Date: Fri, 30 Jun 2006 11:30:11 +0200 From: =?ISO-8859-1?Q?S=F8ren_Schmidt?= <sos@freebsd.org> To: Gerald Heinig <gheinig@syskonnect.de>, hongz@promisechina.com, freebsd-hackers@freebsd.org Subject: Re: ????: Help:why bus resource shortage? Message-ID: <44A4EF23.5010909@freebsd.org> In-Reply-To: <20060630084919.GT82074@funkthat.com> References: <20060629223618.GR82074@funkthat.com> <20060630081646.GS82074@funkthat.com> <1151656903.28501.5.camel@sk-dt-018.skd.de> <20060630084919.GT82074@funkthat.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44A4EF23.5010909>
