Marcin Koziej
2005-Jun-18 23:56 UTC
re0 "no carrier" problem - Patches found in archives didn't work.
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.
Marcin Koziej
2005-Jun-19 11:16 UTC
re0 "no carrier" problem - Patches found in archives didn't work.
[04:12 19-06-2005] Tom Pepper <tom@blorp.com>> this may seem obvious, but do you still have the same issue if you > statically define the mediatype to a fixed link speed and duplex? > lots of interfaces have problems negotiating autoselect with > switches, as protocols vary widely. the blinking is indicative of > autoselect setup woes...This wasn't obvious for me! Thanks for the answer! When I set the media by hand it showed 'active', but no data could be transmitted (yellow link diode on switch, not blinking). I then pulled the switch with my home lan from the wall and plugged my re0 instead - It worked! So this seems to be the %$R#(@%*$ switch issue. The funny thing is, that with media set manually (or sometimes with autoselect) everything works fine with this switch (i have used it all day yesterday till evening without problem). Now, when i wait some time with media manually set, it starts transmitting data and everything works fine. Why does it happen? Why is it so unpredictible? Can it be fixed in software, or should i throw the switch out the window and by a new one? Thanks and best regards, m.