Re: Endpoint is not halted

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

 



On Wed, Oct 31, 2012 at 07:33:17PM +0530, Bhavik Kothari wrote:
> Hi Sarah,
> 
> Thanks Sarah, for your TD-size patch.
> 
> We have tried with your given driver.
> At first time, USB device gets successfully mounted, however after removing
> USB device, once again if we insert the USB device, it does not get
> enumerated.

Ok, so it looks like the TD size patch helped with TD completion events.  Good.

> While inserting USB device second time, we have observed two things, which
> we have marked as bold in below mentioned log:

I can only read the plain text version of your email, so you'll have to
avoid using formatting.  The html portion of your email doesn't display
in Firefox correctly either.

>             1.  Internal device (xhci) and in hub, USB device address is
> different.
>
>             2.  Driver, shows "WARN URB submitted to disabled ep".

Both of those issues are caused by the fact that your host did not write
any state to the output context that the xHCI driver provided on the
second set address command.  It did write state after the first set
address command, but not the second:

Oct 31 12:26:32 xilinx-desktop kernel: [  357.288289] xhci_hcd 0000:01:00.0: Successful Address Device command
...
Oct 31 12:26:32 xilinx-desktop kernel: [  357.288503] xhci_hcd 0000:01:00.0: Slot ID 1 Output Context:
Oct 31 12:26:32 xilinx-desktop kernel: [  357.288507] xhci_hcd 0000:01:00.0: Slot Context:
Oct 31 12:26:32 xilinx-desktop kernel: [  357.288511] xhci_hcd 0000:01:00.0: @ed0b8000 (virt) @2d0b8000 (dma) 0x000000 - dev_info
Oct 31 12:26:32 xilinx-desktop kernel: [  357.288516] xhci_hcd 0000:01:00.0: @ed0b8004 (virt) @2d0b8004 (dma) 0x000000 - dev_info2
Oct 31 12:26:32 xilinx-desktop kernel: [  357.288520] xhci_hcd 0000:01:00.0: @ed0b8008 (virt) @2d0b8008 (dma) 0x000000 - tt_info
Oct 31 12:26:32 xilinx-desktop kernel: [  357.288524] xhci_hcd 0000:01:00.0: @ed0b800c (virt) @2d0b800c (dma) 0x000000 - dev_state
Oct 31 12:26:32 xilinx-desktop kernel: [  357.288529] xhci_hcd 0000:01:00.0: @ed0b8010 (virt) @2d0b8010 (dma) 0x000000 - rsvd[0]
Oct 31 12:26:32 xilinx-desktop kernel: [  357.288534] xhci_hcd 0000:01:00.0: @ed0b8014 (virt) @2d0b8014 (dma) 0x000000 - rsvd[1]
Oct 31 12:26:32 xilinx-desktop kernel: [  357.288539] xhci_hcd 0000:01:00.0: @ed0b8018 (virt) @2d0b8018 (dma) 0x000000 - rsvd[2]
Oct 31 12:26:32 xilinx-desktop kernel: [  357.288543] xhci_hcd 0000:01:00.0: @ed0b801c (virt) @2d0b801c (dma) 0x000000 - rsvd[3]
Oct 31 12:26:32 xilinx-desktop kernel: [  357.288547] xhci_hcd 0000:01:00.0: Endpoint 00 Context:
Oct 31 12:26:32 xilinx-desktop kernel: [  357.288552] xhci_hcd 0000:01:00.0: @ed0b8020 (virt) @2d0b8020 (dma) 0x000000 - ep_info
Oct 31 12:26:32 xilinx-desktop kernel: [  357.288556] xhci_hcd 0000:01:00.0: @ed0b8024 (virt) @2d0b8024 (dma) 0x000000 - ep_info2
Oct 31 12:26:32 xilinx-desktop kernel: [  357.288561] xhci_hcd 0000:01:00.0: @ed0b8028 (virt) @2d0b8028 (dma) 0x000000 - deq
Oct 31 12:26:32 xilinx-desktop kernel: [  357.288565] xhci_hcd 0000:01:00.0: @ed0b8030 (virt) @2d0b8030 (dma) 0x000000 - tx_info
Oct 31 12:26:32 xilinx-desktop kernel: [  357.288570] xhci_hcd 0000:01:00.0: @ed0b8034 (virt) @2d0b8034 (dma) 0x000000 - rsvd[0]
Oct 31 12:26:32 xilinx-desktop kernel: [  357.288575] xhci_hcd 0000:01:00.0: @ed0b8038 (virt) @2d0b8038 (dma) 0x000000 - rsvd[1]
Oct 31 12:26:32 xilinx-desktop kernel: [  357.288580] xhci_hcd 0000:01:00.0: @ed0b803c (virt) @2d0b803c (dma) 0x000000 - rsvd[2]
Oct 31 12:26:32 xilinx-desktop kernel: [  357.288584] xhci_hcd 0000:01:00.0: Endpoint 01 Context:
Oct 31 12:26:32 xilinx-desktop kernel: [  357.288588] xhci_hcd 0000:01:00.0: @ed0b8040 (virt) @2d0b8040 (dma) 0x000000 - ep_info
Oct 31 12:26:32 xilinx-desktop kernel: [  357.288593] xhci_hcd 0000:01:00.0: @ed0b8044 (virt) @2d0b8044 (dma) 0x000000 - ep_info2
Oct 31 12:26:32 xilinx-desktop kernel: [  357.288597] xhci_hcd 0000:01:00.0: @ed0b8048 (virt) @2d0b8048 (dma) 0x000000 - deq
Oct 31 12:26:32 xilinx-desktop kernel: [  357.288602] xhci_hcd 0000:01:00.0: @ed0b8050 (virt) @2d0b8050 (dma) 0x000000 - tx_info
Oct 31 12:26:32 xilinx-desktop kernel: [  357.288606] xhci_hcd 0000:01:00.0: @ed0b8054 (virt) @2d0b8054 (dma) 0x000000 - rsvd[0]
Oct 31 12:26:32 xilinx-desktop kernel: [  357.288611] xhci_hcd 0000:01:00.0: @ed0b8058 (virt) @2d0b8058 (dma) 0x000000 - rsvd[1]
Oct 31 12:26:32 xilinx-desktop kernel: [  357.288616] xhci_hcd 0000:01:00.0: @ed0b805c (virt) @2d0b805c (dma) 0x000000 - rsvd[2]
Oct 31 12:26:32 xilinx-desktop kernel: [  357.288620] xhci_hcd 0000:01:00.0: Endpoint 02 Context:
Oct 31 12:26:32 xilinx-desktop kernel: [  357.288624] xhci_hcd 0000:01:00.0: @ed0b8060 (virt) @2d0b8060 (dma) 0x000000 - ep_info
Oct 31 12:26:32 xilinx-desktop kernel: [  357.288629] xhci_hcd 0000:01:00.0: @ed0b8064 (virt) @2d0b8064 (dma) 0x000000 - ep_info2
Oct 31 12:26:32 xilinx-desktop kernel: [  357.288633] xhci_hcd 0000:01:00.0: @ed0b8068 (virt) @2d0b8068 (dma) 0x000000 - deq
Oct 31 12:26:32 xilinx-desktop kernel: [  357.288638] xhci_hcd 0000:01:00.0: @ed0b8070 (virt) @2d0b8070 (dma) 0x000000 - tx_info
Oct 31 12:26:32 xilinx-desktop kernel: [  357.288642] xhci_hcd 0000:01:00.0: @ed0b8074 (virt) @2d0b8074 (dma) 0x000000 - rsvd[0]
Oct 31 12:26:32 xilinx-desktop kernel: [  357.288647] xhci_hcd 0000:01:00.0: @ed0b8078 (virt) @2d0b8078 (dma) 0x000000 - rsvd[1]
Oct 31 12:26:32 xilinx-desktop kernel: [  357.288652] xhci_hcd 0000:01:00.0: @ed0b807c (virt) @2d0b807c (dma) 0x000000 - rsvd[2]

Since the output context was zeroed, the xHCI driver thinks the device
address is zero.  The USB core always reserves address 1 for the host
controller, so the driver always adds one to the address and sets that
value for the USB core.

When an control endpoint URB is submitted to read the device
descriptors, the xHCI driver looks at the endpoint state in the output
context for that device.  If the endpoint state is not halted, stopped,
or running, it will not enqueue the TD.  Since your output context was
zeroed, the driver thinks the state is zero, or disabled.

Your host needs to write the output context.  Please fix your host.

Have you tried running the Windows compliance test suite on your host?
I think it will catch these sort of low-level errors.

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