Message ID | 20090407180957.GA2831@oksana.dev.rtsoft.ru (mailing list archive) |
---|---|
State | Not Applicable, archived |
Delegated to: | Kumar Gala |
Headers | show |
On Tue, Apr 07, 2009 at 10:09:57PM +0400, Anton Vorontsov wrote: [...] > Still, I think you shouldn't do this in a board-specific fixup. > Maybe I'm a bit naive, but shouldn't this work too? Yes, I'm naive. The phydev isn't yet bound to any driver, so we can't call phy_disable_interrupts(). And I don't see any proper solution. :-( After all, it appears we'll have to live with the board fixup. > diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c > index b754020..9052937 100644 > --- a/drivers/net/phy/mdio_bus.c > +++ b/drivers/net/phy/mdio_bus.c > @@ -205,6 +205,16 @@ struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr) > > phydev->bus = bus; > > + /* > + * Some PHYs may have unmasked/pending interrupts, this might > + * cause troubles w/ shared IRQs. So try to put the PHYs into > + * some sane state. > + * > + * NOTE: This won't work if you have two PHYs w/ shared IRQs > + * on different MDIO buses. > + */ > + phy_disable_interrupts(phydev); > + > /* Run all of the fixups for this PHY */ > phy_scan_fixups(phydev); >
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index b754020..9052937 100644 --- a/drivers/net/phy/mdio_bus.c +++ b/drivers/net/phy/mdio_bus.c @@ -205,6 +205,16 @@ struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr) phydev->bus = bus; + /* + * Some PHYs may have unmasked/pending interrupts, this might + * cause troubles w/ shared IRQs. So try to put the PHYs into + * some sane state. + * + * NOTE: This won't work if you have two PHYs w/ shared IRQs + * on different MDIO buses. + */ + phy_disable_interrupts(phydev); + /* Run all of the fixups for this PHY */ phy_scan_fixups(phydev);