Re: BUG: USB Reset-Resume Mechanism does not work for runtime resume

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

 



On Wed, Mar 05, 2014 at 11:26:06AM -0500, Alan Stern wrote:
> On Wed, 5 Mar 2014, Poulain, Loic wrote:
> 
> > + function 'do_rebind_interface' is in charge of unbind and rebind the interfaces with the 'need_binfind' flag set.
> > + However this method is only called in 'usb_resume_complete'.
> > + Problem is that 'usb_resume_complete' is a dev_pm_ops callback (core/usb.h) used by the System PM core which is never called in a runtime PM scenario.
> > + So interfaces remain suspended forever (or until the next PM system suspend/resume), device is unusable.
> > (unbinding/rebinding manually the interface via sysfs recovers the device)
> > 
> > Could you please let me know if it's the expected behavior or a real issue. Should we not call 'do_rebind_interface' in the runtime resume sequence?
> 
> I suspect this is an oversight.
> 
> Still, implementing it would be difficult.  In usb_runtime_resume, the 
> device lock may or may not already be held.  Therefore we cannot simply 
> lock the device and call do_rebind_interfaces.
> 
> Using a work queue for this seems like overkill (and it seems fragile).  
> I don't know what we should do.
> 

If the autosuspend supported device can't respond resume correctly, eg,
after resume, it can't respond GET_STATUS correctly in this case, the
.reset_resume interface is a must for class driver, it just like a
workaround for broken hardware.

-- 

Best Regards,
Peter Chen

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




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

  Powered by Linux