USBMSC: Fix reversed logic on waiting for SCSI thread start.
The scsi thread was waiting for the wrong condition. However, this was masked by the fact that the code creating the scsi thread was also holding usbmsc_scsi_lock(priv) while initializing data, hence this lock synchronized the scsi thread start with init completion.
This commit is contained in:
parent
2974d2b07e
commit
4f83d58b24
|
@ -2641,8 +2641,8 @@ int usbmsc_scsi_main(int argc, char *argv[])
|
|||
uinfo("Waiting to be signalled\n");
|
||||
usbmsc_scsi_lock(priv);
|
||||
priv->thstate = USBMSC_STATE_STARTED;
|
||||
while ((priv->theventset & USBMSC_EVENT_READY) != 0 &&
|
||||
(priv->theventset & USBMSC_EVENT_TERMINATEREQUEST) != 0)
|
||||
while ((priv->theventset & USBMSC_EVENT_READY) == 0 &&
|
||||
(priv->theventset & USBMSC_EVENT_TERMINATEREQUEST) == 0)
|
||||
{
|
||||
usbmsc_scsi_wait(priv);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue