From nobody Mon Feb 9 12:25:15 2026 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1ADF9332919 for ; Tue, 27 Jan 2026 09:07:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769504824; cv=none; b=YwaDBTBgfo3C57ihITLYG8w5doDiHwK+QRXNAIF7MCwlOAXXmh51D2BOeYGzHGNOvXisBEE93ZBEsvREpsq8+Psc9fFuev/0OMPDdm8DpS9UALZaKNvYmeAzZaZOVfUxwvVPQb2ru7F+CJLHMhVizMsy44v94X8XaHCrLDw/tnE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769504824; c=relaxed/simple; bh=Mq588nrNPw+uc5oepjcOMjmGegEoAI+0BQA2zqK9rvc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=aQGhU65kRiXrqOHKTa5/qwf59HEQjnVboiB7ylsD+2XuIER5+MMjrQhp3TJ5Dy5SKk/HceSIZkPqll0PlNX1yQc0o9QKw5CXfaZ3mhqw9xP4nG/1cU0D6B52zJnsFJbQrNrhGbj1nC9ckSs/aHnEQlK2zHuZB+VkcMmiWBR2fwM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=ML+8wrb2; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="ML+8wrb2" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 263C1C211D1; Tue, 27 Jan 2026 09:06:58 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 29410606F5; Tue, 27 Jan 2026 09:06:56 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 70482119A867E; Tue, 27 Jan 2026 10:06:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1769504815; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=msjsmNWxtn13jWdt/GBOpxERpRumsKymvRVrflpMg/g=; b=ML+8wrb2c3P03ykzUAZenBM6YIG4GfNLivVfNhPXP0RwhOcS9sqP2FI1rqZo9wkqKPllYv IXCRb3DlwHdgRCSRvHc1wD/C+qB31/Iua+ld7C41aLcMxfxlcoCxKmeGWqPlNgIAglH7iP HqJjptHHBq9h1bE6OVElh/YDE4wtuNZybPDc7buA72yli0xB3h9IouMFgsK9VKG8h6IVjM ay36IqcUdJOKHaQGWiuB25XdaY4Xm+KiECJFzufoY9DHhvhHdtrshQ7iNlHd5A6hQAXhF6 baR9+VhRWuaU/C0jZ7rNEDG6nMPP9rIQfJIfO36H/dGyxbYEINFdazLZQVrlDA== From: "Bastien Curutchet (Schneider Electric)" Date: Tue, 27 Jan 2026 10:06:44 +0100 Subject: [PATCH net-next v4 2/8] net: dsa: microchip: Decorrelate IRQ domain from port Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260127-ksz8463-ptp-v4-2-652e021aae86@bootlin.com> References: <20260127-ksz8463-ptp-v4-0-652e021aae86@bootlin.com> In-Reply-To: <20260127-ksz8463-ptp-v4-0-652e021aae86@bootlin.com> To: Woojung Huh , UNGLinuxDriver@microchip.com, Andrew Lunn , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Simon Horman Cc: Pascal Eberhard , =?utf-8?q?Miqu=C3=A8l_Raynal?= , Thomas Petazzoni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "Bastien Curutchet (Schneider Electric)" X-Mailer: b4 0.14.2 X-Last-TLS-Session-Version: TLSv1.3 KSZ8463 has one register holding interrupt bits from both port 1 and 2. So it has to use one IRQ domain for both of its ports. This conflicts with the current initialization procedure that ties one IRQ domain to each port. Decorrelate IRQ domain from port so a port can use an IRQ domain not directly related to itself. Signed-off-by: Bastien Curutchet (Schneider Electric) --- drivers/net/dsa/microchip/ksz_ptp.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/dsa/microchip/ksz_ptp.c b/drivers/net/dsa/microchi= p/ksz_ptp.c index 4a2cc57a628f97bd51fcb11057bc4effda9205dd..3b0dddf918595e9318c9e977903= 5d5152dcd9dde 100644 --- a/drivers/net/dsa/microchip/ksz_ptp.c +++ b/drivers/net/dsa/microchip/ksz_ptp.c @@ -1099,18 +1099,17 @@ static void ksz_ptp_msg_irq_free(struct ksz_port *p= ort, u8 n) irq_dispose_mapping(ptpmsg_irq->num); } =20 -static int ksz_ptp_msg_irq_setup(struct ksz_port *port, u8 n) +static int ksz_ptp_msg_irq_setup(struct irq_domain *domain, struct ksz_por= t *port, u8 n) { u16 ts_reg[] =3D {REG_PTP_PORT_PDRESP_TS, REG_PTP_PORT_XDELAY_TS, REG_PTP_PORT_SYNC_TS}; static const char * const name[] =3D {"pdresp-msg", "xdreq-msg", "sync-msg"}; const struct ksz_dev_ops *ops =3D port->ksz_dev->dev_ops; - struct ksz_irq *ptpirq =3D &port->ptpirq; struct ksz_ptp_irq *ptpmsg_irq; =20 ptpmsg_irq =3D &port->ptpmsg_irq[n]; - ptpmsg_irq->num =3D irq_create_mapping(ptpirq->domain, n); + ptpmsg_irq->num =3D irq_create_mapping(domain, n); if (!ptpmsg_irq->num) return -EINVAL; =20 @@ -1162,7 +1161,7 @@ int ksz_ptp_irq_setup(struct dsa_switch *ds, u8 p) goto out; =20 for (irq =3D 0; irq < ptpirq->nirqs; irq++) { - ret =3D ksz_ptp_msg_irq_setup(port, irq); + ret =3D ksz_ptp_msg_irq_setup(ptpirq->domain, port, irq); if (ret) goto out_ptp_msg; } --=20 2.52.0