From owner-freebsd-current Thu Feb 11 15:51:49 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA07178 for freebsd-current-outgoing; Thu, 11 Feb 1999 15:51:49 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from sirius.ctr.columbia.edu (sirius.ctr.columbia.edu [128.59.64.60]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA07171 for ; Thu, 11 Feb 1999 15:51:38 -0800 (PST) (envelope-from wpaul@ctr.columbia.edu) Received: from startide.ctr.columbia.edu (wpaul@startide.ctr.columbia.edu [128.59.64.52]) by sirius.ctr.columbia.edu (8.9.1/8.6.4.287) with ESMTP id SAA10261 for ; Thu, 11 Feb 1999 18:51:16 -0500 (EST) From: wpaul@ctr.columbia.edu (Bill Paul) Received: (wpaul@localhost) by startide.ctr.columbia.edu (8.9.1/8.6.4.788743) id SAA29185 for freebsd-current@freebsd.org; Thu, 11 Feb 1999 18:51:16 -0500 (EST) Message-Id: <199902112351.SAA29185@startide.ctr.columbia.edu> Subject: Re: 3c905B stops responding during ifconfig alias To: freebsd-current@FreeBSD.ORG Date: Thu, 11 Feb 1999 18:51:15 -0500 (EST) X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Of all the gin joints in all the towns in all the world, tcobb@staff.circle.net had to walk into mine and say: [...] > During an ifconfig xl0 alias, the xl0 interface drops packets. > It does NOT generate errors (netstat -in). > In fact, on several occasions I've seen it go completely > unresponsive (not responding to arp requests) until kicked back > to life by outbound packets. [...] My apologies for not replying to you on this sooner; it took me a while to locate a machine with which I could do some testing (all the 3c905B hardware I have is in the form of embedded chipsets in Dell desktop machines, and they've been moving around on me a lot). > This does NOT happen on the: > xl0: <3Com 3c905 Fast Etherlink XL 10/100BaseTX> rev 0x00 int a irq 10 on I think I found the problem. Currently, xl_stop() and xl_init() both issue RX and TX resets. Seems logical doesn't it? I mean, the purpose of xl_init() is to put the NIC into a known good state, and the purpose of xl_stop() is to slap it in the face and make it shut up ASAP. The difference between the 3c905 and the 3c905B (well, the important difference in this case) is that the 3c905B's chipset has a built-in PHY, while the 3c905 requires an external one (3Com uses a DP83840A for the 3c905 boards, judging by the one sample 3c905 card I have). Apparently, issuing the RX and TX reset commands on the 3c905B causes it to also reset the PHY, which causes the PHY to restart its autonegotiation session with its link partner. It takes a few seconds for the autoneg session to finish, and during this time the 3c905B stops receiving packets. This doesn't happen on the 3c905 because issuing the RX and TX reset commands does not have any affect on the external PHY: the only way to reset the PHY is by writing to the PHY's basic mode control register via the MII management interface. I'm including a patch which should fix this problem. It just disables the code that does the reset in both xl_stop() and xl_init(). Please try this and let me know if it helps. To apply the patch, do the following: - Make sure you have the kernel source code installed under /usr/src. - Save this message to a file, i.e. /tmp/xl.patch - Become root. - Run the following commands: # cd /sys/pci # patch < /tmp/xl.patch - Compile a new kernel and boot it. This patch was generated using a version of if_xl.c from FreeBSD-current, but it should work on any version of the driver with only a couple of mild warnings. -Bill -- ============================================================================= -Bill Paul (212) 854-6020 | System Manager, Master of Unix-Fu Work: wpaul@ctr.columbia.edu | Center for Telecommunications Research Home: wpaul@skynet.ctr.columbia.edu | Columbia University, New York City ============================================================================= "Mulder, toads just fell from the sky!" "I guess their parachutes didn't open." ============================================================================= To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message