Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
ed14df08
Commit
ed14df08
authored
Jan 08, 2005
by
Ganesh Venkatesan
Committed by
Jeff Garzik
Jan 08, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] ixgb: Fix Tx cleanup logic
Signed-off-by:
Ganesh Venkatesan
<
ganesh.venkatesan@intel.com
>
parent
46964350
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
29 deletions
+21
-29
drivers/net/ixgb/ixgb_main.c
drivers/net/ixgb/ixgb_main.c
+21
-29
No files found.
drivers/net/ixgb/ixgb_main.c
View file @
ed14df08
...
...
@@ -865,6 +865,24 @@ ixgb_free_tx_resources(struct ixgb_adapter *adapter)
adapter
->
tx_ring
.
desc
=
NULL
;
}
static
inline
void
ixgb_unmap_and_free_tx_resource
(
struct
ixgb_adapter
*
adapter
,
struct
ixgb_buffer
*
buffer_info
)
{
struct
pci_dev
*
pdev
=
adapter
->
pdev
;
if
(
buffer_info
->
dma
)
{
pci_unmap_page
(
pdev
,
buffer_info
->
dma
,
buffer_info
->
length
,
PCI_DMA_TODEVICE
);
buffer_info
->
dma
=
0
;
}
if
(
buffer_info
->
skb
)
{
dev_kfree_skb_any
(
buffer_info
->
skb
);
buffer_info
->
skb
=
NULL
;
}
}
/**
* ixgb_clean_tx_ring - Free Tx Buffers
* @adapter: board private structure
...
...
@@ -874,7 +892,6 @@ static void ixgb_clean_tx_ring(struct ixgb_adapter *adapter)
{
struct
ixgb_desc_ring
*
tx_ring
=
&
adapter
->
tx_ring
;
struct
ixgb_buffer
*
buffer_info
;
struct
pci_dev
*
pdev
=
adapter
->
pdev
;
unsigned
long
size
;
unsigned
int
i
;
...
...
@@ -882,16 +899,7 @@ static void ixgb_clean_tx_ring(struct ixgb_adapter *adapter)
for
(
i
=
0
;
i
<
tx_ring
->
count
;
i
++
)
{
buffer_info
=
&
tx_ring
->
buffer_info
[
i
];
if
(
buffer_info
->
skb
)
{
pci_unmap_page
(
pdev
,
buffer_info
->
dma
,
buffer_info
->
length
,
PCI_DMA_TODEVICE
);
dev_kfree_skb
(
buffer_info
->
skb
);
buffer_info
->
skb
=
NULL
;
}
ixgb_unmap_and_free_tx_resource
(
adapter
,
buffer_info
);
}
size
=
sizeof
(
struct
ixgb_buffer
)
*
tx_ring
->
count
;
...
...
@@ -1660,7 +1668,6 @@ static boolean_t ixgb_clean_tx_irq(struct ixgb_adapter *adapter)
{
struct
ixgb_desc_ring
*
tx_ring
=
&
adapter
->
tx_ring
;
struct
net_device
*
netdev
=
adapter
->
netdev
;
struct
pci_dev
*
pdev
=
adapter
->
pdev
;
struct
ixgb_tx_desc
*
tx_desc
,
*
eop_desc
;
struct
ixgb_buffer
*
buffer_info
;
unsigned
int
i
,
eop
;
...
...
@@ -1681,24 +1688,9 @@ static boolean_t ixgb_clean_tx_irq(struct ixgb_adapter *adapter)
IXGB_TX_DESC_POPTS_IXSM
))
adapter
->
hw_csum_tx_good
++
;
if
(
buffer_info
->
dma
)
{
pci_unmap_page
(
pdev
,
buffer_info
->
dma
,
buffer_info
->
length
,
PCI_DMA_TODEVICE
);
buffer_info
->
dma
=
0
;
}
if
(
buffer_info
->
skb
)
{
dev_kfree_skb_any
(
buffer_info
->
skb
);
buffer_info
->
skb
=
NULL
;
}
ixgb_unmap_and_free_tx_resource
(
adapter
,
buffer_info
);
*
(
uint32_t
*
)
&
(
tx_desc
->
status
)
=
0
;
*
(
uint32_t
*
)
&
(
tx_desc
->
status
)
=
0
;
cleaned
=
(
i
==
eop
);
if
(
++
i
==
tx_ring
->
count
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment