From patchwork Fri Aug 11 16:56:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sinan Kaya X-Patchwork-Id: 9896347 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 374E060236 for ; Fri, 11 Aug 2017 16:57:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 27ED2285B0 for ; Fri, 11 Aug 2017 16:57:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1CDB028C4C; Fri, 11 Aug 2017 16:57:14 +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=-2.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW 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 A842528C53 for ; Fri, 11 Aug 2017 16:57:13 +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=Zy0ElO+hFsY3GDcqaqEwpzvl6wy3E1Frw8O7Nn56o0s=; b=fjQJm4ZDYh1kjYzLKXQVXgH4aI Y6CMk1cVy4rm1gjJtS+29tjJ413nTS7FPXtcHGSH5yOmZaq51EasDCa2BfNWtdxkJXFR9yYx2dgVN zdnKef4MmC8LOwp7dNgU9FjTB+QTLr69RjK6/w75bFrEq+7h7Ghg+uajCud0CvekwZXWmKUIYG/P4 SSZd5XrS3n7Kd0zmSMID4GxTpF6ghxEFEZMSyIKsTbunKOLIhXZE3djO2Arhdu8OYLupqcLHc5SUa r0EYJWkuizjiR0nZJGPH9QcsDLyPqo4/l/EC4iV9JGmYBEw4beELKKMPQkpor1gueS+3z007ESnTk d7/bD9tA==; 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 1dgDFE-00034D-RI; Fri, 11 Aug 2017 16:57:08 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dgDFA-00030b-0i for linux-arm-kernel@lists.infradead.org; Fri, 11 Aug 2017 16:57:05 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 9ACBC603D2; Fri, 11 Aug 2017 16:56:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1502470606; bh=su7nVKgaDxBU3flFXCFxvXXr2eZQ6SK3xFnGcSFtp3o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Hb3NEQF3B/6IqtEG8Uz3zgCu59JrrHW9SQpxB8vgvii9E/+5AidhFt3zROn6ErHLz PrwU0BT1BwH5K6XrIc1UhHXUqsKYnJUfUMKweYkmWuYzPcs7cQsw+EsghqVovArSq8 V0GhixNmnGT8DjbWoamdCwfgDA+PBuRnuxN7ZBF0= 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 33D97602BE; Fri, 11 Aug 2017 16:56:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1502470606; bh=su7nVKgaDxBU3flFXCFxvXXr2eZQ6SK3xFnGcSFtp3o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Hb3NEQF3B/6IqtEG8Uz3zgCu59JrrHW9SQpxB8vgvii9E/+5AidhFt3zROn6ErHLz PrwU0BT1BwH5K6XrIc1UhHXUqsKYnJUfUMKweYkmWuYzPcs7cQsw+EsghqVovArSq8 V0GhixNmnGT8DjbWoamdCwfgDA+PBuRnuxN7ZBF0= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 33D97602BE 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 V10 3/3] PCI: display not responding message while device is unreachable Date: Fri, 11 Aug 2017 12:56:36 -0400 Message-Id: <1502470596-4112-3-git-send-email-okaya@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1502470596-4112-1-git-send-email-okaya@codeaurora.org> References: <1502470596-4112-1-git-send-email-okaya@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170811_095704_177359_CDACC34A X-CRM114-Status: UNSURE ( 9.73 ) 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_wait_crs() 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 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index b1cb7bd..2f4cf7d 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1839,11 +1839,17 @@ bool pci_bus_wait_crs(struct pci_bus *bus, int devfn, u32 *l, int crs_timeout) 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 since %dms still polling\n", + pci_domain_nr(bus), bus->number, + PCI_SLOT(devfn), PCI_FUNC(devfn), delay); + /* 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 %dms timeout reached\n", pci_domain_nr(bus), bus->number, PCI_SLOT(devfn), - PCI_FUNC(devfn)); + PCI_FUNC(devfn), crs_timeout); return false; } } while ((*l & 0xffff) == 0x0001);