summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2007-06-20 18:02:40 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2007-06-20 18:02:40 +0000
commitfca02c516c82caf63d1f863db7e8b1b418f4cb66 (patch)
tree4b3dd557b5649d7f0f48c0705447fa6963819b45 /sys
parent11c3921a7b40691b70ba5cd66bae3ebba18ea657 (diff)
Better recovery when osiop goes nuts and spits
osiop0: osiop_select while connected? in loops. Before returning from the interrupt handler, whack the chip. Unfortunately, this causes the few i/o which were queued to time out, but this is better than spinning and eventually panicing.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ic/osiop.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/ic/osiop.c b/sys/dev/ic/osiop.c
index 51d9ec16865..eb526a7cab1 100644
--- a/sys/dev/ic/osiop.c
+++ b/sys/dev/ic/osiop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: osiop.c,v 1.28 2007/05/22 04:14:03 jsg Exp $ */
+/* $OpenBSD: osiop.c,v 1.29 2007/06/20 18:02:39 miod Exp $ */
/* $NetBSD: osiop.c,v 1.9 2002/04/05 18:27:54 bouyer Exp $ */
/*
@@ -1333,7 +1333,11 @@ osiop_checkintr(sc, istat, dstat, sstat0, status)
if (acb == NULL) {
printf("%s: Select timeout with no active command?\n",
sc->sc_dev.dv_xname);
+#if 0
return (0);
+#else
+ goto bad_phase;
+#endif
}
#ifdef OSIOP_DEBUG
if (osiop_read_1(sc, OSIOP_SBCL) & OSIOP_BSY) {
@@ -1708,13 +1712,16 @@ osiop_checkintr(sc, istat, dstat, sstat0, status)
#ifdef OSIOP_DEBUG
if (osiop_debug & DEBUG_DMA)
panic("osiop_chkintr: **** temp ****");
+#if 0
#ifdef DDB
Debugger();
#endif
#endif
+#endif
osiop_reset(sc); /* hard reset */
*status = SCSI_OSIOP_NOSTATUS;
- acb->status = ACB_S_DONE;
+ if (acb != NULL)
+ acb->status = ACB_S_DONE;
return (0); /* osiop_reset cleaned up */
}