From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 30 00:00:54 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 9CBC916A4CE for ; Thu, 30 Sep 2004 00:00:54 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 37B9C43D3F for ; Thu, 30 Sep 2004 00:00:54 +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 i8TNxNdo021911; Wed, 29 Sep 2004 17:59:23 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 29 Sep 2004 18:00:43 -0600 (MDT) Message-Id: <20040929.180043.128332638.imp@bsdimp.com> To: bcg@intelli7.com From: "M. Warner Losh" In-Reply-To: <1096476707.2670.1088.camel@localhost.localdomain> References: <1096476707.2670.1088.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 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:00:54 -0000 In message: <1096476707.2670.1088.camel@localhost.localdomain> Brenden Grace writes: : I am writing a network driver for a em(4) compatible chip. I know the : specific subvendor id and subdevice id, but the em(4) driver seems to : attach to the device before my driver can. Is this because the em_probe : is occurring before my probe AND because the em_probe is allowing for : PCI_ANY_ID for subvendor subdevice ids (the vendor and device ids of my : card are identical to an actual Intel card)? If so the solution then : would be to have the em driver return a number less than zero in : em_probe and my driver's probe to return a number greater than the : em_probes's return? Ths solution is to have em's probe return a small negative number, and your probe return a larger negative number (eg, -10 for the em probe and -5 for yours). However, is there any reason you're writing a driver for a device that's compatible with em? why not use em? Warner