Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b467a68d authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

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

parents abaf8c7a ae024ed4
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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);
}