[kernel/f19] Resolves: bz 956732
Neil Horman
nhorman at fedoraproject.org
Tue Jun 18 18:32:54 UTC 2013
commit c48b60cc207c55a6a6a2daa60af38776f9e611a2
Author: Neil Horman <nhorman at tuxdriver.com>
Date: Tue Jun 18 14:32:29 2013 -0400
Resolves: bz 956732
kernel.spec | 9 +++++++++
tulip-dma-debug-error.patch | 32 ++++++++++++++++++++++++++++++++
2 files changed, 41 insertions(+), 0 deletions(-)
---
diff --git a/kernel.spec b/kernel.spec
index ff2633a..9778a77 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -801,6 +801,9 @@ Patch25046: KVM-x86-handle-idiv-overflow-at-kvm_write_tsc.patch
Patch25047: drm-radeon-Disable-writeback-by-default-on-ppc.patch
+#rhbz 956732
+Patch25048: tulip-dma-debug-error.patch
+
# END OF PATCH DEFINITIONS
%endif
@@ -1551,6 +1554,9 @@ ApplyPatch KVM-x86-handle-idiv-overflow-at-kvm_write_tsc.patch
ApplyPatch drm-radeon-Disable-writeback-by-default-on-ppc.patch
+#rhbz 956732
+ApplyPatch tulip-dma-debug-error.patch
+
# END OF PATCH APPLICATIONS
%endif
@@ -2367,6 +2373,9 @@ fi
# and build.
%changelog
+* Tue Jun 18 2013 Neil Horman <nhorman at redhat.com>
+- Fix dma debug error in tulip driver (rhbz 956732)
+
* Tue Jun 18 2013 Dave Jones <davej at redhat.com>
- Disable MTRR sanitizer by default.
diff --git a/tulip-dma-debug-error.patch b/tulip-dma-debug-error.patch
new file mode 100644
index 0000000..0ac631f
--- /dev/null
+++ b/tulip-dma-debug-error.patch
@@ -0,0 +1,32 @@
+commit 2087ac1fc6fd9bbb1f7e16889e984e0af0510b4b
+Author: Neil Horman <nhorman at tuxdriver.com>
+Date: Thu Jun 13 15:25:45 2013 -0400
+
+ tulip: Properly check dma mapping result
+
+ Tulip throws an error when dma debugging is enabled, as it doesn't properly
+ check dma mapping results with dma_mapping_error() durring tx ring refills.
+
+ Easy fix, just add it in, and drop the frame if the mapping is bad
+
+ Signed-off-by: Neil Horman <nhorman at tuxdriver.com>
+ CC: Grant Grundler <grundler at parisc-linux.org>
+ CC: "David S. Miller" <davem at davemloft.net>
+
+diff --git a/drivers/net/ethernet/dec/tulip/interrupt.c b/drivers/net/ethernet/dec/tulip/interrupt.c
+index 28a5e42..92306b3 100644
+--- a/drivers/net/ethernet/dec/tulip/interrupt.c
++++ b/drivers/net/ethernet/dec/tulip/interrupt.c
+@@ -76,6 +76,12 @@ int tulip_refill_rx(struct net_device *dev)
+
+ mapping = pci_map_single(tp->pdev, skb->data, PKT_BUF_SZ,
+ PCI_DMA_FROMDEVICE);
++ if (dma_mapping_error(&tp->pdev->dev, mapping)) {
++ dev_kfree_skb(skb);
++ tp->rx_buffers[entry].skb = NULL;
++ break;
++ }
++
+ tp->rx_buffers[entry].mapping = mapping;
+
+ tp->rx_ring[entry].buffer1 = cpu_to_le32(mapping);
More information about the scm-commits
mailing list