From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 30 00:06:58 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E828716A4CE for ; Thu, 30 Sep 2004 00:06:58 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8AB1043D2D for ; Thu, 30 Sep 2004 00:06:58 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (harmony.village.org [10.0.0.6]) by harmony.village.org (8.13.1/8.13.1) with ESMTP id i8U05ZC5022039; Wed, 29 Sep 2004 18:05:35 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 29 Sep 2004 18:06:55 -0600 (MDT) Message-Id: <20040929.180655.29463294.imp@bsdimp.com> To: bcg@intelli7.com From: "M. Warner Losh" In-Reply-To: <1096487538.2670.1147.camel@localhost.localdomain> References: <1096485467.2670.1127.camel@localhost.localdomain> <415B0DDA.2040200@pantasys.com> <1096487538.2670.1147.camel@localhost.localdomain> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org cc: peter@pantasys.com Subject: Re: Device probe issue with an em(4) compatible device X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Sep 2004 00:06:59 -0000 In message: <1096487538.2670.1147.camel@localhost.localdomain> Brenden Grace writes: : On Wed, 2004-09-29 at 15:32, Peter Buckingham wrote: : > experience then just not compiling in the em driver or an ugly like i : > describe (or you suggest) should be fine. : : I wasn't trying to be rude, but DEVICE_PROBE(9) seems to describe how : conflicts like this should be handled. I was wondering if I am in fact : correct that devices that attempt to be generic enough for wide support : (accepting PCI_ANY_ID) should also properly pass the probing (by : returning some negative) so that a driver that may better fit the exact : device can attach. Well, it does match on the VENDOR ID and DEVICE, so it isn't that generic. The subvendor field is generally a don't care field for drivers in FreeBSD, so it is just following existing practices. Maybe that practice should be revisited, but that's why em_probe does things the way it does. If you need em to not attach, you'll have to hack em in your tree to return some small negative number. Chances are excellent that FreeBSD 6 will have facilities to address these issues (they are needed both for 'vendor supplied updated drivers' as well as 'please load me when you see this sort of card'). Warner