Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-2-0]: src/sys/dev/ic Pullup rev 1.82 (requested by briggs in tick...
details: https://anonhg.NetBSD.org/src/rev/b7f4b305ae55
branches: netbsd-2-0
changeset: 560223:b7f4b305ae55
user: jmc <jmc%NetBSD.org@localhost>
date: Thu Apr 01 23:36:02 2004 +0000
description:
Pullup rev 1.82 (requested by briggs in ticket #45)
Be more careful about issuing CU_RESUME in fxp_start()--only doing
it if we think it's probably necessary. Then do it again in the
tx interrupt handler, if we again think it's necessary. This
reduces the number of commands we issue the chip. Prior to this
change, the i82550 (running without extended feature set, so like
a '559) would sometimes fail in fxp_scb_wait() prior to issuing
another CU_RESUME, resulting in
fxp0: WARNING: SCB timed out!
messages on the console, often followed by device timeouts.
diffstat:
sys/dev/ic/i82557.c | 21 +++++++++++++++++----
1 files changed, 17 insertions(+), 4 deletions(-)
diffs (50 lines):
diff -r 094ff56902e9 -r b7f4b305ae55 sys/dev/ic/i82557.c
--- a/sys/dev/ic/i82557.c Thu Apr 01 23:31:58 2004 +0000
+++ b/sys/dev/ic/i82557.c Thu Apr 01 23:36:02 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i82557.c,v 1.81 2004/02/19 14:21:40 yamt Exp $ */
+/* $NetBSD: i82557.c,v 1.81.2.1 2004/04/01 23:36:02 jmc Exp $ */
/*-
* Copyright (c) 1997, 1998, 1999, 2001, 2002 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i82557.c,v 1.81 2004/02/19 14:21:40 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i82557.c,v 1.81.2.1 2004/04/01 23:36:02 jmc Exp $");
#include "bpfilter.h"
#include "rnd.h"
@@ -1089,9 +1089,18 @@
/*
* Issue a Resume command in case the chip was suspended.
+ * We only do this if we know we were idle before. If we
+ * weren't idle before, we might be now, but we should also
+ * have a pending interrupt, and we'll kick it again, there.
+ * This might result in a tiny delay, but it also prevents
+ * us from slamming the chip with CU_RESUME commands, which
+ * might sometimes fail, resulting in SCB timeouts in
+ * fxp_scb_wait().
*/
- fxp_scb_wait(sc);
- fxp_scb_cmd(sc, FXP_SCB_COMMAND_CU_RESUME);
+ if (opending == 0) {
+ fxp_scb_wait(sc);
+ fxp_scb_cmd(sc, FXP_SCB_COMMAND_CU_RESUME);
+ }
/* Set a watchdog timer in case the chip flakes out. */
ifp->if_timer = 5;
@@ -1224,6 +1233,10 @@
*/
if (sc->sc_txpending == 0)
ifp->if_timer = 0;
+ else {
+ fxp_scb_wait(sc);
+ fxp_scb_cmd(sc, FXP_SCB_COMMAND_CU_RESUME);
+ }
}
/*
Home |
Main Index |
Thread Index |
Old Index