[PATCH] sungem rework & wake on lan

Benjamin Herrenschmidt benh at kernel.crashing.org
Sat Nov 27 09:03:30 EST 2004


On Fri, 2004-11-26 at 20:07 +0100, Colin Leroy wrote:
> On 26 Nov 2004 at 14h11, Benjamin Herrenschmidt wrote:
> 
> Hi Ben, 
> 
>  	if (found_mii_phy(gp) && gp->phy_mii.def->ops->suspend)
> -		gp->phy_mii.def->ops->suspend(&gp->phy_mii, 0 /* wake on lan options */);
> +		gp->phy_mii.def->ops->suspend(&gp->phy_mii);
> 
> Shouldn't this if() have an "&& !wol" clause ?
> At least it doesn't work without it, and works with it, here on 5221 PHY.
> 
> Thanks for your work. Will post a patch applying to 2.6.9+sleep_patch soon 
> for the possibly interested people.

You are right. It happens to work in both case with the 5201 I have
here, but that may be because the superisolate code doesn't quite work
on it ...

Anyway, I do _not_ intend to keep the driver in this state. I dislike
the fact that I have to udelay() between 10 and 100usec (depending on
the machine) at IRQ time with a spinlock held every second when polling
for the link.

I will move the link poll to task level so it can schedule instead. But
the problem is complex. There is a problem with kenrel autoconfig
(ipconfig) which doesn't schedule and should probably be fixed. Also to
do what I want to do (which is to also switch the clock off when the
iface is up, but the link down), I'll have locking issues with set_mtu()
and set_multicast() calls which happen to be called with a spinlock
held.

Ben.






More information about the Linuxppc-dev mailing list