From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 29 16:54:15 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 8804116A4CE for ; Wed, 29 Sep 2004 16:54:15 +0000 (GMT) Received: from intelli7.com (host350.jtan.com [207.106.6.174]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5403643D5D for ; Wed, 29 Sep 2004 16:54:15 +0000 (GMT) (envelope-from bcg@intelli7.com) Received: from [192.168.0.2] (unknown [65.222.158.88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by intelli7.com (Postfix) with ESMTP id 1FC7A7DC86A for ; Wed, 29 Sep 2004 12:58:29 -0400 (EDT) From: Brenden Grace To: freebsd-hackers@freebsd.org Content-Type: text/plain Message-Id: <1096476707.2670.1088.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Wed, 29 Sep 2004 12:51:47 -0400 Content-Transfer-Encoding: 7bit Subject: 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: Wed, 29 Sep 2004 16:54:15 -0000 I have a somewhat limited knowledge of FreeBSD's device system, so forgive (and correct) me if I get any of this wrong. 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? On a side not, would it also not be more correct for FreeBSD drivers in the tree to return a negative number for _any_ device that accepts a PCI_ANY_ID value? Thanks in advance for the clarification/help. -- Brenden C. Grace Intelli7