Add PNP info to PCI attachment of ena driver

Make unsigned values uint16_t for pnp table. They are properly
uint16_t befause they are 16-bit PCI IDs. The PNP_INFO language has no
type for bare unsigned.

Reviewed by: imp, chuck
Submitted by: Lakhan Shiva Kamireddy <lakhanshiva@gmail.com>
Sponsored by: Google, Inc. (GSoC 2018)
Pull Request: https://github.com/bsdimp/freebsd/pull/5
This commit is contained in:
imp 2018-07-08 20:39:38 +00:00
parent da0e5bce44
commit f5e61ffca7
2 changed files with 4 additions and 2 deletions

View File

@ -3947,6 +3947,8 @@ static driver_t ena_driver = {
devclass_t ena_devclass;
DRIVER_MODULE(ena, pci, ena_driver, ena_devclass, 0, 0);
MODULE_PNP_INFO("U16:vendor; U16:device", pci, ena, ena_vendor_info_array,
sizeof(ena_vendor_info_array[0]), nitems(ena_vendor_info_array) - 1);
MODULE_DEPEND(ena, pci, 1, 1, 1);
MODULE_DEPEND(ena, ether, 1, 1, 1);

View File

@ -151,8 +151,8 @@ struct msix_entry {
};
typedef struct _ena_vendor_info_t {
unsigned int vendor_id;
unsigned int device_id;
uint16_t vendor_id;
uint16_t device_id;
unsigned int index;
} ena_vendor_info_t;