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:
parent
f46adaf572
commit
873869f78c
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user