IMO, the best answer is just remove this loop, since it does nothing. Or redesign it to be more sane
It waits for ps_processing to become 0 for 3000 ms, but if 3000 ms expires... execution goes forward like as ps_processing was 0 from the beginning
Maybe it's something hw related, like wait for 3000 ms and all will be ok. Can't say...
Hi Pavel,
same with the loop that follows:
/* System suspend is not allowed to wakeup */
if (pwrpriv->bInSuspend) {
while (pwrpriv->bInSuspend &&
(rtw_get_passing_time_ms(start) <= 3000 ||
(rtw_get_passing_time_ms(start) <= 500)))
msleep(10);
}
I just waits 500ms if pwrpriv->bInSuspend is true. Additionaly the
<= 3000 has no effect here because of the ored <= 500.
Even worse the comment seems misleading because pwrpriv->bInSuspend
indicates usb autosuspend but not system suspend.
Attachment:
OpenPGP_signature
Description: OpenPGP digital signature