linux/drivers/net
Pavel Fedin f406ce4234 net: thunderx: Correctly distinguish between VF and LMAC count
Commit bc69fdfc6c
("net: thunderx: Enable BGX LMAC's RX/TX only after VF is up")
introduces lmac_cnt member and starts verifying VF number against it.
This is plain wrong, and works only because currently we have hardcoded
1:1 mapping between VFs and LMACs, and in this case num_vf_en and
lmac_cnt are always equal. However in future this may change, and the
code will badly misbehave. The worst consequence of this is failure to
deliver link status messages, causing VFs to go defunct because since
commit 0b72a9a106 ("net: thunderx: Switchon carrier only upon
interface link up") VF will not fully bring itself up without it.

This patch fixes the potential problem by doing VF number checks against
the num_vf_en. Since lmac_cnt is not used anywhere else, it is removed.

Additionally some duplicated code is factored out into nic_enable_vf()

Signed-off-by: Pavel Fedin <p.fedin@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-12-08 22:44:55 -05:00
..
appletalk
arcnet arcnet/com20020: add LEDS_CLASS dependency 2015-11-03 11:29:56 -05:00
bonding bonding: fix panic on non-ARPHRD_ETHER enslave failure 2015-11-07 13:17:32 -05:00
caif net: caif: check return value of alloc_netdev 2015-11-09 11:31:13 -05:00
can can: remove obsolete assignment for CAN protocol error type 2015-11-23 09:37:38 +01:00
cris
dsa net: dsa: mv88e6060: replace magic values with register defines 2015-11-15 20:16:16 -05:00
ethernet net: thunderx: Correctly distinguish between VF and LMAC count 2015-12-08 22:44:55 -05:00
fddi
fjes fjes: fix inconsistent indenting 2015-11-15 17:09:23 -05:00
hamradio
hippi
hyperv flow_dissector: Add flags argument to skb_flow_dissector functions 2015-09-01 15:06:22 -07:00
ieee802154 spi: Updates for v4.4 2015-11-05 13:15:12 -08:00
ipvlan ipvlan: fix use after free of skb 2015-11-17 14:39:29 -05:00
irda net: irda: pxaficp_ir: dmaengine conversion 2015-09-28 22:32:48 -07:00
phy net: phy: reset only targeted phy 2015-12-03 15:26:13 -05:00
plip
ppp pppoe: fix memory corruption in padt work structure 2015-12-04 16:48:52 -05:00
slip ppp, slip: Validate VJ compression slot parameters completely 2015-11-02 16:25:00 -05:00
team
usb net: cdc_mbim: add "NDP to end" quirk for Huawei E3372 2015-12-05 23:35:34 -05:00
vmxnet3 vmxnet3: fix checks for dma mapping errors 2015-12-01 15:19:16 -05:00
wan wan/x25: Fix use-after-free in x25_asy_open_tty() 2015-12-01 15:17:42 -05:00
wimax
wireless rtlwifi: rtl8821ae: Fix lockups on boot 2015-11-17 15:58:53 +02:00
xen-netback xen: features for 4.4-rc0 2015-11-04 17:32:42 -08:00
dummy.c net: dummy: add more features 2015-10-21 19:36:10 -07:00
eql.c
geneve.c geneve: Fix IPv6 xmit stats update. 2015-12-08 22:39:03 -05:00
ifb.c
Kconfig net: Add IPv6 support to VRF device 2015-10-13 04:55:07 -07:00
LICENSE.SRC
loopback.c
macvlan.c macvlan: fix leak in macvlan_handle_frame 2015-11-17 14:39:29 -05:00
macvtap.c net: rename SOCK_ASYNC_NOSPACE and SOCK_ASYNC_WAITDATA 2015-12-01 15:45:05 -05:00
Makefile
mdio.c
mii.c
netconsole.c netconsole: use per-attribute show and store methods 2015-10-13 22:17:51 -07:00
nlmon.c
ntb_netdev.c NTB: Add flow control to the ntb_netdev 2015-09-07 15:17:08 -04:00
rionet.c
sb1000.c
Space.c
sungem_phy.c
tun.c net: rename SOCK_ASYNC_NOSPACE and SOCK_ASYNC_WAITDATA 2015-12-01 15:45:05 -05:00
veth.c
virtio_net.c virtio-net: avoid unnecessary sg initialzation 2015-08-27 15:51:45 -07:00
vrf.c vrf: fix double free and memory corruption on register_netdevice failure 2015-11-23 17:52:46 -05:00
vxlan.c vxlan: interpret IP headers for ECN correctly 2015-12-07 17:06:33 -05:00
xen-netfront.c xen: features for 4.4-rc0 2015-11-04 17:32:42 -08:00