Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Jun 2018 20:25:28 +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: r335084 - head/sys/dev/amr
Message-ID:  <201806132025.w5DKPSZY050302@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Wed Jun 13 20:25:27 2018
New Revision: 335084
URL: https://svnweb.freebsd.org/changeset/base/335084

Log:
  Add PNP info to PCI attachment of amr driver
  
  Reviewed by: imp, chuck
  Submitted by: Lakhan Shiva Kamireddy <lakhanshiva@gmail.com>
  Sponsored by: Google, Inc. (GSoC 2018)

Modified:
  head/sys/dev/amr/amr_pci.c

Modified: head/sys/dev/amr/amr_pci.c
==============================================================================
--- head/sys/dev/amr/amr_pci.c	Wed Jun 13 20:25:23 2018	(r335083)
+++ head/sys/dev/amr/amr_pci.c	Wed Jun 13 20:25:27 2018	(r335084)
@@ -116,15 +116,10 @@ static driver_t amr_pci_driver = {
 	sizeof(struct amr_softc)
 };
 
-static devclass_t	amr_devclass;
-DRIVER_MODULE(amr, pci, amr_pci_driver, amr_devclass, 0, 0);
-MODULE_DEPEND(amr, pci, 1, 1, 1);
-MODULE_DEPEND(amr, cam, 1, 1, 1);
-
 static struct amr_ident
 {
-    int		vendor;
-    int		device;
+    uint16_t		vendor;
+    uint16_t		device;
     int		flags;
 #define AMR_ID_PROBE_SIG	(1<<0)	/* generic i960RD, check signature */
 #define AMR_ID_DO_SG64		(1<<1)
@@ -143,6 +138,13 @@ static struct amr_ident
     {0x1028, 0x0013, AMR_ID_QUARTZ | AMR_ID_DO_SG64}, /* perc4/di */
     {0, 0, 0}
 };
+
+static devclass_t	amr_devclass;
+DRIVER_MODULE(amr, pci, amr_pci_driver, amr_devclass, 0, 0);
+MODULE_PNP_INFO("U16:vendor;U16:device", pci, amr, amr_device_ids,
+    sizeof(amr_device_ids[0]), nitems(amr_device_ids) - 1);
+MODULE_DEPEND(amr, pci, 1, 1, 1);
+MODULE_DEPEND(amr, cam, 1, 1, 1);
 
 static struct amr_ident *
 amr_find_ident(device_t dev)



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