* [PATCH net-next] ibm/emac: fix improper cleanup when device is removed to allow re-bind
@ 2011-11-17 13:06 Wolfgang Grandegger
2011-11-17 22:05 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Wolfgang Grandegger @ 2011-11-17 13:06 UTC (permalink / raw)
To: Netdev; +Cc: Linuxppc-dev
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>
---
drivers/net/ethernet/ibm/emac/core.c | 3 +++
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);
--
1.7.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] ibm/emac: fix improper cleanup when device is removed to allow re-bind
2011-11-17 13:06 [PATCH net-next] ibm/emac: fix improper cleanup when device is removed to allow re-bind Wolfgang Grandegger
@ 2011-11-17 22:05 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-11-17 22:05 UTC (permalink / raw)
To: wg; +Cc: Netdev, Linuxppc-dev
From: Wolfgang Grandegger <wg@grandegger.com>
Date: Thu, 17 Nov 2011 14:06:44 +0100
> 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>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-11-17 22:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-17 13:06 [PATCH net-next] ibm/emac: fix improper cleanup when device is removed to allow re-bind Wolfgang Grandegger
2011-11-17 22:05 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).