Hi Yousaf, On 01/07/2015 09:47 AM, Kaukab, Yousaf wrote: >> -----Original Message----- >> From: Dinh Nguyen [mailto:dinguyen@xxxxxxxxxxxxxxxxxxxxx] >> Sent: Wednesday, January 7, 2015 4:39 PM >> To: Kaukab, Yousaf; Paul Zimmerman; linux-usb@xxxxxxxxxxxxxxx; balbi@xxxxxx >> Cc: Herrero, Gregory; sergei.shtylyov@xxxxxxxxxxxxxxxxxx; >> r.baldyga@xxxxxxxxxxx >> Subject: Re: [PATCH v2 00/30] usb: updates for dwc2 gadget driver >> >> On 01/07/2015 09:34 AM, Kaukab, Yousaf wrote: >>> Hi, >>> >>>> -----Original Message----- >>>> From: Dinh Nguyen [mailto:dinguyen@xxxxxxxxxxxxxxxxxxxxx] >>>> Sent: Wednesday, January 7, 2015 1:01 AM >>>> To: Paul Zimmerman; Kaukab, Yousaf; linux-usb@xxxxxxxxxxxxxxx; >> balbi@xxxxxx >>>> Cc: Herrero, Gregory; sergei.shtylyov@xxxxxxxxxxxxxxxxxx; >>>> r.baldyga@xxxxxxxxxxx >>>> Subject: Re: [PATCH v2 00/30] usb: updates for dwc2 gadget driver >>>> >>>> On 01/06/2015 05:47 PM, Dinh Nguyen wrote: >>>>> On 01/05/2015 01:16 PM, Paul Zimmerman wrote: >>>>>> Adding Dinh to CC. >>>>>> >>>>>> Robert, Dinh, I would like to have your tested-bys for this series, please. >>>>>> >>>>> >>>>> This patch series is producing this error on the SOCFPGA platform. >>>>> I'll try to bisect to a specific patch. >>>>> >>>>> root@socfpga_cyclone5:~# [ 47.929743] dwc2 ffb40000.usb: new device is >>>>> low-speed >>>>> [ 63.873596] dwc2 ffb40000.usb: new device is low-speed >>>>> [ 64.219220] dwc2 ffb40000.usb: new device is low-speed >>>>> [ 64.421495] dwc2 ffb40000.usb: new device is low-speed >>>>> [ 64.834505] dwc2 ffb40000.usb: new device is high-speed >>>>> [ 69.899695] ------------[ cut here ]------------ >>>>> [ 69.904315] WARNING: CPU: 0 PID: 0 at drivers/usb/dwc2/gadget.c:1352 >>>>> s3c_hsotg_rx_data+0xc0/0xd4() >>>>> [ 69.913230] Modules linked in: g_mass_storage usb_f_mass_storage >>>>> libcomposite >>>>> [ 69.920385] CPU: 0 PID: 0 Comm: swapper/0 Not tainted >>>>> 3.19.0-rc1-00090-g4864f14 #4 >>>>> [ 69.927917] Hardware name: Altera SOCFPGA >>>>> [ 69.931936] [<c0014d24>] (unwind_backtrace) from [<c001173c>] >>>>> (show_stack+0x10/0x14) >>>>> [ 69.939654] [<c001173c>] (show_stack) from [<c0461c74>] >>>>> (dump_stack+0x74/0x90) >>>>> [ 69.946857] [<c0461c74>] (dump_stack) from [<c0021138>] >>>>> (warn_slowpath_common+0x78/0xb4) >>>>> [ 69.954916] [<c0021138>] (warn_slowpath_common) from [<c0021190>] >>>>> (warn_slowpath_null+0x1c/0x24) >>>>> [ 69.963669] [<c0021190>] (warn_slowpath_null) from [<c030278c>] >>>>> (s3c_hsotg_rx_data+0xc0/0xd4) >>>>> [ 69.972162] [<c030278c>] (s3c_hsotg_rx_data) from [<c0304ac0>] >>>>> (s3c_hsotg_irq+0x454/0x520) >>>>> [ 69.980394] [<c0304ac0>] (s3c_hsotg_irq) from [<c0058c3c>] >>>>> (handle_irq_event_percpu+0x5c/0x1f4) >>>>> [ 69.989056] [<c0058c3c>] (handle_irq_event_percpu) from [<c0058e18>] >>>>> (handle_irq_event+0x44/0x64) >>>>> [ 69.997892] [<c0058e18>] (handle_irq_event) from [<c005b8d8>] >>>>> (handle_fasteoi_irq+0xa8/0x180) >>>>> [ 70.006382] [<c005b8d8>] (handle_fasteoi_irq) from [<c005856c>] >>>>> (generic_handle_irq+0x20/0x30) >>>>> [ 70.014958] [<c005856c>] (generic_handle_irq) from [<c0058668>] >>>>> (__handle_domain_irq+0x54/0xb4) >>>>> [ 70.023619] [<c0058668>] (__handle_domain_irq) from [<c0008638>] >>>>> (gic_handle_irq+0x20/0x5c) >>>>> [ 70.031937] [<c0008638>] (gic_handle_irq) from [<c0012240>] >>>>> (__irq_svc+0x40/0x54) >>>>> [ 70.039384] Exception stack(0xc0635f60 to 0xc0635fa8) >>>>> [ 70.044415] 5f60: 00000000 00000000 c0635fb0 c001cee0 c066cca0 >>>>> c063c498 c046908c c066c4b2 >>>>> [ 70.052556] 5f80: c066cca0 00000001 ef7fccc0 00000000 01000000 >>>>> c0635fa8 c000f0fc c000f100 >>>>> [ 70.060694] 5fa0: 600f0013 ffffffff >>>>> [ 70.064174] [<c0012240>] (__irq_svc) from [<c000f100>] >>>>> (arch_cpu_idle+0x30/0x3c) >>>>> [ 70.071545] [<c000f100>] (arch_cpu_idle) from [<c0050364>] >>>>> (cpu_startup_entry+0x138/0x224) >>>>> [ 70.079783] [<c0050364>] (cpu_startup_entry) from [<c05ebbb0>] >>>>> (start_kernel+0x304/0x35c) >>>>> [ 70.087921] ---[ end trace 66b76f6dcbbda3bf ]--- >>>>> [ 79.911589] dwc2 ffb40000.usb: new device is low-speed >>>>> >>>>> Dinh >>>>> >>>> >>>> It looks like this patch is producing the above error. >>>> >>>> usb: dwc2: gadget: manage ep0 state in software >>>> >>>> Manage ep0 state in software to add handling of status OUT stage. >>>> Just toggling hsotg->setup in s3c_hsotg_handle_outdone leaves it in >>>> wrong state in 2-stage control transfers. >>>> Moreover, don't call s3c_hsotg_handle_outdone both from SetupDone >> and >>>> OutDone. Only use one of them, as for a setup packet we get both. >>>> >>>> Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@xxxxxxxxx> >>> >>> Thank you for testing this patchset. >>> >>> I have tested g_mass_storage without dma in my setup and it is working fine. >> >> Did you also test with DMA enabled? > > Yes, it's working as well. No issue. > s3c_hsotg_rx_data() should not be called when DMA enabled. That's why I only mentioned without-dma case. > >> >>> As I don't see this problem, I need some help in figuring out what's going on. >>> Would it be possible for you to provide me following? >>> 1) Console output after enabling CONFIG_USB_DWC2_DEBUG >>> 2) Function trace >>> echo s3c_* > /sys/kernel/debug/tracing/set_ftrace_filter >>> echo function > /sys/kernel/debug/tracing/current_tracer >>> 3) Values of following registers GSNPSID, GHWCFG1-GHWCFG4 >>> >> >> I'll try to get these out for your shortly. > > Thanks! > I've also attached a text file of the log. root@socfpga_cyclone5:~# insmod g_mass_storage.ko file=/dev/mmcblk0p1 [ 144.084933] Number of LUNs=8 [ 144.087817] Mass Storage Function, version: 2009/09/11 [ 144.092936] LUN: removable file: (no medium) [ 144.097228] Number of LUNs=1 [ 144.100217] LUN: file: /dev/mmcblk0p1 [ 144.103867] Number of LUNs=1 [ 144.106941] g_mass_storage gadget: Mass Storage Gadget, version: 2009/09/11 [ 144.113874] g_mass_storage gadget: userspace failed to provide iSerialNumber [ 144.120922] g_mass_storage gadget: g_mass_storage ready [ 144.129387] dwc2 ffb40000.usb: bound driver g_mass_storage root@socfpga_cyclone5:~# root@socfpga_cyclone5:~# [ 144.353610] dwc2 ffb40000.usb: new device is high-speed [ 144.527612] dwc2 ffb40000.usb: new device is high-speed [ 149.595802] ------------[ cut here ]------------ [ 149.600420] WARNING: CPU: 0 PID: 0 at drivers/usb/dwc2/gadget.c:1352 s3c_hsotg_rx_data+0xcc/0x144() [ 149.609423] Modules linked in: g_mass_storage usb_f_mass_storage libcomposite [ 149.616582] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.19.0-rc1-00090-g4864f14 #14 [ 149.624202] Hardware name: Altera SOCFPGA [ 149.628222] [<c00165e4>] (unwind_backtrace) from [<c00124f0>] (show_stack+0x20/0x24) [ 149.635941] [<c00124f0>] (show_stack) from [<c04c7374>] (dump_stack+0x7c/0x98) [ 149.643147] [<c04c7374>] (dump_stack) from [<c0023ec4>] (warn_slowpath_common+0x88/0xc4) [ 149.651208] [<c0023ec4>] (warn_slowpath_common) from [<c0023f2c>] (warn_slowpath_null+0x2c/0x34) [ 149.659961] [<c0023f2c>] (warn_slowpath_null) from [<c034ccc4>] (s3c_hsotg_rx_data+0xcc/0x144) [ 149.668542] [<c034ccc4>] (s3c_hsotg_rx_data) from [<c034f884>] (s3c_hsotg_irq+0x3e0/0x708) [ 149.676777] [<c034f884>] (s3c_hsotg_irq) from [<c0060d30>] (handle_irq_event_percpu+0x68/0x204) [ 149.685442] [<c0060d30>] (handle_irq_event_percpu) from [<c0060f20>] (handle_irq_event+0x54/0x74) [ 149.694280] [<c0060f20>] (handle_irq_event) from [<c0063e2c>] (handle_fasteoi_irq+0xb8/0x190) [ 149.702771] [<c0063e2c>] (handle_fasteoi_irq) from [<c0060548>] (generic_handle_irq+0x30/0x40) [ 149.711348] [<c0060548>] (generic_handle_irq) from [<c0060694>] (__handle_domain_irq+0x64/0xc4) [ 149.720012] [<c0060694>] (__handle_domain_irq) from [<c00086bc>] (gic_handle_irq+0x30/0x6c) [ 149.728333] [<c00086bc>] (gic_handle_irq) from [<c00130c0>] (__irq_svc+0x40/0x54) [ 149.735781] Exception stack(0xc06fbf38 to 0xc06fbf80) [ 149.740811] bf20: 00000000 00000000 [ 149.748953] bf40: c06fbf90 c001f600 c0702c60 c0733560 c0702498 c04cf08c c0732d73 413fc090 [ 149.757096] bf60: c0733560 c06fbf8c c06fbf90 c06fbf80 c000f934 c000f938 60000013 ffffffff [ 149.765243] [<c00130c0>] (__irq_svc) from [<c000f938>] (arch_cpu_idle+0x40/0x4c) [ 149.772616] [<c000f938>] (arch_cpu_idle) from [<c0057670>] (cpu_startup_entry+0x144/0x22c) [ 149.780857] [<c0057670>] (cpu_startup_entry) from [<c04c2bc4>] (rest_init+0x70/0x88) [ 149.788581] [<c04c2bc4>] (rest_init) from [<c069bc60>] (start_kernel+0x310/0x368) [ 149.796030] ---[ end trace 05bdb288fcc8864d ]--- [ 155.793924] random: nonblocking pool is initialized cat /sys/kernel/debug/tracing/r trace # tracer: function # # entries-in-buffer/entries-written: 130/130 #P:2 # # _-----=> irqs-off # / _----=> need-resched # | / _---=> hardirq/softirq # || / _--=> preempt-depth # ||| / delay # TASK-PID CPU# |||| TIMESTAMP FUNCTION # | | | |||| | | <idle>-0 [000] d.h. 50.383808: s3c_hsotg_irq <-handle_irq_event_percpu <idle>-0 [000] d.h. 74.367931: s3c_hsotg_irq <-handle_irq_event_percpu <idle>-0 [000] d.h. 74.921390: s3c_hsotg_irq <-handle_irq_event_percpu insmod-656 [001] .n.. 144.084905: s3c_hsotg_ep_alloc_request <-composite_dev_prepare insmod-656 [001] .n.. 144.126144: s3c_hsotg_udc_start <-udc_bind_to_driver insmod-656 [001] .n.. 144.126153: s3c_hsotg_phy_enable <-s3c_hsotg_udc_start insmod-656 [001] dn.. 144.126172: s3c_hsotg_init <-s3c_hsotg_udc_start insmod-656 [001] dn.. 144.126187: s3c_hsotg_init_fifo <-s3c_hsotg_init insmod-656 [001] dn.. 144.126201: s3c_hsotg_core_init_disconnected <-s3c_hsotg_udc_start insmod-656 [001] dn.. 144.126203: s3c_hsotg_corereset <-s3c_hsotg_core_init_disconnected insmod-656 [001] dn.. 144.126223: s3c_hsotg_init_fifo <-s3c_hsotg_core_init_disconnected insmod-656 [001] dn.. 144.126248: s3c_hsotg_en_gsint <-s3c_hsotg_core_init_disconnected insmod-656 [001] dn.. 144.126259: s3c_hsotg_en_gsint <-s3c_hsotg_core_init_disconnected insmod-656 [001] dn.. 144.126269: s3c_hsotg_ctrl_epint <-s3c_hsotg_core_init_disconnected insmod-656 [001] dn.. 144.126271: s3c_hsotg_ctrl_epint <-s3c_hsotg_core_init_disconnected insmod-656 [001] dn.. 144.126293: s3c_hsotg_ep0_mps <-s3c_hsotg_core_init_disconnected insmod-656 [001] dn.. 144.126295: s3c_hsotg_ep0_mps <-s3c_hsotg_core_init_disconnected insmod-656 [001] dn.. 144.126297: s3c_hsotg_enqueue_setup <-s3c_hsotg_core_init_disconnected insmod-656 [001] dn.. 144.126308: s3c_hsotg_ep_queue.isra.7 <-s3c_hsotg_enqueue_setup insmod-656 [001] dn.. 144.126323: s3c_hsotg_start_req <-s3c_hsotg_ep_queue.isra.7 insmod-656 [001] dn.. 144.126382: s3c_hsotg_ctrl_epint <-s3c_hsotg_start_req insmod-656 [001] .n.. 144.134867: s3c_hsotg_pullup <-udc_bind_to_driver sh-650 [000] d.h. 144.137903: s3c_hsotg_irq <-handle_irq_event_percpu <idle>-0 [000] d.h. 144.140945: s3c_hsotg_irq <-handle_irq_event_percpu <idle>-0 [000] d.h. 144.343073: s3c_hsotg_irq <-handle_irq_event_percpu <idle>-0 [000] d.h. 144.343122: s3c_hsotg_disconnect <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.343124: s3c_hsotg_complete_request <-kill_all_requests <idle>-0 [000] d.h. 144.343139: s3c_hsotg_complete_setup <-usb_gadget_giveback_request <idle>-0 [000] d.h. 144.343152: s3c_hsotg_core_init_disconnected <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.343154: s3c_hsotg_corereset <-s3c_hsotg_core_init_disconnected <idle>-0 [000] d.h. 144.343173: s3c_hsotg_init_fifo <-s3c_hsotg_core_init_disconnected <idle>-0 [000] d.h. 144.343198: s3c_hsotg_en_gsint <-s3c_hsotg_core_init_disconnected <idle>-0 [000] d.h. 144.343209: s3c_hsotg_en_gsint <-s3c_hsotg_core_init_disconnected <idle>-0 [000] d.h. 144.343220: s3c_hsotg_ctrl_epint <-s3c_hsotg_core_init_disconnected <idle>-0 [000] d.h. 144.343221: s3c_hsotg_ctrl_epint <-s3c_hsotg_core_init_disconnected <idle>-0 [000] d.h. 144.343245: s3c_hsotg_ep0_mps <-s3c_hsotg_core_init_disconnected <idle>-0 [000] d.h. 144.343246: s3c_hsotg_ep0_mps <-s3c_hsotg_core_init_disconnected <idle>-0 [000] d.h. 144.343248: s3c_hsotg_enqueue_setup <-s3c_hsotg_core_init_disconnected <idle>-0 [000] d.h. 144.343259: s3c_hsotg_ep_queue.isra.7 <-s3c_hsotg_enqueue_setup <idle>-0 [000] d.h. 144.343273: s3c_hsotg_start_req <-s3c_hsotg_ep_queue.isra.7 <idle>-0 [000] d.h. 144.343333: s3c_hsotg_ctrl_epint <-s3c_hsotg_start_req klogd-642 [000] d.h. 144.346846: s3c_hsotg_irq <-handle_irq_event_percpu klogd-642 [000] d.h. 144.346884: s3c_hsotg_disconnect <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.353574: s3c_hsotg_irq <-handle_irq_event_percpu <idle>-0 [000] d.h. 144.358811: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358813: s3c_hsotg_ep0_mps <-s3c_hsotg_set_ep_maxpacket <idle>-0 [000] d.h. 144.358815: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358816: s3c_hsotg_ep0_mps <-s3c_hsotg_set_ep_maxpacket <idle>-0 [000] d.h. 144.358817: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358819: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358821: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358822: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358824: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358825: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358826: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358828: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358829: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358831: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358832: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358834: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358835: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358837: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358838: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358839: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358841: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358842: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358844: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358845: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358847: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358848: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358849: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358851: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358852: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358854: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358855: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358857: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358858: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358859: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358861: s3c_hsotg_enqueue_setup <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.361190: s3c_hsotg_irq <-handle_irq_event_percpu <idle>-0 [000] d.h. 144.364228: s3c_hsotg_irq <-handle_irq_event_percpu <idle>-0 [000] d.h. 144.517305: s3c_hsotg_irq <-handle_irq_event_percpu <idle>-0 [000] d.h. 144.517344: s3c_hsotg_disconnect <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.527580: s3c_hsotg_irq <-handle_irq_event_percpu <idle>-0 [000] d.h. 144.532813: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532815: s3c_hsotg_ep0_mps <-s3c_hsotg_set_ep_maxpacket <idle>-0 [000] d.h. 144.532816: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532817: s3c_hsotg_ep0_mps <-s3c_hsotg_set_ep_maxpacket <idle>-0 [000] d.h. 144.532819: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532820: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532822: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532823: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532825: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532826: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532828: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532829: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532831: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532832: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532834: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532835: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532837: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532838: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532839: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532841: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532842: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532844: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532845: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532847: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532848: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532849: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532851: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532852: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532854: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532855: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532857: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532858: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532859: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532861: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532862: s3c_hsotg_enqueue_setup <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.602783: s3c_hsotg_irq <-handle_irq_event_percpu <idle>-0 [000] d.h. 144.602824: s3c_hsotg_rx_data <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.603092: s3c_hsotg_irq <-handle_irq_event_percpu <idle>-0 [000] d.h. 144.603146: s3c_hsotg_epint <-s3c_hsotg_irq <idle>-0 [000] d.h. 149.595739: s3c_hsotg_irq <-handle_irq_event_percpu <idle>-0 [000] d.h. 149.595787: s3c_hsotg_rx_data <-s3c_hsotg_irq <idle>-0 [000] d.h. 149.800683: s3c_hsotg_epint <-s3c_hsotg_irq <idle>-0 [000] d.h. 154.429454: s3c_hsotg_irq <-handle_irq_event_percpu <idle>-0 [000] d.h. 154.432493: s3c_hsotg_irq <-handle_irq_event_percpu <idle>-0 [000] d.h. 154.743081: s3c_hsotg_disconnect <-dwc2_handle_common_intr <idle>-0 [000] d.h. 154.743085: s3c_hsotg_irq <-handle_irq_event_percpu root@socfpga_cyclone5:~#
root@socfpga_cyclone5:~# insmod g_mass_storage.ko file=/dev/mmcblk0p1 [ 144.084933] Number of LUNs=8 [ 144.087817] Mass Storage Function, version: 2009/09/11 [ 144.092936] LUN: removable file: (no medium) [ 144.097228] Number of LUNs=1 [ 144.100217] LUN: file: /dev/mmcblk0p1 [ 144.103867] Number of LUNs=1 [ 144.106941] g_mass_storage gadget: Mass Storage Gadget, version: 2009/09/11 [ 144.113874] g_mass_storage gadget: userspace failed to provide iSerialNumber [ 144.120922] g_mass_storage gadget: g_mass_storage ready [ 144.129387] dwc2 ffb40000.usb: bound driver g_mass_storage root@socfpga_cyclone5:~# root@socfpga_cyclone5:~# [ 144.353610] dwc2 ffb40000.usb: new device is high-speed [ 144.527612] dwc2 ffb40000.usb: new device is high-speed [ 149.595802] ------------[ cut here ]------------ [ 149.600420] WARNING: CPU: 0 PID: 0 at drivers/usb/dwc2/gadget.c:1352 s3c_hsotg_rx_data+0xcc/0x144() [ 149.609423] Modules linked in: g_mass_storage usb_f_mass_storage libcomposite [ 149.616582] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.19.0-rc1-00090-g4864f14 #14 [ 149.624202] Hardware name: Altera SOCFPGA [ 149.628222] [<c00165e4>] (unwind_backtrace) from [<c00124f0>] (show_stack+0x20/0x24) [ 149.635941] [<c00124f0>] (show_stack) from [<c04c7374>] (dump_stack+0x7c/0x98) [ 149.643147] [<c04c7374>] (dump_stack) from [<c0023ec4>] (warn_slowpath_common+0x88/0xc4) [ 149.651208] [<c0023ec4>] (warn_slowpath_common) from [<c0023f2c>] (warn_slowpath_null+0x2c/0x34) [ 149.659961] [<c0023f2c>] (warn_slowpath_null) from [<c034ccc4>] (s3c_hsotg_rx_data+0xcc/0x144) [ 149.668542] [<c034ccc4>] (s3c_hsotg_rx_data) from [<c034f884>] (s3c_hsotg_irq+0x3e0/0x708) [ 149.676777] [<c034f884>] (s3c_hsotg_irq) from [<c0060d30>] (handle_irq_event_percpu+0x68/0x204) [ 149.685442] [<c0060d30>] (handle_irq_event_percpu) from [<c0060f20>] (handle_irq_event+0x54/0x74) [ 149.694280] [<c0060f20>] (handle_irq_event) from [<c0063e2c>] (handle_fasteoi_irq+0xb8/0x190) [ 149.702771] [<c0063e2c>] (handle_fasteoi_irq) from [<c0060548>] (generic_handle_irq+0x30/0x40) [ 149.711348] [<c0060548>] (generic_handle_irq) from [<c0060694>] (__handle_domain_irq+0x64/0xc4) [ 149.720012] [<c0060694>] (__handle_domain_irq) from [<c00086bc>] (gic_handle_irq+0x30/0x6c) [ 149.728333] [<c00086bc>] (gic_handle_irq) from [<c00130c0>] (__irq_svc+0x40/0x54) [ 149.735781] Exception stack(0xc06fbf38 to 0xc06fbf80) [ 149.740811] bf20: 00000000 00000000 [ 149.748953] bf40: c06fbf90 c001f600 c0702c60 c0733560 c0702498 c04cf08c c0732d73 413fc090 [ 149.757096] bf60: c0733560 c06fbf8c c06fbf90 c06fbf80 c000f934 c000f938 60000013 ffffffff [ 149.765243] [<c00130c0>] (__irq_svc) from [<c000f938>] (arch_cpu_idle+0x40/0x4c) [ 149.772616] [<c000f938>] (arch_cpu_idle) from [<c0057670>] (cpu_startup_entry+0x144/0x22c) [ 149.780857] [<c0057670>] (cpu_startup_entry) from [<c04c2bc4>] (rest_init+0x70/0x88) [ 149.788581] [<c04c2bc4>] (rest_init) from [<c069bc60>] (start_kernel+0x310/0x368) [ 149.796030] ---[ end trace 05bdb288fcc8864d ]--- [ 155.793924] random: nonblocking pool is initialized cat /sys/kernel/debug/tracing/r trace # tracer: function # # entries-in-buffer/entries-written: 130/130 #P:2 # # _-----=> irqs-off # / _----=> need-resched # | / _---=> hardirq/softirq # || / _--=> preempt-depth # ||| / delay # TASK-PID CPU# |||| TIMESTAMP FUNCTION # | | | |||| | | <idle>-0 [000] d.h. 50.383808: s3c_hsotg_irq <-handle_irq_event_percpu <idle>-0 [000] d.h. 74.367931: s3c_hsotg_irq <-handle_irq_event_percpu <idle>-0 [000] d.h. 74.921390: s3c_hsotg_irq <-handle_irq_event_percpu insmod-656 [001] .n.. 144.084905: s3c_hsotg_ep_alloc_request <-composite_dev_prepare insmod-656 [001] .n.. 144.126144: s3c_hsotg_udc_start <-udc_bind_to_driver insmod-656 [001] .n.. 144.126153: s3c_hsotg_phy_enable <-s3c_hsotg_udc_start insmod-656 [001] dn.. 144.126172: s3c_hsotg_init <-s3c_hsotg_udc_start insmod-656 [001] dn.. 144.126187: s3c_hsotg_init_fifo <-s3c_hsotg_init insmod-656 [001] dn.. 144.126201: s3c_hsotg_core_init_disconnected <-s3c_hsotg_udc_start insmod-656 [001] dn.. 144.126203: s3c_hsotg_corereset <-s3c_hsotg_core_init_disconnected insmod-656 [001] dn.. 144.126223: s3c_hsotg_init_fifo <-s3c_hsotg_core_init_disconnected insmod-656 [001] dn.. 144.126248: s3c_hsotg_en_gsint <-s3c_hsotg_core_init_disconnected insmod-656 [001] dn.. 144.126259: s3c_hsotg_en_gsint <-s3c_hsotg_core_init_disconnected insmod-656 [001] dn.. 144.126269: s3c_hsotg_ctrl_epint <-s3c_hsotg_core_init_disconnected insmod-656 [001] dn.. 144.126271: s3c_hsotg_ctrl_epint <-s3c_hsotg_core_init_disconnected insmod-656 [001] dn.. 144.126293: s3c_hsotg_ep0_mps <-s3c_hsotg_core_init_disconnected insmod-656 [001] dn.. 144.126295: s3c_hsotg_ep0_mps <-s3c_hsotg_core_init_disconnected insmod-656 [001] dn.. 144.126297: s3c_hsotg_enqueue_setup <-s3c_hsotg_core_init_disconnected insmod-656 [001] dn.. 144.126308: s3c_hsotg_ep_queue.isra.7 <-s3c_hsotg_enqueue_setup insmod-656 [001] dn.. 144.126323: s3c_hsotg_start_req <-s3c_hsotg_ep_queue.isra.7 insmod-656 [001] dn.. 144.126382: s3c_hsotg_ctrl_epint <-s3c_hsotg_start_req insmod-656 [001] .n.. 144.134867: s3c_hsotg_pullup <-udc_bind_to_driver sh-650 [000] d.h. 144.137903: s3c_hsotg_irq <-handle_irq_event_percpu <idle>-0 [000] d.h. 144.140945: s3c_hsotg_irq <-handle_irq_event_percpu <idle>-0 [000] d.h. 144.343073: s3c_hsotg_irq <-handle_irq_event_percpu <idle>-0 [000] d.h. 144.343122: s3c_hsotg_disconnect <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.343124: s3c_hsotg_complete_request <-kill_all_requests <idle>-0 [000] d.h. 144.343139: s3c_hsotg_complete_setup <-usb_gadget_giveback_request <idle>-0 [000] d.h. 144.343152: s3c_hsotg_core_init_disconnected <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.343154: s3c_hsotg_corereset <-s3c_hsotg_core_init_disconnected <idle>-0 [000] d.h. 144.343173: s3c_hsotg_init_fifo <-s3c_hsotg_core_init_disconnected <idle>-0 [000] d.h. 144.343198: s3c_hsotg_en_gsint <-s3c_hsotg_core_init_disconnected <idle>-0 [000] d.h. 144.343209: s3c_hsotg_en_gsint <-s3c_hsotg_core_init_disconnected <idle>-0 [000] d.h. 144.343220: s3c_hsotg_ctrl_epint <-s3c_hsotg_core_init_disconnected <idle>-0 [000] d.h. 144.343221: s3c_hsotg_ctrl_epint <-s3c_hsotg_core_init_disconnected <idle>-0 [000] d.h. 144.343245: s3c_hsotg_ep0_mps <-s3c_hsotg_core_init_disconnected <idle>-0 [000] d.h. 144.343246: s3c_hsotg_ep0_mps <-s3c_hsotg_core_init_disconnected <idle>-0 [000] d.h. 144.343248: s3c_hsotg_enqueue_setup <-s3c_hsotg_core_init_disconnected <idle>-0 [000] d.h. 144.343259: s3c_hsotg_ep_queue.isra.7 <-s3c_hsotg_enqueue_setup <idle>-0 [000] d.h. 144.343273: s3c_hsotg_start_req <-s3c_hsotg_ep_queue.isra.7 <idle>-0 [000] d.h. 144.343333: s3c_hsotg_ctrl_epint <-s3c_hsotg_start_req klogd-642 [000] d.h. 144.346846: s3c_hsotg_irq <-handle_irq_event_percpu klogd-642 [000] d.h. 144.346884: s3c_hsotg_disconnect <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.353574: s3c_hsotg_irq <-handle_irq_event_percpu <idle>-0 [000] d.h. 144.358811: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358813: s3c_hsotg_ep0_mps <-s3c_hsotg_set_ep_maxpacket <idle>-0 [000] d.h. 144.358815: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358816: s3c_hsotg_ep0_mps <-s3c_hsotg_set_ep_maxpacket <idle>-0 [000] d.h. 144.358817: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358819: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358821: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358822: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358824: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358825: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358826: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358828: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358829: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358831: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358832: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358834: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358835: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358837: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358838: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358839: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358841: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358842: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358844: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358845: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358847: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358848: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358849: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358851: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358852: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358854: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358855: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358857: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358858: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358859: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.358861: s3c_hsotg_enqueue_setup <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.361190: s3c_hsotg_irq <-handle_irq_event_percpu <idle>-0 [000] d.h. 144.364228: s3c_hsotg_irq <-handle_irq_event_percpu <idle>-0 [000] d.h. 144.517305: s3c_hsotg_irq <-handle_irq_event_percpu <idle>-0 [000] d.h. 144.517344: s3c_hsotg_disconnect <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.527580: s3c_hsotg_irq <-handle_irq_event_percpu <idle>-0 [000] d.h. 144.532813: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532815: s3c_hsotg_ep0_mps <-s3c_hsotg_set_ep_maxpacket <idle>-0 [000] d.h. 144.532816: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532817: s3c_hsotg_ep0_mps <-s3c_hsotg_set_ep_maxpacket <idle>-0 [000] d.h. 144.532819: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532820: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532822: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532823: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532825: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532826: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532828: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532829: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532831: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532832: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532834: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532835: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532837: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532838: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532839: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532841: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532842: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532844: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532845: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532847: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532848: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532849: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532851: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532852: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532854: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532855: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532857: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532858: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532859: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532861: s3c_hsotg_set_ep_maxpacket <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.532862: s3c_hsotg_enqueue_setup <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.602783: s3c_hsotg_irq <-handle_irq_event_percpu <idle>-0 [000] d.h. 144.602824: s3c_hsotg_rx_data <-s3c_hsotg_irq <idle>-0 [000] d.h. 144.603092: s3c_hsotg_irq <-handle_irq_event_percpu <idle>-0 [000] d.h. 144.603146: s3c_hsotg_epint <-s3c_hsotg_irq <idle>-0 [000] d.h. 149.595739: s3c_hsotg_irq <-handle_irq_event_percpu <idle>-0 [000] d.h. 149.595787: s3c_hsotg_rx_data <-s3c_hsotg_irq <idle>-0 [000] d.h. 149.800683: s3c_hsotg_epint <-s3c_hsotg_irq <idle>-0 [000] d.h. 154.429454: s3c_hsotg_irq <-handle_irq_event_percpu <idle>-0 [000] d.h. 154.432493: s3c_hsotg_irq <-handle_irq_event_percpu <idle>-0 [000] d.h. 154.743081: s3c_hsotg_disconnect <-dwc2_handle_common_intr <idle>-0 [000] d.h. 154.743085: s3c_hsotg_irq <-handle_irq_event_percpu root@socfpga_cyclone5:~#