[prev in list] [next in list] [prev in thread] [next in thread]
List: freebsd-hackers
Subject: if_rl.c autoneg fix
From: TD790 () aol ! com
Date: 2002-01-30 18:52:18
[Download RAW message or body]
The problem I was having with the if_rl driver not working properly when
connected to a 10Mb hub (ie no link partner capabilities) can be fixed by
removing a line with a cryptic comment about broken autonegotiation.
in the file /sys/dev/mii/rlphy.c:
void
rlphy_reset(sc)
struct mii_softc *sc;
{
mii_phy_reset(sc);
/*
* XXX RealTek PHY doesn't set the BMCR properly after
* XXX reset, which breaks autonegotiation.
*/
/*
PHY_WRITE(sc, MII_BMCR, BMCR_S100|BMCR_AUTOEN|BMCR_FDX);
*/
}
taking out the PHY_WRITE repairs autonegotiation in all modes tested. The
line sets the BMCR_AUTOEN flag, which causes the phy_mediachg() call in
rl_reset to have no effect (in that the driver thinks its already doing
autoneg). Taking the line out causes mii_phy_auto() to be called correctly.
ifconfig still reports (none), but the port works properly without a manual
media setting.
Does anyone know the reasoning being the line being added originally? Perhaps
a conditional is required if it was required for older controllers for some
reason.
Dennis
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic