From patchwork Fri Dec 13 11:44:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yicong Yang X-Patchwork-Id: 1209097 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-pci-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=hisilicon.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 47Z87G1NkRz9sNH for ; Fri, 13 Dec 2019 22:48:10 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726718AbfLMLsJ (ORCPT ); Fri, 13 Dec 2019 06:48:09 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:40352 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725980AbfLMLsI (ORCPT ); Fri, 13 Dec 2019 06:48:08 -0500 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id BEF87B0C00308F293E16; Fri, 13 Dec 2019 19:48:06 +0800 (CST) Received: from localhost.localdomain (10.67.165.24) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.439.0; Fri, 13 Dec 2019 19:48:05 +0800 From: Yicong Yang To: , Subject: [Patch]PCI:AER:Notify which device has no error_detected callback Date: Fri, 13 Dec 2019 19:44:34 +0800 Message-ID: <1576237474-32021-1-git-send-email-yangyicong@hisilicon.com> X-Mailer: git-send-email 2.8.1 MIME-Version: 1.0 X-Originating-IP: [10.67.165.24] X-CFilter-Loop: Reflected Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org The PCI error recovery will fail if any device under root port doesn't have an error_detected callback. Currently only failure result is printed, which is not enough to determine which device leads to the failure and the detailed failure reason. Add print information if certain device under root port has no error_detected callback. Signed-off-by: Yicong Yang --- drivers/pci/pcie/err.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.8.1 diff --git a/drivers/pci/pcie/err.c b/drivers/pci/pcie/err.c index b0e6048..ec37c33 100644 --- a/drivers/pci/pcie/err.c +++ b/drivers/pci/pcie/err.c @@ -61,8 +61,10 @@ static int report_error_detected(struct pci_dev *dev, * error callbacks of "any" device in the subtree, and will * exit in the disconnected error state. */ - if (dev->hdr_type != PCI_HEADER_TYPE_BRIDGE) + if (dev->hdr_type != PCI_HEADER_TYPE_BRIDGE) { vote = PCI_ERS_RESULT_NO_AER_DRIVER; + pci_info(dev, "AER: Device has no error_detected callback\n"); + } else vote = PCI_ERS_RESULT_NONE; } else {