re0 "no carrier" problem - Patches found in archives didn't work.

Marcin Koziej creep at desk.pl
Sat Jun 18 23:56:20 GMT 2005


Hello. I am running a recent FreeBSD STABLE i386 [lack of nvidia-amd64 :( ] on amd64 Acer Aspire 1525 machine. I have a RealTek 8169SB Single-chip Gigabit Ethernet on rgephy RTL8169S/8110S media interface. 
The card is properly detected by the pci/re driver and shows up in ifconfig, but I'm expereiencing unpredictible problems with setting up link: Sometimes re0 reports it status ''no carrier'', even when everything was working fine a boot before.

A common scenario:
After boot, the status is active and media 'autoselect: 10baseT/UTP <hw-loopback>), but when i try to do anything with the interface (ifconfig re0 up, dhclient re0) it changes to "no carrier" and mode to autoselect (none).

The diode on re0 card's port blinks with yellow light (compared to stable green when working) about once a second. When the blink occures, it also happens on the my switch's diodes where the cable is connected. [They occur in a rapid sequence - the green 'Act' diode first, then 'Link' blinks for a fraction of second after which both go dark]

Sometimes after waiting several minutes it changes to active again. Sometimes not.

It was mentioned before, I have tried patches i could find,
the one from:
http://lists.freebsd.org/pipermail/freebsd-stable/2005-March/013107.html
seems to do what it's supposed to, ie. 

--- from rgephy.c part:
+	if (bmcr & RGEPHY_BMCR_ISO) {
----> this never happens.
+		mii->mii_media_active |= IFM_NONE;
+		mii->mii_media_status = 0;
+		return;
+	}

---- from if_re.c part:
+
+	for (phy = 0; phy < 32; phy++) {
+		bmsr = re_miibus_readreg(dev, phy, MII_BMSR);
+		bmsr = re_miibus_readreg(dev, phy, MII_BMSR);
+		if (!bmsr) continue;
---> goes here with phy = 1
+
+		re_miibus_writereg(dev, phy, MII_BMCR, BMCR_RESET);
+		for (i = 0; i < RL_TIMEOUT; i++) {
+			if (!(re_miibus_readreg(dev, phy, MII_BMCR) &
+			    BMCR_RESET)) break;
+			DELAY(100);
+		}
----> breaks with i = 0
+		re_miibus_writereg(dev, phy, MII_BMCR, BMCR_LOOP);
+
+		break;
+	}

Unfortunately this doesn't fix the problem.

I have also found some additional patches for if_re but i couldn't apply them to stable - if_re.c changed and i wasn't sure how to merge it.

Please help, I spent a week searching for a fix :( I'm eager to check any patch sent, spend the afternoon in ddb, etc. Just tell me what/where to search - my knowledge on network drivers is close to nil.

-- 
m.


More information about the freebsd-stable mailing list