Isochronous URB submission failure upon resume

Laurent Pinchart <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
Hi everybody,

I'm having an intermittent failure when submitting URB after resume from 
suspend-to-RAM (kernel 2.6.22).

The driver (uvcvideo, a webcam driver available at 
http://linux-uvc.berlios.de) implements suspend/resume support. If a video 
transfer is active at suspend time, it cancels active URBs and resubmits them 
when resuming.

Resubmitting URBs at resume time works. However, usb_submit_urb() then 
sometimes fail pretty soon when called in the URB completion handler. Here's 
a kernel log excerpt from resume time:

uvcvideo: Resuming interface 0
uvcvideo: Resuming interface 1
 usbdev4.4_ep00: PM: resume from 0, parent 4-1 still 2
hci_usb 4-1:1.0: PM: resume from 2, parent 4-1 still 2
hci0: PM: resume from 0, parent 4-1:1.0 still 2
 usbdev4.4_ep81: PM: resume from 0, parent 4-1:1.0 still 2
 usbdev4.4_ep02: PM: resume from 0, parent 4-1:1.0 still 2
 usbdev4.4_ep82: PM: resume from 0, parent 4-1:1.0 still 2
usb 4-1:1.1: PM: resume from 2, parent 4-1 still 2
 usbdev4.4_ep03: PM: resume from 0, parent 4-1:1.1 still 2
 usbdev4.4_ep83: PM: resume from 0, parent 4-1:1.1 still 2
usb 4-1:1.2: PM: resume from 2, parent 4-1 still 2
 usbdev4.4: PM: resume from 0, parent 4-1 still 2
 usbdev4.5_ep00: PM: resume from 0, parent 4-2 still 2
 usbdev4.5_ep81: PM: resume from 0, parent 4-2:1.0 still 2
 usbdev4.5_ep82: PM: resume from 0, parent 4-2:1.0 still 2
 usbdev4.5: PM: resume from 0, parent 4-2 still 2
Restarting tasks ... <6>usb 4-1: USB disconnect, address 4
uvcvideo: Failed to resubmit video URB (-45).
uvcvideo: Failed to resubmit video URB (-45).
uvcvideo: Failed to resubmit video URB (-45).
uvcvideo: Failed to resubmit video URB (-45).
done.

The driver submits isoc URBs when printing the second message ('Resuming 
interface 1'). When tasks are restarted, it fails to resubmit them in the URB 
completion handler.

When the URB submission doesn't fail, the kernel log contains the following 
messages:

 usbdev4.2_ep00: PM: resume from 0, parent 4-1 still 2
hci_usb 4-1:1.0: PM: resume from 2, parent 4-1 still 2
 usbdev4.2_ep81: PM: resume from 0, parent 4-1:1.0 still 2
 usbdev4.2_ep02: PM: resume from 0, parent 4-1:1.0 still 2
 usbdev4.2_ep82: PM: resume from 0, parent 4-1:1.0 still 2
 usbdev4.2_ep03: PM: resume from 0, parent 4-1:1.1 still 2
 usbdev4.2_ep83: PM: resume from 0, parent 4-1:1.1 still 2
 usbdev4.2: PM: resume from 0, parent 4-1 still 2
 usbdev4.3_ep00: PM: resume from 0, parent 4-2 still 2
 usbdev4.3_ep81: PM: resume from 0, parent 4-2:1.0 still 2
 usbdev4.3_ep82: PM: resume from 0, parent 4-2:1.0 still 2
 usbdev4.3: PM: resume from 0, parent 4-2 still 2
ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
hci0: PM: resume from 0, parent 4-1:1.0 still 2
uvcvideo: Resuming interface 0
uvcvideo: Resuming interface 1
uvcvideo: interface 1 altsetting 3
Restarting tasks ... <6>usb 4-1: USB disconnect, address 2
done.

I'm not familiar with the usbcore suspend/resume implementation. Could someone 
help me to diagnose the problem ?

Best regards,

Laurent Pinchart

PS: I'll leave for a week tomorrow morning, so I won't be able to reply before 
a week if your answer comes after tonight. I'll of course follow up when I 
come back.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.