[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Patch that fixes 3c59x.c to support 3com 3c905CX cards
From: |
hde |
Subject: |
Patch that fixes 3c59x.c to support 3com 3c905CX cards |
Date: |
Tue, 24 May 2005 18:25:53 -0500 |
User-agent: |
Internet Messaging Program (IMP) 3.2.1 |
Hi,
I have been trying to narrow down a bug in the file
gnumach/linux/src/drivers/net/3c59x.c which caused my NIC
to act kinda weird. The NIC would not accept and traffic
off the network but it would send it. The problem was
the driver was sending an RxRest to the NIC to often, this
is the cause of the NIC engineer using just some random
interval. That patch updates the wait to be a bit longer.
So it is safe to say that with the patch the 3com Tornado
3c905C and 3c905cx are fully supported. Also I updated
the driver to check for a correct checksum for the Tornado
cards to which removes the INVALID CHECKSUM error you currently get.
Please review this so we can get it applied to gnumach for
the long term. Also the device list should be updated to
state the newly supported 3com Tornado 3c905c and 3c905cx cards.
Here is what the checksum error looks like at boot:
3c59x.c:v0.99L 5/28/99 Donald Becker
http://cesdis.gsfc.nasa.gov/linux/drivers/vortex.html
The PCI BIOS has not enabled the device at 2/8. Updating PCI command 113->
117.
eth0: 3Com 3c905C Tornado at 0x3000, ***INVALID CHECKSUM 66*** 0: b:db:16:
3:14, IRQ 10
8K byte-wide RAM 5:3 Rx:Tx split, autoselect/Autonegotiate interface.
MII transceiver found at address 1, status 24.
MII transceiver found at address 2, status 24.
Enabling bus-master transmits and whole-frame receives.
And with the patch:
3c59x.c:v0.99L 5/28/99 Donald Becker
http://cesdis.gsfc.nasa.gov/linux/drivers/vortex.html
The PCI BIOS has not enabled the device at 2/8. Updating PCI command 113->
117.
eth0: 3Com 3c905C Tornado at 0x3000, 0: b:db:16: 3:14, IRQ 10
8K byte-wide RAM 5:3 Rx:Tx split, autoselect/Autonegotiate interface.
MII transceiver found at address 1, status 24.
MII transceiver found at address 2, status 24.
Enabling bus-master transmits and whole-frame receives.
Thanks
Harley
--- linux/src/drivers/net/3c59x.c 2005-05-24 11:28:11.000000000 -0500
+++ linux/src/drivers/net/3c59xNEW.c 2005-05-24 11:29:24.000000000 -0500
@@ -244,8 +244,8 @@
long ioaddr, int irq,
int chip_idx, int fnd_cnt);
};
-enum { IS_VORTEX=1, IS_BOOMERANG=2, IS_CYCLONE=4,
- HAS_PWR_CTRL=0x10, HAS_MII=0x20, HAS_NWAY=0x40, HAS_CB_FNS=0x80, };
+enum { IS_VORTEX=1, IS_BOOMERANG=2, IS_CYCLONE=4, IS_TORNADO=8,
+ HAS_PWR_CTRL=0x10, HAS_MII=0x20, HAS_NWAY=0x40, HAS_CB_FNS=0x80,
HAS_HWCKSM=0x2000,};
static struct device *vortex_probe1(int pci_bus, int pci_devfn,
struct
device *dev, long ioaddr,
int
irq, int dev_id, int card_idx);
@@ -279,7 +279,7 @@
{"3c905B-FX Cyclone 100baseFx", 0x10B7, 0x905A, 0xffff,
PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE, 128, vortex_probe1},
{"3c905C Tornado", 0x10B7, 0x9200, 0xffff,
- PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE, 128, vortex_probe1},
+ PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY, 128, vortex_probe1},
{"3c980 Cyclone", 0x10B7, 0x9800, 0xfff0,
PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE, 128, vortex_probe1},
{"3cSOHO100-TX Hurricane", 0x10B7, 0x7646, 0xffff,
@@ -863,8 +863,8 @@
checksum ^= eeprom[i++];
checksum = (checksum ^ (checksum >> 8)) & 0xff;
}
- if (checksum != 0x00)
- printk(" ***INVALID CHECKSUM %4.4x*** ", checksum);
+ if ((checksum != 0x00) && !((IS_TORNADO|HAS_NWAY|HAS_HWCKSM) &
IS_TORNADO))
+ printk(" ***INVALID CHECKSUM %4.4x*** ", checksum);
for (i = 0; i < 3; i++)
((u16 *)dev->dev_addr)[i] = htons(eeprom[i + 10]);
@@ -1071,7 +1071,7 @@
outw(RxReset, ioaddr + EL3_CMD);
/* Wait a few ticks for the RxReset command to complete. */
- for (i = 2000; i >= 0 ; i--)
+ for (i = 2000000; i >= 0 ; i--)
if ( ! (inw(ioaddr + EL3_STATUS) & CmdInProgress))
break;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Patch that fixes 3c59x.c to support 3com 3c905CX cards,
hde <=