]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
phylib: Fix auto-negotiation restart avoidance
authorTrent Piepho <tpiepho@freescale.com>
Wed, 19 Nov 2008 23:52:41 +0000 (15:52 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Nov 2008 23:52:41 +0000 (15:52 -0800)
commitde339c2aa7fea18410b1abeab5674bfbd4073a63
tree07b2d6c08d5fa9b3400fc00a286654dd06b5461a
parent31c221c49f92d17632e0d662eb62a27e8b425805
phylib: Fix auto-negotiation restart avoidance

A previous patch, 51e2a3846eab18711f4eb59cd0a4c33054e2980a, made
genphy_config_aneg() not restart aneg by calling genphy_restart_aneg() if
the advertisement hadn't changed.

But, genphy_restart_aneg() doesn't just restart aneg, it may also *enable*
aneg or un-isolate the PHY from the MII (those functions are controlled by
the same register).  The code to avoid calling genphy_restart_aneg() didn't
consider this.

So, modify genphy_config_aneg() to also check if the PHY needs to have aneg
enabled or be un-isolated before deciding not to restart aneg.

This caused a problem with certain Davicom PHYs, as that driver isolates
the PHY (why?) before calling genphy_config_aneg() and expects the PHY to
be un-isolated by that function.

Signed-off-by: Trent Piepho <tpiepho@freescale.com>
Reported-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy_device.c