From owner-freebsd-usb@FreeBSD.ORG Tue Apr 5 16:45:54 2011 Return-Path: Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3837C106566B; Tue, 5 Apr 2011 16:45:54 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 1A34E8FC13; Tue, 5 Apr 2011 16:45:52 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id TAA07789; Tue, 05 Apr 2011 19:45:51 +0300 (EEST) (envelope-from avg@FreeBSD.org) Message-ID: <4D9B473F.8020607@FreeBSD.org> Date: Tue, 05 Apr 2011 19:45:51 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110309 Lightning/1.0b2 Thunderbird/3.1.9 MIME-Version: 1.0 To: Hans Petter Selasky References: <201104051321.56319.hselasky@freebsd.org> <4D9B1023.7020407@FreeBSD.org> <201104051455.33853.hselasky@freebsd.org> In-Reply-To: <201104051455.33853.hselasky@freebsd.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: "freebsd-current@FreeBSD.org" , "freebsd-usb@FreeBSD.org" Subject: Re: use_generic and usb probing X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Apr 2011 16:45:54 -0000 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