]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ice: write register with correct offset
authorMitch Williams <mitch.a.williams@intel.com>
Wed, 9 Oct 2019 14:09:48 +0000 (07:09 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Jun 2021 11:37:06 +0000 (13:37 +0200)
[ Upstream commit 395594563b29fbcd8d9a4f0a642484e5d3bb6db1 ]

The VF_MBX_ARQLEN register array is per-PF, not global, so we should not
use the absolute VF ID as an index. Instead, use the per-PF VF ID.

This fixes an issue with VFs on PFs other than 0 not seeing reset.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c

index e92a00a617556fcc5cc743a3558d1c9f44b567a4..360c0f7e03849c6cf324514d33951315b83ed97e 100644 (file)
@@ -390,7 +390,7 @@ static void ice_trigger_vf_reset(struct ice_vf *vf, bool is_vflr, bool is_pfr)
         * by the time we get here.
         */
        if (!is_pfr)
-               wr32(hw, VF_MBX_ARQLEN(vf_abs_id), 0);
+               wr32(hw, VF_MBX_ARQLEN(vf->vf_id), 0);
 
        /* In the case of a VFLR, the HW has already reset the VF and we
         * just need to clean up, so don't hit the VFRTRIG register.