]> git.droids-corp.org - dpdk.git/blobdiff - drivers/net/sfc/base/ef10_vpd.c
doc: use SPDX tag for bnx2x guide
[dpdk.git] / drivers / net / sfc / base / ef10_vpd.c
index d56747b7ddab4b4aa2d8484736b7755b5c43e6ee..c64193691f395e523e714496f42276f650ce1e77 100644 (file)
@@ -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: