From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 30 09:13:19 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 F40CD16A525 for ; Fri, 30 Jun 2006 09:13:18 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4CD2B4467C for ; Fri, 30 Jun 2006 08:49:24 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (bclj8f6c2vw3p307@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.6/8.13.3) with ESMTP id k5U8nNUr020031; Fri, 30 Jun 2006 01:49:23 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.6/8.13.3/Submit) id k5U8nJKU020030; Fri, 30 Jun 2006 01:49:19 -0700 (PDT) (envelope-from jmg) Date: Fri, 30 Jun 2006 01:49:19 -0700 From: John-Mark Gurney To: Gerald Heinig Message-ID: <20060630084919.GT82074@funkthat.com> Mail-Followup-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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1151656903.28501.5.camel@sk-dt-018.skd.de> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: freebsd-hackers@freebsd.org, hongz@promisechina.com Subject: Re: ????: Help:why bus resource shortage? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney 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:13:19 -0000 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... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."