From fca02c516c82caf63d1f863db7e8b1b418f4cb66 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Wed, 20 Jun 2007 18:02:40 +0000 Subject: 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. --- sys/dev/ic/osiop.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'sys') 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 */ } -- cgit v1.2.3