> This patch initializes SerialNumber field to a default
> value "Unknown". In case of any error or if the PCI device
> doesn't have the PCIe Device Serial Number Capability the
Not to be picky, probably just "PCI" instead only for PCIe.

> default value will be returned for this field.
> 
> Signed-off-by: Neerav Parikh <neerav.par...@intel.com>
> Tested-by: Ross Brattain <ross.b.bratt...@intel.com>

Reviewed-by: Yi Zou <yi....@intel.com>


> ---
>  pci.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/pci.c b/pci.c
> index 70b9d6a..642e33b 100644
> --- a/pci.c
> +++ b/pci.c
> @@ -34,6 +34,10 @@ get_device_serial_number(struct pci_device *dev,
> struct hba_info *hba_info)
>       u_int32_t dword_high = 0;
>       int rc;
> 
> +     /* Default */
> +     snprintf(hba_info->SerialNumber,
> +              sizeof(hba_info->SerialNumber),
> +              "Unknown");
>       /*
>        * Read the Status Register in the PCIe configuration
>        * header space to see if the PCI Capability List is
> 
> _______________________________________________
> devel mailing list
> devel@open-fcoe.org
> https://lists.open-fcoe.org/mailman/listinfo/devel
_______________________________________________
devel mailing list
devel@open-fcoe.org
https://lists.open-fcoe.org/mailman/listinfo/devel

Reply via email to