Re: Linux USB file storage gadget with new UDC

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

 



Hi,

> It looks like you didn't add the dump_stack() call to the UDC driver's
> queue function.  You need to add it.

The attached is the log of dump_stack() call in the UDC driver queue
function, for the last few USB request in the USBCV "device descriptor
test – addressed state". From the log, after Set-Config request is
received, the UDC driver queue function is not called. That function
is called after Get-Config request is received.

>> I also share the pseudo code of the setup data valid processing, i
>> suspect it may be related to the problem:
>>
>> receive setup data valid interrupt
>> find out the usb request field (bmRequestType, bRequest, wValue,
>> wIndex, wLength)
>> if (USB_CLEAR_FEATURE_REQUEST)
>>   call usb_ep_queue()
>
> Don't you need to handle this in the hardware, just like
> USB_SET_FEATURE_REQUEST?

USB_SET_FEATURE_REQUEST is handled in software.

Thanks,
victor
[   83.610000] 00000000: 80 06 00 02 00 00 09 00
[   83.610000] fsg_setup call ep0_queue Backtrace: 
[   83.610000] [<c020c0fc>] (dump_backtrace+0x0/0x110) from [<c03eee04>] (dump_stack+0x18/0x1c)
[   83.610000]  r6:00000002 r5:c0d6f600 r4:c0da69c0 r3:bf02fa10
[   83.610000] [<c03eedec>] (dump_stack+0x0/0x1c) from [<bf02fa2c>] (kagen2_ep_queue+0x1c/0x7b4 [kagen2_udc])
[   83.610000] [<bf02fa10>] (kagen2_ep_queue+0x0/0x7b4 [kagen2_udc]) from [<bf0390b8>] (ep0_queue+0x28/0x60 [g_file_storage])
[   83.610000] [<bf039090>] (ep0_queue+0x0/0x60 [g_file_storage]) from [<bf038e10>] (fsg_setup+0x3a0/0x3d8 [g_file_storage])
[   83.610000]  r5:c0e23e98 r4:c0d6f600
[   83.610000] [<bf038a70>] (fsg_setup+0x0/0x3d8 [g_file_storage]) from [<bf02f8c0>] (kagen2_irq+0x388/0x4d8 [kagen2_udc])
[   83.610000] [<bf02f538>] (kagen2_irq+0x0/0x4d8 [kagen2_udc]) from [<c0249644>] (handle_irq_event_percpu+0x30/0x178)
[   83.610000]  r7:00000020 r6:00000000 r5:c049af70 r4:c0da6840
[   83.610000] [<c0249614>] (handle_irq_event_percpu+0x0/0x178) from [<c02497ec>] (handle_irq_event+0x60/0x7c)
[   83.610000] [<c024978c>] (handle_irq_event+0x0/0x7c) from [<c024bcac>] (handle_edge_irq+0x114/0x16c)
[   83.610000]  r6:f5006000 r5:00000000 r4:c049af70 r3:f5006000
[   83.610000] [<c024bb98>] (handle_edge_irq+0x0/0x16c) from [<c0249054>] (generic_handle_irq+0x28/0x38)
[   83.610000]  r4:00000020 r3:c024bb98
[   83.610000] [<c024902c>] (generic_handle_irq+0x0/0x38) from [<c0209c2c>] (handle_IRQ+0x68/0x8c)
[   83.610000]  r4:00000020 r3:00000040
[   83.610000] [<c0209bc4>] (handle_IRQ+0x0/0x8c) from [<c0208410>] (asm_do_IRQ+0x10/0x14)
[   83.610000]  r5:00000013 r4:bf02f500
[   83.610000] [<c0208400>] (asm_do_IRQ+0x0/0x14) from [<c0208f14>] (__irq_svc+0x34/0xbc)
[   83.610000] Exception stack(0xc0e23f60 to 0xc0e23fa8)
[   83.610000] 3f60: 00000000 40000000 0288001f c2886000 c0df2c00 c0df2c00 bf02f4d8 00000013
[   83.610000] 3f80: 00000000 00000000 00000000 c0e23fbc c0e22000 c0e23fa8 40000001 bf02f500
[   83.610000] 3fa0: 00000013 ffffffff
[   83.610000] [<bf02f4d8>] (chkbusy_thread+0x0/0x60 [kagen2_udc]) from [<c022f868>] (kthread+0x94/0xa0)
[   83.610000]  r4:c0d75d58 r3:00000000
[   83.610000] [<c022f7d4>] (kthread+0x0/0xa0) from [<c021913c>] (do_exit+0x0/0x6f0)
[   83.610000]  r6:c021913c r5:c022f7d4 r4:c0d75d58
[   83.610000] ept0 in queue len 0x9, buffer 0xc0d6f800
[   83.610000] 00000000: 09 02 20 00 01 01 04 c0 01
[   83.620000] 00000000: 80 08 00 00 00 00 01 00
[   83.620000] g_file_storage gadget: get configuration 1 1
[   83.620000] fsg_setup call ep0_queue Backtrace: 
[   83.620000] [<c020c0fc>] (dump_backtrace+0x0/0x110) from [<c03eee04>] (dump_stack+0x18/0x1c)
[   83.620000]  r6:c0da69c0 r5:c0d6f600 r4:c0da69c0 r3:bf02fa10
[   83.620000] [<c03eedec>] (dump_stack+0x0/0x1c) from [<bf02fa2c>] (kagen2_ep_queue+0x1c/0x7b4 [kagen2_udc])
[   83.620000] [<bf02fa10>] (kagen2_ep_queue+0x0/0x7b4 [kagen2_udc]) from [<bf0390b8>] (ep0_queue+0x28/0x60 [g_file_storage])
[   83.620000] [<bf039090>] (ep0_queue+0x0/0x60 [g_file_storage]) from [<bf038e10>] (fsg_setup+0x3a0/0x3d8 [g_file_storage])
[   83.620000]  r5:c0e23e98 r4:c0d6f600
[   83.620000] [<bf038a70>] (fsg_setup+0x0/0x3d8 [g_file_storage]) from [<bf02f8c0>] (kagen2_irq+0x388/0x4d8 [kagen2_udc])
[   83.620000] [<bf02f538>] (kagen2_irq+0x0/0x4d8 [kagen2_udc]) from [<c0249644>] (handle_irq_event_percpu+0x30/0x178)
[   83.620000]  r7:00000020 r6:00000000 r5:c049af70 r4:c0da6840
[   83.620000] [<c0249614>] (handle_irq_event_percpu+0x0/0x178) from [<c02497ec>] (handle_irq_event+0x60/0x7c)
[   83.620000] [<c024978c>] (handle_irq_event+0x0/0x7c) from [<c024bcac>] (handle_edge_irq+0x114/0x16c)
[   83.620000]  r6:f5006000 r5:00000000 r4:c049af70 r3:f5006000
[   83.620000] [<c024bb98>] (handle_edge_irq+0x0/0x16c) from [<c0249054>] (generic_handle_irq+0x28/0x38)
[   83.620000]  r4:00000020 r3:c024bb98
[   83.620000] [<c024902c>] (generic_handle_irq+0x0/0x38) from [<c0209c2c>] (handle_IRQ+0x68/0x8c)
[   83.620000]  r4:00000020 r3:00000040
[   83.620000] [<c0209bc4>] (handle_IRQ+0x0/0x8c) from [<c0208410>] (asm_do_IRQ+0x10/0x14)
[   83.620000]  r5:00000013 r4:bf02f500
[   83.620000] [<c0208400>] (asm_do_IRQ+0x0/0x14) from [<c0208f14>] (__irq_svc+0x34/0xbc)
[   83.620000] Exception stack(0xc0e23f60 to 0xc0e23fa8)
[   83.620000] 3f60: 00000000 40000000 0288001f c2886000 c0df2c00 c0df2c00 bf02f4d8 00000013
[   83.620000] 3f80: 00000000 00000000 00000000 c0e23fbc c0e22000 c0e23fa8 40000001 bf02f500
[   83.620000] 3fa0: 00000013 ffffffff
[   83.620000] [<bf02f4d8>] (chkbusy_thread+0x0/0x60 [kagen2_udc]) from [<c022f868>] (kthread+0x94/0xa0)
[   83.620000]  r4:c0d75d58 r3:00000000
[   83.620000] [<c022f7d4>] (kthread+0x0/0xa0) from [<c021913c>] (do_exit+0x0/0x6f0)
[   83.620000]  r6:c021913c r5:c022f7d4 r4:c0d75d58
[   83.620000] ept0 in queue len 0x1, buffer 0xc0d6f800
[   83.620000] 00000000: 01
[   83.630000] 00000000: 00 09 00 00 00 00 00 00
[   83.630000] and NAK endpoint
[   83.630000] 00000000: 80 08 00 00 00 00 01 00
[   83.630000] g_file_storage gadget: get configuration 1 0
[   83.630000] fsg_setup call ep0_queue Backtrace: 
[   83.630000] [<c020c0fc>] (dump_backtrace+0x0/0x110) from [<c03eee04>] (dump_stack+0x18/0x1c)
[   83.630000]  r6:c0da69c0 r5:c0d6f600 r4:c0da69c0 r3:bf02fa10
[   83.630000] [<c03eedec>] (dump_stack+0x0/0x1c) from [<bf02fa2c>] (kagen2_ep_queue+0x1c/0x7b4 [kagen2_udc])
[   83.630000] [<bf02fa10>] (kagen2_ep_queue+0x0/0x7b4 [kagen2_udc]) from [<bf0390b8>] (ep0_queue+0x28/0x60 [g_file_storage])
[   83.630000] [<bf039090>] (ep0_queue+0x0/0x60 [g_file_storage]) from [<bf038e10>] (fsg_setup+0x3a0/0x3d8 [g_file_storage])
[   83.630000]  r5:c0f2ddb8 r4:c0d6f600
[   83.630000] [<bf038a70>] (fsg_setup+0x0/0x3d8 [g_file_storage]) from [<bf02f8c0>] (kagen2_irq+0x388/0x4d8 [kagen2_udc])
[   83.630000] [<bf02f538>] (kagen2_irq+0x0/0x4d8 [kagen2_udc]) from [<c0249644>] (handle_irq_event_percpu+0x30/0x178)
[   83.630000]  r7:00000020 r6:00000000 r5:c049af70 r4:c0da6840
[   83.630000] [<c0249614>] (handle_irq_event_percpu+0x0/0x178) from [<c02497ec>] (handle_irq_event+0x60/0x7c)
[   83.630000] [<c024978c>] (handle_irq_event+0x0/0x7c) from [<c024bcac>] (handle_edge_irq+0x114/0x16c)
[   83.630000]  r6:f5006000 r5:00000000 r4:c049af70 r3:f5006000
[   83.630000] [<c024bb98>] (handle_edge_irq+0x0/0x16c) from [<c0249054>] (generic_handle_irq+0x28/0x38)
[   83.630000]  r4:00000020 r3:c024bb98
[   83.630000] [<c024902c>] (generic_handle_irq+0x0/0x38) from [<c0209c2c>] (handle_IRQ+0x68/0x8c)
[   83.630000]  r4:00000020 r3:00000040
[   83.630000] [<c0209bc4>] (handle_IRQ+0x0/0x8c) from [<c0208410>] (asm_do_IRQ+0x10/0x14)
[   83.630000]  r5:20000013 r4:bf0300b8
[   83.630000] [<c0208400>] (asm_do_IRQ+0x0/0x14) from [<c0208f14>] (__irq_svc+0x34/0xbc)
[   83.630000] Exception stack(0xc0f2de80 to 0xc0f2dec8)
[   83.630000] de80: 00000003 00000001 c2886000 0000001f c0da6b40 c0df2c00 00000000 c0df2dd0
[   83.630000] dea0: 00000007 00000200 c0da6b74 c0f2df24 00000002 c0f2dec8 c2886000 bf0300b8
[   83.630000] dec0: 20000013 ffffffff
[   83.630000] [<bf02fa10>] (kagen2_ep_queue+0x0/0x7b4 [kagen2_udc]) from [<bf0353d0>] (ep0_complete+0x1ac/0x20c [g_file_storage])
[   83.630000] [<bf0352d4>] (ep0_complete+0xb0/0x20c [g_file_storage]) from [<bf0376e4>] (fsg_main_thread+0xfc/0x12b4 [g_file_storage])
[   83.630000]  r8:00000000 r7:00000001 r6:00000001 r5:c0d6f6bc r4:c0d6f600
[   83.630000] [<bf0375e8>] (fsg_main_thread+0x0/0x12b4 [g_file_storage]) from [<c022f868>] (kthread+0x94/0xa0)
[   83.630000] [<c022f7d4>] (kthread+0x0/0xa0) from [<c021913c>] (do_exit+0x0/0x6f0)
[   83.630000]  r6:c021913c r5:c022f7d4 r4:c0e21e08
[   83.630000] ept0 in queue len 0x1, buffer 0xc0d6f800
[   83.630000] 00000000: 01
[   83.650000] 00000000: 55 53 42 43 48 0e ea 8a 00 00 00 00 00 00 0a 35
[   83.650000] 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   83.650000] attention condition
[   83.650000] g_file_storage gadget: do_set_config
[   83.650000] g_file_storage gadget: fsg->config 0 new_config 0
# 
# 

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux