diff options
author | gibbs <gibbs@FreeBSD.org> | 2004-08-13 21:41:23 +0000 |
---|---|---|
committer | gibbs <gibbs@FreeBSD.org> | 2004-08-13 21:41:23 +0000 |
commit | c2e804d77e2983933cc05fabd70efb8aca941968 (patch) | |
tree | 65673699df7b34be3352aeff559ab21a1e3d9a29 /sys/dev/aic7xxx | |
parent | 2e970a26417ab03e0be4a24f1674e37a3448c3fc (diff) | |
download | FreeBSD-src-c2e804d77e2983933cc05fabd70efb8aca941968.zip FreeBSD-src-c2e804d77e2983933cc05fabd70efb8aca941968.tar.gz |
Extend critical section protection around portions of selection processing
that cannot tolerate changes to the waiting for selection queue by the
host or the host canceling an active selection.
Diffstat (limited to 'sys/dev/aic7xxx')
-rw-r--r-- | sys/dev/aic7xxx/aic7xxx.seq | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/aic7xxx/aic7xxx.seq b/sys/dev/aic7xxx/aic7xxx.seq index 1519639..810d766 100644 --- a/sys/dev/aic7xxx/aic7xxx.seq +++ b/sys/dev/aic7xxx/aic7xxx.seq @@ -83,7 +83,9 @@ poll_for_work: xor SBLKCTL,SELBUSB; /* Toggle to the other bus */ test SCSISEQ, ENSELO jnz poll_for_selection; } +BEGIN_CRITICAL; cmp WAITING_SCBH,SCB_LIST_NULL jne start_waiting; +END_CRITICAL; poll_for_work_loop: if ((ahc->features & AHC_TWIN) != 0) { xor SBLKCTL,SELBUSB; /* Toggle to the other bus */ @@ -141,13 +143,13 @@ BEGIN_CRITICAL; inc QINPOS; } and SEQ_FLAGS2, ~SCB_DMA; -END_CRITICAL; start_waiting: /* * Start the first entry on the waiting SCB list. */ mov SCBPTR, WAITING_SCBH; call start_selection; +END_CRITICAL; poll_for_selection: /* @@ -355,6 +357,7 @@ abort_qinscb: call add_scb_to_free_list; jmp poll_for_work_loop; +BEGIN_CRITICAL; start_selection: /* * If bus reset interrupts have been disabled (from a previous @@ -388,6 +391,7 @@ initialize_scsiid: } else { mov SCSISEQ, SCSISEQ_TEMPLATE ret; } +END_CRITICAL; /* * Initialize transfer settings with SCB provided settings. |