Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp423302pxk; Fri, 11 Sep 2020 10:28:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmnautT0+n0JQhmOqG3TH3n8qRJRzHWLkmoNFSqT02EbIwttBmvAtQjbYi9P35p8e2/lhG X-Received: by 2002:aa7:c985:: with SMTP id c5mr3374357edt.355.1599845281335; Fri, 11 Sep 2020 10:28:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599845281; cv=none; d=google.com; s=arc-20160816; b=P7DZryGVC1lJ5Qa8zSkMI8+h+EiCRiBQh1ads9CLiLbyK47snSnviHqWM9dwwDWVLQ 6+YhV5+sNkHKsN8MBez5eBn+jeCADfW3Jb+VWNiKOt1BY0xGLQpVuGBBfZxhhc9DekA1 EbgC+Q1jt7G03Xp9HGmR5QC0vlM5+KjSV8Uut78pByVLPBhVFV5q6ClLeIErVCUbkqmb BwVzpIugj5Uop65gTiGo4kSzFzCqEiNPPwPntIAA20Rg9495pqh0aEZQ59Gj+HbaZCLQ +RT868mDPUqyUyZxeNlss0pAwuxqM8ZzqKlk37TZMdOMwEx0YM+5fqW6T/8C/a7iWyHB owpw== 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:subject:cc:to :from:dkim-signature; bh=gFJs3GbzZZDKwIWOZXbuO7PeRpQq1LwxFa9kLWJkAqw=; b=1CAf+JexL5j9Kiv6hiEEIY7VPImG7llZi+Zu0x0cbV0VpgvnUsmzmQTl7JfMBdggCz E9BHO1IPrj13HGGw7wvwyNfKe/aoFuOvPPkwdD7xSyuXu9vaNWFGvx207W211ub0yrh5 ELHsnHV0IkauofjrO2cFCPeVdPHRQGkeVD0/kuiKVyPt0FAl7IGcYkWZaiIfzV1/Zur6 d8V60m83hQ1y94kFyzfY1cMOOa3Z87+r761a1X6ilfotGlQ0Ad0aaq7gk9KhjErGGw/Y j+uwaObLBWnTDNf4klduMDhg+AHRSMGntEvWQrdMflfpKl7x2Av48NO6fgToRzq3guG4 2ULw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=P11PmSdt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gu16si114687ejb.218.2020.09.11.10.27.38; Fri, 11 Sep 2020 10:28:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=P11PmSdt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726387AbgIKRYy (ORCPT + 99 others); Fri, 11 Sep 2020 13:24:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:52808 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726136AbgIKNAK (ORCPT ); Fri, 11 Sep 2020 09:00:10 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 1E39B22269; Fri, 11 Sep 2020 12:56:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599828991; bh=kvBJA/qiJc1WD7f0wIbCDjAatVUk58TR8txL9sS+k6I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P11PmSdtcUwTU/Y13Jhyw+kQWiqlgseHw9FHU1idcv8gffXQVgvkSXgZ0i7kb3sTg LLFiwNWHD/6FoleiMsGzYWY/LeT7QBRURLBEEsIZ9UQAZuzAKUlroJKKosIEl/OH8E Crp4w4I9PRU2HJvI/OH1ybQpc8tlG5hjNLjoBba8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vasundhara Volam , Michael Chan , "David S. Miller" , Sasha Levin Subject: [PATCH 4.9 23/71] bnxt_en: Fix PCI AER error recovery flow Date: Fri, 11 Sep 2020 14:46:07 +0200 Message-Id: <20200911122506.095483887@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200911122504.928931589@linuxfoundation.org> References: <20200911122504.928931589@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vasundhara Volam [ Upstream commit df3875ec550396974b1d8a518bd120d034738236 ] When a PCI error is detected the PCI state could be corrupt, save the PCI state after initialization and restore it after the slot reset. Fixes: 6316ea6db93d ("bnxt_en: Enable AER support.") Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 421cbba9a3bc8..f451be63ab7e6 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -7085,6 +7085,7 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) bnxt_parse_log_pcie_link(bp); + pci_save_state(pdev); return 0; init_err: @@ -7158,6 +7159,8 @@ static pci_ers_result_t bnxt_io_slot_reset(struct pci_dev *pdev) "Cannot re-enable PCI device after reset.\n"); } else { pci_set_master(pdev); + pci_restore_state(pdev); + pci_save_state(pdev); if (netif_running(netdev)) err = bnxt_open(netdev); -- 2.25.1