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: 9877439 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 B1ADF602BC for ; Wed, 2 Aug 2017 19:15:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A15A328827 for ; Wed, 2 Aug 2017 19:15:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 961932882B; Wed, 2 Aug 2017 19:15:53 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4A45128827 for ; Wed, 2 Aug 2017 19:15:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=4/39SbCb4G91G+7GqhcEdjfQH5eI7YF+VhlbdV04JUk=; b=ObWY+Mm0Id5amoe8wo9mdXBUoz UU7p03kMR33Du3W0A3A0eNbS1R2sf4l8d32at6JW29TKGrAajyAVMBHqUcUU7Kj1tgTxdeyMVAxfz Z0d89N7ix/RxHMzwBckeMDSQJarpEPafTyG/P32FR1KcbBaVcRfkCciL9Wrf9j8u/KEYOmVXP8mpr TBYCGQMFdoFc/m6Y8N1yjNb3oSTup0PPBj+02sz0Ualyn2yXvzqEopRMhmG4TQvELhwY37vvPZMOS Hy4PV0OO+CvhzajZg7GzhxpEKxb11XA/N19QLBzuUPnBr43qkpuvyi/mNkv3hS/UzudHOEiP9Qduv YdHmsIbQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dcz7U-0004qR-DD; Wed, 02 Aug 2017 19:15:48 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dcz7Q-0004nH-R7 for linux-arm-kernel@lists.infradead.org; Wed, 02 Aug 2017 19:15:47 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 5F97260B7E; 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170802_121544_956233_5860E661 X-CRM114-Status: UNSURE ( 9.50 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sinan Kaya , linux-arm-msm@vger.kernel.org, Bjorn Helgaas , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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;