Re: 64 byte EP0 OUT data transfer issue on Chipidea highspeed dual role controller

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

 



On Sun, Jun 28, 2015 at 5:34 AM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> On Sat, 27 Jun 2015, Jayan John wrote:
>
>> Thanks.
>>
>> Yes, the wLength value in the Setup packet is equal to 64. "Aligned"
>> was the wrong term, multiple of 64 would be more appropriate :).
>>
>> The hid gadget driver queues a request for the transfer. Please see below logs..
>> ...
>> HID: drivers/usb/gadget/f_hid_meu.c:366 - hidg_setup()
>> HID: hid_setup crtl_request : bRequestType:0x21 bRequest:0x9 Value:0x200
>
> What driver is this?  I don't see drivers/usb/gadget/f_hid_meu.c in
> 4.1.  I do see drivers/usb/gadget/function/f_hid.c, but in
> that driver the hidg_setup() routine does this:
>
>         case ((USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE) << 8
>                   | HID_REQ_SET_REPORT):
>                 VDBG(cdev, "set_report | wLength=%d\n", ctrl->wLength);
>                 goto stall;
>                 break;
>
> Thus, it doesn't handle Set Report at all.
>
This is a modified f_hid.c i.e. uses a single Interrupt IN endpoint
and control ep0 for in and out transfers. The source is the same as
f_hid.c before the integration of the Interrupt OUT patch "usb:
gadget: hidg: register OUT INT endpoint for SET_REPORT". See
https://github.com/torvalds/linux/commit/99c515005857ff7d6cd5c2ba272ccab5dc0ea648

>> HID: drivers/usb/chipidea/udc.c:1337 - ep_queue()
>> HID: drivers/usb/chipidea/udc.c:794 - _ep_queue()
>> HID: drivers/usb/chipidea/udc.c:467 - _hardware_enqueue()
>> HID: drivers/usb/chipidea/udc.c:395 - add_td_to_list()
>> HID: drivers/usb/chipidea/udc.c:61 - hw_ep_bit()
>> HID: drivers/usb/chipidea/udc.c:209 - hw_ep_prime()
>> ..
>>
>>
>> In the 64 bytes case, the following logs are missing (indicating
>> transfer complete interrupt):
>> ...
>> HID: drivers/usb/chipidea/core.c:368 - ci_irq()
>> HID: drivers/usb/chipidea/udc.c:1786 - udc_irq()
>> HID: drivers/usb/chipidea/udc.c:282 - hw_read_intr_status()
>> HID: drivers/usb/chipidea/udc.c:271 - hw_read_intr_enable()
>> HID: drivers/usb/chipidea/udc.c:309 - hw_test_and_clear_intr_active()
>> HID: drivers/usb/chipidea/udc.c:992 - isr_tr_complete_handler()
>> HID: drivers/usb/chipidea/udc.c:295 - hw_test_and_clear_complete()
>> HID: drivers/usb/chipidea/udc.c:68 - ep_to_bit()
>> HID: drivers/usb/chipidea/udc.c:957 - isr_tr_complete_low()
>> HID: drivers/usb/chipidea/udc.c:583 - _hardware_dequeue()
>> HID: drivers/usb/gadget/f_hid_meu.c:322 - hidg_set_report_complete()
>> ...
>
> Assuming the ep_queue() was for a 64-byte transfer, this indicates
> there is a bug in the chipidea UDC driver or hardware.
>
> Alan Stern
>

If this is a bug in the chipidea UDC driver or hardware, how can I
address this i.e. register an errata? I am hoping this is something
Peter might be able to help with.

Best regards,
Jayan
--
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