diff mbox series

[v2] PCI/DPC: Fix PCI legacy interrupt acknowledgement

Message ID 1521042648-20522-1-git-send-email-poza@codeaurora.org
State Superseded
Delegated to: Bjorn Helgaas
Headers show
Series [v2] PCI/DPC: Fix PCI legacy interrupt acknowledgement | expand

Commit Message

Oza Pawandeep March 14, 2018, 3:50 p.m. UTC
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>

Comments

Keith Busch March 14, 2018, 8:52 p.m. UTC | #1
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
Keith Busch March 14, 2018, 8:56 p.m. UTC | #2
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>
Oza Pawandeep March 15, 2018, 7:54 a.m. UTC | #3
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.
Oza Pawandeep March 28, 2018, 3:12 p.m. UTC | #4
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.
diff mbox series

Patch

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;