svn commit: r336099 - head/sys/dev/ena

Warner Losh imp at FreeBSD.org
Sun Jul 8 20:39:39 UTC 2018


Author: imp
Date: Sun Jul  8 20:39:38 2018
New Revision: 336099
URL: https://svnweb.freebsd.org/changeset/base/336099

Log:
  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 at gmail.com>
  Sponsored by: Google, Inc. (GSoC 2018)
  Pull Request: https://github.com/bsdimp/freebsd/pull/5

Modified:
  head/sys/dev/ena/ena.c
  head/sys/dev/ena/ena.h

Modified: head/sys/dev/ena/ena.c
==============================================================================
--- head/sys/dev/ena/ena.c	Sun Jul  8 20:39:23 2018	(r336098)
+++ head/sys/dev/ena/ena.c	Sun Jul  8 20:39:38 2018	(r336099)
@@ -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);
 

Modified: head/sys/dev/ena/ena.h
==============================================================================
--- head/sys/dev/ena/ena.h	Sun Jul  8 20:39:23 2018	(r336098)
+++ head/sys/dev/ena/ena.h	Sun Jul  8 20:39:38 2018	(r336099)
@@ -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;
 


More information about the svn-src-head mailing list