Re: xhci isoc : Not enough bandwidth for altsetting 6

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

 



I have changed some dbg's into warn's for some bandwidth related stuff, and also added some printk's to bandwidth related stuff in uvcvideo driver.
Patch attached
With that i get the following output, seems the uvc drivers requests a packetsize of 3072, but max packet size later on still seems to be 1024 as reported by xhci ?:

[    3.577998] xhci_hcd 0000:02:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
[    3.585149] xhci_hcd 0000:02:00.0: setting latency timer to 64
[    3.585152] xhci_hcd 0000:02:00.0: xHCI Host Controller
[    3.590380] drivers/usb/core/inode.c: creating file '009'
[    3.590452] xhci_hcd 0000:02:00.0: new USB bus registered, assigned bus number 9
[    3.603023] hub 7-0:1.0: state 7 ports 2 chg 0000 evt 0000
[    3.603161] xhci_hcd 0000:02:00.0: enabling Mem-Wr-Inval
[    3.603165] xhci_hcd 0000:02:00.0: supports USB remote wakeup
[    3.603175] xhci_hcd 0000:02:00.0: irq 17, io mem 0xfebfe000
[    3.608887] xhci_hcd 0000:02:00.0: irq 46 for MSI/MSI-X
[    3.608890] xhci_hcd 0000:02:00.0: irq 47 for MSI/MSI-X
[    3.608893] xhci_hcd 0000:02:00.0: irq 48 for MSI/MSI-X
[    3.608896] xhci_hcd 0000:02:00.0: irq 49 for MSI/MSI-X
[    3.608899] xhci_hcd 0000:02:00.0: irq 50 for MSI/MSI-X
[    3.608992] usb usb9: No SuperSpeed endpoint companion for config 1  interface 0 altsetting 0 ep 129: using minimum values
[    3.620035] usb usb9: default language 0x0409
[    3.620041] usb usb9: udev 1, busnum 9, minor = 1024
[    3.620043] usb usb9: New USB device found, idVendor=1d6b, idProduct=0003
[    3.626824] usb usb9: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.634043] usb usb9: Product: xHCI Host Controller
[    3.638922] usb usb9: Manufacturer: Linux 2.6.37-rc1-isoc-init+ xhci_hcd
[    3.645619] usb usb9: SerialNumber: 0000:02:00.0
[    3.650320] usb usb9: usb_probe_device
[    3.650325] usb usb9: configuration #1 chosen from 1 choice
[    3.650328] xHCI xhci_add_endpoint called for root hub
[    3.650330] xHCI xhci_check_bandwidth called for root hub
[    3.650334] usb usb9: adding 9-0:1.0 (config #1, interface 0)
[    3.650409] hub 9-0:1.0: usb_probe_interface
[    3.650411] hub 9-0:1.0: usb_probe_interface - got id
[    3.650412] hub 9-0:1.0: USB hub found
[    3.654167] hub 9-0:1.0: 4 ports detected
[    3.658175] hub 9-0:1.0: standalone hub
[    3.658176] hub 9-0:1.0: individual port power switching
[    3.658177] hub 9-0:1.0: individual port over-current protection
[    3.658179] hub 9-0:1.0: TT requires at most 8 FS bit times (666 ns)
[    3.658181] hub 9-0:1.0: power on to power good time: 20ms
[    3.658184] hub 9-0:1.0: local power source is good
[    3.658186] hub 9-0:1.0: enabling power on all ports
[    4.643030] usb 9-3: skipped 1 descriptor after configuration
[    4.643033] usb 9-3: skipped 6 descriptors after interface
[    4.643035] usb 9-3: skipped 1 descriptor after endpoint
[    4.643037] usb 9-3: skipped 28 descriptors after interface
[    4.643040] usb 9-3: skipped 1 descriptor after endpoint
[    4.643042] usb 9-3: skipped 4 descriptors after interface
[    4.643044] usb 9-3: skipped 2 descriptors after interface
[    4.643046] usb 9-3: skipped 1 descriptor after endpoint
[    4.643416] rtc_cmos 00:03: RTC can wake from S4
[    4.644389] xhci_hcd 0000:02:00.0: WARN: short transfer on control ep
[    4.654467] usb 9-3: default language 0x0409
[    4.655268] xhci_hcd 0000:02:00.0: WARN: short transfer on control ep
[    4.662090] rtc_cmos 00:03: rtc core: registered rtc_cmos as rtc0
[    4.663076] xhci_hcd 0000:02:00.0: WARN: short transfer on control ep
[    4.674614] usb 9-3: udev 2, busnum 9, minor = 1025
[    4.674616] usb 9-3: New USB device found, idVendor=045e, idProduct=076d
[    5.130351] usb 9-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    5.137503] usb 9-3: Product: MicrosoftÃÂ LifeCam HD-5000
[    5.142906] usb 9-3: Manufacturer: Microsoft
[    5.147265] usb 9-3: usb_probe_device
[    5.147268] usb 9-3: configuration #1 chosen from 1 choice
[    5.147277] usb 9-3: ep 0x83 - rounding interval to 128 microframes
[    5.154864] SEIK: maxpacket: 8  max burst: 0
[    5.160616] xhci_hcd 0000:02:00.0: add ep 0x83, slot id 1, new drop flags = 0x0, new add flags = 0x80, new slot info = 0x38300000
[    5.173634] xhci_hcd 0000:02:00.0: xhci_check_bandwidth called for udev ffff8800789d8000
[    5.183113] xhci_hcd 0000:02:00.0: New Input Control Context:
[    5.190477] usb 9-3: Successful Endpoint Configure command
[    5.190479] xhci_hcd 0000:02:00.0: Output context after successful config ep cmd:
[    5.199472] usb 9-3: adding 9-3:1.0 (config #1, interface 0)
[    5.200335] xhci_hcd 0000:02:00.0: WARN: short transfer on control ep
[    5.206868] usbserial_generic 9-3:1.0: usb_probe_interface
[    5.206870] usbserial_generic 9-3:1.0: usb_probe_interface - got id
[    5.206919] uvcvideo 9-3:1.0: usb_probe_interface
[    5.206920] uvcvideo 9-3:1.0: usb_probe_interface - got id
[    5.206931] uvcvideo: Found UVC 1.00 device MicrosoftÃÂ LifeCam HD-5000 (045e:076d)
[    5.214621] xhci_hcd 0000:02:00.0: xhci_check_bandwidth called for udev ffff8800789d8000
[    5.222715] xhci_hcd 0000:02:00.0: New Input Control Context:
[    5.287180] usb 9-3: Successful Endpoint Configure command
[    5.287182] xhci_hcd 0000:02:00.0: Output context after successful config ep cmd:
[    5.328688] input: MicrosoftÃÂ LifeCam HD-5000 as /devices/pci0000:00/0000:00:1c.1/0000:02:00.0/usb9/9-3/9-3:1.0/input/input3
[    5.339984] Freeing unused kernel memory: 44k freed
[    5.340078] usb 9-3: adding 9-3:1.1 (config #1, interface 1)
[    5.340143] usb 9-3: adding 9-3:1.2 (config #1, interface 2)
[    5.340216] usbserial_generic 9-3:1.2: usb_probe_interface
[    5.340218] usbserial_generic 9-3:1.2: usb_probe_interface - got id
[    5.340252] usb 9-3: adding 9-3:1.3 (config #1, interface 3)
[    5.340323] usbserial_generic 9-3:1.3: usb_probe_interface
[    5.340325] usbserial_generic 9-3:1.3: usb_probe_interface - got id
[   18.399837] usb 9-3: ep 0x83 - urb len = 0x10 (16), addr = 0x78993a10, num_trbs = 1
[   18.413798] UVC requested bandwidth3: 3072 | 3072
[   24.354010] eth1: no IPv6 routers present
[   31.566721] usb 9-3: ep 0x83 - urb len = 0x10 (16), addr = 0x78993a10, num_trbs = 1
[   31.573776] UVC requested bandwidth3: 3072 | 3072
[   31.581270] UVC requested bandwidth5: 3072
[   31.585463] UVC requested bandwidth6: 3072 | 128
[   31.590173] UVC requested bandwidth6: 3072 | 256
[   31.594878] UVC requested bandwidth6: 3072 | 512
[   31.599585] UVC requested bandwidth6: 3072 | 1024
[   31.604385] UVC requested bandwidth6: 3072 | 2048
[   31.609185] UVC requested bandwidth6: 3072 | 3072
[   31.614008] usb 9-3: ep 0x81 - rounding interval to 1 microframes
[   31.620101] SEIK: maxpacket: 1024  max burst: 2
[   31.624723] xhci_hcd 0000:02:00.0: add ep 0x81, slot id 1, new drop flags = 0x0, new add flags = 0x8, new slot info = 0x18300000
[   31.636292] xhci_hcd 0000:02:00.0: xhci_check_bandwidth called for udev ffff8800789d8000
[   31.644385] xhci_hcd 0000:02:00.0: New Input Control Context:
[   31.650282] usb 9-3: Not enough bandwidth for new device state.
[   31.656202] SEIK Callee should call reset_bandwidth()
[   31.661077] xhci_hcd 0000:02:00.0: xhci_reset_bandwidth called for udev ffff8800789d8000
[   31.669355] usb 9-3: Not enough bandwidth for altsetting 6
[   31.694442] xhci_hcd 0000:02:00.0: xhci_check_bandwidth called for udev ffff8800789d8000
[   31.702538] xhci_hcd 0000:02:00.0: New Input Control Context:
[   31.708436] usb 9-3: Successful Endpoint Configure command
[   31.708439] xhci_hcd 0000:02:00.0: Output context after successful config ep cmd:



Tuesday, November 2, 2010, 3:25:51 PM, you wrote:

> On Tue, Nov 02, 2010 at 03:11:36PM +0800, Xu, Andiry wrote:
>> > -----Original Message-----
>> > From: Sarah Sharp [mailto:sarah.a.sharp@xxxxxxxxxxxxxxx]
>> > Sent: Tuesday, November 02, 2010 1:51 AM
>> > To: Sander Eikelenboom
>> > Cc: Xu, Andiry; linux-usb@xxxxxxxxxxxxxxx
>> > Subject: Re: xhci isoc : Not enough bandwidth for altsetting 6
>> > 
>> > This is the endpoint context that I think the host controller is
>> > complaining about:
>> > 
>> > > [   35.280806] xhci_hcd 0000:02:00.0: Endpoint 02 Context:
>> > > [   35.280808] xhci_hcd 0000:02:00.0: @ffff88007c3f9080 (virt)
>> @7c3f9080
>> > (dma) 0x000000 - ep_info
>> > > [   35.280811] xhci_hcd 0000:02:00.0: @ffff88007c3f9084 (virt)
>> @7c3f9084
>> > (dma) 0x00022a - ep_info2
>> > 
>> > The line above very odd.  It means:
>> >     - bus error is 1 (which only happens if we find an isoc endpoint
>> >       with usb_endpoint_xfer_isoc())
>> 
>> The CErr field for isoc endpoints should be set to 0. Refer to xHCI 1.0
>> spec Table 57:
>> 
>> Note: CErr does not apply to Isoch endpoints and shall be set to '0' if
>> EP Type = Isoch Out ('1') or Isoch In ('5'). 

> There's a note in the xHCI spec 0.96:

> "Note: Software shall not program CErr to a value of â0â when the Slot
> Context Speed field indicates a Full- or Low-speed device. This
> combination could result in undefined behavior."

> Full speed devices can have isochronous endpoints.

> That also conflicts with section 4.8.2.4 that talks about how to set up
> interrupt and isochronous endpoints:

> "CErr = 3. Enables 3 retries."


> You're right that the 1.0 spec says differently in 4.3.6:

> "CErr = 3, or 0 for an Isoch endpoint."

> And Table 6 still has the note about FS/LS devices, but it's followed by
> a section about how CErr doesn't apply to isochronous endpoints.

> However, section 4.8.2.4 still says of interrupt and isochronous
> endpoint initialization:

> "CErr = 3. Enables 3 retries."


> I'm going to send an email to the xHCI architect and ask him to clarify.
> But I suspect that you're right that CErr should be 0 for isochronous
> endpoints.

> Sarah Sharp



-- 
Best regards,
 Sander                            mailto:linux@xxxxxxxxxxxxxx

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