Star64_linux/drivers/net/ethernet
Vladimir Oltean 69df578c5f net: mscc: ocelot: eliminate confusion between CPU and NPI port
Ocelot has the concept of a CPU port. The CPU port is represented in the
forwarding and the queueing system, but it is not a physical device. The
CPU port can either be accessed via register-based injection/extraction
(which is the case of Ocelot), via Frame-DMA (similar to the first one),
or "connected" to a physical Ethernet port (called NPI in the datasheet)
which is the case of the Felix DSA switch.

In Ocelot the CPU port is at index 11.
In Felix the CPU port is at index 6.

The CPU bit is treated special in the forwarding, as it is never cleared
from the forwarding port mask (once added to it). Other than that, it is
treated the same as a normal front port.

Both Felix and Ocelot should use the CPU port in the same way. This
means that Felix should not use the NPI port directly when forwarding to
the CPU, but instead use the CPU port.

This patch is fixing this such that Felix will use port 6 as its CPU
port, and just use the NPI port to carry the traffic.

Therefore, eliminate the "ocelot->cpu" variable which was holding the
index of the NPI port for Felix, and the index of the CPU port module
for Ocelot, so the variable was actually configuring different things
for different drivers and causing at least part of the confusion.

Also remove the "ocelot->num_cpu_ports" variable, which is the result of
another confusion. The 2 CPU ports mentioned in the datasheet are
because there are two frame extraction channels (register based or DMA
based). This is of no relevance to the driver at the moment, and
invisible to the analyzer module.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Suggested-by: Allan W. Nielsen <allan.nielsen@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-03-04 14:19:00 -08:00
..
3com
8390
adaptec
aeroflex
agere
alacritech
allwinner
alteon
altera
amazon
amd
apm
apple
aquantia
arc
atheros
aurora
broadcom
brocade
cadence
calxeda
cavium
chelsio
cirrus
cisco
cortina net/cortina: Delete driver version from ethtool output 2020-03-03 17:54:54 -08:00
davicom net/davicom: Delete ethtool version assignment 2020-03-03 17:54:54 -08:00
dec net/dec: Delete driver versions 2020-03-03 17:54:54 -08:00
dlink net/dlink: Remove driver version and release date 2020-03-03 17:54:54 -08:00
emulex net/emulex: Delete driver version 2020-03-03 17:54:55 -08:00
ezchip
faraday net/faraday: Delete driver version from the drivers 2020-03-03 17:54:55 -08:00
freescale gianfar: remove unnecessary zeroing coalesce settings 2020-03-03 19:22:12 -08:00
fujitsu
google
hisilicon
huawei
i825xx
ibm
intel
marvell
mediatek
mellanox
micrel
microchip
moxa
mscc net: mscc: ocelot: eliminate confusion between CPU and NPI port 2020-03-04 14:19:00 -08:00
myricom
natsemi
neterion
netronome
ni
nvidia
nxp
oki-semi
packetengines
pasemi
pensando
qlogic
qualcomm
rdc
realtek
renesas
rocker
samsung
seeq
sfc
sgi
silan
sis
smsc
socionext
stmicro
sun
synopsys
tehuti
ti
toshiba
tundra
via
wiznet
xilinx
xircom
xscale
dnet.c net/dnet: Delete static version from the driver 2020-03-03 17:54:55 -08:00
dnet.h net/dnet: Delete static version from the driver 2020-03-03 17:54:55 -08:00
ec_bhf.c
ethoc.c
fealnx.c net/fealnx: Delete driver version 2020-03-03 17:54:55 -08:00
jme.c
jme.h
Kconfig
korina.c
lantiq_etop.c
lantiq_xrx200.c
Makefile