Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/sys/dev/pci Apply patch (requested by jhawk):
details: https://anonhg.NetBSD.org/src/rev/fb5c324a81cd
branches: netbsd-1-4
changeset: 470624:fb5c324a81cd
user: he <he%NetBSD.org@localhost>
date: Thu Jun 01 17:15:27 2000 +0000
description:
Apply patch (requested by jhawk):
Calibrate the timeouts by using DELAY(1) so their values are less
machine-dependant. Fixes PR#10141, where spurious timeouts were
being seen. Also report the line numbers of the timeouts so it
can be determined which is being seen.
diffstat:
sys/dev/pci/if_fxp.c | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)
diffs (49 lines):
diff -r c44ee7d663a7 -r fb5c324a81cd sys/dev/pci/if_fxp.c
--- a/sys/dev/pci/if_fxp.c Thu May 25 23:04:12 2000 +0000
+++ b/sys/dev/pci/if_fxp.c Thu Jun 01 17:15:27 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_fxp.c,v 1.33.2.1 2000/05/13 18:24:52 he Exp $ */
+/* $NetBSD: if_fxp.c,v 1.33.2.2 2000/06/01 17:15:27 he Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -1420,13 +1420,16 @@
bus_dmamap_sync(sc->sc_dmat, sc->sc_tx_dmamaps[0],
0, sizeof(struct fxp_cb_config),
BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE);
- i = 10000;
- while (!(cbp->cb_status & FXP_CB_STATUS_C) && --i)
+ i = 1000;
+ while (!(cbp->cb_status & FXP_CB_STATUS_C) && --i) {
bus_dmamap_sync(sc->sc_dmat, sc->sc_tx_dmamaps[0],
0, sizeof(struct fxp_cb_config),
BUS_DMASYNC_POSTREAD);
+ DELAY(1);
+ }
if (i == 0) {
- printf("%s: dmasync timeout\n", sc->sc_dev.dv_xname);
+ printf("%s at line %d: dmasync timeout\n",
+ sc->sc_dev.dv_xname, __LINE__);
return;
}
@@ -1464,13 +1467,16 @@
bus_dmamap_sync(sc->sc_dmat, sc->sc_tx_dmamaps[0],
0, sizeof(struct fxp_cb_ias),
BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE);
- i = 10000;
- while (!(cb_ias->cb_status & FXP_CB_STATUS_C) && --i)
+ i = 1000;
+ while (!(cb_ias->cb_status & FXP_CB_STATUS_C) && --i) {
bus_dmamap_sync(sc->sc_dmat, sc->sc_tx_dmamaps[0],
0, sizeof(struct fxp_cb_ias),
BUS_DMASYNC_POSTREAD);
+ DELAY(1);
+ }
if (i == 0) {
- printf("%s: dmasync timeout\n", sc->sc_dev.dv_xname);
+ printf("%s at line %d: dmasync timeout\n",
+ sc->sc_dev.dv_xname, __LINE__);
return;
}
Home |
Main Index |
Thread Index |
Old Index