summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>1999-05-23 18:55:58 +0000
committergibbs <gibbs@FreeBSD.org>1999-05-23 18:55:58 +0000
commit9b2b6e4e609892474c1f1ff68c0f7707970bfd71 (patch)
treea1a44f22754f522c1381fba518a7e88037c7351d
parentc86e0744cb1501c41c480260eee8e436c219ea2f (diff)
downloadFreeBSD-src-9b2b6e4e609892474c1f1ff68c0f7707970bfd71.zip
FreeBSD-src-9b2b6e4e609892474c1f1ff68c0f7707970bfd71.tar.gz
Don't reference our SCB until we have validated that the firmware has
returned an SCB that is in range.
-rw-r--r--sys/dev/aic7xxx/aic7xxx.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/aic7xxx/aic7xxx.c b/sys/dev/aic7xxx/aic7xxx.c
index 7f243f6..9f050a7 100644
--- a/sys/dev/aic7xxx/aic7xxx.c
+++ b/sys/dev/aic7xxx/aic7xxx.c
@@ -36,7 +36,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: aic7xxx.c,v 1.29 1999/05/18 03:58:49 gibbs Exp $
+ * $Id: aic7xxx.c,v 1.30 1999/05/22 22:04:07 gibbs Exp $
*/
/*
* A few notes on features of the driver.
@@ -2161,7 +2161,6 @@ ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat)
*/
scb_index = ahc_inb(ahc, SCB_TAG);
scb = &ahc->scb_data->scbarray[scb_index];
- hscb = scb->hscb;
/*
* Set the default return value to 0 (don't
@@ -2178,6 +2177,8 @@ ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat)
goto unpause;
}
+ hscb = scb->hscb;
+
/* Don't want to clobber the original sense code */
if ((scb->flags & SCB_SENSE) != 0) {
/*
OpenPOWER on IntegriCloud