SCSI: Use ConditionVariable::NotifyOne, not NotifyAll.
This matches the previous behavior (which just used release_sem or _etc with a count of 1.) The one waiter might delete the object containing the condition variable on wakeup, so the difference does matter.
This commit is contained in:
@@ -194,7 +194,7 @@ finish_autosense(scsi_device_info *device)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// inform peripheral driver
|
// inform peripheral driver
|
||||||
orig_request->completion_cond.NotifyAll();
|
orig_request->completion_cond.NotifyOne();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -325,7 +325,7 @@ scsi_request_finished(scsi_ccb *request, uint num_requests)
|
|||||||
else {
|
else {
|
||||||
// tell peripheral driver about completion
|
// tell peripheral driver about completion
|
||||||
if (!do_autosense)
|
if (!do_autosense)
|
||||||
request->completion_cond.NotifyAll();
|
request->completion_cond.NotifyOne();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -483,7 +483,7 @@ err2:
|
|||||||
if (request->buffered)
|
if (request->buffered)
|
||||||
scsi_release_dma_buffer(request);
|
scsi_release_dma_buffer(request);
|
||||||
err:
|
err:
|
||||||
request->completion_cond.NotifyAll(B_ERROR);
|
request->completion_cond.NotifyOne(B_ERROR);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -571,7 +571,7 @@ scsi_abort(scsi_ccb *req_to_abort)
|
|||||||
scsi_release_dma_buffer(req_to_abort);
|
scsi_release_dma_buffer(req_to_abort);
|
||||||
|
|
||||||
// tell peripheral driver about
|
// tell peripheral driver about
|
||||||
req_to_abort->completion_cond.NotifyAll(B_CANCELED);
|
req_to_abort->completion_cond.NotifyOne(B_CANCELED);
|
||||||
|
|
||||||
if (start_retry)
|
if (start_retry)
|
||||||
release_sem(bus->start_service);
|
release_sem(bus->start_service);
|
||||||
|
|||||||
Reference in New Issue
Block a user