RE: [PATCH v2 00/30] usb: updates for dwc2 gadget driver

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

 



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

> 
> Dinh

BR,
Yousaf
--
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