From 4322d10734cf6303d2b67ecfa06588aa07dfdde8 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Sun, 8 Jul 2018 20:40:10 +0000 Subject: [PATCH] Add PNP info to PCI attachments of ciss driver Move the module declaration so that it's after the device table. The PNP_INFO must come after the module declaration. Reviewed by: imp, chuck Submitted by: Lakhan Shiva Kamireddy Sponsored by: Google, Inc. (GSoC 2018) Differential Revision: https://reviews.freebsd.org/D15995 --- sys/dev/ciss/ciss.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c index a9dd63a0b209..94bd9c69e1c5 100644 --- a/sys/dev/ciss/ciss.c +++ b/sys/dev/ciss/ciss.c @@ -222,11 +222,6 @@ static driver_t ciss_pci_driver = { sizeof(struct ciss_softc) }; -static devclass_t ciss_devclass; -DRIVER_MODULE(ciss, pci, ciss_pci_driver, ciss_devclass, 0, 0); -MODULE_DEPEND(ciss, cam, 1, 1, 1); -MODULE_DEPEND(ciss, pci, 1, 1, 1); - /* * Control device interface. */ @@ -271,6 +266,7 @@ TUNABLE_INT("hw.ciss.force_transport", &ciss_force_transport); static int ciss_force_interrupt = 0; TUNABLE_INT("hw.ciss.force_interrupt", &ciss_force_interrupt); + /************************************************************************ * CISS adapters amazingly don't have a defined programming interface * value. (One could say some very despairing things about PCI and @@ -366,6 +362,13 @@ static struct { 0, 0, 0, NULL } }; +static devclass_t ciss_devclass; +DRIVER_MODULE(ciss, pci, ciss_pci_driver, ciss_devclass, 0, 0); +MODULE_PNP_INFO("U16:vendor;U16:device;", pci, ciss, ciss_vendor_data, + sizeof(ciss_vendor_data[0]), nitems(ciss_vendor_data) - 1); +MODULE_DEPEND(ciss, cam, 1, 1, 1); +MODULE_DEPEND(ciss, pci, 1, 1, 1); + /************************************************************************ * Find a match for the device in our list of known adapters. */