* [PATCH net v2 0/2] amd-xgbe: AMD XGBE driver fixes 2014-12-02
@ 2014-12-03 14:36 Tom Lendacky
2014-12-03 14:36 ` [PATCH net v2 1/2] amd-xgbe: Do not clear interrupt indicator Tom Lendacky
2014-12-03 14:36 ` [PATCH net v2 2/2] amd-xgbe: Associate Tx SKB with proper ring descriptor Tom Lendacky
0 siblings, 2 replies; 3+ messages in thread
From: Tom Lendacky @ 2014-12-03 14:36 UTC (permalink / raw)
To: netdev; +Cc: David Miller
The following series of patches includes two bug fixes. Unfortunately,
the first patch will create a conflict when eventually merged into
net-next but should be very easy to resolve.
- Do not clear the interrupt bit in the xgbe_ring_data structure
- Associate a Tx SKB with the proper xgbe_ring_data structure
This patch series is based on net.
Changes from v1:
- Update the commit message associated with the first patch
---
Tom Lendacky (2):
amd-xgbe: Do not clear interrupt indicator
amd-xgbe: Associate Tx SKB with proper ring descriptor
drivers/net/ethernet/amd/xgbe/xgbe-desc.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
--
Tom Lendacky
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH net v2 1/2] amd-xgbe: Do not clear interrupt indicator
2014-12-03 14:36 [PATCH net v2 0/2] amd-xgbe: AMD XGBE driver fixes 2014-12-02 Tom Lendacky
@ 2014-12-03 14:36 ` Tom Lendacky
2014-12-03 14:36 ` [PATCH net v2 2/2] amd-xgbe: Associate Tx SKB with proper ring descriptor Tom Lendacky
1 sibling, 0 replies; 3+ messages in thread
From: Tom Lendacky @ 2014-12-03 14:36 UTC (permalink / raw)
To: netdev; +Cc: David Miller
The interrupt value within the xgbe_ring_data structure is used as an
indicator of which Rx descriptor should have the INTE bit set to
generate an interrupt when that Rx descriptor is used. This bit was
mistakenly cleared when unmapping the associated ring data, effectively
nullifying the ethtool rx-frames support.
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
---
drivers/net/ethernet/amd/xgbe/xgbe-desc.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-desc.c b/drivers/net/ethernet/amd/xgbe/xgbe-desc.c
index 6fc5da0..43b7d2e 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-desc.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-desc.c
@@ -356,7 +356,6 @@ static void xgbe_unmap_skb(struct xgbe_prv_data *pdata,
rdata->tso_header = 0;
rdata->len = 0;
- rdata->interrupt = 0;
rdata->mapped_as_page = 0;
if (rdata->state_saved) {
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH net v2 2/2] amd-xgbe: Associate Tx SKB with proper ring descriptor
2014-12-03 14:36 [PATCH net v2 0/2] amd-xgbe: AMD XGBE driver fixes 2014-12-02 Tom Lendacky
2014-12-03 14:36 ` [PATCH net v2 1/2] amd-xgbe: Do not clear interrupt indicator Tom Lendacky
@ 2014-12-03 14:36 ` Tom Lendacky
1 sibling, 0 replies; 3+ messages in thread
From: Tom Lendacky @ 2014-12-03 14:36 UTC (permalink / raw)
To: netdev; +Cc: David Miller
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>
---
drivers/net/ethernet/amd/xgbe/xgbe-desc.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-desc.c b/drivers/net/ethernet/amd/xgbe/xgbe-desc.c
index 43b7d2e..b15551b 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 */
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-12-03 14:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-03 14:36 [PATCH net v2 0/2] amd-xgbe: AMD XGBE driver fixes 2014-12-02 Tom Lendacky
2014-12-03 14:36 ` [PATCH net v2 1/2] amd-xgbe: Do not clear interrupt indicator Tom Lendacky
2014-12-03 14:36 ` [PATCH net v2 2/2] amd-xgbe: Associate Tx SKB with proper ring descriptor Tom Lendacky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox