Loading drivers/usb/pd/policy_engine.c +11 −3 Original line number Diff line number Diff line Loading @@ -1165,7 +1165,10 @@ static void phy_msg_received(struct usbpd *pd, enum pd_sop_type sop, list_add_tail(&rx_msg->entry, &pd->rx_q); spin_unlock_irqrestore(&pd->rx_lock, flags); if (!work_busy(&pd->sm_work)) kick_sm(pd, 0); else usbpd_dbg(&pd->dev, "usbpd_sm already running\n"); } static void phy_shutdown(struct usbpd *pd) Loading Loading @@ -3385,7 +3388,7 @@ static void usbpd_sm(struct work_struct *w) spin_unlock_irqrestore(&pd->rx_lock, flags); /* requeue if there are any new/pending RX messages */ if (!ret) if (!ret && !pd->sm_queued) kick_sm(pd, 0); if (!pd->sm_queued) Loading Loading @@ -3477,7 +3480,12 @@ static int psy_changed(struct notifier_block *nb, unsigned long evt, void *ptr) usbpd_dbg(&pd->dev, "hard reset: typec mode:%d present:%d\n", typec_mode, pd->vbus_present); pd->typec_mode = typec_mode; if (!work_busy(&pd->sm_work)) kick_sm(pd, 0); else usbpd_dbg(&pd->dev, "usbpd_sm already running\n"); return 0; } Loading Loading
drivers/usb/pd/policy_engine.c +11 −3 Original line number Diff line number Diff line Loading @@ -1165,7 +1165,10 @@ static void phy_msg_received(struct usbpd *pd, enum pd_sop_type sop, list_add_tail(&rx_msg->entry, &pd->rx_q); spin_unlock_irqrestore(&pd->rx_lock, flags); if (!work_busy(&pd->sm_work)) kick_sm(pd, 0); else usbpd_dbg(&pd->dev, "usbpd_sm already running\n"); } static void phy_shutdown(struct usbpd *pd) Loading Loading @@ -3385,7 +3388,7 @@ static void usbpd_sm(struct work_struct *w) spin_unlock_irqrestore(&pd->rx_lock, flags); /* requeue if there are any new/pending RX messages */ if (!ret) if (!ret && !pd->sm_queued) kick_sm(pd, 0); if (!pd->sm_queued) Loading Loading @@ -3477,7 +3480,12 @@ static int psy_changed(struct notifier_block *nb, unsigned long evt, void *ptr) usbpd_dbg(&pd->dev, "hard reset: typec mode:%d present:%d\n", typec_mode, pd->vbus_present); pd->typec_mode = typec_mode; if (!work_busy(&pd->sm_work)) kick_sm(pd, 0); else usbpd_dbg(&pd->dev, "usbpd_sm already running\n"); return 0; } Loading