summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Curutchet (Schneider Electric) <bastien.curutchet@bootlin.com>2026-01-05 14:08:00 +0100
committerPaolo Abeni <pabeni@redhat.com>2026-01-08 13:01:16 +0100
commit813feab1ac5256b423157f005b3a844a4b2841b5 (patch)
tree18ca99b8c40e96ce4104ded16fce2b60964b1944
parent8e7148b5602321be48614bcde048cbe1c738ce3e (diff)
net: dsa: microchip: Initialize IRQ's mask outside common_setup()
The IRQ logic of the KSZ8463 differs from that of other KSZ switches. It doesn't have a 'mask' register but an 'enable' one instead. The common IRQ framework can still be used though as soon as we reverse the logic (using '1' to enable interrupts instead of '0') for KSZ8463 cases. Move the initialization of the kirq->masked outside of ksz_irq_common_setup() to keep this function truly common when IRQ support for the KSZ8463 is added. Signed-off-by: Bastien Curutchet (Schneider Electric) <bastien.curutchet@bootlin.com> Link: https://patch.msgid.link/20260105-ksz-rework-v1-1-a68df7f57375@bootlin.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
-rw-r--r--drivers/net/dsa/microchip/ksz_common.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c
index 0c10351fe5eb..fa392f952f94 100644
--- a/drivers/net/dsa/microchip/ksz_common.c
+++ b/drivers/net/dsa/microchip/ksz_common.c
@@ -2905,7 +2905,6 @@ static int ksz_irq_common_setup(struct ksz_device *dev, struct ksz_irq *kirq)
int ret, n;
kirq->dev = dev;
- kirq->masked = ~0;
kirq->domain = irq_domain_create_simple(dev_fwnode(dev->dev), kirq->nirqs, 0,
&ksz_irq_domain_ops, kirq);
@@ -2935,6 +2934,7 @@ static int ksz_girq_setup(struct ksz_device *dev)
girq->nirqs = dev->info->port_cnt;
girq->reg_mask = REG_SW_PORT_INT_MASK__1;
girq->reg_status = REG_SW_PORT_INT_STATUS__1;
+ girq->masked = ~0;
snprintf(girq->name, sizeof(girq->name), "global_port_irq");
girq->irq_num = dev->irq;
@@ -2949,6 +2949,7 @@ static int ksz_pirq_setup(struct ksz_device *dev, u8 p)
pirq->nirqs = dev->info->port_nirqs;
pirq->reg_mask = dev->dev_ops->get_port_addr(p, REG_PORT_INT_MASK);
pirq->reg_status = dev->dev_ops->get_port_addr(p, REG_PORT_INT_STATUS);
+ pirq->masked = ~0;
snprintf(pirq->name, sizeof(pirq->name), "port_irq-%d", p);
pirq->irq_num = irq_find_mapping(dev->girq.domain, p);