]> git.baikalelectronics.ru Git - kernel.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)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 29 Jun 2016 16:18:06 +0000 (09:18 -0700)
commita9029e54ab9f8d6294e3c482c8b12e24ef5974ce
treebce17fd2b08e385b25256de18a71aec30e2f9710
parentd5fb3adf615b4c4aa3f2f119b3ccbc35eec33c8e
ixgbevf: ixgbevf_write/read_posted_mbx should use IXGBE_ERR_MBX to initialize ret_val

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>
drivers/net/ethernet/intel/ixgbevf/mbx.c