Skip to content

Commit

Permalink
Add PNP info to PCI attachment of ena driver
Browse files Browse the repository at this point in the history
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: bsdimp#5


git-svn-id: svn+ssh://svn.freebsd.org/base/head@336099 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
  • Loading branch information
imp committed Jul 8, 2018
1 parent eac1d0e commit 643e02c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions sys/dev/ena/ena.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions sys/dev/ena/ena.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 643e02c

Please sign in to comment.