git: cba757ef2a7e - main - ocs_fc: Populate subvendor and subdevice ids. Enable serialnumber reporting.

From: Ram Kishore Vegesna <ram_at_FreeBSD.org>
Date: Tue, 21 Dec 2021 07:22:41 UTC
The branch main has been updated by ram:

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

commit cba757ef2a7ec2bb985fbcd67e8d616328b7209a
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-21 07:11:51 +0000

    ocs_fc: Populate subvendor and subdevice ids.
    Enable serialnumber reporting.
    
    Reviewed by: mav
    MFC after: 3 days
---
 sys/dev/ocs_fc/ocs_pci.c  | 3 +++
 sys/dev/ocs_fc/ocs_scsi.c | 4 ----
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/sys/dev/ocs_fc/ocs_pci.c b/sys/dev/ocs_fc/ocs_pci.c
index 8714c242a212..f50172fdada6 100644
--- a/sys/dev/ocs_fc/ocs_pci.c
+++ b/sys/dev/ocs_fc/ocs_pci.c
@@ -529,6 +529,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 b1d98c7c0e3d..8938c0e2819f 100644
--- a/sys/dev/ocs_fc/ocs_scsi.c
+++ b/sys/dev/ocs_fc/ocs_scsi.c
@@ -43,9 +43,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"
 
@@ -2808,7 +2806,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;
@@ -2859,7 +2856,6 @@ void *ocs_scsi_get_property_ptr(ocs_t *ocs, ocs_scsi_property_e prop)
 		}
 		break;
 	}
-#endif
 	default:
 		break;
 	}