Merge "usb: pd: Rerun usbpd_sm if RX queue is not empty"
This commit is contained in:
commit
b467a68d13
1 changed files with 8 additions and 0 deletions
|
@ -2321,6 +2321,14 @@ static void usbpd_sm(struct work_struct *w)
|
|||
sm_done:
|
||||
kfree(rx_msg);
|
||||
|
||||
spin_lock_irqsave(&pd->rx_lock, flags);
|
||||
ret = list_empty(&pd->rx_q);
|
||||
spin_unlock_irqrestore(&pd->rx_lock, flags);
|
||||
|
||||
/* requeue if there are any new/pending RX messages */
|
||||
if (!ret)
|
||||
kick_sm(pd, 0);
|
||||
|
||||
if (!pd->sm_queued)
|
||||
pm_relax(&pd->dev);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue