]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit6527ed1b8290f4446a1b165cb170854cc88cfe13
tree9e226a672ab344d519d9cf18fafd7c958bf2e8ae
parent478aa2aba997f4d2eb5e2298e798e6eb9f4ad496
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