From c48b60cc207c55a6a6a2daa60af38776f9e611a2 Mon Sep 17 00:00:00 2001 From: Neil Horman Date: Tue, 18 Jun 2013 14:32:29 -0400 Subject: [PATCH] Resolves: bz 956732 --- kernel.spec | 9 +++++++++ tulip-dma-debug-error.patch | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 tulip-dma-debug-error.patch diff --git a/kernel.spec b/kernel.spec index ff2633ab9..9778a77d8 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 +- Fix dma debug error in tulip driver (rhbz 956732) + * Tue Jun 18 2013 Dave Jones - Disable MTRR sanitizer by default. diff --git a/tulip-dma-debug-error.patch b/tulip-dma-debug-error.patch new file mode 100644 index 000000000..0ac631f0d --- /dev/null +++ b/tulip-dma-debug-error.patch @@ -0,0 +1,32 @@ +commit 2087ac1fc6fd9bbb1f7e16889e984e0af0510b4b +Author: Neil Horman +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 + CC: Grant Grundler + CC: "David S. Miller" + +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);