OSDN Git Service

net: dsa: realtek: rtl8365mb: allow non-cpu extint ports
authorLuiz Angelo Daros de Luca <luizluca@gmail.com>
Fri, 28 Jan 2022 06:05:08 +0000 (03:05 -0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 28 Jan 2022 15:02:49 +0000 (15:02 +0000)
commit6147631c079f6d8e45feaf6eacd8da728804922e
tree9e226a672ab344d519d9cf18fafd7c958bf2e8ae
parent84a10aecdcc013b390547d0b84c75eefb84bf828
net: dsa: realtek: rtl8365mb: allow non-cpu extint ports

External interfaces can be configured, even if they are not CPU ports.
The first CPU port will also be the trap port (for receiving trapped
frames from the switch).

The CPU information was dropped from chip data as it was not used
outside setup. The only other place it was used is when it wrongly
checks for CPU port when it should check for extint.

The supported modes check now uses port type and not port usage.

As a byproduct, more than one CPU can be configured. although this
might not work well with DSA setups. Also, this driver is still only
blindly forwarding all traffic to CPU port(s).

This change was not tested in a device with multiple active external
interfaces ports.

realtek_priv->cpu_port is now only used by rtl8366rb.c

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/realtek/rtl8365mb.c