OSDN Git Service

net: dsa: qca8k: add support for cpu port 6
authorAnsuel Smith <ansuelsmth@gmail.com>
Wed, 13 Oct 2021 22:39:10 +0000 (00:39 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Oct 2021 10:06:37 +0000 (11:06 +0100)
commit3fcf734aa482487df83cf8f18608438fcf59127f
tree7541bbe6d44893192aaa529418f2dd6f05cc1357
parent731d613338ec6de482053ffa3f71be2325b0f8eb
net: dsa: qca8k: add support for cpu port 6

Currently CPU port is always hardcoded to port 0. This switch have 2 CPU
ports. The original intention of this driver seems to be use the
mac06_exchange bit to swap MAC0 with MAC6 in the strange configuration
where device have connected only the CPU port 6. To skip the
introduction of a new binding, rework the driver to address the
secondary CPU port as primary and drop any reference of hardcoded port.
With configuration of mac06 exchange, just skip the definition of port0
and define the CPU port as a secondary. The driver will autoconfigure
the switch to use that as the primary CPU port.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/qca8k.c
drivers/net/dsa/qca8k.h