Date: Wed, 30 Jan 2002 18:52:18 EST From: TD790@aol.com To: hackers@freebsd.org Subject: if_rl.c autoneg fix Message-ID: <10d.c9ea21f.2989e132@aol.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?10d.c9ea21f.2989e132>