Re: Autosuspend and unbound interfaces

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

 



On May 5, 2010, at 1:09 PM, Alan Stern wrote:

> On Wed, 5 May 2010, Rob Duncan wrote:
>
>> On May 5, 2010, at 12:03 PM, Alan Stern wrote:
>>
>>>> May  5 11:34:00 localhost kernel: usb 3-3: usb_autoresume_device: cnt 1 -> 1
>>>> May  5 11:34:00 localhost kernel: usb 3-3: usb_autosuspend_device: cnt 0 -> -16
>>>
>>> These -EBUSY error codes indicate that the usage_count for one of the
>>> interfaces is nonzero.  (Well, it could be something else, like the
>>> child_count, but most likely it's the usage_count.)
>>
>> It appears that usb_autosuspend_device() is returning -EBUSY because
>> __pm_runtime_idle() sees !pm_children_suspended().
>>
>> The child_count is 1, and ignore_children is 0.
>
> Right, that's what I said: The children of a device are its interfaces.
> You need to find out which interface has a positive usage_count and
> why.

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?

> 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.

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?

Thanks,

Rob.


The information and any attached documents contained in this message
may be confidential and/or legally privileged.  The message is
intended solely for the addressee(s).  If you are not the intended
recipient, you are hereby notified that any use, dissemination, or
reproduction is strictly prohibited and may be unlawful.  If you are
not the intended recipient, please contact the sender immediately by
return e-mail and destroy all copies of the original message.
--
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