From patchwork Mon Aug 7 02:09:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sinan Kaya X-Patchwork-Id: 9884279 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 8CA4C60364 for ; Mon, 7 Aug 2017 02:10:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 778272861B for ; Mon, 7 Aug 2017 02:10:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6C82B28620; Mon, 7 Aug 2017 02:10:28 +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 03C1E2861B for ; Mon, 7 Aug 2017 02:10:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751868AbdHGCKQ (ORCPT ); Sun, 6 Aug 2017 22:10:16 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:46022 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751411AbdHGCKC (ORCPT ); Sun, 6 Aug 2017 22:10:02 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 85D7860350; Mon, 7 Aug 2017 02:10:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1502071801; bh=ExzbMbKokTVOUkWixWTa8w95ALuUSueQ6H8DR7SRD00=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jUeuwxpOHykg73HDbiGApJvzEMd3CMGd98YpdWsdhvXGGUsBrFUbS1nhDB4uejZeq CVnbfWQ+pTjyN3YSQsVJfqQCHvsixGz3jL/Tj5rvsEQXXDN73xde6beUisVFSKkSid WuRNRN6EqgNmH/qlq4W83pj5LDF39rXBmCklbDas= 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 112D360313; Mon, 7 Aug 2017 02:09:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1502071800; bh=ExzbMbKokTVOUkWixWTa8w95ALuUSueQ6H8DR7SRD00=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BkExcOAf9Y1iIGsJvdnY3B+/WjKGJ5/a8CGTM11k4ZpaLqXUdTCT9bWDPiYdkMi4G fRJ3EFKohO3LBrZ+ZZpE+xF24MUJdccwWGheiY+fC/zAcmf0frX6tsQX+FNw4hjCgX N+YrymFJDA058YTX8+FHfUn4WkyqX7w2o7nCBW1c= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 112D360313 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 V8 2/2] PCI: display not responding message while device is unreachable Date: Sun, 6 Aug 2017 22:09:52 -0400 Message-Id: <1502071792-15263-2-git-send-email-okaya@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1502071792-15263-1-git-send-email-okaya@codeaurora.org> References: <1502071792-15263-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;