Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Aug 1998 14:23:35 +0400
From:      "Vasily V. Grechishnikov" <bazilio@monitord.vrn.ru>
To:        "Bill Paul" <wpaul@skynet.ctr.columbia.edu>
Cc:        <freebsd-hackers@FreeBSD.ORG>
Subject:   Re: Some errors in XL driver ?
Message-ID:  <000801bdc6a4$6e6fd180$0a64a8c0@baz_station.monitord.vrn.ru>

next in thread | raw e-mail | index | archive | help

-----Original Message-----
From: Bill Paul <wpaul@skynet.ctr.columbia.edu>
To: Vasily V. Grechishnikov <bazilio@monitord.vrn.ru>
Cc: hackers@freebsd.org <hackers@freebsd.org>
Date: 12 августа 1998 г. 1:01
Subject: Re: Some errors in XL driver ?


>Of all the gin joints in all the towns in all the world, Vasily V.
>Grechishnikov had to walk into mine and say:
>
>>                 Hi !
>>     Today I had to test 3C905 NIC. After downloading XL driver
>> from www.freebsd.org/~/wpaul I had strange results. NIC detection
>> and autonegotiation works fine but some performance problem
>> occured - 380-400Kb/s at 10Mbps. After looking at network
>> statistic I saw very high Ierrs count. Here netstat -ni from my
>> test box running 2.2.7-RELEASE after downloading 12MB
>> file from local ftp. Whats happen ?
>>
>> Name  Mtu   Network       Address            Ipkts Ierrs    Opkts Oerrs
>> Coll
>> xl0   1500  <Link>      00.a0.24.4d.c3.3b     9305  1757     4113     0
>> 0
>> xl0   1500  192.168.100   192.168.100.245     9305  1757     4113     0
>> 0

Now my 3c905B works nicely.
netstat -ni after applying patch listed below:
Name  Mtu   Network       Address            Ipkts Ierrs    Opkts Oerrs
Coll
xl0   1500  <Link>      00.10.4b.06.a7.55     9083     4     4018  1565
332
xl0   1500  192.168.100   192.168.100.245     9083     4     4018  1565
332
lp0*  1500  <Link>                               0     0        0     0
0
tun0* 1500  <Link>                               0     0        0     0
0
sl0*  552   <Link>                               0     0        0     0
0
ppp0* 1500  <Link>                               0     0        0     0
0
lo0   16384 <Link>                              26     0       26     0
0
lo0   16384 127           127.0.0.1             26     0       26     0
0

>
>Aieeee! I think I found the cause of this problem. The autonegotiation
>code is setting the modes incorrectly. Please try to fix this using
>one of the following methods:
>
>- Force the card to 10mbps/half-duplex mode using the following command:
> # ifconfig xl0 media 10baseT/UTP mediaopt half-duplex
>  This is just to see if setting the mode correctly clears up the
>  problem. If so, do one of the next to things.
>
>- Apply the following patch to if_xl.c, recompile your kernel, and
>  reboot:
>
>--- if_xl.c 1998/08/11 02:13:59 1.33
>+++ if_xl.c 1998/08/11 15:26:28
>@@ -796,13 +796,13 @@
> ability & PHY_ANAR_10BTFULL) {
> ifm->ifm_media = IFM_ETHER|IFM_10_T|IFM_FDX;
> media &= ~PHY_BMCR_SPEEDSEL;
>- media &= ~PHY_BMCR_DUPLEX;
>+ media |= PHY_BMCR_DUPLEX;
> printf("(full-duplex, 10Mbps)\n");
> } else if (advert & PHY_ANAR_10BTHALF &&
> ability & PHY_ANAR_10BTHALF) {
> ifm->ifm_media = IFM_ETHER|IFM_10_T|IFM_HDX;
> media &= ~PHY_BMCR_SPEEDSEL;
>- media |= PHY_BMCR_DUPLEX;
>+ media &= ~PHY_BMCR_DUPLEX;
> printf("(half-duplex, 10Mbps)\n");
> }
>
>
>- Download a new copy of if_xl.c from www.freebsd.org/~wpaul/3Com,
>  recompile your kernel and reboot.
>
>As you can see, I transposed a couple of lines: the chip is detecting
>the right modes, but the code later sets the duplex mode incorrectly.
>I'm not sure how this crept in, but it explains the poor performance
>at 10Mbps: if you set the duplex bit incorrectly, the card behaves
>very strangely. I didn't notice this initially because the machine I
>use for 10Mbps testing has a 3c900 card, which does not have a PHY,
>hance the autoneg code is never used. The other code in xl_setmode_mii()
>which manually sets the chip modes gets this right, which is why
>setting the mode manually works.
>
>I apologize for this stupid mistake; that's what I get for not doing
>proper testing. Naturally, at 100Mbps, which is what my 3c905B test
>machines were set for, it works right.
>
>[chop]
>
>> dmesg output (disabled XL_USEIOSPACE), else if this variable
>> defined we has supplement warning xl0: command never completed!:
>
>[chop]
>
>This I want to know more about. It anybody else sees this, please
>let me know. Try to show me where the warning appears and whether or
>not it affects the operation of the NIC.
>
>-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
>===========================================================================
==
> "It is not I who am crazy; it is I who am mad!" - Ren Hoek, "Space
Madness"
>===========================================================================
==
>
>



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000801bdc6a4$6e6fd180$0a64a8c0>