Re: [PATCH] USB: Add LVS Test device driver

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

 



On Wed, May 14, 2014 at 09:56:02AM +0530, Pratyush Anand wrote:
> Hi Alan,
> 
> PS: For all other comments, will do as you suggested.
> On Tue, May 13, 2014 at 10:28:11PM +0800, Alan Stern wrote:
> > On Tue, 13 May 2014, Pratyush Anand wrote:
> > 
> > > > The biggest bug may not be an obvious one.  Suppose the lvstest driver
> > > > has been built into the kernel.  When the kernel boots and the root
> > > > hubs are registered, what will prevent them all from binding to lvstest
> > > > instead of the normal hub driver?
> > > 
> > > Sorry, I do not have much knowledge of device model, so may be I am
> > > wrong, but this is what I understand.
> > > 
> > > Since core comes before misc in makefile, so won't it insure that
> > > hub_diver is registered before lvs_driver on usb bus?
> > 
> > No.  Order in the makefile has no direct connection with driver 
> > probing.
> > 
> > >  And if that is
> > > insured than, would n't a root hub device always binds to the first
> > > driver and ie hub_driver. Infact, I am working with lvstest driver
> > > being built into the kernel.
> > 
> > It works only because drivers get probed in the order they are 
> > registered, and the hub driver is registered first.  But the probing 
> > order is not guaranteed, as far as I know.  You shouldn't rely on it.
> > 
> 
> I see some references on different mailing lists that "probe will be
> executed according to object link order which is decided by Makefile".
> 
> http://comments.gmane.org/gmane.linux.usb.general/98616

That is true, for modules that are built into the kernel.  If they are
modules, then there is no specific order at all, it's random, which ever
userspace decides to load first.

greg k-h
--
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