On Tuesday 05 April 2011 18:45:51 Andriy Gapon wrote:
> on 05/04/2011 15:55 Hans Petter Selasky said the following:
> > On Tuesday 05 April 2011 14:50:43 Andriy Gapon wrote:
> >> I believe that newbus already supports ordering of children on a bus.
> >> 
> >> BTW, does USB have to pass anything from probe to attach?
> > 
> > Mostly only the driver info field. To avoid duplicate lookups.
> > 
> >> Duplicate lookup is of course not very nice, but duplicate probing pass
> >> is not nice either.
> > 
> > This can all be avoided if the bus-drivers are sorted correctly before
> > probing!


> Well, I think that that's what probe priorities actually for.
> I also think that typically ivars should be set by a bus driver.  So maybe
> it's not such a good idea to pass data from probe to attach via ivars in
> child drivers. But I could be mistaken about that.

The same device_t is used to do all the probes!

> Practically speaking, you most likely don't have to worry about that for
> drivers that return BUS_PROBE_SPECIFIC (=0) from their probe methods.  And
> there is only a few "generic" drivers that can be handled on a case by
> case basis.

There are more drivers that needs patching! Please scan all of the kernel 
files for usbdi.h and the use_generic flag.

After looking at subr_usb.c I see your solution is fine as long as the PROBE() 
method that it attaches is the last one called before ATTACH(). If this is 
documented in how newbus should function, then please go ahead updating your 
patch to cover all USB drivers using use_generic.

freebsd-usb@freebsd.org mailing list
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"

Reply via email to