linux-uconsole/drivers/net
Heiner Kallweit 4d8f5df0cb net: dsa: mv88e6xxx: prevent interrupt storm caused by mv88e6390x_port_set_cmode
[ Upstream commit ed8fe20205 ]

When debugging another issue I faced an interrupt storm in this
driver (88E6390, port 9 in SGMII mode), consisting of alternating
link-up / link-down interrupts. Analysis showed that the driver
wanted to set a cmode that was set already. But so far
mv88e6390x_port_set_cmode() doesn't check this and powers down
SERDES, what causes the link to break, and eventually results in
the described interrupt storm.

Fix this by checking whether the cmode actually changes. We want
that the very first call to mv88e6390x_port_set_cmode() always
configures the registers, therefore initialize port.cmode with
a value that is different from any supported cmode value.
We have to take care that we only init the ports cmode once
chip->info->num_ports is set.

v2:
- add small helper and init the number of actual ports only

Fixes: 364e9d7776 ("net: dsa: mv88e6xxx: Power on/off SERDES on cmode change")
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-10 07:17:20 +01:00
..
appletalk net/appletalk: fix minor pointer leak to userspace in SIOCFINDIPDDPRT 2018-09-13 10:35:57 -07:00
arcnet
bonding bonding: update nest level on unlink 2019-01-22 21:40:31 +01:00
caif
can can: flexcan: fix NULL pointer exception during bringup 2019-01-31 08:14:39 +01:00
dsa net: dsa: mv88e6xxx: prevent interrupt storm caused by mv88e6390x_port_set_cmode 2019-03-10 07:17:20 +01:00
ethernet lan743x: Fix TX Stall Issue 2019-03-10 07:17:17 +01:00
fddi
fjes
hamradio net/hamradio/6pack: use mod_timer() to rearm timers 2019-01-09 17:38:32 +01:00
hippi
hyperv hv_netvsc: Fix IP header checksum for coalesced packets 2019-03-10 07:17:17 +01:00
ieee802154 ieee802154: ca8210: fix possible u8 overflow in ca8210_rx_done 2019-01-13 09:50:58 +01:00
ipvlan ipvlan, l3mdev: fix broken l3s mode wrt local routes 2019-02-06 17:30:06 +01:00
netdevsim
phy net: phy: phylink: fix uninitialized variable in phylink_get_mac_state 2019-03-10 07:17:18 +01:00
plip
ppp net: Fix usage of pskb_trim_rcsum 2019-01-31 08:14:31 +01:00
slip
team team: Free BPF filter when unregistering netdev 2019-03-10 07:17:17 +01:00
usb qmi_wwan: Add support for Quectel EG12/EM12 2019-03-10 07:17:17 +01:00
vmxnet3
wan net/wan: fix a double free in x25_asy_open_tty() 2019-01-09 17:38:32 +01:00
wimax wimax/i2400m: fix spelling mistake "not unitialized" -> "uninitialized" 2018-09-26 20:09:58 -07:00
wireless ath9k: dynack: check da->enabled first in sampling routines 2019-02-12 19:47:27 +01:00
xen-netback xen-netback: fix occasional leak of grant ref mappings under memory pressure 2019-03-10 07:17:19 +01:00
dummy.c
eql.c
geneve.c geneve: correctly handle ipv6.disable module parameter 2019-03-10 07:17:17 +01:00
gtp.c
ifb.c
Kconfig
LICENSE.SRC
loopback.c net: loopback: clear skb->tstamp before netif_rx() 2018-11-13 11:08:20 -08:00
macsec.c
macvlan.c macvlan: return correct error value 2018-12-21 14:15:20 +01:00
macvtap.c
Makefile
mdio.c
mii.c
net_failover.c failover: Add missing check to validate 'slave_dev' in net_failover_slave_unregister 2018-11-13 11:08:28 -08:00
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c rapidio/rionet: do not free skb before reading its length 2018-12-05 19:31:59 +01:00
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c tun: remove unnecessary memory barrier 2019-03-10 07:17:19 +01:00
veth.c veth: Orphan skb before GRO 2018-09-16 15:33:50 -07:00
virtio_net.c virtio_net: Account for tx bytes and packets on sending xdp_frames 2019-02-12 19:47:23 +01:00
vrf.c
vsockmon.c
vxlan.c vxlan: test dev->flags & IFF_UP before calling netif_rx() 2019-02-23 09:07:25 +01:00
xen-netfront.c xen/netfront: tolerate frags with no data 2019-01-09 17:38:34 +01:00