linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] PCI/DPC: Fix PCI legacy interrupt acknowledgement
@ 2018-03-14 15:50 Oza Pawandeep
  2018-03-14 20:52 ` Keith Busch
  0 siblings, 1 reply; 5+ messages in thread
From: Oza Pawandeep @ 2018-03-14 15:50 UTC (permalink / raw)
  To: Bjorn Helgaas, Philippe Ombredanne, Thomas Gleixner,
	Greg Kroah-Hartman, Kate Stewart, linux-pci, linux-kernel,
	Dongdong Liu, Keith Busch, Wei Zhang, Sinan Kaya, Timur Tabi
  Cc: Oza Pawandeep

Current DPC driver acknowledges the interrupt in deferred work, which works
since MSI are edge triggered.

But when MSI is disabled (e.g. pci=nomsi boot option) port service
driver falls back to PCI legacy INT interrupt.

With current code we do not acknowledge the interrupt back in dpc_irq()
and we get dpc interrupt storm.

This patch acknowledges the interrupt in interrupt handler.

Signed-off-by: Oza Pawandeep <poza@codeaurora.org>

diff --git a/drivers/pci/pcie/pcie-dpc.c b/drivers/pci/pcie/pcie-dpc.c
index 38e40c6..9c05120 100644
--- a/drivers/pci/pcie/pcie-dpc.c
+++ b/drivers/pci/pcie/pcie-dpc.c
@@ -112,7 +112,7 @@ static void dpc_work(struct work_struct *work)
 	}
 
 	pci_write_config_word(pdev, cap + PCI_EXP_DPC_STATUS,
-		PCI_EXP_DPC_STATUS_TRIGGER | PCI_EXP_DPC_STATUS_INTERRUPT);
+			      PCI_EXP_DPC_STATUS_TRIGGER);
 
 	pci_read_config_word(pdev, cap + PCI_EXP_DPC_CTL, &ctl);
 	pci_write_config_word(pdev, cap + PCI_EXP_DPC_CTL,
@@ -222,6 +222,9 @@ static irqreturn_t dpc_irq(int irq, void *context)
 	if (dpc->rp_extensions && reason == 3 && ext_reason == 0)
 		dpc_process_rp_pio_error(dpc);
 
+	pci_write_config_word(pdev, cap + PCI_EXP_DPC_STATUS,
+			      PCI_EXP_DPC_STATUS_INTERRUPT);
+
 	schedule_work(&dpc->work);
 
 	return IRQ_HANDLED;
-- 
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.,
a Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.

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

* Re: [PATCH v2] PCI/DPC: Fix PCI legacy interrupt acknowledgement
  2018-03-14 15:50 [PATCH v2] PCI/DPC: Fix PCI legacy interrupt acknowledgement Oza Pawandeep
@ 2018-03-14 20:52 ` Keith Busch
  2018-03-14 20:56   ` Keith Busch
  2018-03-15  7:54   ` poza
  0 siblings, 2 replies; 5+ messages in thread
From: Keith Busch @ 2018-03-14 20:52 UTC (permalink / raw)
  To: Oza Pawandeep
  Cc: Bjorn Helgaas, Philippe Ombredanne, Thomas Gleixner,
	Greg Kroah-Hartman, Kate Stewart, linux-pci, linux-kernel,
	Dongdong Liu, Wei Zhang, Sinan Kaya, Timur Tabi

On Wed, Mar 14, 2018 at 09:20:48PM +0530, Oza Pawandeep wrote:
> Current DPC driver acknowledges the interrupt in deferred work, which works
> since MSI are edge triggered.
> 
> But when MSI is disabled (e.g. pci=nomsi boot option) port service
> driver falls back to PCI legacy INT interrupt.
> 
> With current code we do not acknowledge the interrupt back in dpc_irq()
> and we get dpc interrupt storm.
> 
> This patch acknowledges the interrupt in interrupt handler.
> 
> Signed-off-by: Oza Pawandeep <poza@codeaurora.org>

Thanks, this looks good to me.

Reviewed-by: Keith Busch <keith

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

* Re: [PATCH v2] PCI/DPC: Fix PCI legacy interrupt acknowledgement
  2018-03-14 20:52 ` Keith Busch
@ 2018-03-14 20:56   ` Keith Busch
  2018-03-28 15:12     ` poza
  2018-03-15  7:54   ` poza
  1 sibling, 1 reply; 5+ messages in thread
From: Keith Busch @ 2018-03-14 20:56 UTC (permalink / raw)
  To: Oza Pawandeep
  Cc: Bjorn Helgaas, Philippe Ombredanne, Thomas Gleixner,
	Greg Kroah-Hartman, Kate Stewart, linux-pci, linux-kernel,
	Dongdong Liu, Wei Zhang, Sinan Kaya, Timur Tabi

On Wed, Mar 14, 2018 at 02:52:30PM -0600, Keith Busch wrote:
> 
> Reviewed-by: Keith Busch <keith

Whoops, I accidentally truncated my message. My correct tag:

Reviewed-by: Keith Busch <keith.busch@intel.com>

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

* Re: [PATCH v2] PCI/DPC: Fix PCI legacy interrupt acknowledgement
  2018-03-14 20:52 ` Keith Busch
  2018-03-14 20:56   ` Keith Busch
@ 2018-03-15  7:54   ` poza
  1 sibling, 0 replies; 5+ messages in thread
From: poza @ 2018-03-15  7:54 UTC (permalink / raw)
  To: Keith Busch
  Cc: Bjorn Helgaas, Philippe Ombredanne, Thomas Gleixner,
	Greg Kroah-Hartman, Kate Stewart, linux-pci, linux-kernel,
	Dongdong Liu, Wei Zhang, Sinan Kaya, Timur Tabi

On 2018-03-15 02:22, Keith Busch wrote:
> On Wed, Mar 14, 2018 at 09:20:48PM +0530, Oza Pawandeep wrote:
>> Current DPC driver acknowledges the interrupt in deferred work, which 
>> works
>> since MSI are edge triggered.
>> 
>> But when MSI is disabled (e.g. pci=nomsi boot option) port service
>> driver falls back to PCI legacy INT interrupt.
>> 
>> With current code we do not acknowledge the interrupt back in 
>> dpc_irq()
>> and we get dpc interrupt storm.
>> 
>> This patch acknowledges the interrupt in interrupt handler.
>> 
>> Signed-off-by: Oza Pawandeep <poza@codeaurora.org>
> 
> Thanks, this looks good to me.
> 
> Reviewed-by: Keith Busch <keith


checkpatch script shows
WARNING: 'acknowledgement' may be misspelled - perhaps 'acknowledgment'?

but dictionaries shows acknowledgement.

Regards,
Oza.

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

* Re: [PATCH v2] PCI/DPC: Fix PCI legacy interrupt acknowledgement
  2018-03-14 20:56   ` Keith Busch
@ 2018-03-28 15:12     ` poza
  0 siblings, 0 replies; 5+ messages in thread
From: poza @ 2018-03-28 15:12 UTC (permalink / raw)
  To: Bjorn Helgaas <bhelgaas@google.com> Keith Busch
  Cc: Philippe Ombredanne, Thomas Gleixner, Greg Kroah-Hartman,
	Kate Stewart, linux-pci, linux-kernel, Dongdong Liu, Wei Zhang,
	Sinan Kaya, Timur Tabi

On 2018-03-15 02:26, Keith Busch wrote:
> On Wed, Mar 14, 2018 at 02:52:30PM -0600, Keith Busch wrote:
>> 
>> Reviewed-by: Keith Busch <keith
> 
> Whoops, I accidentally truncated my message. My correct tag:
> 
> Reviewed-by: Keith Busch <keith.busch@intel.com>

Hi Bjorn,

Can this be merged ?

Regards,
Oza.

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

end of thread, other threads:[~2018-03-28 15:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-14 15:50 [PATCH v2] PCI/DPC: Fix PCI legacy interrupt acknowledgement Oza Pawandeep
2018-03-14 20:52 ` Keith Busch
2018-03-14 20:56   ` Keith Busch
2018-03-28 15:12     ` poza
2018-03-15  7:54   ` poza

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).