Merge "usb: pd: Rerun usbpd_sm if RX queue is not empty"

This commit is contained in:
Linux Build Service Account 2017-05-31 17:58:03 -07:00 committed by Gerrit - the friendly Code Review server
commit b467a68d13

View file

@ -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);
}