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:
Justin T. Gibbs 2000-10-09 19:54:54 +00:00
parent 8576ccb74b
commit b00aeda6f0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=66891
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;