diff options
author | Lendacky, Thomas <Thomas.Lendacky@amd.com> | 2014-12-03 01:16:54 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-12-09 19:15:42 +0100 |
commit | c153031773887fca473d25a2854cc37bd946c010 (patch) | |
tree | a017e63d3e95fee8ad1d98ead741305fcbac07e1 /drivers | |
parent | amd-xgbe: Do not clear interrupt indicator (diff) | |
download | linux-c153031773887fca473d25a2854cc37bd946c010.tar.xz linux-c153031773887fca473d25a2854cc37bd946c010.zip |
amd-xgbe: Associate Tx SKB with proper ring descriptor
The SKB for a Tx packet is associated with an xgbe_ring_data structure
in the xgbe_map_tx_skb function. However, it is being saved in the
structure after the last structure used when the SKB is mapped. Use
the last used structure to save the SKB value.
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/amd/xgbe/xgbe-desc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-desc.c b/drivers/net/ethernet/amd/xgbe/xgbe-desc.c index 43b7d2e948f7..b15551bad7fa 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-desc.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-desc.c @@ -480,7 +480,11 @@ static int xgbe_map_tx_skb(struct xgbe_channel *channel, struct sk_buff *skb) } } - /* Save the skb address in the last entry */ + /* Save the skb address in the last entry. We always have some data + * that has been mapped so rdata is always advanced past the last + * piece of mapped data - use the entry pointed to by cur_index - 1. + */ + rdata = XGBE_GET_DESC_DATA(ring, cur_index - 1); rdata->skb = skb; /* Save the number of descriptor entries used */ |