Re: [PATCH] [PNP] 'modalias' sysfs export

From: Sergey Vlasov
Date: Tue Mar 14 2006 - 10:00:53 EST


On Tue, Mar 14, 2006 at 01:47:47PM +0100, Pierre Ossman wrote:
> Sergey Vlasov wrote:
> > BTW, we can change the alias format for PNP device drivers to
> >
> > pnp:*dXXXYYYY*
> >
> > (note the additional "*" before the device ID). This would allow us to
> > have a single-value "modalias" attribute for PNP logical devices too -
> > it would have the form
> >
> > pnp:dXXXYYYYdXXXYYYYdXXXYYYY
> >
> > (listing all IDs, in this case sorting is not required, because each
> > driver will match at most only a single dXXXYYYY entry).
> >
>
> How do you guarantee that the modules are tried in the correct order? Is
> it well defined in modprobe that pnp:*dABC0001* would match before
> pnp:*dXYZ0001* if the modalias is pnp:dABC0001dXYZ0001 ?

No, the order is undefined. However, defining it will not really help -
what if there is another similar device in the system, which is discovered
earlier and brings in the generic driver before the second device is
considered? In this case defining the module load order buys you nothing.
Currently the only reliable solution to prevent a generic driver from
driving a device which has a more specific driver is to blacklist the
problematic device in the generic driver (e.g., usbhid has lots of
blacklist entries because vendors like to abuse the HID class).

Attachment: pgp00000.pgp
Description: PGP signature