A while ago I started having problems with a dc(4) cardbus card that
I hadn't had before.  Lots of failures to force tx and rx to idle
state resulting in the card eventually hanging under load and
basically being worthless until I ejected it and reinserted it.
ifconfig up/down, etc. didn't help.  So I bought a new dc(4) cardbus
card and it had the same problems.  First card:

dc0: <Abocom FE2500 10/100BaseTX> port 0x1100-0x11ff mem 0x88002000-0x880023ff irq 11 
at device 0.0
on cardbus0

(really a LinkSys PCMP100 or some such)  Second card:

dc0: <Accton EN2242 MiniPCI 10/100BaseTX> port 0x1100-0x11ff mem 0x88002000-0x880023ff 
irq 11 at
device 0.0 on cardbus0

(really a SpeedStream SS1012).  The patch below fixed the hangs
on both cards:

--- if_dc.c     4 Sep 2002 18:14:17 -0000       1.77
+++ if_dc.c     19 Sep 2002 20:57:03 -0000
@@ -1366,7 +1370,8 @@
                for (i = 0; i < DC_TIMEOUT; i++) {
                        isr = CSR_READ_4(sc, DC_ISR);
                        if (isr & DC_ISR_TX_IDLE &&
-                           (isr & DC_ISR_RX_STATE) == DC_RXSTATE_STOPPED)
+                           ((isr & DC_ISR_RX_STATE) == DC_RXSTATE_STOPPED ||
+                            (isr & DC_ISR_RX_STATE) == DC_RXSTATE_WAIT))
                                break;
                        DELAY(10);
                }

The automatic TX underrun recovery stuff didn't make a bit of difference
for the SpeedStream card FWIW.  Also, unlike one of the PR's which claimed
that the SpeedStream SS1020 (PCI adapter rather than cardbus card), the
dc(4) driver read the right MAC address just fine w/o the need for any
changes.

-- 

John Baldwin <[EMAIL PROTECTED]>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to