From 420bf587298f22081e1975c07546f54573a0fb34 Mon Sep 17 00:00:00 2001 From: "Justin T. Gibbs" Date: Sun, 12 Nov 2000 05:19:46 +0000 Subject: aic7xxx.c: Shutdown the card when a catastrophic error occurs. This quenches any interrupts stemming from the card. aic7xxx_inline.h: Return instead of processing additional interrupt state after handling a catastrophic error. We now shutdown the chip in this case in the hopes that the system can live without this controller. The shutdown process invalidates any other interrupt state. aic7xxx.seq: Only attempt to clear SCSIBUSL on Ultra2 controllers. The clearing is workaround for a selection timeout bug on U2/U160 controllers and happens to be illegal on aic7770 (EISA/VL) controllers. --- sys/dev/aic7xxx/aic7xxx.c | 3 +++ sys/dev/aic7xxx/aic7xxx.seq | 12 +++++++++--- sys/dev/aic7xxx/aic7xxx_inline.h | 5 ++++- 3 files changed, 16 insertions(+), 4 deletions(-) (limited to 'sys') diff --git a/sys/dev/aic7xxx/aic7xxx.c b/sys/dev/aic7xxx/aic7xxx.c index 2a51edcdb9fa..e21b9a191c55 100644 --- a/sys/dev/aic7xxx/aic7xxx.c +++ b/sys/dev/aic7xxx/aic7xxx.c @@ -368,6 +368,9 @@ ahc_handle_brkadrint(struct ahc_softc *ahc) ahc_abort_scbs(ahc, CAM_TARGET_WILDCARD, ALL_CHANNELS, CAM_LUN_WILDCARD, SCB_LIST_NULL, ROLE_UNKNOWN, CAM_NO_HBA); + + /* Disable all interrupt sources by resetting the controller */ + ahc_shutdown(ahc); } void diff --git a/sys/dev/aic7xxx/aic7xxx.seq b/sys/dev/aic7xxx/aic7xxx.seq index 2c1bfdb1b029..2457e50b57fc 100644 --- a/sys/dev/aic7xxx/aic7xxx.seq +++ b/sys/dev/aic7xxx/aic7xxx.seq @@ -57,7 +57,9 @@ poll_for_work: call clear_target_state; and SXFRCTL0, ~SPIOEN; - clr SCSIBUSL; + if ((ahc->features & AHC_ULTRA2) != 0) { + clr SCSIBUSL; + } poll_for_work_loop: test SSTAT0, SELDO|SELDI jnz selection; test SCSISEQ, ENSELO jnz poll_for_work_loop; @@ -508,7 +510,9 @@ target_busfree_wait: test SCSISIGI, ACKI jnz .; target_busfree: and SIMODE1, ~ENBUSFREE; - clr SCSIBUSL; + if ((ahc->features & AHC_ULTRA2) != 0) { + clr SCSIBUSL; + } clr SCSISIGO; mvi LASTPHASE, P_BUSFREE; call complete_target_cmd; @@ -635,7 +639,9 @@ ITloop: await_busfree: and SIMODE1, ~ENBUSFREE; mov NONE, SCSIDATL; /* Ack the last byte */ - clr SCSIBUSL; /* Prevent bit leakage durint SELTO */ + if ((ahc->features & AHC_ULTRA2) != 0) { + clr SCSIBUSL; /* Prevent bit leakage durint SELTO */ + } and SXFRCTL0, ~SPIOEN; test SSTAT1,REQINIT|BUSFREE jz .; test SSTAT1, BUSFREE jnz poll_for_work; diff --git a/sys/dev/aic7xxx/aic7xxx_inline.h b/sys/dev/aic7xxx/aic7xxx_inline.h index c99763249019..6d6df14721c0 100644 --- a/sys/dev/aic7xxx/aic7xxx_inline.h +++ b/sys/dev/aic7xxx/aic7xxx_inline.h @@ -400,8 +400,11 @@ ahc_intr(struct ahc_softc *ahc) ahc_run_tqinfifo(ahc, /*paused*/FALSE); #endif } - if (intstat & BRKADRINT) + if (intstat & BRKADRINT) { ahc_handle_brkadrint(ahc); + /* Fatal error, no more interrupts to handle. */ + return; + } if ((intstat & (SEQINT|SCSIINT)) != 0) ahc_pause_bug_fix(ahc); -- cgit v1.3