diff options
author | gibbs <gibbs@FreeBSD.org> | 2003-12-19 04:17:43 +0000 |
---|---|---|
committer | gibbs <gibbs@FreeBSD.org> | 2003-12-19 04:17:43 +0000 |
commit | 520da0a57cd69937f5f712cc0a9b9de36f6f60b5 (patch) | |
tree | 8531485471042dfcb68673cd29d911a7f8ad0858 /sys/dev/aic7xxx | |
parent | 9916b5df7f088764ee235dc591abd537588a8e94 (diff) | |
download | FreeBSD-src-520da0a57cd69937f5f712cc0a9b9de36f6f60b5.zip FreeBSD-src-520da0a57cd69937f5f712cc0a9b9de36f6f60b5.tar.gz |
In ahd_run_qoutfifos, correct a !=/== logic bug
that would cause an infinite loop any time we
manually flush the good status FIFO. Also make
our loop delay unconditional to ensure we don't
miss any FIFO allocations by the hardware.
Diffstat (limited to 'sys/dev/aic7xxx')
-rw-r--r-- | sys/dev/aic7xxx/aic79xx.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/sys/dev/aic7xxx/aic79xx.c b/sys/dev/aic7xxx/aic79xx.c index b00700a..e224edb 100644 --- a/sys/dev/aic7xxx/aic79xx.c +++ b/sys/dev/aic7xxx/aic79xx.c @@ -37,7 +37,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: //depot/aic7xxx/aic7xxx/aic79xx.c#223 $ + * $Id: //depot/aic7xxx/aic7xxx/aic79xx.c#224 $ */ #ifdef __linux__ @@ -404,20 +404,12 @@ rescan_fifos: /* Toggle to the other mode. */ fifo_mode ^= 1; ahd_set_modes(ahd, fifo_mode, fifo_mode); - if (ahd_scb_active_in_fifo(ahd, scb) != 0) + + if (ahd_scb_active_in_fifo(ahd, scb) == 0) continue; ahd_run_data_fifo(ahd, scb); - if (ahd_scb_active_in_fifo(ahd, scb) != 0) { - /* - * Delay a bit so that status has - * a chance to change before we look - * at this FIFO again. - */ - aic_delay(200); - } - /* * Running this FIFO may cause a CFG4DATA for * this same transaction to assert in the other @@ -428,8 +420,11 @@ rescan_fifos: * until the transaction is not active in either * FIFO just to be sure. Reset our loop counter * so we will visit both FIFOs again before - * declaring this transaction finished. + * declaring this transaction finished. We + * also delay a bit so that status has a chance + * to change before we look at this FIFO again. */ + aic_delay(200); goto rescan_fifos; } ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI); |