From vortex-admin@scyld.com  Mon Dec 30 10:38:08 2002
Return-Path: <vortex-admin@scyld.com>
Received: from blueraja.scyld.com (dsl093-058-083.blt1.dsl.speakeasy.net [66.93.58.83])
	by scortch.unisrv.net (8.12.6/8.12.6) with ESMTP id gBUGc7O4029513
	for <pez@apocalyptech.com>; Mon, 30 Dec 2002 10:38:07 -0600
Received: from dsl093-058-083.blt1.dsl.speakeasy.net (localhost.localdomain [127.0.0.1])
	by blueraja.scyld.com (8.11.6/8.11.6) with ESMTP id gBUGaQG06045;
	Mon, 30 Dec 2002 11:36:26 -0500
Received: from scortch.unisrv.net (scortch.unisrv.net [24.123.88.66])
	by blueraja.scyld.com (8.11.6/8.11.6) with ESMTP id gBUGY2G05866
	for <vortex@scyld.com>; Mon, 30 Dec 2002 11:34:03 -0500
Received: from scortch.unisrv.net (localhost [127.0.0.1])
	by scortch.unisrv.net (8.12.6/8.12.6) with ESMTP id gBUGY1O4027288
	for <vortex@scyld.com>; Mon, 30 Dec 2002 10:34:01 -0600
Received: (from pez@localhost)
	by scortch.unisrv.net (8.12.6/8.12.6/Submit) id gBUGY0KX027276
	for vortex@scyld.com; Mon, 30 Dec 2002 10:34:00 -0600
From: CJ Kucera <pez@apocalyptech.com>
To: vortex@scyld.com
Message-ID: <20021230103400.B1817@unisrv.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5.1i
Subject: [vortex] Problems detecting 100Mbps with 3c59x (Vortex)
Sender: vortex-admin@scyld.com
Errors-To: vortex-admin@scyld.com
X-BeenThere: vortex@scyld.com
X-Mailman-Version: 2.0.6
Precedence: bulk
List-Help: <mailto:vortex-request@scyld.com?subject=help>
List-Post: <mailto:vortex@scyld.com>
List-Subscribe: <http://www.scyld.com/mailman/listinfo/vortex>,
	<mailto:vortex-request@scyld.com?subject=subscribe>
List-Id: Discussions about the Linux drivers for 3Com PCI Ethernet adapters. <vortex.scyld.com>
List-Unsubscribe: <http://www.scyld.com/mailman/listinfo/vortex>,
	<mailto:vortex-request@scyld.com?subject=unsubscribe>
List-Archive: <http://www.scyld.com/pipermail/vortex/>
X-Original-Date: Mon, 30 Dec 2002 10:34:00 -0600
Date: Mon, 30 Dec 2002 10:34:00 -0600
Status: RO
Content-Length: 11358
Lines: 236

Hello, everyone...

I've got a couple of "3c595 100BaseTX [Vortex]" cards which have to be
coerced very strongly into believing they're on a 100BaseTx-FD network.
I've got a 100Mbps hub/swtich (just some cheap thing from Netgear) which
works fine for my other 100Mbps network cards (my other PCs autodetect
the rate just fine).  Here's the output from mii-diag on another PC on
the network plugged into the same switch as the 3c595 card:

> Using the default interface 'eth0'.
> Basic registers of MII PHY #1:  1000 782d 02a8 0150 05e1 45e1 0001 ffff.
>  The autonegotiated capability is 01e0.
> The autonegotiated media type is 100baseTx-FD.
>  Basic mode control register 0x1000: Auto-negotiation enabled.
>  You have link beat, and everything is working OK.
>  Your link partner advertised 45e1: Flow-control 100baseTx-FD 100baseTx 10baseT-FD 10baseT, w/ 802.3X flow control.
>    End of basic transceiver information.

I tried swapping cables with one that I know works fine on the network,
and most recently I've moved one of the cards to another PC, just to make
sure that the problem wasn't with the PC itself.  Here's the card's entry
from /proc/pci:

>   Bus  0, device   9, function  0:
>     Ethernet controller: 3Com Corporation 3c595 100BaseTX [Vortex] (rev 0).
>       IRQ 10.
>       Master Capable.  Latency=32.  Min Gnt=3.Max Lat=8.
>       I/O at 0xb800 [0xb81f].

This is on a Linux Debian system running kernel 2.4.20.  The box the card
is currently in is a 233MHz Cyrix MII processor; the other machine is
a 90MHz Pentium.

At first, I was using the 3c59x driver included in the sources for the
2.4.20 kernel, which reports its version as "LK1.1.16."  Using these
sources, I could *not* get the card to respond to 100Mbps traffic at all.
The link light on the card itself was stuck at 10Mbps.  I have tried both
using the driver as a module and compiled directly into the kernel.
Since the autodetection wasn't working, I tried passing options into the
module as "options=4 full_duplex=1."  When inserting the module, things
looked promising:

> 3c59x: Donald Becker and others. www.scyld.com/network/vortex.html
> 00:09.0: 3Com PCI 3c595 Vortex 100baseTx at 0xb800. Vers LK1.1.16
> 00:09.0: Overriding PCI latency timer (CFLT) setting of 32, new value is 248.
> 00:09.0:  Media override to transceiver type 4 (100baseTX).

However, running "mii-diag -v" produced less than stellar results:

> mii-diag.c:v2.07 11/15/2002 Donald Becker (becker@scyld.com)
>  http://www.scyld.com/diag/index.html
>   Using the new SIOCGMIIPHY value on PHY 0 (BMCR 0x0000).
>  The autonegotiated capability is 0000.
> No common media type was autonegotiated!
> This is extremely unusual and typically indicates a configuration error.
> Perhaps the advertised capability set was intentionally limited.
>  Basic mode control register 0x0000: Auto-negotiation disabled, with
>  Speed fixed at 10 mbps, half-duplex.
>  Basic mode status register 0xffff ... ffff.
>    Link status: established.
>    This transceiver is capable of  100baseT4 100baseTx-FD 100baseTx 10baseT-FD 10baseT.
>    Able to perform Auto-negotiation, negotiation complete.
>  Remote fault detected!
>    *** Link Jabber! ***
>  Your link partner advertised ffff: Flow-control 100baseT4 100baseTx-FD 100baseTx 10baseT-FD 10baseT, w/ 802.3X flow control.
>    End of basic transceiver information.
> 
>  MII PHY #0 transceiver registers:
>    0000 ffff 0000 ffff 0000 ffff 0000 ffff
>    0000 ffff 0000 ffff 0000 ffff 0000 ffff
>    0000 ffff 0000 ffff 0000 ffff 0000 ffff
>    0000 ffff 0000 ffff 0000 ffff 0000 ffff

So there's definitely some kind of problem there.  Running
"vortex-diag -aef", I notice that it gives me conflicting kinds of
transceivers:

> vortex-diag.c:v2.13a 12/15/2002 Donald Becker (becker@scyld.com)
>  http://www.scyld.com/diag/index.html
> Index #1: Found a 3Com 3c595 Vortex 10/100baseTx adapter at 0xb800.
>  Station address 00:a0:24:a4:2b:2b.
>   Receive mode is 0x07: Normal unicast and all multicast.
> Initial window 4, registers values by window:
>   Window 0: 0000 0000 0000 0000 0000 00bf 0000 0000.
>   Window 1: ffff 02d5 0000 0c80 0001 8882 0200 8000.
>   Window 2: a000 a424 2b2b 0000 0000 0000 00de 4000.
>   Window 3: 001b 0041 0000 0020 e10a bfff 3fff 6000.
>   Window 4: 0000 02d5 0000 0c80 0001 8882 0200 8000.
>   Window 5: 1ffc 1ffc 00de 1ffc 0007 02de 00de a000.
>   Window 6: 0000 0000 0000 5f00 0000 16d5 0089 c000.
>   Window 7: 0000 0000 0000 0000 8000 00ff 0000 e000.
> Vortex chip registers at 0xb800
>   0xB810: 00002020 00000000 00008000 00003ffc
>  Indication enable is 00de, interrupt enable is 02de.
>  No interrupt sources are pending.
>  Transceiver/media interfaces available:  100baseTx 10baseT.
> Transceiver type in use:  100baseTX.
>  MAC settings: full-duplex.
> Maximum packet size is 0.
>  Station address set to 00:a0:24:a4:2b:2b.
>  Configuration options 00de.
> Setting the EEPROM BIOS ROM field to 0000, new checksum ff.
>  Would write new 19 entry 0xff01 (old value 0x0001).
>  Would write new 32 entry 0x00ff (old value 0x0000).
> Saved EEPROM settings of a 3Com Vortex/Boomerang:
>  3Com Node Address 00:A0:24:A4:2B:2B (used as a unique ID only).
>  OEM Station address 00:A0:24:A4:2B:2B (used as the ethernet address).
>   Device ID 5950,  Manufacturer ID 6d50.
>   Manufacture date (MM/DD/YYYY) 6/5/1996, division 6, product BU.
>   No BIOS ROM is present.
>  Transceiver selection: 10baseT.
>    Options: negotiated duplex, link beat required.
>   Vortex format checksum is correct (ee vs. ee).
>   Cyclone format checksum is correct (00 vs. 00).
>   Hurricane format checksum is correct (00 vs. 00).

Looking around on the Vortex homepage at scyld.org, I noticed that
the version of the driver shipped with 2.4.20 is a bit out of date,
so I downloaded the "current" version (labeled "0.99Xf") and tried that
one out.  Without giving any options to the insmod or modprobe line,
this driver functioned the same as the older driver.  The link light
on the back of the NIC was giving me 10Mbps, and the mii-diag and
vortex-diag programs gave similar results.  However, adding the
"options=4 full_duplex=1" arguments into the module seemed to produce
the correct results.  Here's the modprobe:

> pci-scan.c:v1.11 8/31/2002  Donald Becker <becker@scyld.com> http://www.scyld.com/linux/drivers.html
> 3c59x.c:v0.99Xf 11/17/2002 Donald Becker, becker@scyld.com
>   http://www.scyld.com/network/vortex.html
> eth0: Overriding PCI latency timer (CFLT) setting of 32, new value is 248.
> eth0: 3Com 3c595 Vortex 100baseTx at 0xb800,  00:a0:24:a4:2b:2b, IRQ 10
>   64K buffer 1:1 Rx:Tx split, autoselect/10baseT interface.
>   Media override to transceiver type 4 (100baseTX).
> PCI: Setting latency timer of device 00:09.0 to 32

And here's the output of "mii-diag -v":

> Using the default interface 'eth0'.
> mii-diag.c:v2.07 11/15/2002 Donald Becker (becker@scyld.com)
>  http://www.scyld.com/diag/index.html
>   Using the new SIOCGMIIPHY value on PHY 32 (BMCR 0x2100).
>  Basic mode control register 0x2100: Auto-negotiation disabled, with
>  Speed fixed at 100 mbps, full-duplex.
>  You have link beat, and everything is working OK.
>    This transceiver is capable of  100baseTx-FD 100baseTx 10baseT-FD 10baseT.
>    Unable to perform Auto-negotiation, negotiation not complete.
>  Link partner information is not exchanged when in fixed speed mode.
>    End of basic transceiver information.
> 
>  MII PHY #32 transceiver registers:
>    2100 7804 0280 9000 0000 0000 0000 0000
>    0000 0000 0000 0000 0000 0000 0000 0000
>    0000 0000 0000 0000 0000 0000 0000 0000
>    0000 0000 0000 0000 0000 0000 0000 0000

And here's "vortex-diag -aef" (though note that there seems to be the
same kind of transciever mismatch as before):

> vortex-diag.c:v2.13a 12/15/2002 Donald Becker (becker@scyld.com)
>  http://www.scyld.com/diag/index.html
> Index #1: Found a 3Com 3c595 Vortex 10/100baseTx adapter at 0xb800.
>  Station address 00:a0:24:a4:2b:2b.
>   Receive mode is 0x07: Normal unicast and all multicast.
> Initial window 4, registers values by window:
>   Window 0: 0000 0000 0000 0000 0000 00bf 0000 0000.
>   Window 1: 00cc 02d4 0000 0c80 0000 8882 0000 8000.
>   Window 2: a000 a424 2b2b 0000 0000 0000 00de 4000.
>   Window 3: 001b 0041 0000 0020 e10a bfff 3fff 6000.
>   Window 4: 0000 02d4 0000 0c80 0000 8882 0000 8000.
>   Window 5: 1ffc 1ffc 00de 1ffc 0007 02de 00de a000.
>   Window 6: 0000 0000 0000 3000 0000 0b40 0000 c000.
>   Window 7: 0000 0000 0000 0000 8000 00ff 0000 e000.
> Vortex chip registers at 0xb800
>   0xB810: 00000105 00000000 00008000 00003ffc
>  Indication enable is 00de, interrupt enable is 02de.
>  No interrupt sources are pending.
>  Transceiver/media interfaces available:  100baseTx 10baseT.
> Transceiver type in use:  100baseTX.
>  MAC settings: full-duplex.
> Maximum packet size is 0.
>  Station address set to 00:a0:24:a4:2b:2b.
>  Configuration options 00de.
> Setting the EEPROM BIOS ROM field to 0000, new checksum ff.
>  Would write new 19 entry 0xff01 (old value 0x0001).
>  Would write new 32 entry 0x00ff (old value 0x0000).
> Saved EEPROM settings of a 3Com Vortex/Boomerang:
>  3Com Node Address 00:A0:24:A4:2B:2B (used as a unique ID only).
>  OEM Station address 00:A0:24:A4:2B:2B (used as the ethernet address).
>   Device ID 5950,  Manufacturer ID 6d50.
>   Manufacture date (MM/DD/YYYY) 6/5/1996, division 6, product BU.
>   No BIOS ROM is present.
>  Transceiver selection: 10baseT.
>    Options: negotiated duplex, link beat required.
>   Vortex format checksum is correct (ee vs. ee).
>   Cyclone format checksum is correct (00 vs. 00).
>   Hurricane format checksum is correct (00 vs. 00).

Using the newer driver, the link light on the back of the NIC is on
100Mbps.

Now, you may be asking yourselves, "Why is this guy complaining now
that everything seems to be working fine?"  Basically, because the box
these NICs are going to be in will be functioning as a firewall machine,
and I don't want to enable loadable modules on that box.  There are a
number of Linux rootkits which function by loading a module into the kernel,
which makes things much more difficult to recover from, so I typically
leave modules off on firewall-like systems, in the event it's ever
compromised.  My problem is that I've had relatively little luck getting
the newer driver to compile into the kernel itself.  So, here are my
questions:

  1) Is it possible to have the newer 3c59x driver compile into the kernel,
     not as a module?

  2) If not, is there some way to get the older 3c59x driver to behave
     properly?

  3) At any rate, why isn't the proper speed of the network being
     autodetected by *either* of the drivers?  The only way I've been able
     to get things running properly is by forcing the options.

Any help you could give would be much appreciated.  And of course, let
me know if there's any other commands I can run to help shed some more light
on my setup here.

Thanks in advance,
CJ

-- 
WOW: Kakistocracy        |  "The ships hung in the sky in much the same
apocalyptech.com/wow     |    way that bricks don't." - Douglas Adams,
pez@apocalyptech.com     |     _The Hitchhiker's Guide To The Galaxy_
_______________________________________________
vortex mailing list
vortex@scyld.com
http://www.scyld.com/mailman/listinfo/vortex

From vortex-admin@scyld.com  Mon Dec 30 13:59:29 2002
Return-Path: <vortex-admin@scyld.com>
Received: from blueraja.scyld.com (dsl093-058-083.blt1.dsl.speakeasy.net [66.93.58.83])
	by scortch.unisrv.net (8.12.6/8.12.6) with ESMTP id gBUJxSO4010306
	for <pez@apocalyptech.com>; Mon, 30 Dec 2002 13:59:28 -0600
Received: from dsl093-058-083.blt1.dsl.speakeasy.net (localhost.localdomain [127.0.0.1])
	by blueraja.scyld.com (8.11.6/8.11.6) with ESMTP id gBUJuBG25310;
	Mon, 30 Dec 2002 14:56:11 -0500
Received: from scortch.unisrv.net (scortch.unisrv.net [24.123.88.66])
	by blueraja.scyld.com (8.11.6/8.11.6) with ESMTP id gBUJtwG25229;
	Mon, 30 Dec 2002 14:55:58 -0500
Received: from scortch.unisrv.net (localhost [127.0.0.1])
	by scortch.unisrv.net (8.12.6/8.12.6) with ESMTP id gBUJtvO4010220;
	Mon, 30 Dec 2002 13:55:57 -0600
Received: (from pez@localhost)
	by scortch.unisrv.net (8.12.6/8.12.6/Submit) id gBUJtukN010219;
	Mon, 30 Dec 2002 13:55:56 -0600
From: CJ Kucera <pez@apocalyptech.com>
To: Donald Becker <becker@scyld.com>
Cc: vortex@scyld.com
Subject: Re: [vortex] Problems detecting 100Mbps with 3c59x (Vortex)
Message-ID: <20021230135556.D1817@unisrv.net>
References: <20021230103400.B1817@unisrv.net> <Pine.LNX.4.44.0212301332230.29812-100000@beohost.scyld.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5.1i
In-Reply-To: <Pine.LNX.4.44.0212301332230.29812-100000@beohost.scyld.com>; from becker@scyld.com on Mon, Dec 30, 2002 at 02:35:05PM -0500
Sender: vortex-admin@scyld.com
Errors-To: vortex-admin@scyld.com
X-BeenThere: vortex@scyld.com
X-Mailman-Version: 2.0.6
Precedence: bulk
List-Help: <mailto:vortex-request@scyld.com?subject=help>
List-Post: <mailto:vortex@scyld.com>
List-Subscribe: <http://www.scyld.com/mailman/listinfo/vortex>,
	<mailto:vortex-request@scyld.com?subject=subscribe>
List-Id: Discussions about the Linux drivers for 3Com PCI Ethernet adapters. <vortex.scyld.com>
List-Unsubscribe: <http://www.scyld.com/mailman/listinfo/vortex>,
	<mailto:vortex-request@scyld.com?subject=unsubscribe>
List-Archive: <http://www.scyld.com/pipermail/vortex/>
X-Original-Date: Mon, 30 Dec 2002 13:55:56 -0600
Date: Mon, 30 Dec 2002 13:55:56 -0600
Status: RO
Content-Length: 3607
Lines: 92

On Mon, Dec 30, 2002 at 02:35:05PM -0500, Donald Becker wrote:
> First: do not force full duplex!
> 
> When your switch allows forcing the setting, you have a long-term
> network administration problem.
> When your switch cannot be set, you have an immediate bug.

Hm...  I had figured since my other ethernet cards had autodetected
100baseTx-FD, that it was a viable mode for me to be using.  I presume
from when you said "Note that this is required for the 3c595 and 3c590
boards" you mean that autodetection is something that just isn't
possible with the 3c595?  If you take a look at the mii-diag output
from one of my other machines which is working at 100Mpbs it says
that it's autonegotiated the full duplex itself...

> > >   Manufacture date (MM/DD/YYYY) 6/5/1996, division 6, product BU.
> 
> I don't recommend using an old 590 series card if you care about
> performance.
> Even a rtl8139 will have far better performance.

Heh.  Yeah, I figured they'd probably not be great, but they have the
distinct advantage of being the cards I happen to already own.  :)
Still, the 100Mbps mode on the 3c595 should do better than the 10Mbps,
right?  Or is the difference between the two on the 3c595 negligible?

> > So there's definitely some kind of problem there.  Running
> > "vortex-diag -aef", I notice that it gives me conflicting kinds of
> > transceivers:
> 
> What is confliciting?
> The part has both 100baseTx and 10baseT transceiver connections.
> It defaults to 10baseT.

I was referring to the differences between these two lines:
> Transceiver type in use:  100baseTX.
and
>  Transceiver selection: 10baseT.

Looking at it again, though, I suppose that the second line is grouped
under the "EEPROM settings," which I now presume are just the defaults.
So nevermind about that one...

> >   3) At any rate, why isn't the proper speed of the network being
> >      autodetected by *either* of the drivers?  The only way I've been able
> >      to get things running properly is by forcing the options.
> 
> The '10baseT' setting is correct -- the driver detects the 10baseT link
> beat from the switch (autonegotiation takes place on the 10baseT link
> signal) and remains at 10Mbps.  If you had a 100baseTx repeater, or
> 100baseTx only switch, the 3c595 would have switch to 100baseTx (half
> duplex).

So, just to clarify, on a 10/100 switch, the 3c595 will *always* go with
10 as opposed to 100?

> This is accurate.
> 
> Note that you can also use
>    mii-diag -F 100baseTx

Yeah, I had tried that before using the old driver, but nothing seemed
to change when I did so . . .

> > >  You have link beat, and everything is working OK.
> > >    This transceiver is capable of  100baseTx-FD 100baseTx 10baseT-FD 10baseT.
> > >    Unable to perform Auto-negotiation, negotiation not complete.
> 
> Pay attention to that last line.

I suppose I was more curious as to *why* the autonegotiation doesn't
happen.  Is it just a limitation of the 3c595?  Running "mii-diag -v"
on a working machine yields:

> The autonegotiated media type is 100baseTx-FD.
> ...
>    Link status: established.
>    Capable of  100baseTx-FD 100baseTx 10baseT-FD 10baseT.
>    Able to perform Auto-negotiation, negotiation complete.

Thanks again for your help!

-CJ

-- 
WOW: Kakistocracy        |  "The ships hung in the sky in much the same
apocalyptech.com/wow     |    way that bricks don't." - Douglas Adams,
pez@apocalyptech.com     |     _The Hitchhiker's Guide To The Galaxy_
_______________________________________________
vortex mailing list
vortex@scyld.com
http://www.scyld.com/mailman/listinfo/vortex

From vortex-admin@scyld.com  Tue Dec 31 00:25:53 2002
Return-Path: <vortex-admin@scyld.com>
Received: from blueraja.scyld.com (dsl093-058-083.blt1.dsl.speakeasy.net [66.93.58.83])
	by scortch.unisrv.net (8.12.6/8.12.6) with ESMTP id gBV6PpO4009215
	for <pez@apocalyptech.com>; Tue, 31 Dec 2002 00:25:52 -0600
Received: from dsl093-058-083.blt1.dsl.speakeasy.net (localhost.localdomain [127.0.0.1])
	by blueraja.scyld.com (8.11.6/8.11.6) with ESMTP id gBV6O8G08796;
	Tue, 31 Dec 2002 01:24:08 -0500
Received: from scortch.unisrv.net (scortch.unisrv.net [24.123.88.66])
	by blueraja.scyld.com (8.11.6/8.11.6) with ESMTP id gBV6NUG08758;
	Tue, 31 Dec 2002 01:23:30 -0500
Received: from scortch.unisrv.net (localhost [127.0.0.1])
	by scortch.unisrv.net (8.12.6/8.12.6) with ESMTP id gBV6NRO4009154;
	Tue, 31 Dec 2002 00:23:28 -0600
Received: (from pez@localhost)
	by scortch.unisrv.net (8.12.6/8.12.6/Submit) id gBV6NNKV009153;
	Tue, 31 Dec 2002 00:23:23 -0600
From: CJ Kucera <pez@apocalyptech.com>
To: Donald Becker <becker@scyld.com>
Cc: vortex@scyld.com
Subject: Re: [vortex] Problems detecting 100Mbps with 3c59x (Vortex)
Message-ID: <20021231002322.E1817@unisrv.net>
References: <20021230135556.D1817@unisrv.net> <Pine.LNX.4.44.0212301658410.29812-100000@beohost.scyld.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5.1i
In-Reply-To: <Pine.LNX.4.44.0212301658410.29812-100000@beohost.scyld.com>; from becker@scyld.com on Mon, Dec 30, 2002 at 05:12:20PM -0500
Sender: vortex-admin@scyld.com
Errors-To: vortex-admin@scyld.com
X-BeenThere: vortex@scyld.com
X-Mailman-Version: 2.0.6
Precedence: bulk
List-Help: <mailto:vortex-request@scyld.com?subject=help>
List-Post: <mailto:vortex@scyld.com>
List-Subscribe: <http://www.scyld.com/mailman/listinfo/vortex>,
	<mailto:vortex-request@scyld.com?subject=subscribe>
List-Id: Discussions about the Linux drivers for 3Com PCI Ethernet adapters. <vortex.scyld.com>
List-Unsubscribe: <http://www.scyld.com/mailman/listinfo/vortex>,
	<mailto:vortex-request@scyld.com?subject=unsubscribe>
List-Archive: <http://www.scyld.com/pipermail/vortex/>
X-Original-Date: Tue, 31 Dec 2002 00:23:23 -0600
Date: Tue, 31 Dec 2002 00:23:23 -0600
Status: RO
Content-Length: 2248
Lines: 55

On Mon, Dec 30, 2002 at 05:12:20PM -0500, Donald Becker wrote:
> Full duplex is only correct when it is auto-negotiated.

Aaah.  Works for me!

> > Heh.  Yeah, I figured they'd probably not be great, but they have the
> > distinct advantage of being the cards I happen to already own.  :)
> > Still, the 100Mbps mode on the 3c595 should do better than the 10Mbps,
> > right?  Or is the difference between the two on the 3c595 negligible?
> 
> The problem is that the 3c590 series has a single-region bus master
> capability.  CPU must do a substantial amount of the work transferring
> packets: not as much as a NE2000 clone, but significantly more than with
> more modern designs.  And for the $5-$10 that a new low-end Ethernet NIC
> will cost, the 3c590 series should be relagated to stand-by use only.

Hm, yeah.  Well, they'll have to do until I can find some time to go
out and snag some new ones then...  Or until I can make my way over
to pricewatch, I suppose.  At any rate, I'll keep it in mind; thanks.

> A long time ago the driver tried to offer 100baseTx link beat for a few
> seconds when started.
> But this jams most 10baseT repeaters.. a very bad thing.

Heh, I'll say.

> Autonegotiation is really a Very Good Thing.  It is a _requirement_ for
> a plug-and-play networking.
> 
>   http://scyld.com/expert/NWay.html

Thanks for the link...

In other news, I seem to have shoehorned the current 3c59x driver into
compiling directly into the kernel.  It actually wasn't that hard (the
Makefile changes were trivial); basically all I had to do was remove
some of the "#ifdef MODULE" and a couple of references to
"linux/modversions.h", which doesn't exist when your kernel isn't using
modules.  Oh, and calls to "module_init" and "module_exit" towards
the end.

If anyone's interested, I've put up the patches at:
  http://apocalyptech.com/linux/3c59x/

Thanks again for your help,
CJ

-- 
WOW: Kakistocracy        |  "The ships hung in the sky in much the same
apocalyptech.com/wow     |    way that bricks don't." - Douglas Adams,
pez@apocalyptech.com     |     _The Hitchhiker's Guide To The Galaxy_
_______________________________________________
vortex mailing list
vortex@scyld.com
http://www.scyld.com/mailman/listinfo/vortex

From vortex-admin@scyld.com  Tue Dec 31 02:17:45 2002
Return-Path: <vortex-admin@scyld.com>
Received: from blueraja.scyld.com (dsl093-058-083.blt1.dsl.speakeasy.net [66.93.58.83])
	by scortch.unisrv.net (8.12.6/8.12.6) with ESMTP id gBV8HhO4001843
	for <pez@apocalyptech.com>; Tue, 31 Dec 2002 02:17:43 -0600
Received: from dsl093-058-083.blt1.dsl.speakeasy.net (localhost.localdomain [127.0.0.1])
	by blueraja.scyld.com (8.11.6/8.11.6) with ESMTP id gBV8FAG15916;
	Tue, 31 Dec 2002 03:15:10 -0500
Received: from beohost.scyld.com (pool-151-196-173-34.balt.east.verizon.net [151.196.173.34])
	by blueraja.scyld.com (8.11.6/8.11.6) with ESMTP id gBV8EWG15891
	for <vortex@scyld.com>; Tue, 31 Dec 2002 03:14:32 -0500
Received: from localhost (becker@localhost)
	by beohost.scyld.com (8.11.6/8.11.6) with ESMTP id gBV8Ew829222;
	Tue, 31 Dec 2002 03:14:58 -0500
From: Donald Becker <becker@scyld.com>
To: CJ Kucera <pez@apocalyptech.com>
cc: vortex@scyld.com
Subject: Re: [vortex] Problems detecting 100Mbps with 3c59x (Vortex)
In-Reply-To: <20021231002322.E1817@unisrv.net>
Message-ID: <Pine.LNX.4.44.0212310311130.29812-100000@beohost.scyld.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: vortex-admin@scyld.com
Errors-To: vortex-admin@scyld.com
X-BeenThere: vortex@scyld.com
X-Mailman-Version: 2.0.6
Precedence: bulk
List-Help: <mailto:vortex-request@scyld.com?subject=help>
List-Post: <mailto:vortex@scyld.com>
List-Subscribe: <http://www.scyld.com/mailman/listinfo/vortex>,
	<mailto:vortex-request@scyld.com?subject=subscribe>
List-Id: Discussions about the Linux drivers for 3Com PCI Ethernet adapters. <vortex.scyld.com>
List-Unsubscribe: <http://www.scyld.com/mailman/listinfo/vortex>,
	<mailto:vortex-request@scyld.com?subject=unsubscribe>
List-Archive: <http://www.scyld.com/pipermail/vortex/>
X-Original-Date: Tue, 31 Dec 2002 03:14:58 -0500 (EST)
Date: Tue, 31 Dec 2002 03:14:58 -0500 (EST)
Status: RO
Content-Length: 1607
Lines: 41

On Tue, 31 Dec 2002, CJ Kucera wrote:
> On Mon, Dec 30, 2002 at 05:12:20PM -0500, Donald Becker wrote:
> > Full duplex is only correct when it is auto-negotiated.
> 
> Aaah.  Works for me!

When the link data rate goes up, you will start seeing
  - out-of-window collisions on half duplex side, and
  - corrupted Rx packets on the full duplex side.

> Hm, yeah.  Well, they'll have to do until I can find some time to go
> out and snag some new ones then...  Or until I can make my way over
> to pricewatch, I suppose.  At any rate, I'll keep it in mind; thanks.

Check out your local mega-box-shop (BestBuy, Frys, etc.) -- $5-$15 is
now common for NICs on sale.

> In other news, I seem to have shoehorned the current 3c59x driver into
> compiling directly into the kernel.  It actually wasn't that hard (the
> Makefile changes were trivial); basically all I had to do was remove
> some of the "#ifdef MODULE" and a couple of references to
> "linux/modversions.h", which doesn't exist when your kernel isn't using
> modules.  Oh, and calls to "module_init" and "module_exit" towards
> the end.
> 
> If anyone's interested, I've put up the patches at:
>   http://apocalyptech.com/linux/3c59x/

This would be in the current driver if there was a clean way to make it
work with all kernel versions.

-- 
Donald Becker				becker@scyld.com
Scyld Computing Corporation		http://www.scyld.com
410 Severn Ave. Suite 210		Scyld Beowulf cluster system
Annapolis MD 21403			410-990-9993

_______________________________________________
vortex mailing list
vortex@scyld.com
http://www.scyld.com/mailman/listinfo/vortex

From vortex-admin@scyld.com  Mon Dec 30 16:15:12 2002
Return-Path: <vortex-admin@scyld.com>
Received: from blueraja.scyld.com (dsl093-058-083.blt1.dsl.speakeasy.net [66.93.58.83])
	by scortch.unisrv.net (8.12.6/8.12.6) with ESMTP id gBUMF7O4004897
	for <pez@apocalyptech.com>; Mon, 30 Dec 2002 16:15:08 -0600
Received: from dsl093-058-083.blt1.dsl.speakeasy.net (localhost.localdomain [127.0.0.1])
	by blueraja.scyld.com (8.11.6/8.11.6) with ESMTP id gBUMCDG06251;
	Mon, 30 Dec 2002 17:12:13 -0500
Received: from beohost.scyld.com (dsl093-058-082.blt1.dsl.speakeasy.net [66.93.58.82])
	by blueraja.scyld.com (8.11.6/8.11.6) with ESMTP id gBUMBlG06191
	for <vortex@scyld.com>; Mon, 30 Dec 2002 17:11:47 -0500
Received: from localhost (becker@localhost)
	by beohost.scyld.com (8.11.6/8.11.6) with ESMTP id gBUMCKG25220;
	Mon, 30 Dec 2002 17:12:20 -0500
From: Donald Becker <becker@scyld.com>
To: CJ Kucera <pez@apocalyptech.com>
cc: vortex@scyld.com
Subject: Re: [vortex] Problems detecting 100Mbps with 3c59x (Vortex)
In-Reply-To: <20021230135556.D1817@unisrv.net>
Message-ID: <Pine.LNX.4.44.0212301658410.29812-100000@beohost.scyld.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: vortex-admin@scyld.com
Errors-To: vortex-admin@scyld.com
X-BeenThere: vortex@scyld.com
X-Mailman-Version: 2.0.6
Precedence: bulk
List-Help: <mailto:vortex-request@scyld.com?subject=help>
List-Post: <mailto:vortex@scyld.com>
List-Subscribe: <http://www.scyld.com/mailman/listinfo/vortex>,
	<mailto:vortex-request@scyld.com?subject=subscribe>
List-Id: Discussions about the Linux drivers for 3Com PCI Ethernet adapters. <vortex.scyld.com>
List-Unsubscribe: <http://www.scyld.com/mailman/listinfo/vortex>,
	<mailto:vortex-request@scyld.com?subject=unsubscribe>
List-Archive: <http://www.scyld.com/pipermail/vortex/>
X-Original-Date: Mon, 30 Dec 2002 17:12:20 -0500 (EST)
Date: Mon, 30 Dec 2002 17:12:20 -0500 (EST)
Status: RO
X-Status: A
Content-Length: 2944
Lines: 74

On Mon, 30 Dec 2002, CJ Kucera wrote:
> On Mon, Dec 30, 2002 at 02:35:05PM -0500, Donald Becker wrote:
> > First: do not force full duplex!
> > 
> > When your switch allows forcing the setting, you have a long-term
> > network administration problem.
> > When your switch cannot be set, you have an immediate bug.
> 
> Hm...  I had figured since my other ethernet cards had autodetected
> 100baseTx-FD, that it was a viable mode for me to be using.

Full duplex is only correct when it is auto-negotiated.

>  I presume from when you said "Note that this is required for the
> 3c595 and 3c590 boards" you mean that autodetection is something that
> just isn't possible with the 3c595?

Correct.  The 3c595 pre-dated autonegotiation, and was one of the
earliest PCI designs.  The 3c905 was a major improvement: it added
autonegotiation, as well as a much more effective architecture for
bus-master transfers.

> > I don't recommend using an old 590 series card if you care about
> > performance.
> > Even a rtl8139 will have far better performance.
> 
> Heh.  Yeah, I figured they'd probably not be great, but they have the
> distinct advantage of being the cards I happen to already own.  :)
> Still, the 100Mbps mode on the 3c595 should do better than the 10Mbps,
> right?  Or is the difference between the two on the 3c595 negligible?

The problem is that the 3c590 series has a single-region bus master
capability.  CPU must do a substantial amount of the work transferring
packets: not as much as a NE2000 clone, but significantly more than with
more modern designs.  And for the $5-$10 that a new low-end Ethernet NIC
will cost, the 3c590 series should be relagated to stand-by use only.

> > What is confliciting?
> I was referring to the differences between these two lines:
> > Transceiver type in use:  100baseTX.
> and
> >  Transceiver selection: 10baseT.

Yes, you got it: it's the difference between the configuration EEPROM
values, and what the chip is currently configured to use.

> So, just to clarify, on a 10/100 switch, the 3c595 will *always* go with
> 10 as opposed to 100?

The 3c595 can only sense the speed.
On a autonegotiating switch the initial offered link beat is 10baseT.
Thus the 3c595 will always stay at 10baseT.

A long time ago the driver tried to offer 100baseTx link beat for a few
seconds when started.
But this jams most 10baseT repeaters.. a very bad thing.
And there is a race condition when communicating with a link partner
trying to do the same thing.

Autonegotiation is really a Very Good Thing.  It is a _requirement_ for
a plug-and-play networking.

  http://scyld.com/expert/NWay.html

-- 
Donald Becker				becker@scyld.com
Scyld Computing Corporation		http://www.scyld.com
410 Severn Ave. Suite 210		Scyld Beowulf cluster system
Annapolis MD 21403			410-990-9993

_______________________________________________
vortex mailing list
vortex@scyld.com
http://www.scyld.com/mailman/listinfo/vortex

From vortex-admin@scyld.com  Mon Dec 30 13:39:00 2002
Return-Path: <vortex-admin@scyld.com>
Received: from blueraja.scyld.com (dsl093-058-083.blt1.dsl.speakeasy.net [66.93.58.83])
	by scortch.unisrv.net (8.12.6/8.12.6) with ESMTP id gBUJcwO4002650
	for <pez@apocalyptech.com>; Mon, 30 Dec 2002 13:38:59 -0600
Received: from dsl093-058-083.blt1.dsl.speakeasy.net (localhost.localdomain [127.0.0.1])
	by blueraja.scyld.com (8.11.6/8.11.6) with ESMTP id gBUJbCG23442;
	Mon, 30 Dec 2002 14:37:12 -0500
Received: from beohost.scyld.com (dsl093-058-082.blt1.dsl.speakeasy.net [66.93.58.82])
	by blueraja.scyld.com (8.11.6/8.11.6) with ESMTP id gBUJa9G23307
	for <vortex@scyld.com>; Mon, 30 Dec 2002 14:36:09 -0500
Received: from localhost (becker@localhost)
	by beohost.scyld.com (8.11.6/8.11.6) with ESMTP id gBUJZ6T24210;
	Mon, 30 Dec 2002 14:36:01 -0500
From: Donald Becker <becker@scyld.com>
To: CJ Kucera <pez@apocalyptech.com>
cc: vortex@scyld.com
Subject: Re: [vortex] Problems detecting 100Mbps with 3c59x (Vortex)
In-Reply-To: <20021230103400.B1817@unisrv.net>
Message-ID: <Pine.LNX.4.44.0212301332230.29812-100000@beohost.scyld.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: vortex-admin@scyld.com
Errors-To: vortex-admin@scyld.com
X-BeenThere: vortex@scyld.com
X-Mailman-Version: 2.0.6
Precedence: bulk
List-Help: <mailto:vortex-request@scyld.com?subject=help>
List-Post: <mailto:vortex@scyld.com>
List-Subscribe: <http://www.scyld.com/mailman/listinfo/vortex>,
	<mailto:vortex-request@scyld.com?subject=subscribe>
List-Id: Discussions about the Linux drivers for 3Com PCI Ethernet adapters. <vortex.scyld.com>
List-Unsubscribe: <http://www.scyld.com/mailman/listinfo/vortex>,
	<mailto:vortex-request@scyld.com?subject=unsubscribe>
List-Archive: <http://www.scyld.com/pipermail/vortex/>
X-Original-Date: Mon, 30 Dec 2002 14:35:05 -0500 (EST)
Date: Mon, 30 Dec 2002 14:35:05 -0500 (EST)
Status: RO
Content-Length: 4001
Lines: 105

On Mon, 30 Dec 2002, CJ Kucera wrote:

> I've got a couple of "3c595 100BaseTX [Vortex]" cards which have to be
> coerced very strongly into believing they're on a 100BaseTx-FD network.
> I've got a 100Mbps hub/swtich (just some cheap thing from Netgear) which
> works fine for my other 100Mbps network cards (my other PCs autodetect
> the rate just fine).  Here's the output from mii-diag on another PC on
> the network plugged into the same switch as the 3c595 card:

First: do not force full duplex!

When your switch allows forcing the setting, you have a long-term
network administration problem.
When your switch cannot be set, you have an immediate bug.

> >   Bus  0, device   9, function  0:
> >     Ethernet controller: 3Com Corporation 3c595 100BaseTX [Vortex] (rev 0).
> This is on a Linux Debian system running kernel 2.4.20.  The box the card
> is currently in is a 233MHz Cyrix MII processor; the other machine is
> a 90MHz Pentium.
...
> >   Manufacture date (MM/DD/YYYY) 6/5/1996, division 6, product BU.

I don't recommend using an old 590 series card if you care about
performance.
Even a rtl8139 will have far better performance.

> So there's definitely some kind of problem there.  Running
> "vortex-diag -aef", I notice that it gives me conflicting kinds of
> transceivers:

What is confliciting?
The part has both 100baseTx and 10baseT transceiver connections.
It defaults to 10baseT.

...
> so I downloaded the "current" version (labeled "0.99Xf") and tried that
> one out.  Without giving any options to the insmod or modprobe line,
> this driver functioned the same as the older driver.  The link light
> on the back of the NIC was giving me 10Mbps, and the mii-diag and
> vortex-diag programs gave similar results.

Hmmm, 'mii-diag' didn't produce accurate output?

...
>   3) At any rate, why isn't the proper speed of the network being
>      autodetected by *either* of the drivers?  The only way I've been able
>      to get things running properly is by forcing the options.

The '10baseT' setting is correct -- the driver detects the 10baseT link
beat from the switch (autonegotiation takes place on the 10baseT link
signal) and remains at 10Mbps.  If you had a 100baseTx repeater, or
100baseTx only switch, the 3c595 would have switch to 100baseTx (half
duplex).

> However, adding the
> "options=4 full_duplex=1" arguments into the module seemed to produce
> the correct results.  Here's the modprobe:
> 
> > pci-scan.c:v1.11 8/31/2002  Donald Becker <becker@scyld.com> http://www.scyld.com/linux/drivers.html
> > 3c59x.c:v0.99Xf 11/17/2002 Donald Becker, becker@scyld.com
> >   http://www.scyld.com/network/vortex.html
> > eth0: Overriding PCI latency timer (CFLT) setting of 32, new value is 248.

Note that this is required for the 3c595 and 3c590 boards.

> > eth0: 3Com 3c595 Vortex 100baseTx at 0xb800,  00:a0:24:a4:2b:2b, IRQ 10
> >   64K buffer 1:1 Rx:Tx split, autoselect/10baseT interface.
> >   Media override to transceiver type 4 (100baseTX).

Correct.
  (I should add a warning about forced full duplex.)

> And here's the output of "mii-diag -v":
.
> >  Basic mode control register 0x2100: Auto-negotiation disabled, with
> >  Speed fixed at 100 mbps, full-duplex.

This is accurate.

Note that you can also use
   mii-diag -F 100baseTx

> >  You have link beat, and everything is working OK.
> >    This transceiver is capable of  100baseTx-FD 100baseTx 10baseT-FD 10baseT.
> >    Unable to perform Auto-negotiation, negotiation not complete.

Pay attention to that last line.

> >  Transceiver/media interfaces available:  100baseTx 10baseT.
> > Transceiver type in use:  100baseTX.
> >  MAC settings: full-duplex.

OK, this is accurate.

-- 
Donald Becker				becker@scyld.com
Scyld Computing Corporation		http://www.scyld.com
410 Severn Ave. Suite 210		Scyld Beowulf cluster system
Annapolis MD 21403			410-990-9993

_______________________________________________
vortex mailing list
vortex@scyld.com
http://www.scyld.com/mailman/listinfo/vortex

