aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/i825xx/sni_82596.c
diff options
context:
space:
mode:
authorThomas Bogendoerfer <tbogendoerfer@suse.de>2019-10-15 16:42:45 +0200
committerDavid S. Miller <davem@davemloft.net>2019-10-15 20:50:05 -0700
commit61c1d33daf7b5146f44d4363b3322f8cda6a6c43 (patch)
tree2053e0eeb840b5ce9cb5be8056971d6e4566af3c /drivers/net/ethernet/i825xx/sni_82596.c
parentsctp: change sctp_prot .no_autobind with true (diff)
downloadlinux-dev-61c1d33daf7b5146f44d4363b3322f8cda6a6c43.tar.xz
linux-dev-61c1d33daf7b5146f44d4363b3322f8cda6a6c43.zip
net: i82596: fix dma_alloc_attr for sni_82596
Commit 7f683b920479 ("i825xx: switch to switch to dma_alloc_attrs") switched dma allocation over to dma_alloc_attr, but didn't convert the SNI part to request consistent DMA memory. This broke sni_82596 since driver doesn't do dma_cache_sync for performance reasons. Fix this by using different DMA_ATTRs for lasi_82596 and sni_82596. Fixes: 7f683b920479 ("i825xx: switch to switch to dma_alloc_attrs") Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/i825xx/sni_82596.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/i825xx/sni_82596.c b/drivers/net/ethernet/i825xx/sni_82596.c
index 6eb6c2ff7f09..6436a98c5953 100644
--- a/drivers/net/ethernet/i825xx/sni_82596.c
+++ b/drivers/net/ethernet/i825xx/sni_82596.c
@@ -24,6 +24,8 @@
static const char sni_82596_string[] = "snirm_82596";
+#define LIB82596_DMA_ATTR 0
+
#define DMA_WBACK(priv, addr, len) do { } while (0)
#define DMA_INV(priv, addr, len) do { } while (0)
#define DMA_WBACK_INV(priv, addr, len) do { } while (0)
@@ -152,7 +154,7 @@ static int sni_82596_driver_remove(struct platform_device *pdev)
unregister_netdev(dev);
dma_free_attrs(dev->dev.parent, sizeof(struct i596_private), lp->dma,
- lp->dma_addr, DMA_ATTR_NON_CONSISTENT);
+ lp->dma_addr, LIB82596_DMA_ATTR);
iounmap(lp->ca);
iounmap(lp->mpu_port);
free_netdev (dev);