Date: Fri, 30 Jun 2006 01:49:19 -0700 From: John-Mark Gurney <gurney_j@resnet.uoregon.edu> To: Gerald Heinig <gheinig@syskonnect.de> Cc: freebsd-hackers@freebsd.org, hongz@promisechina.com Subject: Re: ????: Help:why bus resource shortage? Message-ID: <20060630084919.GT82074@funkthat.com> In-Reply-To: <1151656903.28501.5.camel@sk-dt-018.skd.de> References: <20060629223618.GR82074@funkthat.com> <20060630081646.GS82074@funkthat.com> <1151656903.28501.5.camel@sk-dt-018.skd.de>
next in thread | previous in thread | raw e-mail | index | archive | help
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."
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060630084919.GT82074>
