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

usb-host.c 1.13 vs 1.19



I'm trying to connect a Philips PCVC750K USB webcam to an EtraxLX system.
Using kernel 2.4.19 with usb-host.c v1.13, I'm able to open the device, do ioctl() and close, but grabbing images isn't possible due to lack of ISOC support.
Upgrading usb-host.c with version 1.19 for ISOC support, the open() of the device hangs the system!
By debugging the kernel I noted that the hang result when the driver try to set a default video mode changing the alternate mode of the USB interface, switching from 0 to something else.

This is an estract of /proc/bus/usb/devices:

[...]
P:  Vendor=0471 ProdID=0312 Rev= 0.03
S:  SerialNumber=01690000FE260301
C:* #Ifs= 3 Cfg#= 1 Atr=a0 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=Philips webcam
E:  Ad=82(I) Atr=03(Int.) MxPS=   1 Ivl=32ms
E:  Ad=85(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
I:  If#= 0 Alt= 1 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=Philips webcam
E:  Ad=82(I) Atr=03(Int.) MxPS=   1 Ivl=32ms
E:  Ad=85(I) Atr=01(Isoc) MxPS= 196 Ivl=1ms
I:  If#= 0 Alt= 2 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=Philips webcam
E:  Ad=82(I) Atr=03(Int.) MxPS=   1 Ivl=32ms
E:  Ad=85(I) Atr=01(Isoc) MxPS= 292 Ivl=1ms
[...]

In particular I need alt 2.
When the driver tries to set the alternate mode, the Etrax freezes in some way, also the watchdog doesn't work because the activity LED of ethernet stays on after sending the last debug info from /proc/kmesg, instead of resetting.

This is the output from /proc/kmesg with USB_DEBUG_CTRL, until the system hangs:


<6>usb-host.c: ETRAX 100LX USB-HCD $Revision: 1.19 $ (c) 2001-2003 Axis Communications AB
<4>
<3>kmem_create: Forcing size word alignment - top_half_reg_cache
<6>usb.c: new USB bus registered, assigned bus number 1
<6>hub.c: USB hub found
<6>hub.c: 2 ports detected
<6>usb-host.c: USB controller running.
<6>hub.c: USB new device connect on bus1/2, assigned device number 2
<4>usb-host.c: (CTRL) Adding ctrl urb 0xc06c28a0 to empty list, epid 0
<4>usb-host.c: (CTRL) Transfer for epid 0 is OUT
<4>usb-host.c: (CTRL) Completing ctrl epid 0, urb 0xc06c28a0
<4>usb-host.c: (CTRL) No ctrl for epid 0
<4>usb-host.c: (CTRL) Adding ctrl urb 0xc06c28a0 to empty list, epid 0
<4>usb-host.c: (CTRL) Transfer for epid 0 is IN
<4>usb-host.c: (CTRL) transfer_buffer_length = 8
<4>usb-host.c: (CTRL) rem is calculated to 0
<4>usb-host.c: (CTRL) sw_len got 1
<4>usb-host.c: (CTRL) Completing ctrl epid 0, urb 0xc06c28a0
<4>usb-host.c: (CTRL) No ctrl for epid 0
<4>usb-host.c: (CTRL) Adding ctrl urb 0xc06c28a0 to empty list, epid 0
<4>usb-host.c: (CTRL) Transfer for epid 0 is IN
<4>usb-host.c: (CTRL) transfer_buffer_length = 18
<4>usb-host.c: (CTRL) rem is calculated to 2
<4>usb-host.c: (CTRL) sw_len got 3
<4>usb-host.c: (CTRL) Completing ctrl epid 0, urb 0xc06c28a0
<4>usb-host.c: (CTRL) No ctrl for epid 0
<4>usb-host.c: (CTRL) Adding ctrl urb 0xc06c28a0 to empty list, epid 0
<4>usb-host.c: (CTRL) Transfer for epid 0 is IN
<4>usb-host.c: (CTRL) transfer_buffer_length = 8
<4>usb-host.c: (CTRL) rem is calculated to 0
<4>usb-host.c: (CTRL) sw_len got 1
<4>usb-host.c: (CTRL) Completing ctrl epid 0, urb 0xc06c28a0
<4>usb-host.c: (CTRL) No ctrl for epid 0
<4>usb-host.c: (CTRL) Adding ctrl urb 0xc06c28a0 to empty list, epid 0
<4>usb-host.c: (CTRL) Transfer for epid 0 is IN
<4>usb-host.c: (CTRL) transfer_buffer_length = 490
<4>usb-host.c: (CTRL) rem is calculated to 2
<4>usb-host.c: (CTRL) sw_len got 62
<4>usb-host.c: Got epid_attn for INVALID_EPID (31).
<3>usb-host.c: R_USB_EPT_DATA = 0x80000800
<3>usb-host.c: R_USB_STATUS = 0x17
<4>usb-host.c: (CTRL) Completing ctrl epid 0, urb 0xc06c28a0
<4>usb-host.c: (CTRL) No ctrl for epid 0
<4>usb-host.c: (CTRL) Adding ctrl urb 0xc06c29a0 to empty list, epid 0
<4>usb-host.c: (CTRL) Transfer for epid 0 is OUT
<4>usb-host.c: (CTRL) Completing ctrl epid 0, urb 0xc06c29a0
<4>usb-host.c: (CTRL) No ctrl for epid 0
<6>pwc Philips PCVC750K (ToUCam Pro Scan) USB webcam detected.
<4>usb-host.c: (CTRL) Adding ctrl urb 0xc06c29a0 to empty list, epid 0
<4>usb-host.c: (CTRL) Transfer for epid 0 is IN
<4>usb-host.c: (CTRL) transfer_buffer_length = 4
<4>usb-host.c: (CTRL) rem is calculated to 4
<4>usb-host.c: (CTRL) sw_len got 1
<4>usb-host.c: Got epid_attn for INVALID_EPID (31).
<3>usb-host.c: R_USB_EPT_DATA = 0x80000800
<3>usb-host.c: R_USB_STATUS = 0x17
<4>usb-host.c: Got epid_attn for INVALID_EPID (31).
<3>usb-host.c: R_USB_EPT_DATA = 0x80000800
<3>usb-host.c: R_USB_STATUS = 0x17
<4>usb-host.c: Got epid_attn for INVALID_EPID (31).
<3>usb-host.c: R_USB_EPT_DATA = 0x80000800
<3>usb-host.c: R_USB_STATUS = 0x17
<4>usb-host.c: Got epid_attn for INVALID_EPID (31).
<3>usb-host.c: R_USB_EPT_DATA = 0x80000800
<3>usb-host.c: R_USB_STATUS = 0x17
<4>usb-host.c: Got epid_attn for INVALID_EPID (31).
<3>usb-host.c: R_USB_EPT_DATA = 0x80000800
<3>usb-host.c: R_USB_STATUS = 0x17
<4>usb-host.c: (CTRL) Completing ctrl epid 0, urb 0xc06c29a0
<4>usb-host.c: (CTRL) No ctrl for epid 0
<4>usb-host.c: (CTRL) Adding ctrl urb 0xc06c29a0 to empty list, epid 0
<4>usb-host.c: (CTRL) Transfer for epid 0 is IN
<4>usb-host.c: (CTRL) transfer_buffer_length = 255
<4>usb-host.c: (CTRL) rem is calculated to 7
<4>usb-host.c: (CTRL) sw_len got 32
<4>usb-host.c: (CTRL) Completing ctrl epid 0, urb 0xc06c29a0
<4>usb-host.c: (CTRL) No ctrl for epid 0
<6>pwc Registered as /dev/video0.

then opening the device:

<4>usb-host.c: (CTRL) Adding ctrl urb 0xc06c2a20 to empty list, epid 0
<4>usb-host.c: (CTRL) Transfer for epid 0 is OUT
<4>usb-host.c: (CTRL) Completing ctrl epid 0, urb 0xc06c2a20
<4>usb-host.c: (CTRL) No ctrl for epid 0
<4>usb-host.c: (CTRL) Adding ctrl urb 0xc06c2a20 to empty list, epid 0
<4>usb-host.c: (CTRL) Transfer for epid 0 is OUT
<4>usb-host.c: (CTRL) This OUT transfer has an extra data stage
<4>usb-host.c: (CTRL) Completing ctrl epid 0, urb 0xc06c2a20
<4>usb-host.c: (CTRL) No ctrl for epid 0
<4>usb-host.c: (CTRL) Adding ctrl urb 0xc06c2a20 to empty list, epid 0
<4>usb-host.c: (CTRL) Transfer for epid 0 is OUT
<4>usb-host.c: (CTRL) This OUT transfer has an extra data stage
<4>usb-host.c: Got epid_attn for INVALID_EPID (31).
<3>usb-host.c: R_USB_EPT_DATA = 0x80000800
<3>usb-host.c: R_USB_STATUS = 0x17
<4>usb-host.c: (CTRL) Completing ctrl epid 0, urb 0xc06c2a20
<4>usb-host.c: (CTRL) No ctrl for epid 0
<4>usb-host.c: (CTRL) Adding ctrl urb 0xc06c2a20 to empty list, epid 0
<4>usb-host.c: (CTRL) Transfer for epid 0 is OUT
<4>usb-host.c: (CTRL) Completing ctrl epid 0, urb 0xc06c2a20
<4>usb-host.c: (CTRL) No ctrl for epid 0

and hang!

But with v1.13 it works.
Is there a version of usb-host.c that works like 1.13 for CTRL but with ISOC support?

Thanks in advance.
Giancarlo Capella