* [RESEND] usb: gadget: Question on chipidea UDC driver
@ 2020-12-23 16:19 Yuval Shaia
2020-12-24 6:05 ` Peter Chen
0 siblings, 1 reply; 2+ messages in thread
From: Yuval Shaia @ 2020-12-23 16:19 UTC (permalink / raw)
To: Peter.Chen@nxp.com; +Cc: linux-usb@vger.kernel.org, Yuval Shaia
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.
Any idea?
Thanks a lot in advance for any help.
Yuval
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [RESEND] usb: gadget: Question on chipidea UDC driver
2020-12-23 16:19 [RESEND] usb: gadget: Question on chipidea UDC driver Yuval Shaia
@ 2020-12-24 6:05 ` Peter Chen
0 siblings, 0 replies; 2+ messages in thread
From: Peter Chen @ 2020-12-24 6:05 UTC (permalink / raw)
To: Yuval Shaia; +Cc: linux-usb@vger.kernel.org
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-24 6:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-23 16:19 [RESEND] usb: gadget: Question on chipidea UDC driver Yuval Shaia
2020-12-24 6:05 ` Peter Chen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox