linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: mediatek: Change MSI interrupt processing sequence
@ 2022-01-23  3:33 qizhong cheng
  2022-01-24  3:12 ` Chen-Yu Tsai
  2022-01-25 16:57 ` Bjorn Helgaas
  0 siblings, 2 replies; 14+ messages in thread
From: qizhong cheng @ 2022-01-23  3:33 UTC (permalink / raw)
  To: Ryder Lee, Jianjun Wang, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Bjorn Helgaas
  Cc: linux-pci, linux-mediatek, linux-kernel, linux-arm-kernel,
	qizhong.cheng, chuanjia.liu

As an edge-triggered interrupts, its interrupt status should be cleared
before dispatch to the handler of device.

Signed-off-by: qizhong cheng <qizhong.cheng@mediatek.com>
---
 drivers/pci/controller/pcie-mediatek.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/controller/pcie-mediatek.c b/drivers/pci/controller/pcie-mediatek.c
index 2f3f974977a3..705ea33758b1 100644
--- a/drivers/pci/controller/pcie-mediatek.c
+++ b/drivers/pci/controller/pcie-mediatek.c
@@ -624,12 +624,12 @@ static void mtk_pcie_intr_handler(struct irq_desc *desc)
 		if (status & MSI_STATUS){
 			unsigned long imsi_status;
 
+			/* Clear MSI interrupt status */
+			writel(MSI_STATUS, port->base + PCIE_INT_STATUS);
 			while ((imsi_status = readl(port->base + PCIE_IMSI_STATUS))) {
 				for_each_set_bit(bit, &imsi_status, MTK_MSI_IRQS_NUM)
 					generic_handle_domain_irq(port->inner_domain, bit);
 			}
-			/* Clear MSI interrupt status */
-			writel(MSI_STATUS, port->base + PCIE_INT_STATUS);
 		}
 	}
 
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-02-08  7:16 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-23  3:33 [PATCH] PCI: mediatek: Change MSI interrupt processing sequence qizhong cheng
2022-01-24  3:12 ` Chen-Yu Tsai
2022-01-24  6:27   ` qizhong.cheng
2022-01-24  6:55     ` Chen-Yu Tsai
2022-01-24  8:34       ` qizhong.cheng
2022-01-25 16:57 ` Bjorn Helgaas
2022-01-25 17:21   ` Marc Zyngier
2022-01-26  3:37     ` qizhong.cheng
2022-01-27 21:21       ` Bjorn Helgaas
2022-01-28  7:58         ` Jianjun Wang
2022-02-08  7:08           ` qizhong.cheng
2022-01-28  8:57         ` Marc Zyngier
2022-01-28 13:12           ` Bjorn Helgaas
2022-01-28 15:09             ` Marc Zyngier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).