From: Peter Chen <peter.chen@nxp.com>
To: Yuval Shaia <yshaia@marvell.com>
Cc: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: Re: [RESEND] usb: gadget: Question on chipidea UDC driver
Date: Thu, 24 Dec 2020 06:05:08 +0000 [thread overview]
Message-ID: <20201224060439.GC27629@b29397-desktop> (raw)
In-Reply-To: <MN2PR18MB2911B7D74FD3A16F8AF9BFD8D3DE0@MN2PR18MB2911.namprd18.prod.outlook.com>
On 20-12-23 16:19:06, Yuval Shaia wrote:
> Hello,
> I'm using a board equipped with ChipIdea UDC and trying to expose storage device (for example) out of it.
>
> I load the following modules/drivers:
> udc-core
> libcomposite
> ci_hdrc
> ci_hdrc_usb
> usb_f_mass_storage.
>
> Next, I used the basic setup via configfs:
> idVendor = 0x1d6b
> idProduct = 0x0001
>
> Created an empty config, function and linked the function to configuration:
> mkdir configs/c.1
> mkdir functions/mass_storage.1
> (also created lun0 with dd)
> ln -s functions/mass_storage.1 configs/c.1
>
> Then started the device:
> echo ci_hdrc.0 > UDC
>
> On device side I can see that the setup from Linux perspective is looking good:
> [ 8.360082] Mass Storage Function, version: 2009/09/11
> [ 8.360094] LUN: removable file: (no medium)
>
> However on the host side I see some errors:
> [ 10.087328] usb 1-1: device descriptor read/64, error -32
> [ 10.455328] usb 1-1: device descriptor read/64, error -32
> [ 10.695328] usb 1-1: device descriptor read/64, error -32
> [ 11.875327] usb 1-1: device not accepting address 4, error -32
> [ 12.423327] usb 1-1: device not accepting address 5, error -32
> [ 12.429178] usb usb1-port1: unable to enumerate USB device
>
> I added some debug printks to both coreidea/udc.c and coreidea/core.c and can see that the interatom between the platform driver and the device controller is ok (i.e interrupts etc).
>
> git tag 4.14.76.
>
Your kernel is a little older, try more recently kernel. From the log, it
fails at the first EP0 transfer, the interrupt you see may for port change
and bus reset. There are tracepoint supports for chipidea UDC and gadget
layer at recently support, try to enable it and see what happens again.
--
Thanks,
Peter Chen
prev parent reply other threads:[~2020-12-24 6:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-23 16:19 [RESEND] usb: gadget: Question on chipidea UDC driver Yuval Shaia
2020-12-24 6:05 ` Peter Chen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201224060439.GC27629@b29397-desktop \
--to=peter.chen@nxp.com \
--cc=linux-usb@vger.kernel.org \
--cc=yshaia@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox