From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 30 09:30:17 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 1243516A4A0 for ; Fri, 30 Jun 2006 09:30:17 +0000 (UTC) (envelope-from sos@freebsd.org) Received: from spider.deepcore.dk (cpe.atm2-0-53484.0x50a6c9a6.abnxx9.customer.tele.dk [80.166.201.166]) by mx1.FreeBSD.org (Postfix) with ESMTP id C757B43D86 for ; Fri, 30 Jun 2006 09:30:12 +0000 (GMT) (envelope-from sos@freebsd.org) Received: from [194.192.25.130] (sos.deepcore.dk [194.192.25.130]) by spider.deepcore.dk (8.13.6/8.13.4) with ESMTP id k5U9UBZg011416; Fri, 30 Jun 2006 11:30:11 +0200 (CEST) (envelope-from sos@freebsd.org) Message-ID: <44A4EF23.5010909@freebsd.org> Date: Fri, 30 Jun 2006 11:30:11 +0200 From: =?ISO-8859-1?Q?S=F8ren_Schmidt?= User-Agent: Thunderbird 1.5.0.2 (X11/20060531) To: Gerald Heinig , hongz@promisechina.com, freebsd-hackers@freebsd.org References: <20060629223618.GR82074@funkthat.com> <20060630081646.GS82074@funkthat.com> <1151656903.28501.5.camel@sk-dt-018.skd.de> <20060630084919.GT82074@funkthat.com> In-Reply-To: <20060630084919.GT82074@funkthat.com> Content-Transfer-Encoding: 7bit X-mail-scanned: by DeepCore Virus & Spam killer v1.16 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: ????: Help:why bus resource shortage? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2006 09:30:17 -0000 John-Mark Gurney wrote: Gerald Heinig wrote this message on Fri, Jun 30, 2006 at 10:41 +0200: On Fri, 2006-06-30 at 01:16 -0700, John-Mark Gurney wrote: This has now been fixed by making the built in driver return a negative value for the probe.. so your probe routine can return 0, and it will win the probe for the device... Minor nitpick: it may perhaps be better to return a smaller negative value (eg. -5) rather than 0. IIRC -10 is the default score used by standard system drivers and 0 is the highest score available. If someone wants to use an alternative driver to Hong's and the standard system's it won't attach. The correct values to return are: #define BUS_PROBE_SPECIFIC 0 /* Only I can use this device */ #define BUS_PROBE_VENDOR (-10) /* Vendor supplied driver */ #define BUS_PROBE_DEFAULT (-20) /* Base OS default driver */ #define BUS_PROBE_LOW_PRIORITY (-40) /* Older, less desirable drivers */ #define BUS_PROBE_GENERIC (-100) /* generic driver for dev */ #define BUS_PROBE_HOOVER (-500) /* Generic dev for all devs on bus */ So, ata should be returning _GENERIC, and Hong's driver should use _VENDOR... Actually I have a local patch that makes ATA return BUS_PROBE_DEFAULT in case it has a "real" driver for the chip, and BUS_PROBE_GENERIC in case it takes it as a generic (legacy) ATA chip. That way I can do modules for new support without having to touch ATA... -Søren