Fix broken skge driver (rhbz 1008328)

This commit is contained in:
Josh Boyer 2013-09-20 10:36:00 -04:00
parent 80641a0bb8
commit 2f00632219
2 changed files with 69 additions and 0 deletions

View File

@ -0,0 +1,62 @@
From c194992cbe71c20bb3623a566af8d11b0bfaa721 Mon Sep 17 00:00:00 2001
From: Mikulas Patocka <mpatocka@redhat.com>
Date: Thu, 19 Sep 2013 14:13:17 -0400
Subject: [PATCH] skge: fix broken driver
The patch 136d8f377e1575463b47840bc5f1b22d94bf8f63 broke the skge driver.
Note this part of the patch:
+ if (skge_rx_setup(skge, e, nskb, skge->rx_buf_size) < 0) {
+ dev_kfree_skb(nskb);
+ goto resubmit;
+ }
+
pci_unmap_single(skge->hw->pdev,
dma_unmap_addr(e, mapaddr),
dma_unmap_len(e, maplen),
PCI_DMA_FROMDEVICE);
skb = e->skb;
prefetch(skb->data);
- skge_rx_setup(skge, e, nskb, skge->rx_buf_size);
The function skge_rx_setup modifies e->skb to point to the new skb. Thus,
after this change, the new buffer, not the old, is returned to the
networking stack.
This bug is present in kernels 3.11, 3.11.1 and 3.12-rc1. The patch should
be queued for 3.11-stable.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Reported-by: Mikulas Patocka <mpatocka@redhat.com>
Reported-by: Vasiliy Glazov <vascom2@gmail.com>
Tested-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
drivers/net/ethernet/marvell/skge.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/marvell/skge.c b/drivers/net/ethernet/marvell/skge.c
index ef94a59..1a9c4f6 100644
--- a/drivers/net/ethernet/marvell/skge.c
+++ b/drivers/net/ethernet/marvell/skge.c
@@ -3092,6 +3092,9 @@ static struct sk_buff *skge_rx_get(struct net_device *dev,
if (!nskb)
goto resubmit;
+ skb = e->skb;
+ prefetch(skb->data);
+
if (skge_rx_setup(skge, e, nskb, skge->rx_buf_size) < 0) {
dev_kfree_skb(nskb);
goto resubmit;
@@ -3101,8 +3104,6 @@ static struct sk_buff *skge_rx_get(struct net_device *dev,
dma_unmap_addr(e, mapaddr),
dma_unmap_len(e, maplen),
PCI_DMA_FROMDEVICE);
- skb = e->skb;
- prefetch(skb->data);
}
skb_put(skb, len);
--
1.8.3.1

View File

@ -763,6 +763,9 @@ Patch25104: ansi_cprng-Fix-off-by-one-error-in-non-block-size-request.patch
#rhbz 928561
Patch25105: 0001-HID-kye-Add-report-fixup-for-Genius-Gx-Imperator-Key.patch
#rhbz 1008323
Patch25106: 0001-skge-fix-broken-driver.patch
#rhbz 997705
Patch25110: rpc-clean-up-decoding-of-gssproxy-linux-creds.patch
Patch25111: rpc-comment-on-linux_cred-encoding-treat-all-as-unsigned.patch
@ -1486,6 +1489,9 @@ ApplyPatch rpc-comment-on-linux_cred-encoding-treat-all-as-unsigned.patch
ApplyPatch rpc-fix-huge-kmallocs-in-gss-proxy.patch
ApplyPatch rpc-let-xdr-layer-allocate-gssproxy-receieve-pages.patch
#rhbz 1008323
ApplyPatch 0001-skge-fix-broken-driver.patch
# END OF PATCH APPLICATIONS
%endif
@ -2299,6 +2305,7 @@ fi
%changelog
* Fri Sep 20 2013 Josh Boyer <jwboyer@fedoraproject.org>
- Fix broken skge driver (rhbz 1008328)
- Fix large order rpc allocations (rhbz 997705)
- Fix multimedia keys on Genius GX keyboard (rhbz 928561)