Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Jul 2018 20:39:38 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r336099 - head/sys/dev/ena
Message-ID:  <201807082039.w68Kdcwo089814@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@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;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807082039.w68Kdcwo089814>