allow specifying literal values in MODULE_PNP_INFO(9)

Warner Losh imp at bsdimp.com
Tue Sep 25 13:20:17 UTC 2018


On Tue, Sep 25, 2018 at 7:12 AM Yuri Pankov <yuripv at yuripv.net> wrote:

> Hi,
>
> Looking at adding the MODULE_PNP_INFO() entry to iwm(4), I came up with
> the patch in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=231625
> adding redundant and useless vendor field to iwm_devices.  While it
> works, it's unfortunate, and I have started looking into possible
> solutions and the result is a small patch for kldxref(8) allowing
> specifying literal values in descriptor_string like the following:
>
> MODULE_PNP_INFO("U16=8086:vendor;U16:device;P:#", pci, iwm_pci_driver,
>      iwm_devices, sizeof(iwm_devices[0]), nitems(iwm_devices));
>
> ...so that we always have vendor 0x8086 and only consume the device field.
>
> If it makes at least some sense, I'll put it for review.
>

So what's wrong with using the T type that's already implemented?
T:device=0x8086?

Warner


More information about the freebsd-hackers mailing list