linux_dsm_epyc7002/drivers/net/dsa
Vladimir Oltean f4cfcfbdf0 net: dsa: sja1105: Fix link speed not working at 100 Mbps and below
The hardware values for link speed are held in the sja1105_speed_t enum.
However they do not increase in the order that sja1105_get_speed_cfg was
iterating over them (basically from SJA1105_SPEED_AUTO - 0 - to
SJA1105_SPEED_1000MBPS - 1 - skipping the other two).

Another bug is that the code in sja1105_adjust_port_config relies on the
fact that an invalid link speed is detected by sja1105_get_speed_cfg and
returned as -EINVAL.  However storing this into an enum that only has
positive members will cast it into an unsigned value, and it will miss
the negative check.

So take the simplest approach and remove the sja1105_get_speed_cfg
function and replace it with a simple switch-case statement.

Fixes: 8aa9ebccae ("net: dsa: Introduce driver for NXP SJA1105 5-port L2 switch")
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Suggested-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-06-04 11:51:57 -07:00
..
b53 treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
microchip treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
mv88e6xxx net: dsa: mv88e6xxx: avoid error message on remove from VLAN 0 2019-06-02 13:53:29 -07:00
sja1105 net: dsa: sja1105: Fix link speed not working at 100 Mbps and below 2019-06-04 11:51:57 -07:00
bcm_sf2_cfp.c net: dsa: bcm_sf2: fix buffer overflow doing set_rxnfc 2019-04-30 11:02:37 -04: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 net: dsa: bcm_sf2: Remove print of base address 2019-03-21 13:32:35 -07: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 treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
dsa_loop.c net: phy: fixed-phy: Drop GPIO from fixed_phy_add() 2019-02-04 18:33:36 -08:00
dsa_loop.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
lan9303_i2c.c net: dsa: lan9303: Adjust indenting 2017-11-08 13:29:06 +09:00
lan9303_mdio.c net: dsa: lan9303: Adjust indenting 2017-11-08 13:29:06 +09:00
lan9303-core.c dsa: Remove phydev parameter from disable_port call 2019-02-24 22:30:34 -08:00
lan9303.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-11-04 09:26:51 +09:00
lantiq_gswip.c net: dsa: lantiq: fix spelling mistake "brigde" -> "bridge" 2019-05-08 09:43:56 -07:00
lantiq_pce.h net: dsa: Add Lantiq / Intel DSA driver for vrx200 2018-09-13 08:14:33 -07:00
Makefile net: dsa: Introduce driver for NXP SJA1105 5-port L2 switch 2019-05-03 10:49:17 -04:00
mt7530.c net: dsa: mt7530: Use the DSA vlan_filtering helper function 2019-04-30 23:05:29 -04:00
mt7530.h net: dsa: mt7530: Use the DSA vlan_filtering helper function 2019-04-30 23:05:29 -04:00
mv88e6060.c net: dsa: mv88e6060: Remove support for legacy probing 2019-04-30 23:13:33 -04:00
mv88e6060.h net: dsa: mv88e6060: Replace ds with priv 2019-04-27 20:23:04 -04:00
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 net: dsa: realtek-smi: fix OF child-node lookup 2019-01-17 14:04:49 -08:00
realtek-smi.h net: dsa: realtek-smi: Add Realtek SMI driver 2018-07-18 13:43:38 +09:00
rtl8366.c dsa: rtl8366: Remove unused variable. 2018-07-18 14:42:18 +09:00
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