diff options
author | Sergey Ryazanov <ryazanov.s.a@gmail.com> | 2020-09-05 02:51:31 +0300 |
---|---|---|
committer | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2020-09-06 19:49:43 +0200 |
commit | ce3b135243ea6f313eb768a23000a436b8a7b2cc (patch) | |
tree | 74848ecd91b2fc5b8232e85fc01fec77ad5ffd50 /target/linux/ath25/patches-5.4/220-enet_micrel_workaround.patch | |
parent | 36e06497f4612a8b7b341dc3834c7281ac8a9b27 (diff) | |
download | upstream-ce3b135243ea6f313eb768a23000a436b8a7b2cc.tar.gz upstream-ce3b135243ea6f313eb768a23000a436b8a7b2cc.tar.bz2 upstream-ce3b135243ea6f313eb768a23000a436b8a7b2cc.zip |
ath25: eth: fix crash on skb DMA (un-)map
AR2315 Ethernet driver pass NULL instead of a real device pointer to DMA
(un-)map calls. With kernel version 5.4 such behaviour causes a kernel
panic. Fix this issue by preserving device pointer during the probe
procedure and pass it to each skb data DMA (un-)map call.
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Diffstat (limited to 'target/linux/ath25/patches-5.4/220-enet_micrel_workaround.patch')
-rw-r--r-- | target/linux/ath25/patches-5.4/220-enet_micrel_workaround.patch | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/target/linux/ath25/patches-5.4/220-enet_micrel_workaround.patch b/target/linux/ath25/patches-5.4/220-enet_micrel_workaround.patch index 91b9792515..9051e1b466 100644 --- a/target/linux/ath25/patches-5.4/220-enet_micrel_workaround.patch +++ b/target/linux/ath25/patches-5.4/220-enet_micrel_workaround.patch @@ -41,7 +41,7 @@ static int ar231x_probe(struct platform_device *pdev) { struct net_device *dev; -@@ -273,6 +300,24 @@ static int ar231x_probe(struct platform_ +@@ -274,6 +301,24 @@ static int ar231x_probe(struct platform_ mdiobus_register(sp->mii_bus); @@ -66,7 +66,7 @@ if (ar231x_mdiobus_probe(dev) != 0) { printk(KERN_ERR "%s: mdiobus_probe failed\n", dev->name); rx_tasklet_cleanup(dev); -@@ -326,8 +371,10 @@ static int ar231x_remove(struct platform +@@ -327,8 +372,10 @@ static int ar231x_remove(struct platform rx_tasklet_cleanup(dev); ar231x_init_cleanup(dev); unregister_netdev(dev); @@ -79,7 +79,7 @@ kfree(dev); return 0; } -@@ -870,7 +917,8 @@ static int ar231x_open(struct net_device +@@ -871,7 +918,8 @@ static int ar231x_open(struct net_device sp->eth_regs->mac_control |= MAC_CONTROL_RE; @@ -89,7 +89,7 @@ return 0; } -@@ -951,7 +999,8 @@ static int ar231x_close(struct net_devic +@@ -952,7 +1000,8 @@ static int ar231x_close(struct net_devic #endif @@ -99,7 +99,7 @@ return 0; } -@@ -995,6 +1044,9 @@ static int ar231x_ioctl(struct net_devic +@@ -996,6 +1045,9 @@ static int ar231x_ioctl(struct net_devic { struct ar231x_private *sp = netdev_priv(dev); |