Commit d6f14483 authored by Wolfgang Grandegger's avatar Wolfgang Grandegger Committed by David S. Miller

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: default avatarWolfgang Grandegger <wg@denx.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e11c259f
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment