linux_dsm_epyc7002/drivers/net/dsa
Heiner Kallweit 5ceaeb99ff net: dsa: mv88e6xxx: fix few issues in mv88e6390x_port_set_cmode
This patches fixes few issues in mv88e6390x_port_set_cmode().

1. When entering the function the old cmode may be 0, in this case
   mv88e6390x_serdes_get_lane() returns -ENODEV. As result we bail
   out and have no chance to set a new mode. Therefore deal properly
   with -ENODEV.

2. Once we have disabled power and irq, let's set the cached cmode to 0.
   This reflects the actual status and is cleaner if we bail out with an
   error in the following function calls.

3. The cached cmode is used by mv88e6390x_serdes_get_lane(),
   mv88e6390_serdes_power_lane() and mv88e6390_serdes_irq_enable().
   Currently we set the cached mode to the new one at the very end of
   the function only, means until then we use the old one what may be
   wrong.

4. When calling mv88e6390_serdes_irq_enable() we use the lane value
   belonging to the old cmode. Get the lane belonging to the new cmode
   before calling this function.

It's hard to provide a good "Fixes" tag because quite a few smaller
changes have been done to the code in question recently.

Fixes: d235c48b40 ("net: dsa: mv88e6xxx: power serdes on/off for 10G interfaces on 6390X")
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-03-27 21:53:50 -07:00
..
b53 dsa: Remove phydev parameter from disable_port call 2019-02-24 22:30:34 -08:00
microchip net: dsa: microchip: add KSZ9893 switch support 2019-03-03 13:48:49 -08:00
mv88e6xxx net: dsa: mv88e6xxx: fix few issues in mv88e6390x_port_set_cmode 2019-03-27 21:53:50 -07:00
bcm_sf2_cfp.c net: dsa: bcm_sf2: Remove set but not used variables 'v6_spec, v6_m_spec' 2019-02-17 15:31:47 -08:00
bcm_sf2_regs.h net: dsa: bcm_sf2: Add support for CFP statistics 2019-02-08 22:11:07 -08:00
bcm_sf2.c dsa: Remove phydev parameter from disable_port call 2019-02-24 22:30:34 -08:00
bcm_sf2.h net: dsa: bcm_sf2: Add support for CFP statistics 2019-02-08 22:11:07 -08:00
dsa_loop_bdinfo.c
dsa_loop.c net: phy: fixed-phy: Drop GPIO from fixed_phy_add() 2019-02-04 18:33:36 -08:00
dsa_loop.h
Kconfig
lan9303_i2c.c
lan9303_mdio.c
lan9303-core.c dsa: Remove phydev parameter from disable_port call 2019-02-24 22:30:34 -08:00
lan9303.h
lantiq_gswip.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-03-02 12:54:35 -08:00
lantiq_pce.h
Makefile
mt7530.c drivers: net: Remove unnecessary semicolon 2019-03-01 23:13:49 -08:00
mt7530.h net: dsa: mt7530: support the 7530 switch on the Mediatek MT7621 SoC 2019-01-30 14:26:07 -08:00
mv88e6060.c
mv88e6060.h
qca8k.c net: dsa: qca8k: extend slave-bus implementations 2019-03-26 10:47:10 -07:00
qca8k.h net: dsa: qca8k: extend slave-bus implementations 2019-03-26 10:47:10 -07:00
realtek-smi.c
realtek-smi.h
rtl8366.c
rtl8366rb.c dsa: Remove phydev parameter from disable_port call 2019-02-24 22:30:34 -08:00
vitesse-vsc73xx.c dsa: Remove phydev parameter from disable_port call 2019-02-24 22:30:34 -08:00