diff options
author | gibbs <gibbs@FreeBSD.org> | 2001-04-01 00:00:09 +0000 |
---|---|---|
committer | gibbs <gibbs@FreeBSD.org> | 2001-04-01 00:00:09 +0000 |
commit | 915b69775d3d6710c74457a892f78f7870bc15d5 (patch) | |
tree | 7e464752451d1a91c7898c116952a0795110cdad /sys/dev/aic7xxx/aic7xxx.c | |
parent | 083b9a8fbebc9b99d94c2a90541462bc70137ef4 (diff) | |
download | FreeBSD-src-915b69775d3d6710c74457a892f78f7870bc15d5.zip FreeBSD-src-915b69775d3d6710c74457a892f78f7870bc15d5.tar.gz |
Change ahc_update_pending_scbs() so that it safe to be called
even if the controller is not paused. This prevents SCB list
corruption that was introduced in the last checkin.
Diffstat (limited to 'sys/dev/aic7xxx/aic7xxx.c')
-rw-r--r-- | sys/dev/aic7xxx/aic7xxx.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/dev/aic7xxx/aic7xxx.c b/sys/dev/aic7xxx/aic7xxx.c index 1e5a8b3..0e4fa18 100644 --- a/sys/dev/aic7xxx/aic7xxx.c +++ b/sys/dev/aic7xxx/aic7xxx.c @@ -1922,6 +1922,7 @@ ahc_update_pending_scbs(struct ahc_softc *ahc) struct scb *pending_scb; int pending_scb_count; int i; + int paused; u_int saved_scbptr; /* @@ -1956,6 +1957,13 @@ ahc_update_pending_scbs(struct ahc_softc *ahc) if (pending_scb_count == 0) return; + if (ahc_is_paused(ahc)) { + paused = 1; + } else { + paused = 0; + ahc_pause(ahc); + } + saved_scbptr = ahc_inb(ahc, SCBPTR); /* Ensure that the hscbs down on the card match the new information */ for (i = 0; i < ahc->scb_data->maxhscbs; i++) { @@ -1978,6 +1986,9 @@ ahc_update_pending_scbs(struct ahc_softc *ahc) ahc_outb(ahc, SCB_SCSIOFFSET, pending_hscb->scsioffset); } ahc_outb(ahc, SCBPTR, saved_scbptr); + + if (paused == 0) + ahc_unpause(ahc); } /**************************** Pathing Information *****************************/ |