summaryrefslogtreecommitdiffstats
path: root/sys/dev/gem
diff options
context:
space:
mode:
authortmm <tmm@FreeBSD.org>2002-05-24 12:47:41 +0000
committertmm <tmm@FreeBSD.org>2002-05-24 12:47:41 +0000
commit8ec91229890dc25f70b4188bff4cdceb65bb38cf (patch)
tree871a42065657e5d182b6c918a9085347f24b4e12 /sys/dev/gem
parent26e1492d4c6a274678008fe49106c1bf9fa69356 (diff)
downloadFreeBSD-src-8ec91229890dc25f70b4188bff4cdceb65bb38cf.zip
FreeBSD-src-8ec91229890dc25f70b4188bff4cdceb65bb38cf.tar.gz
Fully reset a gem on some error conditions; otherwise it would hang in
about 1 of 10 cases. Proposed and tested by: phk
Diffstat (limited to 'sys/dev/gem')
-rw-r--r--sys/dev/gem/if_gem.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/gem/if_gem.c b/sys/dev/gem/if_gem.c
index fe91327..ecff86f 100644
--- a/sys/dev/gem/if_gem.c
+++ b/sys/dev/gem/if_gem.c
@@ -1610,11 +1610,15 @@ gem_intr(v)
int txstat = bus_space_read_4(t, seb, GEM_MAC_TX_STATUS);
if (txstat & ~GEM_MAC_TX_XMIT_DONE)
printf("MAC tx fault, status %x\n", txstat);
+ if (txstat & (GEM_MAC_TX_UNDERRUN | GEM_MAC_TX_PKT_TOO_LONG))
+ gem_init(sc);
}
if (status & GEM_INTR_RX_MAC) {
int rxstat = bus_space_read_4(t, seb, GEM_MAC_RX_STATUS);
if (rxstat & ~(GEM_MAC_RX_DONE | GEM_MAC_RX_FRAME_CNT))
printf("MAC rx fault, status %x\n", rxstat);
+ if ((rxstat & GEM_MAC_RX_OVERFLOW) != 0)
+ gem_init(sc);
}
}
OpenPOWER on IntegriCloud