linux/drivers/net
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
..
appletalk
arcnet arcnet/com20020: add LEDS_CLASS dependency 2015-11-03 11:29:56 -05:00
bonding bonding: drop unused to_dev macro in bond_sysfs.c 2015-12-23 22:26:48 -05:00
caif net: caif: check return value of alloc_netdev 2015-11-09 11:31:13 -05:00
can Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-12-03 21:09:12 -05:00
cris
dsa dsa: mv88e6xxx: Add Second back of statistics 2015-12-23 22:17:00 -05:00
ethernet ixgbe: Fix bugs in ixgbe_clear_vf_vlans() 2015-12-29 19:16:08 -08:00
fddi
fjes fjes: fix inconsistent indenting 2015-11-15 17:09:23 -05:00
hamradio
hippi
hyperv hv_netvsc: Fix race condition on Multi-Send Data field 2015-12-14 00:02:06 -05:00
ieee802154 ieee802154/adf7242: Driver for ADF7242 MAC IEEE802154 2015-12-11 11:27:22 +01:00
ipvlan net: Rename NETIF_F_ALL_CSUM to NETIF_F_CSUM_MASK 2015-12-15 16:50:08 -05:00
irda
phy Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-12-17 22:08:28 -05:00
plip
ppp Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-12-17 22:08:28 -05:00
slip ppp, slip: Validate VJ compression slot parameters completely 2015-11-02 16:25:00 -05:00
team team: Advertise tunneling offload features 2015-12-17 16:24:36 -05:00
usb asix: silence log message from oversize packet 2015-12-18 16:08:35 -05:00
vmxnet3 vmxnet3: fix checks for dma mapping errors 2015-12-01 15:19:16 -05:00
wan wan: wanxl: add pci_disable_device in case of error 2015-12-14 16:21:58 -05:00
wimax
wireless brcfmac 2015-12-08 12:39:15 -05:00
xen-netback xen: features for 4.4-rc0 2015-11-04 17:32:42 -08:00
dummy.c
eql.c
geneve.c ip_tunnel: Move stats update to iptunnel_xmit() 2015-12-25 23:32:23 -05:00
ifb.c
Kconfig
LICENSE.SRC
loopback.c sctp: Rename NETIF_F_SCTP_CSUM to NETIF_F_SCTP_CRC 2015-12-15 16:49:58 -05:00
macvlan.c net: Eliminate NETIF_F_GEN_CSUM and NETIF_F_V[46]_CSUM 2015-12-15 16:50:20 -05:00
macvtap.c net: Rename NETIF_F_ALL_CSUM to NETIF_F_CSUM_MASK 2015-12-15 16:50:08 -05:00
Makefile
mdio.c
mii.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tun.c tun: honor IFF_UP in tun_get_user() 2015-12-17 15:25:57 -05:00
veth.c
virtio_net.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-12-17 22:08:28 -05:00
vrf.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-12-03 21:09:12 -05:00
vxlan.c ip_tunnel: Move stats update to iptunnel_xmit() 2015-12-25 23:32:23 -05:00
xen-netfront.c xen: features for 4.4-rc0 2015-11-04 17:32:42 -08:00