summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2011-05-07 00:18:58 +0000
committeryongari <yongari@FreeBSD.org>2011-05-07 00:18:58 +0000
commit3a014bc50fc152226a313ec5ce203034b68f1d96 (patch)
treece3997a835fb4e045a7d297f0b3ab64731fcb86a
parent091c72cf13ccb4e7622eded8e54e781bf5832119 (diff)
downloadFreeBSD-src-3a014bc50fc152226a313ec5ce203034b68f1d96.zip
FreeBSD-src-3a014bc50fc152226a313ec5ce203034b68f1d96.tar.gz
Rearm watchdog timer if driver kick controller to recover from TX
underrun error. While here, prepend 0x to status code to show TX status is hex number.
-rw-r--r--sys/dev/xl/if_xl.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/xl/if_xl.c b/sys/dev/xl/if_xl.c
index a63a314..03a7114 100644
--- a/sys/dev/xl/if_xl.c
+++ b/sys/dev/xl/if_xl.c
@@ -2207,7 +2207,7 @@ xl_txeoc(struct xl_softc *sc)
txstat & XL_TXSTATUS_JABBER ||
txstat & XL_TXSTATUS_RECLAIM) {
device_printf(sc->xl_dev,
- "transmission error: %x\n", txstat);
+ "transmission error: 0x%02x\n", txstat);
CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_TX_RESET);
xl_wait(sc);
if (sc->xl_type == XL_TYPE_905B) {
@@ -2220,11 +2220,14 @@ xl_txeoc(struct xl_softc *sc)
CSR_WRITE_4(sc, XL_DOWNLIST_PTR,
c->xl_phys);
CSR_WRITE_1(sc, XL_DOWN_POLL, 64);
+ sc->xl_wdog_timer = 5;
}
} else {
- if (sc->xl_cdata.xl_tx_head != NULL)
+ if (sc->xl_cdata.xl_tx_head != NULL) {
CSR_WRITE_4(sc, XL_DOWNLIST_PTR,
sc->xl_cdata.xl_tx_head->xl_phys);
+ sc->xl_wdog_timer = 5;
+ }
}
/*
* Remember to set this for the
OpenPOWER on IntegriCloud