Skip to contentSkip to conversation

pci: designware: fix missing msi irqs

PATCH New Harro Haan 6 participants 8 messages Dec 12, 2013 – Dec 20, 2013 PCI

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 pci: designware: fix missing msi irqs

Am 12.12.2013 19:29, schrieb Harro Haan:

Quoted 3 lines

The interrupts were cleared after the irq handler was called. This means that new interrupts that occur after the handler handled the previous irq but before the interrupt is cleared will be missed.

I discovered the same issue today. I'll test that patch tomorrow.

#3 lore raw

PATCH 1/1 pci: designware: fix missing msi irqs

In reply to Harro Haan
Quoted 32 lines · Harro Haan

The interrupts were cleared after the irq handler was called. This means that new interrupts that occur after the handler handled the previous irq but before the interrupt is cleared will be missed.

Cc Mohit Kumar <[email protected]>
Cc Jingoo Han <[email protected]>
Cc Bjorn Helgaas <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Richard Zhu <[email protected]>
Cc Shawn Guo <[email protected]>
Cc Pratyush Anand <[email protected]>
Cc Tim Harvey <[email protected]>
Cc Juergen Beisert <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Siva Reddy Kallam <[email protected]>
Cc Srikanth T Shivanand <[email protected]>
Cc Sean Cross <[email protected]>
Cc linux-pci at vger.kernel.org
Cc linux-arm-kernel at lists.infradead.org
---
 drivers/pci/host/pcie-designware.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/pci/host/pcie-designware.c index 1ce0453..762f596 100644

drivers/pci/host/pcie-designware.c +0 -0
@@ -167,11 +167,13 @@ void dw_handle_msi_irq(struct pcie_port *pp)
 			while ((pos = find_next_bit(&val, 32, pos)) != 32) {
 				irq = irq_find_mapping(pp->irq_domain,
 						i * 32 + pos);

drivers/pci/host/pcie-designware.c void dw_handle_msi_irq(struct pcie_port *pp) · line 178

Quoted 10 lines
drivers/pci/host/pcie-designware.c +3 -1
+				dw_pcie_wr_own_conf(pp,
+						PCIE_MSI_INTR0_STATUS + i * 12,
+						4, 1 << pos);
 				generic_handle_irq(irq);
 				pos++;
 			}
 		}
-		dw_pcie_wr_own_conf(pp, PCIE_MSI_INTR0_STATUS + i * 12, 4, val);
 	}
 }

On imx6-sabrelite:

Best regards,
Marek Vasut

#2 lore raw

PATCH 1/1 pci: designware: fix missing msi irqs

In reply to Matthias Mann

Am 12.12.2013 20:29, schrieb Matthias Mann:

Quoted 7 lines

Am 12.12.2013 19:29, schrieb Harro Haan:

Quoted 3 lines

The interrupts were cleared after the irq handler was called. This means that new interrupts that occur after the handler handled the previous irq but before the interrupt is cleared will be missed.

I discovered the same issue today. I'll test that patch tomorrow.

I tested this patch on our custom i.MX6 board with an Altera FPGA as PCIe device and it fixed the missed MSI interrupts.

Regards
Matthias Mann

Signature · 30 lines
Matthias Mann
Research & Development

Phone: 	+49 (0) 6155 7802883
Fax: 	+49 (0) 6155 7802880
Email: 	M.Mann at arkona-technologies.de 
<mailto:[email protected]>
Web: 	www.arkona-technologies.de <http://www.arkona-technologies.de>

arkona technologies GmbH
Im Leuschnerpark 4
64347 Griesheim
Germany

Amtsgericht / Commercial Register of Darmstadt, HRB 90080
USt-ID: DE273794666
Steuernummer / Tax-ID: 007 / 228 / 19331
Gesch?ftsf?hrung / Managing Director: Rainer Sturm

This e-mail may contain confidential and/or privileged information. If you are
not the intended recipient (or have received this e-mail in error) please notify
the sender immediately and delete this message and any attachments from your
system. Any unauthorised copying, disclosure or distribution of the material in
this e-mail is strictly forbidden.

We cannot accept any responsibility for the accuracy or completeness of this
message as it has been transmitted over a public network. If, despite our use of
anti-virus software, a virus enters your systems in connection with the sending
of the e-mail, you may not hold us liable for any damages that may possibly
arise in that connection. We will accept liability which by law we cannot exclude.
#4 lore raw

PATCH 1/1 pci: designware: fix missing msi irqs

In reply to Harro Haan
Quoted 5 lines · Harro Haan

The interrupts were cleared after the irq handler was called. This means that new interrupts that occur after the handler handled the previous irq but before the interrupt is cleared will be missed.

Quoted 16 lines
Cc Mohit Kumar <[email protected]>
Cc Jingoo Han <[email protected]>
Cc Bjorn Helgaas <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Richard Zhu <[email protected]>
Cc Shawn Guo <[email protected]>
Cc Pratyush Anand <[email protected]>
Cc Tim Harvey <[email protected]>
Cc Juergen Beisert <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Siva Reddy Kallam <[email protected]>
Cc Srikanth T Shivanand <[email protected]>
Cc Sean Cross <[email protected]>
Cc linux-pci at vger.kernel.org
Cc linux-arm-kernel at lists.infradead.org

I was not able to reproduce the problem, however it looks good. Also, there is no side effect on Exynos platform.

Mohit,
If you have some comments, please let us know.

Best regards,
Jingoo Han

Quoted 3 lines
---
 drivers/pci/host/pcie-designware.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
#5 lore raw

PATCH 1/1 pci: designware: fix missing msi irqs

Quoted 33 lines

-----Original Message-----
From: Jingoo Han [mailto:jg1.han at samsung.com]
Sent: Monday, December 16, 2013 6:24 AM
To: 'Harro Haan'; Mohit KUMAR DCG
Cc: 'Bjorn Helgaas'; 'Marek Vasut'; 'Richard Zhu'; 'Shawn Guo'; Pratyush ANAND; 'Tim Harvey'; 'Juergen Beisert'; 'Arnd Bergmann'; 'Siva Reddy Kallam'; 'Srikanth T Shivanand'; 'Sean Cross'; linux-pci at vger.kernel.org; linux- arm-kernel at lists.infradead.org; 'Jingoo Han'
Subject: Re: [PATCH] pci: designware: fix missing msi irqs

Quoted 5 lines · Harro Haan

The interrupts were cleared after the irq handler was called. This means that new interrupts that occur after the handler handled the previous irq but before the interrupt is cleared will be missed.

Quoted 16 lines
Cc Mohit Kumar <[email protected]>
Cc Jingoo Han <[email protected]>
Cc Bjorn Helgaas <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Richard Zhu <[email protected]>
Cc Shawn Guo <[email protected]>
Cc Pratyush Anand <[email protected]>
Cc Tim Harvey <[email protected]>
Cc Juergen Beisert <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Siva Reddy Kallam <[email protected]>
Cc Srikanth T Shivanand <[email protected]>
Cc Sean Cross <[email protected]>
Cc linux-pci at vger.kernel.org
Cc linux-arm-kernel at lists.infradead.org
Quoted 7 lines

I was not able to reproduce the problem, however it looks good. Also, there is no side effect on Exynos platform.

Mohit,
If you have some comments, please let us know.

- Quickly tested on SPEAr1310, working fine without any side effect. So is,

..

Quoted 4 lines
Quoted 4 lines
---
 drivers/pci/host/pcie-designware.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
#6 lore raw

PATCH 1/1 pci: designware: fix missing msi irqs

Quoted 26 lines · Mohit KUMAR DCG
Quoted 25 lines · Jingoo Han
Quoted 5 lines · Harro Haan

The interrupts were cleared after the irq handler was called. This means that new interrupts that occur after the handler handled the previous irq but before the interrupt is cleared will be missed.

Quoted 16 lines
Cc Mohit Kumar <[email protected]>
Cc Jingoo Han <[email protected]>
Cc Bjorn Helgaas <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Richard Zhu <[email protected]>
Cc Shawn Guo <[email protected]>
Cc Pratyush Anand <[email protected]>
Cc Tim Harvey <[email protected]>
Cc Juergen Beisert <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Siva Reddy Kallam <[email protected]>
Cc Srikanth T Shivanand <[email protected]>
Cc Sean Cross <[email protected]>
Cc linux-pci at vger.kernel.org
Cc linux-arm-kernel at lists.infradead.org
Quoted 8 lines
Quoted 5 lines

I was not able to reproduce the problem, however it looks good. Also, there is no side effect on Exynos platform.

Mohit,
If you have some comments, please let us know.

- Quickly tested on SPEAr1310, working fine without any side effect. So is,

Hi Bjorn Helgaas,

Would you apply this patch to your 'pci/host-designware' branch with the following Tested-by and Acked-by?

Quoted 5 lines

..

Quoted 4 lines
Quoted 4 lines
---
 drivers/pci/host/pcie-designware.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
maintainer Applied
#7 lore raw

PATCH 1/1 pci: designware: fix missing msi irqs

Quoted 38 lines · Jingoo Han
Quoted 26 lines · Mohit KUMAR DCG
Quoted 25 lines · Jingoo Han
Quoted 5 lines · Harro Haan

The interrupts were cleared after the irq handler was called. This means that new interrupts that occur after the handler handled the previous irq but before the interrupt is cleared will be missed.

Quoted 16 lines
Cc Mohit Kumar <[email protected]>
Cc Jingoo Han <[email protected]>
Cc Bjorn Helgaas <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Richard Zhu <[email protected]>
Cc Shawn Guo <[email protected]>
Cc Pratyush Anand <[email protected]>
Cc Tim Harvey <[email protected]>
Cc Juergen Beisert <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Siva Reddy Kallam <[email protected]>
Cc Srikanth T Shivanand <[email protected]>
Cc Sean Cross <[email protected]>
Cc linux-pci at vger.kernel.org
Cc linux-arm-kernel at lists.infradead.org
Quoted 8 lines
Quoted 5 lines

I was not able to reproduce the problem, however it looks good. Also, there is no side effect on Exynos platform.

Mohit,
If you have some comments, please let us know.

- Quickly tested on SPEAr1310, working fine without any side effect. So is,

Hi Bjorn Helgaas,

Quoted 7 lines

Would you apply this patch to your 'pci/host-designware' branch with the following Tested-by and Acked-by?

Applied to pci/host-designware for v3.14, thanks for the reminder!

Bjorn