summaryrefslogtreecommitdiff
path: root/drivers/net/dsa/microchip/ksz_common.h
diff options
context:
space:
mode:
authorArun Ramadoss <arun.ramadoss@microchip.com>2022-09-22 10:10:23 +0300
committerJakub Kicinski <kuba@kernel.org>2022-09-26 22:41:05 +0300
commit978f1f72460cb2dc742a35bae4de50b6b9ac653f (patch)
tree386df4e3ea72432b5fc467c2228e74be224e9001 /drivers/net/dsa/microchip/ksz_common.h
parentfc4f2fd02a1af919f79beaf406a8ef54327ff84b (diff)
downloadlinux-978f1f72460cb2dc742a35bae4de50b6b9ac653f.tar.xz
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>
Diffstat (limited to 'drivers/net/dsa/microchip/ksz_common.h')
-rw-r--r--drivers/net/dsa/microchip/ksz_common.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/dsa/microchip/ksz_common.h b/drivers/net/dsa/microchip/ksz_common.h
index 6203dcd8c8f7..baa1e1bc1b7c 100644
--- a/drivers/net/dsa/microchip/ksz_common.h
+++ b/drivers/net/dsa/microchip/ksz_common.h
@@ -45,6 +45,7 @@ struct ksz_chip_data {
int num_statics;
int cpu_ports;
int port_cnt;
+ u8 port_nirqs;
const struct ksz_dev_ops *ops;
bool phy_errata_9477;
bool ksz87xx_eee_link_erratum;