On Tue, 28 Sep 2004, John W. Linville wrote:
> Date: Tue, 28 Sep 2004 14:54:55 -0400
> From: John W. Linville <linville@xxxxxxxxxxxxx>
> To: akpm@xxxxxxxx
> Cc: netdev@xxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
> Subject: [patch 2.6.9-rc2] 3c59x: do not mask reset of aism logic at rmmod
> Some (earlier?) versions of the 3c905(B) card get confused and refuse to
> work again after the 3c59x module is removed (even after reloading the
> module). Changing vortex_remove_one() to allow the auto-initialize
> state machine logic to be reset when the module is removed alleviates
> this problem.
...and creates a new problem: resetting the link causes operational
problems on many networks. The most obvious example is spanning tree
detection delays on switches, where the switch does not pass traffic.
This 3c59x.c code was changed in 2001 to mask the transceiver reset and
shut the chip down cleanly. This occurred in two steps, with a
discussion on the vortex mailing list for each.
The December change was noted as specifically for the 3c905B.
The correct solution is to reset the transceiver (and thus cause
re-autonegotiation) only if a problem is detected, not an unconditional
or proactive reset.
> --- linux-2.6/drivers/net/3c59x.c.orig
> +++ linux-2.6/drivers/net/3c59x.c
> @@ -3162,7 +3162,7 @@ static void __devexit vortex_remove_one
> pci_restore_state(VORTEX_PCI(vp), vp->power_state);
> /* Should really use issue_and_wait() here */
> - outw(TotalReset|0x14, dev->base_addr + EL3_CMD);
> + outw(TotalReset|0x04, dev->base_addr + EL3_CMD);
Donald Becker becker@xxxxxxxxx
Scyld Software Scyld Beowulf cluster systems
914 Bay Ridge Road, Suite 220 www.scyld.com
Annapolis MD 21403 410-990-9993