Discussion:
allow specifying literal values in MODULE_PNP_INFO(9)
Yuri Pankov
2018-09-25 13:10:26 UTC
Permalink
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.
Warner Losh
2018-09-25 13:20:04 UTC
Permalink
Post by Yuri Pankov
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
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
Yuri Pankov
2018-09-25 13:29:04 UTC
Permalink
Post by Warner Losh
Post by Yuri Pankov
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
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?
Nothing other than my inability to read and understand the
documentation. I'm actually happy that it already exists. Thanks and
sorry for the noise.

Loading...