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] [day] [month] [year] [list]
Date:	Tue, 17 Jun 2014 02:04:04 +0000
From:	Peter Chen <Peter.Chen@...escale.com>
To:	Alan Stern <stern@...land.harvard.edu>,
	Felipe Balbi <balbi@...com>,
	"r.baldyga@...sung.com" <r.baldyga@...sung.com>
CC:	Greg KH <gregkh@...uxfoundation.org>,
	"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"chanho61.park@...sung.com" <chanho61.park@...sung.com>
Subject: RE: Disable bus's drivers_autoprobe before rootfs has mounted

 
> > Yes, otherwise, the device which the udc is probed deferral and the
> > gadget driver is build-in will never work. If we skip fixing it, this
> > problem will exist for more than 2 years, it is too long.
> >
> > I have a support request from android team that usb peripheral
> > function never works from 3.10.x kernel at one device, I think it is a
> > common problem, no only I meet it.
> >
> > Below are links which this problem reports:
> >
> > http://marc.info/?l=linux-usb&m=139380872501745&w=2
> > http://marc.info/?l=linux-usb&m=137706435611447&w=2
> >
> > > If you do want to fix the problem, there's a much easier way than
> > > what you posted.  See below.
> > >
> > Robert Baldyga posts the similar solution, but seems Felipe doesn't
> > agree it.
> > http://www.spinics.net/lists/linux-usb/msg102795.html
> >
> > Then, you and Felipe has a discussion for this problem:
> > http://www.spinics.net/lists/linux-usb/msg106760.html
> 
> Okay, I get it.  Felipe didn't want to do this because you might end up
> loading a gadget driver that never gets bound.  There might not even be
> any UDC devices at all.
> 
> Felipe, I think the problem of having unbound gadget drivers isn't so bad.
> It's just like having unbound drivers of any sort.  For example, the
> Fedora kernels have ohci-hcd and uhci-hcd built-in.  Relatively few
> systems have both OHCI and UHCI controllers (lots of current machines
> have neither); everybody else ends up with at least one unused driver and
> no way to remove it.  If Fedora can do this, I think we can allow users
> to have unnecessary gadget drivers.
> 
> In fact, I don't know of any other kind of driver module whose init
> routine will fail if there's no hardware to bind to.
> 
> I suggest you go ahead and accept Robert Baldyga's original patch --
> except for one little problem: The patch forgets to add driver->list to
> the global driver_list if the driver gets bound immediately.  The
> 
> 	list_add_tail(&driver->list, &driver_list);
> 
> call needs to be moved up near the start of usb_gadget_probe_driver().
> 

Thanks, Alan.

The another improvement is: set driver->attached as true at udc_bind_to_driver.

Peter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ