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)
commita30bf805592ed56af7a9482b4339d9c9bb092784
treec8d1a77bdb8c0dc3a7389a11d30af0ca9720c4f3
parent6431ce6cd3bb2ccf55acab0ccaae33208e9a0ab3
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