Date: Tue, 05 Apr 2011 19:45:51 +0300 From: Andriy Gapon <avg@FreeBSD.org> To: Hans Petter Selasky <hselasky@FreeBSD.org> Cc: "freebsd-current@FreeBSD.org" <freebsd-current@FreeBSD.org>, "freebsd-usb@FreeBSD.org" <freebsd-usb@FreeBSD.org> Subject: Re: use_generic and usb probing Message-ID: <4D9B473F.8020607@FreeBSD.org> In-Reply-To: <201104051455.33853.hselasky@freebsd.org> References: <201104051321.56319.hselasky@freebsd.org> <4D9B1023.7020407@FreeBSD.org> <201104051455.33853.hselasky@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D9B473F.8020607>