linux-stable/drivers/net
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
..
appletalk
arcnet ARCNET: fix hard_header_len limit 2015-09-17 22:26:55 -07:00
bonding Changes for 4.3 2015-09-09 08:33:31 -07:00
caif net: caif: convert to using IFF_NO_QUEUE 2015-08-18 11:55:07 -07:00
can Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-08-27 21:45:31 -07:00
cris
dsa net: dsa: actually force the speed on the CPU port 2015-09-22 17:18:24 -07:00
ethernet sunvnet: Invoke SET_NETDEV_DEV() to set up the vdev in vnet_new() 2015-09-21 16:28:36 -07:00
fddi net/fddi: remove HWM_REVERSE() macro 2015-08-13 21:12:17 -07:00
fjes fjes: fix off-by-one error at fjes_hw_update_zone_task() 2015-09-17 22:34:09 -07:00
hamradio Merge branch 'x86/urgent' into x86/asm to fix up conflicts and to pick up fixes 2015-08-18 09:39:47 +02:00
hippi
hyperv flow_dissector: Add flags argument to skb_flow_dissector functions 2015-09-01 15:06:22 -07:00
ieee802154 cc2520: set the default fifo pin value from platform data 2015-08-11 06:13:39 +02:00
ipvlan net: ipvlan: convert to using IFF_NO_QUEUE 2015-08-18 11:55:06 -07:00
irda irda: ali-ircc: Fix deadlock in ali_ircc_sir_change_speed() 2015-09-11 16:18:33 -07:00
phy net: phy: mdio-gpio: Fix module autoload for OF platform driver 2015-09-21 16:11:20 -07:00
plip
ppp ppp: implement x-netns support 2015-08-25 14:11:20 -07:00
slip
team net: team: convert to using IFF_NO_QUEUE 2015-08-18 11:55:05 -07:00
usb usbnet: New driver for QinHeng CH9200 devices 2015-09-21 16:16:16 -07:00
vmxnet3 vmxnet3: prevent receive getting out of sequence on napi poll 2015-07-08 23:36:11 -07:00
wan net: wan: sbni: fix device usage count 2015-09-05 17:32:53 -07:00
wimax
wireless drivers/net/wireless/ath/wil6210: use seq_hex_dump() to dump buffers 2015-09-10 13:29:01 -07:00
xen-netback xen: MFN/GFN/BFN terminology changes for 4.3-rc0 2015-09-10 16:21:11 -07:00
dummy.c net: dummy: convert to using IFF_NO_QUEUE 2015-08-18 11:55:05 -07:00
eql.c
geneve.c geneve: ensure ECN info is handled properly in all tx/rx paths 2015-09-22 16:49:56 -07:00
ifb.c ifb: add multiqueue operation 2015-07-08 16:00:09 -07:00
Kconfig geneve: Consolidate Geneve functionality in single module. 2015-08-27 15:42:48 -07:00
LICENSE.SRC
loopback.c net: loopback: convert to using IFF_NO_QUEUE 2015-08-18 11:55:05 -07:00
macvlan.c macvlan: Don't segment multiple tagged packets on macvlan device 2015-08-03 14:24:49 -07:00
macvtap.c macvtap: fix TUNSETSNDBUF values > 64k 2015-09-20 22:44:39 -07:00
Makefile fjes: Introduce FUJITSU Extended Socket Network Device driver 2015-08-24 14:06:33 -07:00
mdio.c
mii.c
netconsole.c
nlmon.c net: nlmon: convert to using IFF_NO_QUEUE 2015-08-18 11:55:05 -07:00
ntb_netdev.c NTB: ntb_netdev not covering all receive errors 2015-08-09 16:32:21 -04:00
rionet.c bus: subsys: update return type of ->remove_dev() to void 2015-08-05 17:08:14 -07:00
sb1000.c
Space.c
sungem_phy.c
tun.c tuntap: Don't segment multiple tagged packets on tap device 2015-08-03 14:24:50 -07:00
veth.c net: veth: enable noqueue operation by default 2015-08-18 11:55:04 -07:00
virtio_net.c virtio-net: avoid unnecessary sg initialzation 2015-08-27 15:51:45 -07:00
vrf.c net: Fix vti use case with oif in dst lookups 2015-09-17 16:36:34 -07:00
vxlan.c vxlan: reject IPv6 addresses if IPv6 is not configured 2015-09-17 22:32:15 -07:00
xen-netfront.c xen: MFN/GFN/BFN terminology changes for 4.3-rc0 2015-09-10 16:21:11 -07:00