ice: initialize mailbox snapshot earlier in PF init
authorJacob Keller <jacob.e.keller@intel.com>
Wed, 22 Feb 2023 17:09:13 +0000 (09:09 -0800)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Mon, 13 Mar 2023 18:06:05 +0000 (11:06 -0700)
Now that we no longer depend on the number of VFs being allocated, we can
move the ice_mbx_init_snapshot function earlier. This will be required by
Scalable IOV as we will not be calling ice_sriov_configure for Scalable
VFs.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Tested-by: Marek Szlosek <marek.szlosek@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_main.c
drivers/net/ethernet/intel/ice/ice_sriov.c
drivers/net/ethernet/intel/ice/ice_vf_mbx.h

index 567694bf098ba52684899ad593e6df448653a68b..615a731d7afe086a840fedc2224537f77f5c784a 100644 (file)
@@ -3891,6 +3891,7 @@ static int ice_init_pf(struct ice_pf *pf)
 
        mutex_init(&pf->vfs.table_lock);
        hash_init(pf->vfs.table);
+       ice_mbx_init_snapshot(&pf->hw);
 
        return 0;
 }
index 6152c90d7286ddb2f5278e3db3e163bb02f6cae1..79159cbb66ec641da5f177fed7e2189d30cf6aca 100644 (file)
@@ -1023,8 +1023,6 @@ int ice_sriov_configure(struct pci_dev *pdev, int num_vfs)
                return -EBUSY;
        }
 
-       ice_mbx_init_snapshot(&pf->hw);
-
        err = ice_pci_sriov_ena(pf, num_vfs);
        if (err)
                return err;
index 41250519bc565572db0882bbb95fd578966984cf..44bc030d17e07ab1538f8f27299484ed2c039dc4 100644 (file)
@@ -43,5 +43,9 @@ ice_conv_link_speed_to_virtchnl(bool __always_unused adv_link_support,
        return 0;
 }
 
+static inline void ice_mbx_init_snapshot(struct ice_hw *hw)
+{
+}
+
 #endif /* CONFIG_PCI_IOV */
 #endif /* _ICE_VF_MBX_H_ */