On Wed, 5 May 2010, Rob Duncan wrote: > OK, so even though the device's own usage_count is 0, the child_count == 1 means > that one of the interfaces are busy. Is that right? Right. Or at least, the kernel _thinks_ one of the interfaces is busy. > > For an interface, the usage_count is manipulated mostly in the > > non-is_usb_device() pathways of the usb_autopm_*_interface_* routines. > > To confuse things, the driver and PM cores also make a few changes of > > their own (especially during probing) -- but these changes should add > > up to 0 in the end. > > I have VERBOSE_DEBUG enabled in driver.c, and I do not see the usb_autopm_*_interface_* > routines being called for my interfaces. Note that there are no debugging printk's in usb_autopm_put_interface_no_suspend() or usb_autopm_get_interface_no_resume(). I guess I should add some. Anyway, you'll want to see if they are getting called. If that doesn't show anything then you'll need to print out the values of all the interfaces' dev.power.usage_count fields at some strategic spots, like in usb_autoresume_device() and usb_autosuspend_device(). > I should mention that all I am doing at this stage is attaching the device. No > application is opening it, and my driver has not made any usb_autopm_*_interface_* > calls itself. Am I right to expect my suspend routine to be called in this case? Yes, I think it should. Alan Stern -- 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