From patchwork Wed Aug 9 00:57:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sinan Kaya X-Patchwork-Id: 9889369 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7221E601EB for ; Wed, 9 Aug 2017 00:58:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 64398289B5 for ; Wed, 9 Aug 2017 00:58:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 590A0289E4; Wed, 9 Aug 2017 00:58:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE5BC289B5 for ; Wed, 9 Aug 2017 00:58:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751989AbdHIA5s (ORCPT ); Tue, 8 Aug 2017 20:57:48 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:51130 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752455AbdHIA5d (ORCPT ); Tue, 8 Aug 2017 20:57:33 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 3CCCF603D2; Wed, 9 Aug 2017 00:57:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1502240253; bh=ExzbMbKokTVOUkWixWTa8w95ALuUSueQ6H8DR7SRD00=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NsNvBPx24NgPcQItGQgwE73XJZUBLHgtFWjR4K7v+Ym7LNpL0TE6fCOc9O3OZkY1t BqENXjwSe4RBmxUtD+kuGWfDD+RzWCIpqbzEIul9N/FNID+yFdj24DVT/Rymn+aVAx 7PTSE5K6B4FZFYw0WaaUhNacbc1AWsWUVwqMtaOY= Received: from drakthul.qualcomm.com (global_nat1_iad_fw.qualcomm.com [129.46.232.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: okaya@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id D84D3603D2; Wed, 9 Aug 2017 00:57:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1502240252; bh=ExzbMbKokTVOUkWixWTa8w95ALuUSueQ6H8DR7SRD00=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KdakrJ3YPAnHDgbO627gntuCiE17zZY8PAthUFa3BzimUR9ZEapCMMgaMDStsM9Km WUKrlrO8pCrbxO14lofmAEnlJSwU2jSEc19B1IP1yytSgrmuJewkDTLVAmPh6wBwAT SKPevfVP68paYyMHAlHyJJxzXgEahQsZ1PUK7hTE= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org D84D3603D2 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=okaya@codeaurora.org From: Sinan Kaya To: linux-pci@vger.kernel.org, timur@codeaurora.org, alex.williamson@redhat.com Cc: linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sinan Kaya , Bjorn Helgaas , linux-kernel@vger.kernel.org Subject: [PATCH V9 2/2] PCI: display not responding message while device is unreachable Date: Tue, 8 Aug 2017 20:57:25 -0400 Message-Id: <1502240245-11714-2-git-send-email-okaya@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1502240245-11714-1-git-send-email-okaya@codeaurora.org> References: <1502240245-11714-1-git-send-email-okaya@codeaurora.org> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Adding a print statement into pci_bus_read_dev_vendor_id() so that user observes the progress of device polling instead of silently waiting for timeout to be reached. Signed-off-by: Sinan Kaya --- drivers/pci/probe.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index c31310d..6e4a846 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1851,9 +1851,15 @@ bool pci_bus_read_dev_vendor_id(struct pci_bus *bus, int devfn, u32 *l, delay *= 2; if (pci_bus_read_config_dword(bus, devfn, PCI_VENDOR_ID, l)) return false; + + if (delay > 1000) + pr_info("pci %04x:%02x:%02x.%d: not responding\n", + pci_domain_nr(bus), bus->number, + PCI_SLOT(devfn), PCI_FUNC(devfn)); + /* Card hasn't responded in 60 seconds? Must be stuck. */ if (delay > crs_timeout) { - printk(KERN_WARNING "pci %04x:%02x:%02x.%d: not responding\n", + pr_warn("pci %04x:%02x:%02x.%d: not responding timeout reached\n", pci_domain_nr(bus), bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); return false;