On Thu, Feb 02, 2023, Jack Pham wrote: > On Thu, Feb 02, 2023 at 08:10:01PM +0000, Thinh Nguyen wrote: > > On Thu, Feb 02, 2023, Linyu Yuan wrote: > > > > > > On 2/2/2023 3:05 AM, Thinh Nguyen wrote: > > > > On Wed, Feb 01, 2023, Linyu Yuan wrote: > > > > > Consider there is interrpt sequences as suspend (U3) -> wakeup (U0) -> > > > > interrupt? > > > > > > > > > thanks, will change next version. > > > > > > > > > > > > > > > suspend (U3), as there is no update to link state in wakeup interrupt, > > > > Instead of "no update", can you note in the commit that the link state > > > > change event is not enabled for most devices, so the driver doesn't > > > > update its link_state. > > > > > > > > > thanks, will change next version. > > > > > > > > > > > > > > > the second suspend interrupt will not report to upper layer. > > > > > > > > > > Fix it by update link state in wakeup interrupt handler. > > > > > > > > > > Cc: stable@xxxxxxxxxxxxxxx > > > > Can you add fix tag? > > > > > > > > > seem this change can apply to all current stable kernel. > > > > Did we have handling of suspend/resume since the beginning? If we did, > > please add a fix tag to the commit when the driver first added. > > > > That helps to know that this is a fix patch. > > Suspend was added with my change: d1d90dd27254 ("usb: dwc3: gadget: Enable suspend > events"), so arguably the link_state mismatch of $SUBJECT wouldn't have occurred > prior to that if suspend_interrupt() never got called right? ;) > > But strictly speaking, wakeup_interrupt() was introduced all the way back > in the first commit 72246da40f37 ("usb: Introduce DesignWare USB3 DRD Driver") > and had not been changed since. > > Any preference which tag to choose for Fixes? > Perhaps this: 72704f876f50 ("dwc3: gadget: Implement the suspend entry event handler") Thanks, Thinh