3c509 driver bug

Andrzej Orchowski (A.Orchowski@softpress.com.pl)
Fri, 30 Mar 2001 10:39:24 +0200


Hi,
sorry for this non-proffesional way of sending bug report and patch
(I'm new to Linux, couldn't find utility to create patch). Fix is based
upon of the code analysis rather (and obviosly my working environment)
then 3Com tech docs. Anyway lets start...

1. Bug Summary
Inproper interface setting in 3Com 509 nic driver 1.16 (2.2)

2. Bug Description
Bug exists in 3Com 509 nic driver version 1.16 (2.2) by Donald J. Becker.
Under some circomstances the nic interface (10BaseT, AUI, BNC) is set
inproperly usually causing the card to stop working.
The unwanted and/or strange behaviour occures esspecially with more then
one 509 nics present.

Internally the code sets the interface type in if_port variable. It is set
upon of eeprom value in several places depending on the nic type:
PnP, ISA, EISA. After if_port assigment code flows to found: label
in which the different parameters are gathered together (to dev variable)
to set the nic.
Unfortunatelly in that place if_port is used condidionally which I believe
is inherited from previous driver versions.

/* Fix is simple enough not to include any attachments. Here it is */
The line (around #451)
dev->if_port = (dev->mem_start & 0x1f) ? dev->mem_start & 3: if_port;
should be replaced simply with
dev->if_port = if_port;

3. Keywords
networking, kernel, 3Com, 3C509, modules, drivers

4. Kernel version
I checked buggy driver is distributed with kernel version 2.2 and 2.4.2
(and probably all earlier kernel versions dated after Feb 1998).

Cheers
Andrzej Orchowski
andor@softpress.com.pl
>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/