[PATCH] powerpc: 85xx: Add PHY fixup to socrates board code

Anton Vorontsov avorontsov at ru.mvista.com
Wed Apr 8 04:40:34 EST 2009


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);
>  

-- 
Anton Vorontsov
email: cbouatmailru at gmail.com
irc://irc.freenode.net/bd2



More information about the Linuxppc-dev mailing list