????: Help:why bus resource shortage?
sos at freebsd.org
Fri Jun 30 09:30:17 UTC 2006
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
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
More information about the freebsd-hackers