]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: microchip: ksz8795: update the port_cnt value in ksz_chip_data
authorArun Ramadoss <arun.ramadoss@microchip.com>
Tue, 17 May 2022 09:43:25 +0000 (15:13 +0530)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 May 2022 11:50:59 +0000 (12:50 +0100)
commitcb2b7ebb1c9c2fc6bedabf2a39a7e21c31545d57
treec8d1a77bdb8c0dc3a7389a11d30af0ca9720c4f3
parentc27655b344b5c45924d7b66a93e8824bb20c6d1f
net: dsa: microchip: ksz8795: update the port_cnt value in ksz_chip_data

The port_cnt value in the structure is not used in the switch_init.
Instead it uses the fls(chip->cpu_port), this is due to one of port in
the ksz8794 unavailable. The cpu_port for the 8794 is 0x10, fls(0x10) =
5, hence updating it directly in the ksz_chip_data structure in order to
same with all the other switches in ksz8795.c and ksz9477.c files.

Signed-off-by: Arun Ramadoss <arun.ramadoss@microchip.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/microchip/ksz8795.c