????: Help:why bus resource shortage?

John-Mark Gurney gurney_j at resnet.uoregon.edu
Fri Jun 30 09:13:19 UTC 2006


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."


More information about the freebsd-hackers mailing list