]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/spdk/dpdk/drivers/net/sfc/base/ef10_vpd.c
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / spdk / dpdk / drivers / net / sfc / base / ef10_vpd.c
index d56747b7ddab4b4aa2d8484736b7755b5c43e6ee..63a5ea7de29b170fd4bcfccb5823d2f1b3dc56d9 100644 (file)
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  *
- * Copyright (c) 2009-2018 Solarflare Communications Inc.
- * All rights reserved.
+ * Copyright(c) 2019-2020 Xilinx, Inc.
+ * Copyright(c) 2009-2019 Solarflare Communications Inc.
  */
 
 #include "efx.h"
@@ -79,6 +79,7 @@ ef10_vpd_size(
        __out                   size_t *sizep)
 {
        efx_rc_t rc;
+       efx_nvram_info_t eni = { 0 };
 
        EFSYS_ASSERT(EFX_FAMILY_IS_EF10(enp));
 
@@ -88,10 +89,12 @@ ef10_vpd_size(
         * so we just need to return an upper bound on the dynamic vpd,
         * which is the size of the DYNAMIC_CONFIG partition.
         */
-       if ((rc = efx_mcdi_nvram_info(enp, NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG,
-                   sizep, NULL, NULL, NULL)) != 0)
+       if ((rc = efx_mcdi_nvram_info(enp,
+                   NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG, &eni)) != 0)
                goto fail1;
 
+       *sizep = eni.eni_partn_size;
+
        return (0);
 
 fail1: