Subject: Re: Plug-and-Play BIOS support available
To: Rafal Boni <rafal@mediaone.net>
From: Matthias Drochner <M.Drochner@fz-juelich.de>
List: port-i386
Date: 11/17/1999 16:58:53
rafal@mediaone.net said:
> I imagine the same effect could be achieved by making the match
> routine of any *PNP device return a value > X[*] if the ID does not
> start with "PNP". 

As I just wrote to Christos, I doubt that an ID starting
with "PNP" is automatically a compat ID. A device driver
A driver's "match" function could of course check against
all ID's it gets passed and weight them. The problem with
this is that the driver's "attach" function does not know
necessarily which ID's match result made it win the fight
for the device and it has to check both ID dimensions again
to know eg which level of functionality it should work with.
(Note that there can be multiple compat IDs for one device.)

> I'm also guessing it 
> could be done at a level higher than the match routines of all the drivers,
> like the PNP emueration routine, so each driver wouldn't have to be touched.

The pnpbios code takes first the primary ID, and if any driver
matches it, it gets the device. (even if another driver would
match a compat id with a higher score)
I'd say this is reasonable, and it keeps drivers simple.

> For example, my laptop has a CS4237B sound chip which reports CSC000 and
> PNPB007 (WSS compatibility ID).  The WSS driver could match the PNPB007, 
> while my custom CS423x driver could match CSC0000 and have the PNP enumerator
> automatically bump its' priority.

This would work, provided that the "CSC" ID is the chip's
primary ID.

best regards
Matthias