Skip to contentSkip to conversation

pwc-webcam attached to usb-ohci card blocks on read() indefinitely.

DISCUSSION Thomas Winischhofer 3 participants 5 messages Mar 8, 2002 – Mar 9, 2002

lore
Share & tools
lore
#0 lore raw
Quoted 7 lines

The camera attached to the UHCI-controller running usb-uhci works just fine,out the three attached to the OHCI-controllers running usb-ohci don't. After a random amount of frames being read from a camera the read()-call blocks indefinitely until the device is closed. Next time the v4l-device is opened the program can again read frames from the camera but read() always blocks after some time.

I can't help, but I have the exact same problem here. Closing the application (eg. camstream) and re-opening it makes it work again for a while.

As Carl-Johan said, this happens with or without the pwcx module, so that's not the problem.

I think it's an ohci problem.

Furthermore, the usb driver(s) behave strangely on connecting/disconnecting the camera. Sometimes this works flawlessly, sometimes I get a lot of USB timeout ("usb_control/bulk_msg: timeout") and/or "USBDEVFS_CONTROL failed dev x rqt 128 rq 6 len 490 ret -110" messages in the syslog. (Kernel is 2.4.16 and 2.4.18 - no difference) After a couple of times disconnecting and reconnecting the camera it's being detected. Since 2.4.18, the camera's LED sometimes is on, sometimes off - seems quite random.

Even closing the cam application (xawtv, camstream) after the camera stopped working never results in any error messages in the log, I only read "pwc: Closing video device: xxx frames received, dumped 0 frames, 0 frames with errors"

Thomas

Signature · 3 lines
Thomas Winischhofer
Vienna/Austria
mailto:[email protected]                  *** http://www.webit.com/tw
#1 lore raw
Quoted 5 lines · Thomas Winischhofer

Furthermore, the usb driver(s) behave strangely on connecting/disconnecting the camera. Sometimes this works flawlessly, sometimes I get a lot of USB timeout ("usb_control/bulk_msg: timeout") and/or "USBDEVFS_CONTROL failed dev x rqt 128 rq 6 len 490 ret -110" messages in the syslog. (Kernel is 2.4.16 and 2.4.18 - no difference)

Try removing /sbin/usbmodules (or renaming it) to see if this problem goes away. I have the same problem with some devices too, and am working on tracking it down.

thanks,

greg k-h

#2 lore raw
In reply to Thomas Winischhofer

Just as a FYI, I had similar trouble using usb-uhci (440BX chipset) to a 680K using pwc/pwcx. I had to add a bunch of error recovery (close / open device, ignore open() failing and retry, etc).

I get a group of EMC messages logged , then the reset seems to take quite a while.

(2.4.19-pre2-ac2, but have seem this will many recent 2.4.x kernels)

Mark

Quoted 33 lines · Thomas Winischhofer
Quoted 6 lines

The camera attached to the UHCI-controller running usb-uhci works just fine,out the three attached to the OHCI-controllers running usb-ohci don't. After a random amount of frames being read from a camera the read()-call blocks indefinitely until the device is closed. Next time the v4l-device is opened the program can again read frames from the camera but read() always blocks after some time.

I can't help, but I have the exact same problem here. Closing the application (eg. camstream) and re-opening it makes it work again for a while.

As Carl-Johan said, this happens with or without the pwcx module, so that's not the problem.

I think it's an ohci problem.

Furthermore, the usb driver(s) behave strangely on connecting/disconnecting the camera. Sometimes this works flawlessly, sometimes I get a lot of USB timeout ("usb_control/bulk_msg: timeout") and/or "USBDEVFS_CONTROL failed dev x rqt 128 rq 6 len 490 ret -110" messages in the syslog. (Kernel is 2.4.16 and 2.4.18 - no difference) After a couple of times disconnecting and reconnecting the camera it's being detected. Since 2.4.18, the camera's LED sometimes is on, sometimes off - seems quite random.

Even closing the cam application (xawtv, camstream) after the camera stopped working never results in any error messages in the log, I only read "pwc: Closing video device: xxx frames received, dumped 0 frames, 0 frames with errors"

Thomas

Signature · 5 lines
+-------------------------------------------------------------------------+
Mark Cooke                  The views expressed above are mine and are not
Systems Programmer          necessarily representative of university policy
University Of Birmingham    URL: http://www.sr.bham.ac.uk/~mpc/
+-------------------------------------------------------------------------+
#3 lore raw
In reply to Thomas Winischhofer
Quoted 11 lines · Greg KH
Quoted 5 lines · Thomas Winischhofer

Furthermore, the usb driver(s) behave strangely on connecting/disconnecting the camera. Sometimes this works flawlessly, sometimes I get a lot of USB timeout ("usb_control/bulk_msg: timeout") and/or "USBDEVFS_CONTROL failed dev x rqt 128 rq 6 len 490 ret -110" messages in the syslog. (Kernel is 2.4.16 and 2.4.18 - no difference)

Try removing /sbin/usbmodules (or renaming it) to see if this problem goes away. I have the same problem with some devices too, and am working on tracking it down.

This actually made it, thanks so far! (usbmodules is located in /usr/sbin/ on my machine)

Of course, the main problem still exists. Additionally, the USB audio module is not loaded any more (for the built-in microphone of this camera).

Sorry if I ask something stupid, I am a total USB rookie - what's that /usr/sbin/usbmodules file for?

Thomas

Signature · 3 lines
Thomas Winischhofer
Vienna/Austria
mailto:[email protected]                  *** http://www.webit.com/tw
#4 lore raw
In reply to Thomas Winischhofer
Quoted 3 lines · Thomas Winischhofer

Sorry if I ask something stupid, I am a total USB rookie - what's that /usr/sbin/usbmodules file for?

The hotplug package uses it to try to determine some stuff about the device. Why it does this, I'm not really sure, it shouldn't be running for when a new device is plugged in, but only when the hotplug stuff is started the first time.

thanks,

greg k-h