From owner-freebsd-stable@FreeBSD.ORG Sat Jun 18 23:56:20 2005 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6760E16A41C for ; Sat, 18 Jun 2005 23:56:20 +0000 (GMT) (envelope-from creep@daedalus.desk.pl) Received: from daedalus.desk.pl (daedalus.desk.pl [62.233.238.17]) by mx1.FreeBSD.org (Postfix) with ESMTP id E178843D1F for ; Sat, 18 Jun 2005 23:56:19 +0000 (GMT) (envelope-from creep@daedalus.desk.pl) Received: from localhost (localhost [127.0.0.1]) by daedalus.desk.pl (Postfix) with ESMTP id 45993366667 for ; Sun, 19 Jun 2005 01:49:22 +0200 (CEST) Received: from daedalus.desk.pl ([127.0.0.1]) by localhost (daedalus [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 03817-05 for ; Sun, 19 Jun 2005 01:49:21 +0200 (CEST) Received: by daedalus.desk.pl (Postfix, from userid 1023) id 209FD36650A; Sun, 19 Jun 2005 01:49:21 +0200 (CEST) Date: Sun, 19 Jun 2005 01:49:21 +0200 From: Marcin Koziej To: freebsd-stable@freebsd.org Message-ID: <20050618234921.GA1740@daedalus.desk.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline User-Agent: Mutt/1.4.1i X-Antivirus: Skaner Antywirusowy DESK.pl Subject: re0 "no carrier" problem - Patches found in archives didn't work. X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jun 2005 23:56:20 -0000 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 ), 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.