Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp903398imm; Wed, 18 Jul 2018 12:46:58 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdCJ3s1Z0OIpd0/9wuo53WHane0cQ/KWPTBewDAldVvC52YcpgFGWwCcbCR1YtOvLgtLNEr X-Received: by 2002:a63:d5b:: with SMTP id 27-v6mr6920103pgn.107.1531943218441; Wed, 18 Jul 2018 12:46:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531943218; cv=none; d=google.com; s=arc-20160816; b=nETkvifabOQo6NxbQeuS6+UBVTgLQGhnM2Qs0erh47xPlGBaSIOV4U9VnE7f5Jfboe hUkWz0XEWVUcVxEDj37QUms1aw9zVriwOLzvwsxxOHC+6yB7b5kzBy3ORNpidLxpz/re 2baE3DTA7g/zzVCc8MGbqjjHviZBSi31olDQl4SoBPBs63wkqj9mRrQV5LXR+Tx8uQOw qzuZxP6LvcFvovJUSIfwsbNK+2IZR4t4xo3foSX3xWr+8N5u1LTmpoGY2NKgszGLMghy JmtpgbSJyuwQSKCoUubb6LJtZ6+BxPeqX/8W6YUpxATB+vBq8UUX1QnzQVPhs4DSsqg/ 6sEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:cc:to:from :subject:dkim-signature:arc-authentication-results; bh=t/tiNv/tSG7ww66pn2KjAtuUOMAa5JbFmFWmuUk4NCk=; b=TgMpzKYumujwtVGqFQpS0+Su8i2goP2Hf19TQoimPnyxMQ31CjEPHgbN1Fe/sRdkgd 8tQGWKXjLsmkiuhEqOUsp5zNHy0kdZVmJFIv4fCmE5TmlIknVhH+Q+iIKn76hLYpehkf 6uFVkMJiNlCsPhxGWEt7A9Mu7fk+w1pUVzlRrK8LdNcuqmBFlQ5luApbmUGwZ5dZTKw8 BfQUhBf6DLMeC3jclZ2Bou5CmUHrRz+DCEKfYNt3b8WM9HAGLYSmo0KmAbLrREF4zTQG 4ORw/kFT9qyIGM4mKpWOXhpVilh4uCZ+WnbRMmWSbUc8W0QFAzji3+22c+izI4nJV7zH UXEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=a8H6XN2O; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e15-v6si4052472pli.44.2018.07.18.12.46.20; Wed, 18 Jul 2018 12:46:58 -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; dkim=pass header.i=@kernel.org header.s=default header.b=a8H6XN2O; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730627AbeGRUXz (ORCPT + 99 others); Wed, 18 Jul 2018 16:23:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:33704 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729642AbeGRUXz (ORCPT ); Wed, 18 Jul 2018 16:23:55 -0400 Received: from localhost (unknown [69.71.4.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CD6F12084E; Wed, 18 Jul 2018 19:44:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1531943073; bh=w2LVEmWRG9KBBHN6JiM+kfl6dlBJ3HisGqvOB8XGwpA=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=a8H6XN2OQS57PUsWu7JFntSP4jvgc/dZTw6DzleeQVY+dWmCAbcq4iisI33EB8sbX /ugly38jCOndRUh10bh/WMy6a9Vh9z/4Kq5I9F0KhxE5+P9aNyxMJmHzLsyrG9r20N V7Bv5aISjm0FLMXOVqCZ97GsbYRhkwOIubca2F+s= Subject: [PATCH v3 2/7] PCI/AER: Clear only ERR_NONFATAL bits during non-fatal recovery From: Bjorn Helgaas To: Oza Pawandeep Cc: Philippe Ombredanne , Thomas Gleixner , Greg Kroah-Hartman , Kate Stewart , Dongdong Liu , Keith Busch , Wei Zhang , Sinan Kaya , Timur Tabi , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 18 Jul 2018 14:44:31 -0500 Message-ID: <153194307163.191586.14136554437248317995.stgit@bhelgaas-glaptop.roam.corp.google.com> In-Reply-To: <153194245964.191586.14782253252654776509.stgit@bhelgaas-glaptop.roam.corp.google.com> References: <153194245964.191586.14782253252654776509.stgit@bhelgaas-glaptop.roam.corp.google.com> User-Agent: StGit/0.18 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Oza Pawandeep pci_cleanup_aer_uncorrect_error_status() is called by driver .slot_reset() methods when handling ERR_NONFATAL errors. Previously this cleared *all* the bits, including ERR_FATAL bits. Since we're only handling ERR_NONFATAL errors, clear only the ERR_NONFATAL error status bits. Signed-off-by: Oza Pawandeep [bhelgaas: split to separate patch] Signed-off-by: Bjorn Helgaas --- drivers/pci/pcie/aer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c index 5b4a84e3d360..6f0f131b5e6a 100644 --- a/drivers/pci/pcie/aer.c +++ b/drivers/pci/pcie/aer.c @@ -360,13 +360,16 @@ EXPORT_SYMBOL_GPL(pci_disable_pcie_error_reporting); int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev) { int pos; - u32 status; + u32 status, sev; pos = dev->aer_cap; if (!pos) return -EIO; + /* Clear status bits for ERR_NONFATAL errors only */ pci_read_config_dword(dev, pos + PCI_ERR_UNCOR_STATUS, &status); + pci_read_config_dword(dev, pos + PCI_ERR_UNCOR_SEVER, &sev); + status &= ~sev; if (status) pci_write_config_dword(dev, pos + PCI_ERR_UNCOR_STATUS, status);