]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: qca8k: Use up to 7 ports for all operations
authorMichal Vokáč <michal.vokac@ysoft.com>
Thu, 26 Sep 2019 08:59:17 +0000 (10:59 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 30 Sep 2019 18:06:38 +0000 (11:06 -0700)
commite2bf97c5592a487f339ee75357d00106fb7e4d00
treec3950feb4b7a972f78de4c7c00b69d00b694a29d
parent14b6c7a8bf32b6a88b81b84005ffd541c0f659f2
net: dsa: qca8k: Use up to 7 ports for all operations

The QCA8K family supports up to 7 ports. So use the existing
QCA8K_NUM_PORTS define to allocate the switch structure and limit all
operations with the switch ports.

This was not an issue until commit 404668d1f07e ("net: dsa: enable and
disable all ports") disabled all unused ports. Since the unused ports 7-11
are outside of the correct register range on this switch some registers
were rewritten with invalid content.

Fixes: ac0b70704be3 ("net-next: dsa: add new driver for qca8xxx family")
Fixes: 654f3e1668c6 ("net: dsa: variable number of ports")
Fixes: 404668d1f07e ("net: dsa: enable and disable all ports")
Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/qca8k.c