ice: check if VF exists before mode check
authorMichal Swiatkowski <michal.swiatkowski@intel.com>
Fri, 10 Mar 2023 11:33:44 +0000 (12:33 +0100)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 21 Mar 2023 17:02:48 +0000 (10:02 -0700)
commit83b49e7f63da88a1544cba2b2e40bfabb24bd203
treeda3fbf319619716696365719e3ace887703f2645
parent387d42ae6df76d2ae813432d05630535a5480038
ice: check if VF exists before mode check

Setting trust on VF should return EINVAL when there is no VF. Move
checking for switchdev mode after checking if VF exists.

Fixes: c54d209c78b8 ("ice: Wait for VF to be reset/ready before configuration")
Signed-off-by: Michal Swiatkowski <michal.swiatkowski@intel.com>
Signed-off-by: Kalyan Kodamagula <kalyan.kodamagula@intel.com>
Tested-by: Sujai Buvaneswaran <sujai.buvaneswaran@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_sriov.c