Hi Greg KH,

I have a query regarding the USB-FS driver, usb/core/devio.c.

It looks like it takes a PM ref-count on the USB device in its .open() and 
release the PM ref-count on the USB device in its .release().

As a result of this, the USB suspend (L2) does not seem to happen, even if all 
the interface drivers of a composite USB device report "idle" to USB core 
driver. The USB suspend seem to happen only when the caller in user-space (in 
our case) closes the device file.

Is this correct understanding?

If yes, could you please help understand -
1. Any specific reason to choose this design approach? Apologies, but "git 
blame" does not reveal much information (or maybe I did not do git blame on 
correct kernel version).
2. Is it possible to modify this driver to take PM ref-count on USB device, 
only when user-space is actively interacting with the USB device (so in 
open/close and appropriate ioctl calls, with special handling for async URB 
submission)?
3. Will (2) break any known existing device(s)?

Please feel free to correct if any of above information/questions are incorrect 
or incorrectly understood.

Best Regards,
Mayuresh

Reply via email to