iavf: Fix change VF's mac address
authorSylwester Dziedziuch <sylwesterx.dziedziuch@intel.com>
Thu, 1 Sep 2022 14:32:06 +0000 (16:32 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 8 Sep 2022 20:22:25 +0000 (13:22 -0700)
commitf66b98c868f2c1ffcb1139ea19d6f20983f1f9dc
tree3db6bcdb70183366d4c1c0ff94cb149aeefbb4de
parenta509702cac95a8b450228a037c8542f57e538e5b
iavf: Fix change VF's mac address

Previously changing mac address gives false negative because
ip link set <interface> address <MAC> return with
RTNLINK: Permission denied.
In iavf_set_mac was check if PF handled our mac set request,
even before filter was added to list.
Because this check returns always true and it never waits for
PF's response.

Move iavf_is_mac_handled to wait_event_interruptible_timeout
instead of false. Now it will wait for PF's response and then
check if address was added or rejected.

Fixes: 35a2443d0910 ("iavf: Add waiting for response from PF in set mac")
Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com>
Co-developed-by: Norbert Zulinski <norbertx.zulinski@intel.com>
Signed-off-by: Norbert Zulinski <norbertx.zulinski@intel.com>
Signed-off-by: Mateusz Palczewski <mateusz.palczewski@intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/iavf/iavf_main.c