aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/kirkwood/patches-3.10/0018-net-mv643xx_eth-use-phy_disconnect-instead-of-phy_de.patch
diff options
context:
space:
mode:
authorLuka Perkov <luka@openwrt.org>2013-10-02 00:33:47 +0000
committerLuka Perkov <luka@openwrt.org>2013-10-02 00:33:47 +0000
commit417ec27a08b7019cd0380d9fdbea4680bf7a2fbc (patch)
tree46a17cfdfe54d9f96fdfb53263ba377c738d1bff /target/linux/kirkwood/patches-3.10/0018-net-mv643xx_eth-use-phy_disconnect-instead-of-phy_de.patch
parent882530853b300ddd8abe5917c0b8356280f8356b (diff)
downloadmaster-187ad058-417ec27a08b7019cd0380d9fdbea4680bf7a2fbc.tar.gz
master-187ad058-417ec27a08b7019cd0380d9fdbea4680bf7a2fbc.tar.bz2
master-187ad058-417ec27a08b7019cd0380d9fdbea4680bf7a2fbc.zip
kirkwood: add linux 3.10 support
Backport appropriate patches to allow using device tree only board defintions. Signed-off-by: Jonas Gorski <jogo@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38280 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/kirkwood/patches-3.10/0018-net-mv643xx_eth-use-phy_disconnect-instead-of-phy_de.patch')
-rw-r--r--target/linux/kirkwood/patches-3.10/0018-net-mv643xx_eth-use-phy_disconnect-instead-of-phy_de.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/target/linux/kirkwood/patches-3.10/0018-net-mv643xx_eth-use-phy_disconnect-instead-of-phy_de.patch b/target/linux/kirkwood/patches-3.10/0018-net-mv643xx_eth-use-phy_disconnect-instead-of-phy_de.patch
new file mode 100644
index 0000000000..513ee8990a
--- /dev/null
+++ b/target/linux/kirkwood/patches-3.10/0018-net-mv643xx_eth-use-phy_disconnect-instead-of-phy_de.patch
@@ -0,0 +1,33 @@
+From 40a635881d8fedff7242598cd3bf892e4733f7dc Mon Sep 17 00:00:00 2001
+From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
+Date: Wed, 29 May 2013 21:32:43 +0200
+Subject: [PATCH 18/29] net: mv643xx_eth: use phy_disconnect instead of
+ phy_detach
+
+Using a separated mdio bus driver with mvmdio, phy_detach on network device
+removal will not stop the phy and finally lead to NULL pointer dereference
+in mvmdio due to non-existent network device. Use phy_disconnect instead
+to properly stop phy device from accessing network device prior removal of
+the network device.
+
+Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
+---
+ drivers/net/ethernet/marvell/mv643xx_eth.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c
+index d1cbfb1..748dcd3 100644
+--- a/drivers/net/ethernet/marvell/mv643xx_eth.c
++++ b/drivers/net/ethernet/marvell/mv643xx_eth.c
+@@ -2805,7 +2805,7 @@ static int mv643xx_eth_remove(struct platform_device *pdev)
+
+ unregister_netdev(mp->dev);
+ if (mp->phy != NULL)
+- phy_detach(mp->phy);
++ phy_disconnect(mp->phy);
+ cancel_work_sync(&mp->tx_timeout_task);
+
+ if (!IS_ERR(mp->clk))
+--
+1.8.4.rc1
+