linux_dsm_epyc7002/drivers
Vladimir Oltean b8fc7177d8 net: dsa: felix: Fix CPU port assignment when not last port
On the NXP LS1028A, there are 2 Ethernet links between the Felix switch
and the ENETC:
- eno2 <-> swp4, at 2.5G
- eno3 <-> swp5, at 1G

Only one of the above Ethernet port pairs can act as a DSA link for
tagging.

When adding initial support for the driver, it was tested only on the 1G
eno3 <-> swp5 interface, due to the necessity of using PHYLIB initially
(which treats fixed-link interfaces as emulated C22 PHYs, so it doesn't
support fixed-link speeds higher than 1G).

After making PHYLINK work, it appears that swp4 still can't act as CPU
port. So it looks like ocelot_set_cpu_port was being called for swp4,
but then it was called again for swp5, overwriting the CPU port assigned
in the DT.

It appears that when you call dsa_upstream_port for a port that is not
defined in the device tree (such as swp5 when using swp4 as CPU port),
its dp->cpu_dp pointer is not initialized by dsa_tree_setup_default_cpu,
and this trips up the following condition in dsa_upstream_port:

	if (!cpu_dp)
		return port;

So the moral of the story is: don't call dsa_upstream_port for a port
that is not defined in the device tree, and therefore its dsa_port
structure is not completely initialized (ds->num_ports is still 6).

Fixes: 5605194877 ("net: dsa: ocelot: add driver for Felix switch family")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-11-19 15:21:45 -08:00
..
accessibility
acpi
amba
android
ata
atm
auxdisplay
base mm/memory_hotplug: fix try_offline_node() 2019-11-15 18:34:00 -08:00
bcma
block for-linus-20191115 2019-11-15 13:02:34 -08:00
bluetooth Bluetooth: hci_qca: Add support for Qualcomm Bluetooth SoC WCN3991 2019-11-09 03:26:47 +01:00
bus Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-11-02 13:54:56 -07:00
cdrom
char Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2019-11-16 18:14:32 -08:00
clk Fixes for various clk driver issues that happened because of code we 2019-11-08 08:15:01 -08:00
clocksource - Fix scary messages in sh_mtu2 by using platform_irq_count() helper 2019-11-04 18:43:23 +01:00
connector
counter
cpufreq cpufreq: intel_pstate: Fix invalid EPB setting 2019-11-08 11:29:58 +01:00
cpuidle
crypto net: silence data-races on sk_backlog.tail 2019-11-06 21:35:34 -08:00
dax
dca
devfreq
dio
dma
dma-buf
edac
eisa
extcon
firewire net: add annotations on hh->hh_len lockless accesses 2019-11-07 20:07:30 -08:00
firmware Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-11-02 13:54:56 -07:00
fpga
fsi
gnss
gpio Revert "gpio: merrifield: Pass irqchip when adding gpiochip" 2019-11-03 23:41:11 +01:00
gpu drm fixes for 5.4-rc8 2019-11-15 08:47:34 -08:00
greybus
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid 2019-11-07 11:54:54 -08:00
hsi
hv
hwmon
hwspinlock
hwtracing intel_th: pci: Add Jasper Lake PCH support 2019-11-04 15:01:25 +01:00
i2c
i3c
ide
idle
iio
infiniband Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-11-16 21:51:42 -08:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2019-11-15 18:37:20 -08:00
interconnect
iommu
ipack
irqchip
isdn mISDN: remove unused variable 'faxmodulation_s' 2019-11-03 19:10:30 -08:00
leds
lightnvm
macintosh
mailbox
mcb
md
media
memory
memstick
message
mfd
misc vsock/vmci: register vmci_transport only when VMCI guest/host are active 2019-11-14 18:12:18 -08:00
mmc mmc: sdhci-of-at91: fix quirk2 overwrite 2019-11-14 14:57:53 +01:00
mtd
mux
net net: dsa: felix: Fix CPU port assignment when not last port 2019-11-19 15:21:45 -08:00
nfc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-11-16 21:51:42 -08:00
ntb
nubus
nvdimm
nvme for-linus-2019-11-08 2019-11-08 18:15:55 -08:00
nvmem
of net: of_get_phy_mode: Change API to solve int/unit warnings 2019-11-04 11:21:25 -08:00
opp
oprofile
parisc
parport
pci
pcmcia
perf
phy
pinctrl pinctrl: stmfx: fix valid_mask init sequence 2019-11-07 10:06:46 +01:00
platform
pnp
power
powercap
pps
ps3
ptp Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-11-16 21:51:42 -08:00
pwm pwm: bcm-iproc: Prevent unloading the driver module while in use 2019-11-08 18:38:06 +01:00
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc
s390 net/smc: immediate termination for SMCD link groups 2019-11-15 12:28:28 -08:00
sbus
scsi SCSI fixes on 20191111 2019-11-11 09:14:36 -08:00
sfi
sh
siox
slimbus
soc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-11-16 21:51:42 -08:00
soundwire
spi
spmi
ssb
staging Remove VirtualBox guest shared folders filesystem 2019-11-12 15:22:24 -08:00
target SCSI fixes on 20191101 2019-11-02 11:15:52 -07:00
tc
tee
thermal
thunderbolt
tty
uio
usb
vfio
vhost vhost/vsock: refuse CID assigned to the guest->host transport 2019-11-14 18:12:18 -08:00
video - Some new documentation for GEM shmem madvise helpers 2019-11-08 12:12:57 +10:00
virt
virtio
visorbus
vlynq
vme
w1
watchdog watchdog: bd70528: Add MODULE_ALIAS to allow module auto loading 2019-11-05 16:58:12 +01:00
xen
zorro
Kconfig
Makefile