]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ixgbevf: ixgbevf_write/read_posted_mbx should use IXGBE_ERR_MBX to initialize ret_val
authorXin Long <lucien.xin@gmail.com>
Thu, 12 May 2016 17:51:55 +0000 (01:51 +0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Sat, 25 Feb 2017 05:47:41 +0000 (21:47 -0800)
commit6dbd5e1cb9530afd9b824502559eac3aea26c47e
tree1b57c80415be7cad9fb07b5218860d7d7c2b04a4
parentf3873a54b218b60fa5946beb3cf3f299c4e47915
ixgbevf: ixgbevf_write/read_posted_mbx should use IXGBE_ERR_MBX to initialize ret_val

Orabug: 24568240

Now ixgbevf_write/read_posted_mbx use -IXGBE_ERR_MBX as the initiative
return value, but it's incorrect, cause in ixgbevf_vlan_rx_add_vid(),
it use err == IXGBE_ERR_MBX, the err returned from mac.ops.set_vfta,
and in ixgbevf_set_vfta_vf, it return from write/read_posted. so we
should initialize err with IXGBE_ERR_MBX, instead of -IXGBE_ERR_MBX.

With this fix, the other functions that called it also can work well,
cause they only care about if err is 0 or not.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit b3a3c5176c146ec7de653a3062237620464175fb)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/intel/ixgbevf/mbx.c