kernel-fxtec-pro1x/drivers/net/dsa
Russell King 53adc9e830 net: dsa: actually force the speed on the CPU port
Commit 54d792f257 ("net: dsa: Centralise global and port setup
code into mv88e6xxx.") merged in the 4.2 merge window broke the link
speed forcing for the CPU port of Marvell DSA switches.  The original
code was:

        /* MAC Forcing register: don't force link, speed, duplex
         * or flow control state to any particular values on physical
         * ports, but force the CPU port and all DSA ports to 1000 Mb/s
         * full duplex.
         */
        if (dsa_is_cpu_port(ds, p) || ds->dsa_port_mask & (1 << p))
                REG_WRITE(addr, 0x01, 0x003e);
        else
                REG_WRITE(addr, 0x01, 0x0003);

but the new code does a read-modify-write:

                reg = _mv88e6xxx_reg_read(ds, REG_PORT(port), PORT_PCS_CTRL);
                if (dsa_is_cpu_port(ds, port) ||
                    ds->dsa_port_mask & (1 << port)) {
                        reg |= PORT_PCS_CTRL_FORCE_LINK |
                                PORT_PCS_CTRL_LINK_UP |
                                PORT_PCS_CTRL_DUPLEX_FULL |
                                PORT_PCS_CTRL_FORCE_DUPLEX;
                        if (mv88e6xxx_6065_family(ds))
                                reg |= PORT_PCS_CTRL_100;
                        else
                                reg |= PORT_PCS_CTRL_1000;

The link speed in the PCS control register is a two bit field.  Forcing
the link speed in this way doesn't ensure that the bit field is set to
the correct value - on the hardware I have here, the speed bitfield
remains set to 0x03, resulting in the speed not being forced to gigabit.

We must clear both bits before forcing the link speed.

Fixes: 54d792f257 ("net: dsa: Centralise global and port setup code into mv88e6xxx.")
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-09-22 17:18:24 -07:00
..
bcm_sf2.c net: dsa: bcm_sf2: Fix ageing conditions and operation 2015-09-08 22:27:35 -07:00
bcm_sf2.h net: dsa: bcm_sf2: Fix 64-bits register writes 2015-09-09 14:14:22 -07:00
bcm_sf2_regs.h net: dsa: bcm_sf2: add HW bridging support 2015-02-25 17:03:38 -05:00
Kconfig dsa: mv88e6352/mv88e6xxx: Add support for Marvell 88E6320 and 88E6321 2015-07-09 14:34:23 -07:00
Makefile net: dsa: Add support for Marvell 88E6352 2014-10-30 14:54:10 -04:00
mv88e6xxx.c net: dsa: actually force the speed on the CPU port 2015-09-22 17:18:24 -07:00
mv88e6xxx.h dsa: mv88e6xxx: Set the RGMII delay based on phy interface 2015-08-31 14:48:02 -07:00
mv88e6060.c net: dsa: Report known silicon revisions for Marvell 88E6060 2014-10-30 14:54:10 -04:00
mv88e6123_61_65.c dsa: mv88e6xxx: Allow speed/duplex of port to be configured 2015-08-31 14:48:01 -07:00
mv88e6131.c dsa: mv88e6xxx: Allow speed/duplex of port to be configured 2015-08-31 14:48:01 -07:00
mv88e6171.c net: dsa: mv88e6171: add hardware 802.1Q support 2015-09-06 19:50:50 -07:00
mv88e6352.c dsa: mv88e6xxx: Allow speed/duplex of port to be configured 2015-08-31 14:48:01 -07:00