]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: microchip: determine number of port irq based on switch type
authorArun Ramadoss <arun.ramadoss@microchip.com>
Thu, 22 Sep 2022 07:10:23 +0000 (12:40 +0530)
committerJakub Kicinski <kuba@kernel.org>
Mon, 26 Sep 2022 19:41:05 +0000 (12:41 -0700)
commit9aab02208e030bb1081c0cb05f1ab94a1e27e1dc
tree386df4e3ea72432b5fc467c2228e74be224e9001
parent20b88ad5d4df74f46547cc7b4081aa4f93235ced
net: dsa: microchip: determine number of port irq based on switch type

Currently the number of port irqs is hard coded for the lan937x switch
as 6. In order to make the generic interrupt handler for ksz switches,
number of port irq supported by the switch is added to the
ksz_chip_data. It is 4 for ksz9477, 2 for ksz9897 and 3 for ksz9567.

Signed-off-by: Arun Ramadoss <arun.ramadoss@microchip.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/microchip/ksz_common.c
drivers/net/dsa/microchip/ksz_common.h
drivers/net/dsa/microchip/lan937x_main.c