qed: Fix removal of spoof checking for VFs
authorYuval Mintz <Yuval.Mintz@qlogic.com>
Wed, 27 Jul 2016 11:45:20 +0000 (14:45 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 31 Jul 2016 03:33:53 +0000 (20:33 -0700)
Driver has reverse logic for checking the result of the
spoof-checking configuration. As a result, it would log that
the configuration failed [even though it succeeded], and will
no longer do anything when requested to remove the configuration,
as it's accounting of the feature will be incorrect.

Fixes: 6ddc7608258d5 ("qed*: IOV support spoof-checking")
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qed/qed_sriov.c

index 4d161c751c1217a23bf5f0de666a81132e7c2151..15399da268d9652769f0fe76a715622e719c0aaa 100644 (file)
@@ -1404,7 +1404,7 @@ static int __qed_iov_spoofchk_set(struct qed_hwfn *p_hwfn,
        params.anti_spoofing_en = val;
 
        rc = qed_sp_vport_update(p_hwfn, &params, QED_SPQ_MODE_EBLOCK, NULL);
-       if (rc) {
+       if (!rc) {
                p_vf->spoof_chk = val;
                p_vf->req_spoofchk_val = p_vf->spoof_chk;
                DP_VERBOSE(p_hwfn, QED_MSG_IOV,