Received: by 10.192.165.148 with SMTP id m20csp3553972imm; Mon, 23 Apr 2018 08:26:35 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/oiQVZKo6ynRTYaXrDdtcOApAq1T6/IfTMViOvcewRqQ2JDmFsu2GcjgnAcccrfHmiEV4L X-Received: by 10.98.86.16 with SMTP id k16mr8556118pfb.19.1524497195885; Mon, 23 Apr 2018 08:26:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524497195; cv=none; d=google.com; s=arc-20160816; b=JWYVCchXWNdLwB+oYDVpo+1KW1Az5ho99TOFiMB5T+HIiMTMTKxcxjH9ymVmnvNycf 0FbGC3HsgF7/RBTzBsFITofn9P+nbk0Y52szAuAmXesswuOzbCEGPsbaoIRiSmXIdKNw eMpMgTMwE3w9DYi94yIpjUEUO60yyb7kkJ2uFJFf20u1BsJULIloU4HPtFPgO7uFNSIZ zdiA9fFKlZ4lIEepLbHis9gL05Km+ZoAXPuNLa0RMDcN5zn1kAjGnpq7Yq+gaxcgo7hW Rv2Q+BvoY+/1fXgSYpLJM8LdrRUQMGpIogyQFYcoKrU7PShE+QccCtNcyAl9Xk9soHhB NJEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=CJK4nceyb2ZtpnDLV8R4aQ/MpAcAJHa2MgWqZwMRaus=; b=fIx8UHwELDic+2ryXBSFjisYvJx795pxNDLqeE567cLRk0EDp5fpRamz2nWGESznG7 S0XiPgcpDawAdjdwdprEtGQ0oeN8Yd9tLUQPovxNOJ1UZkpxSYUSH+BZAVtCZobJ2jxX S6ksdpWuOTRBlAfwKiSjtZ3sJurKyi5Tr1YE40LGCzjXoGIWkzChOiIO3GlCMLUoaqXl 9EtY3+RLyTOW5Zq59QmeOgEat5EysiW/CMh0aVKSHOV1BvOeitmPbJTqHmZ2oqsYgALC taqFyqwZqoMhW2zm4GzGxsa4t6pEpu7gyRGHc8GYpqIsz+O/z5OBimAzH8YhFVPzD41c W0/w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h188si6890257pgc.53.2018.04.23.08.26.21; Mon, 23 Apr 2018 08:26:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932154AbeDWPYi (ORCPT + 99 others); Mon, 23 Apr 2018 11:24:38 -0400 Received: from wolverine01.qualcomm.com ([199.106.114.254]:40452 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755728AbeDWPXS (ORCPT ); Mon, 23 Apr 2018 11:23:18 -0400 X-IronPort-AV: E=Sophos;i="5.49,318,1520924400"; d="scan'208";a="337205361" Received: from unknown (HELO ironmsg02-sd.qualcomm.com) ([10.53.140.142]) by wolverine01.qualcomm.com with ESMTP; 23 Apr 2018 08:23:17 -0700 Received: from westreach.qualcomm.com ([10.228.196.125]) by ironmsg02-sd.qualcomm.com with ESMTP; 23 Apr 2018 08:23:15 -0700 Received: by westreach.qualcomm.com (Postfix, from userid 467151) id 957661F0C; Mon, 23 Apr 2018 11:23:14 -0400 (EDT) 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 v14 7/9] PCI/DPC: Disable ERR_NONFATAL and enable ERR_FATAL for DPC Date: Mon, 23 Apr 2018 11:23:11 -0400 Message-Id: <1524496993-29799-8-git-send-email-poza@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1524496993-29799-1-git-send-email-poza@codeaurora.org> References: <1524496993-29799-1-git-send-email-poza@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch disables ERR_NONFATAL trigger for DPC, so now DPC handles only ERR_FATAL. Signed-off-by: Oza Pawandeep diff --git a/drivers/pci/pcie/pcie-dpc.c b/drivers/pci/pcie/pcie-dpc.c index 6baed85..cd15862 100644 --- a/drivers/pci/pcie/pcie-dpc.c +++ b/drivers/pci/pcie/pcie-dpc.c @@ -283,7 +283,8 @@ static int dpc_probe(struct pcie_device *dev) } } - ctl = (ctl & 0xfff4) | PCI_EXP_DPC_CTL_EN_NONFATAL | PCI_EXP_DPC_CTL_INT_EN; + ctl = (ctl & 0xfff4) | PCI_EXP_DPC_CTL_EN_FATAL | + PCI_EXP_DPC_CTL_INT_EN; pci_write_config_word(pdev, dpc->cap_pos + PCI_EXP_DPC_CTL, ctl); dev_info(device, "DPC error containment capabilities: Int Msg #%d, RPExt%c PoisonedTLP%c SwTrigger%c RP PIO Log %d, DL_ActiveErr%c\n", @@ -301,7 +302,7 @@ static void dpc_remove(struct pcie_device *dev) u16 ctl; pci_read_config_word(pdev, dpc->cap_pos + PCI_EXP_DPC_CTL, &ctl); - ctl &= ~(PCI_EXP_DPC_CTL_EN_NONFATAL | PCI_EXP_DPC_CTL_INT_EN); + ctl &= ~(PCI_EXP_DPC_CTL_EN_FATAL | PCI_EXP_DPC_CTL_INT_EN); pci_write_config_word(pdev, dpc->cap_pos + PCI_EXP_DPC_CTL, ctl); } diff --git a/include/uapi/linux/pci_regs.h b/include/uapi/linux/pci_regs.h index 0c79eac..dcc3957 100644 --- a/include/uapi/linux/pci_regs.h +++ b/include/uapi/linux/pci_regs.h @@ -978,7 +978,8 @@ #define PCI_EXP_DPC_CAP_DL_ACTIVE 0x1000 /* ERR_COR signal on DL_Active supported */ #define PCI_EXP_DPC_CTL 6 /* DPC control */ -#define PCI_EXP_DPC_CTL_EN_NONFATAL 0x0002 /* Enable trigger on ERR_NONFATAL message */ +#define PCI_EXP_DPC_CTL_EN_FATAL 0x0001 /* Enable trigger on ERR_FATAL message */ +#define PCI_EXP_DPC_CTL_EN_NONFATAL 0x0002 /* Enable trigger on ERR_NONFATAL message */ #define PCI_EXP_DPC_CTL_INT_EN 0x0008 /* DPC Interrupt Enable */ #define PCI_EXP_DPC_STATUS 8 /* DPC Status */ -- 2.7.4