linux/drivers/net/ethernet/intel/ixgbe
Alexander Duyck ab3a3b7b0c ixgbe: Fix bugs in ixgbe_clear_vf_vlans()
When I had rewritten the code for ixgbe_clear_vf_vlans() it looks like I
had transitioned back and forth between using word as an offset and using
word as a register offset.  As a result I honestly don't see how the code
was working before other than the fact that resetting the VLANs on the VF
like didn't do much to clear them.

Another issue found is that the mask was using a divide instead of a
modulus.  As a result the mask bit was incorrectly being set to either bit
0 or 1 based on the value of the VF being tested.  As a result the wrong
VFs were having their VLANs cleared if they were enabled.

I have updated the code so that word represents the offset in the array.
This way we can use the modulus and xor operations and they will make sense
instead of being performed on a 4 byte aligned value.

I replaced the statement "(word % 2) ^ 1" with "~word % 2" in order to
reduce the line length as the line exceeded 80 characters with the register
name inserted.  The two should be equivalent so the change should be safe.

Reported-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-12-29 19:16:08 -08:00
..
ixgbe_82598.c ixgbe: Add support for adding/removing VLAN on PF bypassing the VLVF 2015-12-12 01:29:28 -08:00
ixgbe_82599.c ixgbe: Clear stale pool mappings 2015-12-12 02:05:21 -08:00
ixgbe_common.c ixgbe: Clear stale pool mappings 2015-12-12 02:05:21 -08:00
ixgbe_common.h ixgbe: Add support for adding/removing VLAN on PF bypassing the VLVF 2015-12-12 01:29:28 -08:00
ixgbe_dcb_82598.c ixgbe: convert low_water into an array 2014-04-22 23:07:11 -07:00
ixgbe_dcb_82598.h ixgbe: update date to 2013 2013-02-05 01:44:13 -08:00
ixgbe_dcb_82599.c ixgbe: Fix FCRTH value in VM-to-VM loopback mode 2015-09-23 23:04:48 -07:00
ixgbe_dcb_82599.h ixgbe: clean up checkpatch warnings about CODE_INDENT and LEADING_SPACE 2014-05-23 05:24:04 -07:00
ixgbe_dcb_nl.c ixgbe: Add new support for X550 MAC's 2014-11-11 06:18:56 -08:00
ixgbe_dcb.c ixgbe: Add new support for X550 MAC's 2014-11-11 06:18:56 -08:00
ixgbe_dcb.h IXGBE: Set the SW prio_tc values at initialization to the HW setting. 2013-05-21 03:14:21 -07:00
ixgbe_debugfs.c ixgbe: don't check NULL for debugfs_remove_recursive 2014-05-23 05:28:24 -07:00
ixgbe_ethtool.c ixgbe: report correct media type for KR, KX and KX4 interfaces 2015-12-29 19:16:06 -08:00
ixgbe_fcoe.c ixgbe: drop null test before destroy functions 2015-11-23 11:08:48 -08:00
ixgbe_fcoe.h ixgbe: adds x550 specific FCoE offloads 2015-04-10 00:15:55 -07:00
ixgbe_lib.c net: provide generic busy polling to all NAPI drivers 2015-11-18 16:17:42 -05:00
ixgbe_main.c ixgbe: Clean up redundancy in hw_enc_features 2015-12-29 19:16:06 -08:00
ixgbe_mbx.c ixgbe: Add new support for X550 MAC's 2014-11-11 06:18:56 -08:00
ixgbe_mbx.h ixgbe, ixgbevf: Add new mbox API xcast mode 2015-10-23 05:52:26 -07:00
ixgbe_phy.c ixgbe: Always turn PHY power on when requested 2015-12-03 02:45:13 -08:00
ixgbe_phy.h ixgbe: Add logic to reset CS4227 when needed 2015-09-23 22:34:29 -07:00
ixgbe_ptp.c ixgbe: Update PTP to support X550EM_x devices 2015-12-03 02:32:12 -08:00
ixgbe_sriov.c ixgbe: Fix bugs in ixgbe_clear_vf_vlans() 2015-12-29 19:16:08 -08:00
ixgbe_sriov.h ixgbe: Add new ndo to trust VF 2015-10-23 05:48:53 -07:00
ixgbe_sysfs.c ixgbe: add Linux NICS mailing list to contact info 2014-03-12 19:05:30 -07:00
ixgbe_type.h ixgbe: Correct X550EM_x revision check 2015-12-29 19:16:07 -08:00
ixgbe_x540.c ixgbe: Clear stale pool mappings 2015-12-12 02:05:21 -08:00
ixgbe_x540.h ixgbe: Add X550 support function pointers 2014-12-05 09:13:07 -08:00
ixgbe_x550.c ixgbe: Correct X550EM_x revision check 2015-12-29 19:16:07 -08:00
ixgbe.h ixgbe: fix RSS limit for X550 2015-12-29 19:16:07 -08:00
Makefile ixgbe: Add X550 support function pointers 2014-12-05 09:13:07 -08:00