lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAB=otbSfj24nSUe1DyfVBDKD=trCp2-X-S-AcA1D+PTHZuP1Bg@mail.gmail.com>
Date:	Fri, 18 Mar 2016 09:47:57 +0200
From:	Ruslan Bilovol <ruslan.bilovol@...il.com>
To:	Pavel Machek <pavel@....cz>
Cc:	pali.rohar@...il.com, sre@...nel.org,
	kernel list <linux-kernel@...r.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
	linux-omap <linux-omap@...r.kernel.org>,
	Tony Lindgren <tony@...mide.com>, khilman@...nel.org,
	aaro.koskinen@....fi, ivo.g.dimitrov.75@...il.com,
	patrikbachan@...il.com, serge@...lyn.com,
	Maxime Ripard <maxime.ripard@...e-electrons.com>,
	Marek Szyprowski <m.szyprowski@...sung.com>,
	Peter Chen <peter.chen@...escale.com>,
	"Balbi, Felipe" <balbi@...com>
Subject: Re: usb: gadget breakage on N900: bind UDC by name passed via
 usb_gadget_driver structure

Hi Pavel

On Thu, Mar 17, 2016 at 11:26 PM, Pavel Machek <pavel@....cz> wrote:
> Hi!
>
> USB gadget stops working for me on n900, if I merge

Could you please give us more details?
Which gadget driver do you use (g_nokia?)

>
> usb: gadget: bind UDC by name passed via usb_gadget_driver structure
>
> patch.
>
> commit 2284b29d3d9dd16490909962574d7f3fef83fd97
> Author: Ruslan Bilovol <ruslan.bilovol@...il.com>
> Date:   Mon Nov 23 09:56:35 2015 +0100
>
>     usb: gadget: bind UDC by name passed via usb_gadget_driver
>     structure
>
>     Introduce new 'udc_name' member to usb_gadget_driver structure.
>         The 'udc_name' is a name of UDC that usb_gadget_driver should
>             be bound to. If udc_name is NULL, it will be bound to any
>                 available UDC.
>
>     Tested-by: Maxime Ripard <maxime.ripard@...e-electrons.com>
>         Signed-off-by: Ruslan Bilovol <ruslan.bilovol@...il.com>
>             Signed-off-by: Marek Szyprowski <m.szyprowski@...sung.com>
>                 Tested-by: Peter Chen <peter.chen@...escale.com>
>                     Signed-off-by: Felipe Balbi <balbi@...com>
>
>
> Patch is obvious enough... if there's someone who sets udc_name to
> NULL. Who is supposed to do that?

That is done automatically if you use libcomposite.
There is a static usb_gadget_driver composite_driver_template structure in
composite.c that is used in usb_composite_probe later (used by libcomposite
based gadgets). Since it's statically declared, 'udc_name' member is set
to NULL automatically.

Other gadgets (not based on libcomposite) use same approach with
statically declared usb_gadget_driver structure.

>
> (I have patch in my tree to make USB gadget work when it is not
> modular).

So this can be reproduced only on builtin gadget, right?

BTW, I have N900 and can try to play with it this weekend if you'll
give us more details.

Best regards,
Ruslan

>
> Best regards,
>                                                                         Pavel
> --
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ