git: a086650f6dc8 - stable/12 - ocs_fc: Populate subvendor and subdevice ids. Enable serialnumber reporting.

From: Ram Kishore Vegesna <ram_at_FreeBSD.org>
Date: Fri, 24 Dec 2021 09:02:01 UTC
The branch stable/12 has been updated by ram:

URL: https://cgit.FreeBSD.org/src/commit/?id=a086650f6dc864806e65d8020f6eae58a1da0ea5

commit a086650f6dc864806e65d8020f6eae58a1da0ea5
Author:     Ram Kishore Vegesna <ram@FreeBSD.org>
AuthorDate: 2021-12-20 12:25:13 +0000
Commit:     Ram Kishore Vegesna <ram@FreeBSD.org>
CommitDate: 2021-12-24 08:55:50 +0000

    ocs_fc: Populate subvendor and subdevice ids.
    Enable serialnumber reporting.
    
    Reviewed by: mav
    MFC after: 3 days
    
    (cherry picked from commit cba757ef2a7ec2bb985fbcd67e8d616328b7209a)
    
    ocs_fs(4): Fix some common typos in source code comments
    
    - s/transfered/transferred/
    - s/associted/associated/
    
    MFC after:      3 days
    
    (cherry picked from commit 16b71d98d96a3a9a2ac666440aa80f12d478959d)
---
 sys/dev/ocs_fc/ocs_gendump.c   | 2 +-
 sys/dev/ocs_fc/ocs_hw_queues.c | 2 +-
 sys/dev/ocs_fc/ocs_pci.c       | 3 +++
 sys/dev/ocs_fc/ocs_scsi.c      | 4 ----
 4 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/sys/dev/ocs_fc/ocs_gendump.c b/sys/dev/ocs_fc/ocs_gendump.c
index d24870f39668..83155d90c3a3 100644
--- a/sys/dev/ocs_fc/ocs_gendump.c
+++ b/sys/dev/ocs_fc/ocs_gendump.c
@@ -234,7 +234,7 @@ ocs_fdb_dump(ocs_t *ocs)
  * @par Description
  * This function creates a DMA buffer to hold a Lancer dump,
  * sets the dump location to point to that buffer, then calls
- * ocs_gen_dump to cause a dump to be transfered to the buffer.
+ * ocs_gen_dump to cause a dump to be transferred to the buffer.
  * After the dump is complete it copies the dump to the provided
  * user space buffer.
  *
diff --git a/sys/dev/ocs_fc/ocs_hw_queues.c b/sys/dev/ocs_fc/ocs_hw_queues.c
index 2527d72865a7..437e1f296ad1 100644
--- a/sys/dev/ocs_fc/ocs_hw_queues.c
+++ b/sys/dev/ocs_fc/ocs_hw_queues.c
@@ -962,7 +962,7 @@ hw_queue_teardown(ocs_hw_t *hw)
  * If wq_steering is OCS_HW_WQ_STEERING_REQUEST, then a WQ from the EQ that
  * the IO request came in on is selected.
  *
- * If wq_steering is OCS_HW_WQ_STEERING_CPU, then a WQ associted with the
+ * If wq_steering is OCS_HW_WQ_STEERING_CPU, then a WQ associated with the
  * CPU the request is made on is selected.
  *
  * @param hw pointer to HW object
diff --git a/sys/dev/ocs_fc/ocs_pci.c b/sys/dev/ocs_fc/ocs_pci.c
index b38ec041b397..a5e67c2614c3 100644
--- a/sys/dev/ocs_fc/ocs_pci.c
+++ b/sys/dev/ocs_fc/ocs_pci.c
@@ -532,6 +532,9 @@ ocs_pci_attach(device_t dev)
 
 	ocs->pci_vendor = pci_get_vendor(dev);
 	ocs->pci_device = pci_get_device(dev);
+	ocs->pci_subsystem_vendor = pci_get_subvendor(dev);
+	ocs->pci_subsystem_device = pci_get_subdevice(dev);
+
 	snprintf(ocs->businfo, sizeof(ocs->businfo), "%02X:%02X:%02X",
 		pci_get_bus(dev), pci_get_slot(dev), pci_get_function(dev));
 
diff --git a/sys/dev/ocs_fc/ocs_scsi.c b/sys/dev/ocs_fc/ocs_scsi.c
index b11d2678267c..560ed023f955 100644
--- a/sys/dev/ocs_fc/ocs_scsi.c
+++ b/sys/dev/ocs_fc/ocs_scsi.c
@@ -44,9 +44,7 @@
 #include "ocs.h"
 #include "ocs_els.h"
 #include "ocs_scsi.h"
-#if defined(OCS_ENABLE_VPD_SUPPORT)
 #include "ocs_vpd.h"
-#endif
 #include "ocs_utils.h"
 #include "ocs_device.h"
 
@@ -2826,7 +2824,6 @@ void *ocs_scsi_get_property_ptr(ocs_t *ocs, ocs_scsi_property_e prop)
 	case OCS_SCSI_BIOS_VERSION_STRING:
 		rc = ocs_hw_get_ptr(&ocs->hw, OCS_HW_BIOS_VERSION_STRING);
 		break;
-#if defined(OCS_ENABLE_VPD_SUPPORT)
 	case OCS_SCSI_SERIALNUMBER:
 	{
 		uint8_t *pvpd;
@@ -2877,7 +2874,6 @@ void *ocs_scsi_get_property_ptr(ocs_t *ocs, ocs_scsi_property_e prop)
 		}
 		break;
 	}
-#endif
 	default:
 		break;
 	}