use_generic and usb probing
Andriy Gapon
avg at FreeBSD.org
Tue Apr 5 16:45:54 UTC 2011
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.
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.
--
Andriy Gapon
More information about the freebsd-usb
mailing list