]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit52ec49c332ad7dc1cab4476e79d671bccd05472e
tree7541bbe6d44893192aaa529418f2dd6f05cc1357
parent6203822534d017b0461698fd3df851b994854531
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