summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/ibm/emac
diff options
context:
space:
mode:
authorWolfgang Grandegger <wg@grandegger.com>2011-11-17 03:06:44 +0000
committerDavid S. Miller <davem@davemloft.net>2011-11-17 17:04:57 -0500
commitd6f144830bdfa5fcf116e9ab8fc6a60d23fa623d (patch)
tree2d29fcd8a415f8ea5bc5de19018e66639815feff /drivers/net/ethernet/ibm/emac
parente11c259f745889b55bc5596ca78271f2f5cf08d2 (diff)
downloadop-kernel-dev-d6f144830bdfa5fcf116e9ab8fc6a60d23fa623d.zip
op-kernel-dev-d6f144830bdfa5fcf116e9ab8fc6a60d23fa623d.tar.gz
ibm/emac: fix improper cleanup when device is removed to allow re-bind
The re-binding (unbind..bind) of an EMAC device fails because the static variable "busy_phy_map" is not updated when the device is removed. Signed-off-by: Wolfgang Grandegger <wg@denx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ibm/emac')
-rw-r--r--drivers/net/ethernet/ibm/emac/core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ibm/emac/core.c b/drivers/net/ethernet/ibm/emac/core.c
index ed79b2d..2abce96 100644
--- a/drivers/net/ethernet/ibm/emac/core.c
+++ b/drivers/net/ethernet/ibm/emac/core.c
@@ -2924,6 +2924,9 @@ static int __devexit emac_remove(struct platform_device *ofdev)
if (emac_has_feature(dev, EMAC_FTR_HAS_ZMII))
zmii_detach(dev->zmii_dev, dev->zmii_port);
+ busy_phy_map &= ~(1 << dev->phy.address);
+ DBG(dev, "busy_phy_map now %#x" NL, busy_phy_map);
+
mal_unregister_commac(dev->mal, &dev->commac);
emac_put_deps(dev);
OpenPOWER on IntegriCloud