Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Feb 1999 18:51:15 -0500 (EST)
From:      wpaul@ctr.columbia.edu (Bill Paul)
To:        freebsd-current@FreeBSD.ORG
Subject:   Re: 3c905B stops responding during ifconfig alias
Message-ID:  <199902112351.SAA29185@startide.ctr.columbia.edu>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199902112351.SAA29185>