From patchwork Wed Aug 2 19:15:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sinan Kaya X-Patchwork-Id: 9877435 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 0483B602BC for ; Wed, 2 Aug 2017 19:15:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E960628827 for ; Wed, 2 Aug 2017 19:15:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DDBA92882B; Wed, 2 Aug 2017 19:15:43 +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 7388528827 for ; Wed, 2 Aug 2017 19:15:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752449AbdHBTP3 (ORCPT ); Wed, 2 Aug 2017 15:15:29 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:40864 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751345AbdHBTP1 (ORCPT ); Wed, 2 Aug 2017 15:15:27 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 7A35A60B74; Wed, 2 Aug 2017 19:15:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1501701326; bh=ExzbMbKokTVOUkWixWTa8w95ALuUSueQ6H8DR7SRD00=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bCOtYo8DpEr8DgWhacYc4E0MzjrPiBL2jltTThWmGICjbJOlDYtAJUkhOltWyCiXO Dq92WLAgOS8yPfO+eaVTiczL9pl3ZanQg/4MkwtyfaJTjWcpxHHroxAk2hXzm4QRqH n3vy8rVj/gxTpLBkTtxStRAlH++g9ihsEtqa4E04= 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 1BCEE60AFB; Wed, 2 Aug 2017 19:15:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1501701325; bh=ExzbMbKokTVOUkWixWTa8w95ALuUSueQ6H8DR7SRD00=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cxKzTreTPBrK8BMwTaLxz9FIvpUNqmhprr6UPw5ZQtSDsHb94F8YYXKiLA9crFSxr m58rlnbWDhmXtAi5PLtACnRU+TvoCa1nKkLCIYp1hAJEgJh5iO/T/NOk15Zs3DIsHY szPmz/hv/2N1zO5E7zvp8fMheChzKWxIuuTBruZw= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 1BCEE60AFB 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 V7 3/3] PCI: display not responding message while device is unreachable Date: Wed, 2 Aug 2017 15:15:17 -0400 Message-Id: <1501701317-32249-3-git-send-email-okaya@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1501701317-32249-1-git-send-email-okaya@codeaurora.org> References: <1501701317-32249-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;