[vortex] Problems forcing a 3c905 card's media type

Bogdan Costescu Bogdan.Costescu@IWR.Uni-Heidelberg.De
Tue, 22 Aug 2000 17:01:36 +0200 (CEST)


Hmm...Bugs! I hate bugs! ("The Mummy")

On Mon, 21 Aug 2000, Shane Wegner wrote:

> Well linux/Documentation/networking/vortex.txt doesn't even mention the
> full_duplex option.  It indicated options=12 is correct.  However,
> http://www.scyld.com/network/vortex.html does mention the full_duplex option
> and recommends using it.

The 2 drivers (the in-kernel one, maintained by Andrew Morton along with
Documentation/networking/vortex.txt and Donald Becker's which also
maintains www.scyld.com/network) are not identical in this part. That's
why the 2 docs say different things...

Anyway, there seems to be a bug in Andrew's version. About 20 lines down
the vortex_probe1() routine, there is a test which sets some driver
variables based on the options passed to the driver:

	if (option >= 0) {
		vp->media_override = ((option & 7)==2) ? 0 : options & 7;
		vp->full_duplex = (option & 8) ? 1 : 0;

These lines are based on older (pre-Cyclone) media settings for which the
xcvrSelect field in InternalConfig register was only 3 bits. Cyclone and
later chips have 4 bits in this register (page 62 in B docs), so these
lines are no longer valid.
Donald's Ra version (and probably some older ones) are OK w.r.t. this, as
the "definition" of full duplex was changed from 8+ to 0x200+.

So, if you pass options=8 to the current in-kernel driver, it will
interpret it as "use default media, force full duplex".

> continuum:~# insmod 3c59x options=8 full_duplex=1
> Using /lib/modules/2.2.17pre13/net/3c59x.o

Please, if you send bug reports, start your network first
(/etc/rc.d/init.d/network start or similar which calls ifconfig). An
"insmod-ed" module is not yet functional until somebody (like ifconfig)
calls the open() routine which initialize lots of internal variables. The
state reported by diag tools is mostly irrelevant in this situation.

> I thought the same thing and it's kind of a long story.  To summarize. 
> Bought switch performed half as well as hub (dlink dss8+ 10/100mbps btw). 
> Called tech support and there explanation was that 3com's cards didn't do
> autonegotiation correctly.  Forcing all cards to 100mbps full duplex should
> solve the problem.  Whether this is correct or not I don't know but I'd like
> to give them the benefit of the doubt.

One thing that you can try with the current driver is: 
"options=4 full_duplex=1". Please report the results.

Sincerely,

Bogdan Costescu

IWR - Interdisziplinaeres Zentrum fuer Wissenschaftliches Rechnen
Universitaet Heidelberg, INF 368, D-69120 Heidelberg, GERMANY
Telephone: +49 6221 54 8869, Telefax: +49 6221 54 8868
E-mail: Bogdan.Costescu@IWR.Uni-Heidelberg.De