From patchwork Wed Jan 31 16:18:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oza Pawandeep X-Patchwork-Id: 10194189 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3B215601A0 for ; Wed, 31 Jan 2018 16:19:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3848426220 for ; Wed, 31 Jan 2018 16:19:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2AF7328740; Wed, 31 Jan 2018 16:19:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 84CF526220 for ; Wed, 31 Jan 2018 16:19:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753366AbeAaQTL (ORCPT ); Wed, 31 Jan 2018 11:19:11 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:60818 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753310AbeAaQTK (ORCPT ); Wed, 31 Jan 2018 11:19:10 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id B2FC560112; Wed, 31 Jan 2018 16:19:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1517415549; bh=vR9dTOZg2m6dNdtSbYpP91YHzBw5FA7bOBZ4iUI1iHo=; h=From:To:Cc:Subject:Date:From; b=ovLW7t0Z0UC01qytyUhMHwIywgsrjpu4x401JLgXNafLPHUChTTwAMFYAiYnhSDbt 9sk/WGQRKrmnWeXXc85RKvJCRjYI7VJqSNv3HvujUWWeCmhLgxh5eBj/MY5O+DccDX Vn6P0F2N9tRSNTkpv+Kj183THSogn8kTrGYk97qI= Received: from blr-ubuntu-poza.qualcomm.com (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.18.19]) (using TLSv1.1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: poza@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 3689760112; Wed, 31 Jan 2018 16:19:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1517415548; bh=vR9dTOZg2m6dNdtSbYpP91YHzBw5FA7bOBZ4iUI1iHo=; h=From:To:Cc:Subject:Date:From; b=XCfgDzjFTSbuzzvpEm0cQDxCVe3Iv0rzz/MSm+3bpvnvwbdUcjtKIlwD5s30+Xytz iwFv6XgpCdu8rRUi7WrEpXdxLIK9XUMdSAp1UzcErQPJ/drSEFsCHXCpOC9zVB0Xhr NzXtz8ZoTxgk2WXVcVVypzcw+LQMXtuShxTU8xfw= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 3689760112 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=poza@codeaurora.org From: Oza Pawandeep To: Bjorn Helgaas , Philippe Ombredanne , Thomas Gleixner , Greg Kroah-Hartman , Kate Stewart , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Dongdong Liu , Keith Busch , Wei Zhang , Sinan Kaya , Timur Tabi Cc: Oza Pawandeep Subject: [PATCH] PCI/DPC: Fix INT legacy interrupt in dpc_irq Date: Wed, 31 Jan 2018 21:48:55 +0530 Message-Id: <1517415535-21850-1-git-send-email-poza@codeaurora.org> X-Mailer: git-send-email 1.9.1 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Current dpc driver acknowledge the interrupt in deferred work, which works okay since LPI are edge triggered. But when RP does not have MSI support, port service driver falls back to legacy GIC SPI interrupts, and with current code we do not acknowledge the interrupt and we get dpc interrupt storm. This patch acknowledges the interrupt in interrupt handler. Signed-off-by: Oza Pawandeep Reviewed-by: Keith Busch diff --git a/drivers/pci/pcie/pcie-dpc.c b/drivers/pci/pcie/pcie-dpc.c index 2d976a6..570b561 100644 --- a/drivers/pci/pcie/pcie-dpc.c +++ b/drivers/pci/pcie/pcie-dpc.c @@ -134,7 +134,7 @@ static void interrupt_event_handler(struct work_struct *work) } pci_write_config_word(pdev, dpc->cap_pos + PCI_EXP_DPC_STATUS, - PCI_EXP_DPC_STATUS_TRIGGER | PCI_EXP_DPC_STATUS_INTERRUPT); + PCI_EXP_DPC_STATUS_TRIGGER); } static void dpc_rp_pio_print_tlp_header(struct device *dev, @@ -277,6 +277,8 @@ static irqreturn_t dpc_irq(int irq, void *context) schedule_work(&dpc->work); } + pci_write_config_word(pdev, dpc->cap_pos + PCI_EXP_DPC_STATUS, + PCI_EXP_DPC_STATUS_INTERRUPT); return IRQ_HANDLED; }