Close a race condition that doesn't really exist in -current. When

a resource shortage occurs, freeze our queue and then set the resource
shortage flag while the controller data structure is locked.  The old
code did these in the wrong order potentially allowing our interrupt
handler to release the queue and clear the flag before the freeze
ever occurred.
This commit is contained in:
gibbs 2000-10-09 19:54:54 +00:00
parent f46adaf572
commit 873869f78c
2 changed files with 2 additions and 2 deletions

View File

@ -433,9 +433,9 @@ ahc_action(struct cam_sim *sim, union ccb *ccb)
ahc_lock(ahc, &s);
if ((scb = ahc_get_scb(ahc)) == NULL) {
xpt_freeze_simq(sim, /*count*/1);
ahc->flags |= AHC_RESOURCE_SHORTAGE;
ahc_unlock(ahc, &s);
xpt_freeze_simq(sim, /*count*/1);
ccb->ccb_h.status = CAM_REQUEUE_REQ;
xpt_done(ccb);
return;

View File

@ -433,9 +433,9 @@ ahc_action(struct cam_sim *sim, union ccb *ccb)
ahc_lock(ahc, &s);
if ((scb = ahc_get_scb(ahc)) == NULL) {
xpt_freeze_simq(sim, /*count*/1);
ahc->flags |= AHC_RESOURCE_SHORTAGE;
ahc_unlock(ahc, &s);
xpt_freeze_simq(sim, /*count*/1);
ccb->ccb_h.status = CAM_REQUEUE_REQ;
xpt_done(ccb);
return;