]> 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)
commit9efdd676ef90a30d590f7f14a2a963bb26fc327a
tree386df4e3ea72432b5fc467c2228e74be224e9001
parentf26866f6562a1f0cbae922e30011b3ff59f98a3b
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