ocs_fc: Populate subvendor and subdevice ids.

Enable serialnumber reporting.

Reviewed by: mav
MFC after: 3 days
This commit is contained in:
Ram Kishore Vegesna 2021-12-20 17:55:13 +05:30
parent 81a48881c6
commit cba757ef2a
2 changed files with 3 additions and 4 deletions

View File

@ -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));

View File

@ -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;
}