From 3fc7cd87fb3a4cf301b97f9d5ceebcc1852ec807 Mon Sep 17 00:00:00 2001 From: Lakhan Shiva Date: Wed, 2 May 2018 22:13:44 +0530 Subject: [PATCH 01/10] Adding PNP_INFO to aac --- sys/dev/aac/aac_pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/aac/aac_pci.c b/sys/dev/aac/aac_pci.c index 1685abe8a00ece..fd8e4e17e3112d 100644 --- a/sys/dev/aac/aac_pci.c +++ b/sys/dev/aac/aac_pci.c @@ -493,6 +493,8 @@ static driver_t aacch_driver = { static devclass_t aacch_devclass; DRIVER_MODULE(aacch, pci, aacch_driver, aacch_devclass, NULL, NULL); +MODULE_PNP_INFO("U16:vendor;U16:device;U16:#;U16:#;D:#", pci, aac, + aac_identifiers, sizeof(aac_identifiers[0]), nitems(aac_identifiers) - 1); static int aacch_probe(device_t dev) From a30d60c9ad6a4a98e2e6eb6ee026cf95ac089afb Mon Sep 17 00:00:00 2001 From: Lakhan Shiva Date: Thu, 3 May 2018 12:01:07 +0530 Subject: [PATCH 02/10] Change descriptor string for MODULE_PNP_INFO in aac --- sys/dev/aac/aac_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/aac/aac_pci.c b/sys/dev/aac/aac_pci.c index fd8e4e17e3112d..6c34b6c7a45693 100644 --- a/sys/dev/aac/aac_pci.c +++ b/sys/dev/aac/aac_pci.c @@ -493,7 +493,7 @@ static driver_t aacch_driver = { static devclass_t aacch_devclass; DRIVER_MODULE(aacch, pci, aacch_driver, aacch_devclass, NULL, NULL); -MODULE_PNP_INFO("U16:vendor;U16:device;U16:#;U16:#;D:#", pci, aac, +MODULE_PNP_INFO("U16:vendor;U16:device;U16:#;U16:#", pci, aac, aac_identifiers, sizeof(aac_identifiers[0]), nitems(aac_identifiers) - 1); static int From 94dae4a615a75294ab54efd89957bf1dc5dee997 Mon Sep 17 00:00:00 2001 From: Lakhan Shiva Date: Thu, 3 May 2018 12:38:12 +0530 Subject: [PATCH 03/10] Add PNP info to the PCI attachment of the ncr driver. --- sys/dev/ncr/ncr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/ncr/ncr.c b/sys/dev/ncr/ncr.c index e125ee189a804b..671a1a0ab74c7e 100644 --- a/sys/dev/ncr/ncr.c +++ b/sys/dev/ncr/ncr.c @@ -7108,6 +7108,8 @@ static driver_t ncr_driver = { static devclass_t ncr_devclass; DRIVER_MODULE(ncr, pci, ncr_driver, ncr_devclass, 0, 0); +MODULE_PNP_INFO("U32:#;U16:#;D:#", pci, ncr, ncr_chip_table, + sizeof(ncr_chip_table[0]), nitems(ncr_chip_table) - 1); MODULE_DEPEND(ncr, cam, 1, 1, 1); MODULE_DEPEND(ncr, pci, 1, 1, 1); From 18a47bd2a856de4d9f28f9f45695110dde363477 Mon Sep 17 00:00:00 2001 From: Lakhan Shiva Date: Thu, 3 May 2018 17:21:35 +0530 Subject: [PATCH 04/10] Add PNP info to PCI attachment of ath driver, modify ncr driver and aac driver --- sys/dev/aac/aac_pci.c | 2 +- sys/dev/ath/if_ath_pci.c | 2 ++ sys/dev/ncr/ncr.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/aac/aac_pci.c b/sys/dev/aac/aac_pci.c index 6c34b6c7a45693..540eed28f17fdc 100644 --- a/sys/dev/aac/aac_pci.c +++ b/sys/dev/aac/aac_pci.c @@ -493,7 +493,7 @@ static driver_t aacch_driver = { static devclass_t aacch_devclass; DRIVER_MODULE(aacch, pci, aacch_driver, aacch_devclass, NULL, NULL); -MODULE_PNP_INFO("U16:vendor;U16:device;U16:#;U16:#", pci, aac, +MODULE_PNP_INFO("U16:vendor;U16:device;U16:#;U16:#", pci, aacch, aac_identifiers, sizeof(aac_identifiers[0]), nitems(aac_identifiers) - 1); static int diff --git a/sys/dev/ath/if_ath_pci.c b/sys/dev/ath/if_ath_pci.c index ae5867713094ee..3362476cca1091 100644 --- a/sys/dev/ath/if_ath_pci.c +++ b/sys/dev/ath/if_ath_pci.c @@ -466,6 +466,8 @@ static driver_t ath_pci_driver = { }; static devclass_t ath_devclass; DRIVER_MODULE(if_ath_pci, pci, ath_pci_driver, ath_devclass, 0, 0); +MODULE_PNP_INFO("U16:vendor;U16:device;U16:#;U16:#", pci, if_ath_pci, + ath_pci_id_table, sizeof(ath_pci_id_table), nitems(ath_pci_id_table) - 1); MODULE_VERSION(if_ath_pci, 1); MODULE_DEPEND(if_ath_pci, wlan, 1, 1, 1); /* 802.11 media layer */ MODULE_DEPEND(if_ath_pci, ath_main, 1, 1, 1); /* if_ath driver */ diff --git a/sys/dev/ncr/ncr.c b/sys/dev/ncr/ncr.c index 671a1a0ab74c7e..0b4ae740814c5a 100644 --- a/sys/dev/ncr/ncr.c +++ b/sys/dev/ncr/ncr.c @@ -7108,7 +7108,7 @@ static driver_t ncr_driver = { static devclass_t ncr_devclass; DRIVER_MODULE(ncr, pci, ncr_driver, ncr_devclass, 0, 0); -MODULE_PNP_INFO("U32:#;U16:#;D:#", pci, ncr, ncr_chip_table, +MODULE_PNP_INFO("U32:device;U16:#;D:#", pci, ncr, ncr_chip_table, sizeof(ncr_chip_table[0]), nitems(ncr_chip_table) - 1); MODULE_DEPEND(ncr, cam, 1, 1, 1); MODULE_DEPEND(ncr, pci, 1, 1, 1); From 71384ca4d464d0de14bff7c87aec306c45f8e50f Mon Sep 17 00:00:00 2001 From: Lakhan Shiva Date: Fri, 11 May 2018 20:36:55 +0530 Subject: [PATCH 05/10] Add PNP info to the PCI attachment of the aacraid driver. --- sys/dev/aacraid/aacraid_pci.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/aacraid/aacraid_pci.c b/sys/dev/aacraid/aacraid_pci.c index 1f17a7c9345dca..3a32dbeaafb4f6 100644 --- a/sys/dev/aacraid/aacraid_pci.c +++ b/sys/dev/aacraid/aacraid_pci.c @@ -86,6 +86,9 @@ static driver_t aacraid_pci_driver = { static devclass_t aacraid_devclass; DRIVER_MODULE(aacraid, pci, aacraid_pci_driver, aacraid_devclass, 0, 0); +MODULE_PNP_INFO("U16:vendor;U16:device;U16:#;U16:#", pci, aacraid, + aacraid_family_identifiers, sizeof(aacraid_family_identifiers[0]), + nitems(aacraid_family_identifiers) - 1); MODULE_DEPEND(aacraid, pci, 1, 1, 1); struct aac_ident From cefd9cbff7d612d44a352032f5126b20807601ff Mon Sep 17 00:00:00 2001 From: Lakhan Shiva Kamireddy Date: Fri, 11 May 2018 22:14:28 +0530 Subject: [PATCH 06/10] Modifying PNP info to correct the .num_entry field --- sys/dev/ncr/ncr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ncr/ncr.c b/sys/dev/ncr/ncr.c index 0b4ae740814c5a..904d7074c93458 100644 --- a/sys/dev/ncr/ncr.c +++ b/sys/dev/ncr/ncr.c @@ -7109,7 +7109,7 @@ static devclass_t ncr_devclass; DRIVER_MODULE(ncr, pci, ncr_driver, ncr_devclass, 0, 0); MODULE_PNP_INFO("U32:device;U16:#;D:#", pci, ncr, ncr_chip_table, - sizeof(ncr_chip_table[0]), nitems(ncr_chip_table) - 1); + sizeof(ncr_chip_table[0]), nitems(ncr_chip_table)); MODULE_DEPEND(ncr, cam, 1, 1, 1); MODULE_DEPEND(ncr, pci, 1, 1, 1); From 37722c6041fec61d561de8b5b8fd8caad6a11914 Mon Sep 17 00:00:00 2001 From: Lakhan Shiva Kamireddy Date: Sat, 12 May 2018 15:34:52 +0530 Subject: [PATCH 07/10] Modify sizeof attribute of PNP in if_ath_pci.c --- sys/dev/ath/if_ath_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ath/if_ath_pci.c b/sys/dev/ath/if_ath_pci.c index 3362476cca1091..fc696685508165 100644 --- a/sys/dev/ath/if_ath_pci.c +++ b/sys/dev/ath/if_ath_pci.c @@ -467,7 +467,7 @@ static driver_t ath_pci_driver = { static devclass_t ath_devclass; DRIVER_MODULE(if_ath_pci, pci, ath_pci_driver, ath_devclass, 0, 0); MODULE_PNP_INFO("U16:vendor;U16:device;U16:#;U16:#", pci, if_ath_pci, - ath_pci_id_table, sizeof(ath_pci_id_table), nitems(ath_pci_id_table) - 1); + ath_pci_id_table, sizeof(ath_pci_id_table[0]), nitems(ath_pci_id_table) - 1); MODULE_VERSION(if_ath_pci, 1); MODULE_DEPEND(if_ath_pci, wlan, 1, 1, 1); /* 802.11 media layer */ MODULE_DEPEND(if_ath_pci, ath_main, 1, 1, 1); /* if_ath driver */ From 703caee4563630c5ee794de0611a2b7d802ed31c Mon Sep 17 00:00:00 2001 From: Lakhan Shiva Kamireddy Date: Mon, 14 May 2018 16:54:47 +0530 Subject: [PATCH 08/10] Update PNP info for aacraid --- sys/dev/aacraid/aacraid_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/aacraid/aacraid_pci.c b/sys/dev/aacraid/aacraid_pci.c index 3a32dbeaafb4f6..b33b47ea4d6e2d 100644 --- a/sys/dev/aacraid/aacraid_pci.c +++ b/sys/dev/aacraid/aacraid_pci.c @@ -86,7 +86,7 @@ static driver_t aacraid_pci_driver = { static devclass_t aacraid_devclass; DRIVER_MODULE(aacraid, pci, aacraid_pci_driver, aacraid_devclass, 0, 0); -MODULE_PNP_INFO("U16:vendor;U16:device;U16:#;U16:#", pci, aacraid, +MODULE_PNP_INFO("U16:vendor;U16:device", pci, aacraid, aacraid_family_identifiers, sizeof(aacraid_family_identifiers[0]), nitems(aacraid_family_identifiers) - 1); MODULE_DEPEND(aacraid, pci, 1, 1, 1); From 9740852856c09af00c6fc78dcc05452495fa3501 Mon Sep 17 00:00:00 2001 From: Lakhan Shiva Kamireddy Date: Mon, 14 May 2018 16:56:09 +0530 Subject: [PATCH 09/10] Update PNP info for aac_pci --- sys/dev/aac/aac_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/aac/aac_pci.c b/sys/dev/aac/aac_pci.c index 540eed28f17fdc..78f9d001dd36c5 100644 --- a/sys/dev/aac/aac_pci.c +++ b/sys/dev/aac/aac_pci.c @@ -493,7 +493,7 @@ static driver_t aacch_driver = { static devclass_t aacch_devclass; DRIVER_MODULE(aacch, pci, aacch_driver, aacch_devclass, NULL, NULL); -MODULE_PNP_INFO("U16:vendor;U16:device;U16:#;U16:#", pci, aacch, +MODULE_PNP_INFO("U16:vendor;U16:device", pci, aacch, aac_identifiers, sizeof(aac_identifiers[0]), nitems(aac_identifiers) - 1); static int From 29d3f33cd6fece96af211e73cee566edaab28c8c Mon Sep 17 00:00:00 2001 From: Lakhan Shiva Kamireddy Date: Mon, 14 May 2018 20:46:14 +0530 Subject: [PATCH 10/10] Moved device table before PNP info in aacraid --- sys/dev/aacraid/aacraid_pci.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/dev/aacraid/aacraid_pci.c b/sys/dev/aacraid/aacraid_pci.c index b33b47ea4d6e2d..868a8c0eac5dbb 100644 --- a/sys/dev/aacraid/aacraid_pci.c +++ b/sys/dev/aacraid/aacraid_pci.c @@ -85,12 +85,6 @@ static driver_t aacraid_pci_driver = { static devclass_t aacraid_devclass; -DRIVER_MODULE(aacraid, pci, aacraid_pci_driver, aacraid_devclass, 0, 0); -MODULE_PNP_INFO("U16:vendor;U16:device", pci, aacraid, - aacraid_family_identifiers, sizeof(aacraid_family_identifiers[0]), - nitems(aacraid_family_identifiers) - 1); -MODULE_DEPEND(aacraid, pci, 1, 1, 1); - struct aac_ident { u_int16_t vendor; @@ -110,6 +104,12 @@ struct aac_ident {0, 0, 0, 0, 0, 0, 0} }; +DRIVER_MODULE(aacraid, pci, aacraid_pci_driver, aacraid_devclass, 0, 0); +MODULE_PNP_INFO("U16:vendor;U16:device", pci, aacraid, + aacraid_family_identifiers, sizeof(aacraid_family_identifiers[0]), + nitems(aacraid_family_identifiers) - 1); +MODULE_DEPEND(aacraid, pci, 1, 1, 1); + static struct aac_ident * aac_find_ident(device_t dev) {