Re: [PATCH] usb: dwc3: update link state when process wakeup interrupt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 03, 2023, Linyu Yuan wrote:
> > 
> > Perhaps we should not update dwc->link_state outside of link state
> > change event, and just track whether we called gadget_driver->suspend()
> > to call the correspond resume() on wakeup? It can be tracked with
> > dwc->gadget_driver_is_suspended.
> 
> 
> could you help provide a change for this idea ?
> 
> 

Sorry for the delay in response. I was hoping to be able to allocate
some time to write an experimental patch for this, but it looks like it
may take some more time. The idea is to separate the use of
dwc->link_state for its own purpose and track suspend/resume separately
as a toggle flag only. So that we won't repeat gadget driver suspend()
or wakeup() operations.

Ideally we don't even need to do this. My concern is this check in
dwc3_gadget_suspend_interrupt():
	if (dwc->link_state != next && next == DWC3_LINK_STATE_U3)

This was done 7 years ago with little info on why it was handled that
way in the commit. My suspicion is the setup from Baolin may disabled
link state change event also, which would require this check to
determine if it had toggled (however it's not a good check as you're
working to fix it now).

I don't expect this fix to be big.

Thanks,
Thinh




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux