Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3525065pxf; Mon, 15 Mar 2021 11:29:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwk8lqUtY9O3qdAOU/L1GcpiUqFuy7tIVdnloPEfgamB/6eOyKc9oAi6WmTmQ7gRjx/wose X-Received: by 2002:a05:6402:382:: with SMTP id o2mr32236499edv.238.1615832973097; Mon, 15 Mar 2021 11:29:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832973; cv=none; d=google.com; s=arc-20160816; b=EHXsDTgW6Nk1jCRlk2Ok6g7HJtHQpH9/aEDxhIGCDiAW5GwzJuxMb8wrLnjeKq7Wra ERIzaOzvg8zlCZC52aAij5kETCNQb9D/lRgXIuQ/nXRkSfkRxiZFem1E72O9TTmS/Ntq cF973yD9en6DF+8nsp0YLjTndDAkuhAqqByEpgbChaywJG7MiFx+gmdCIDXfVSwubSjm zCUFXeyhYpwmAK4BZFIC2pL0QrZcPtJKFgTEAIyaSrbaT/oRaqZZ83cK/zK4Hs1HmHgq tNPCbf87glnBDuGmOyryVDeYUD3ZfcJvfwHPrFUn6RptBnH8I8s0ycgm/70XNufpgL4M t1uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2woPmsmcrZQSK+S38yoJWbi0rHhgUpMIqpI4OhjWcNU=; b=YvCqJUp/JWbn1OYSneJwnrGY7ZEaZDhXly0JY0SwvsH0RN98CsTepRneqj3q6li9M5 gdEBXP9rRghkAPxkx3OQ9rdo+Euhl69oiCjoIKffFEB19HaK49i2OpAq4nQ9INadMXlA sQ2dSlMUTfVswJfGNhqi46OWLfpzIu5Uf5cR6EcxsCM7wadBUCErpTxjHMsKSkjyLsrZ wE2rKfiBfgZuoFSNWd/0dDDrR3NjnbXX9S7gxlZBOHMTiXqvNHhIruCNuvKUwUFf197X sCStsvHipH0tIHjBbnNHU9jOXrXq7stXvkKbMHPVxORG6OEXxAuSjSoSbFrs2luGQLas P1xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kQlja6sb; 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=pass (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 i5si11844351ejh.313.2021.03.15.11.29.05; Mon, 15 Mar 2021 11:29:33 -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=@linuxfoundation.org header.s=korg header.b=kQlja6sb; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233157AbhCOOdr (ORCPT + 99 others); Mon, 15 Mar 2021 10:33:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:37582 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232387AbhCOOBV (ORCPT ); Mon, 15 Mar 2021 10:01:21 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 665F464F1A; Mon, 15 Mar 2021 14:00:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816838; bh=BoFeJl2b2IAlMXRiME3GRR8ptyLtIUx1y864mnsLlQw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kQlja6sbIDefNW+pCA5teZKvWDne0zLL5jcReDFhNODVd++arvCrPjTjp8sYwrm2W WAB4LV67ITzgo27IMPFOU3CISieqYC2EursVM1xm4HxmjGsT/J/EtJ+OoNuuZBUu6x k6uOhUOUOsI/Y16+RRuuKup9NNx2vVnkRtU1PCk4= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hinko Kocevar , Hedi Berriche , Keith Busch , Bjorn Helgaas , Sean V Kelley , Sasha Levin Subject: [PATCH 5.11 155/306] PCI/ERR: Retain status from error notification Date: Mon, 15 Mar 2021 14:53:38 +0100 Message-Id: <20210315135512.875485335@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135507.611436477@linuxfoundation.org> References: <20210315135507.611436477@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Kroah-Hartman From: Keith Busch [ Upstream commit 387c72cdd7fb6bef650fb078d0f6ae9682abf631 ] Overwriting the frozen detected status with the result of the link reset loses the NEED_RESET result that drivers are depending on for error handling to report the .slot_reset() callback. Retain this status so that subsequent error handling has the correct flow. Link: https://lore.kernel.org/r/20210104230300.1277180-4-kbusch@kernel.org Reported-by: Hinko Kocevar Tested-by: Hedi Berriche Signed-off-by: Keith Busch Signed-off-by: Bjorn Helgaas Acked-by: Sean V Kelley Acked-by: Hedi Berriche Signed-off-by: Sasha Levin --- drivers/pci/pcie/err.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/pci/pcie/err.c b/drivers/pci/pcie/err.c index 510f31f0ef6d..4798bd6de97d 100644 --- a/drivers/pci/pcie/err.c +++ b/drivers/pci/pcie/err.c @@ -198,8 +198,7 @@ pci_ers_result_t pcie_do_recovery(struct pci_dev *dev, pci_dbg(bridge, "broadcast error_detected message\n"); if (state == pci_channel_io_frozen) { pci_walk_bridge(bridge, report_frozen_detected, &status); - status = reset_subordinates(bridge); - if (status != PCI_ERS_RESULT_RECOVERED) { + if (reset_subordinates(bridge) != PCI_ERS_RESULT_RECOVERED) { pci_warn(bridge, "subordinate device reset failed\n"); goto failed; } -- 2.30.1