Received: by 10.223.164.221 with SMTP id h29csp1505013wrb; Wed, 25 Oct 2017 01:22:41 -0700 (PDT) X-Google-Smtp-Source: ABhQp+ROivoUn5EHvX5tF4OETO2yd1oZn5h70T4OQexMUPxZ+UWARm59GoTwqD1fwLbhiL8wKiI/ X-Received: by 10.98.204.93 with SMTP id a90mr1414438pfg.51.1508919761099; Wed, 25 Oct 2017 01:22:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508919761; cv=none; d=google.com; s=arc-20160816; b=Mz2KUk/Q7sKkUB646yrzhTHVeqsIlvG9x2HVSSVHm7164LsiFrj7wM7aunrtP1FHQL kdiom4p0/HYCBJOkz+qhuOXfinxRXTMA63DY48A/+x7d5/CQBimWCvR++uqdFRumaHSn jQ4I7VkKOiazvk4L+w6ajuvSFmSEpIawWoCygMN2PAa+HarsxeGKmhtk0JdqsYZunC/q tm4LZfP3P6lZ8UgIW/XuIp6LJA/0xY3r8MZr6hEz1KuPE3EHc5p8TM4OhPyOv2Sy0c9o 1Ppbgl2C47i5puFFgbiVOopKOqww0UZOYgf2ys0t6fVG0waMnKnw5aW47/YoQ31dDK+R Y99g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=r2OQ++PU8yp/VXcNcnYicmLjJ3gWGbaSIDQH2mBHczY=; b=O6E2dyhZZDGDpqR6KZUBWMXME0M/o13ROAyxo9W6FqelgfLqi4xn7uBtMzepPhOtGP GLSYjdiPYKnFEhmT3ILNnV7eUhmyTgc3LzOUMXXr7OX7bPs/YOzovdvZi0Ng+JP2YPoi aQG89wkLVlJ1/wpEtF8XBGWqaMhXiYaSlyM/CgIir8Q0GcsvgDF4A0X7pRIT+LHhdDiM Mjv88l771PeIH3/YUkJ9P2uElMKQXlzkukbdcp9EIZwfd0K1F7t6/p04zhatVB3ETqwx Cv/rGj7cNkVKB9bRjLsNMf/JxtgOyf/AGFIxQ/VVPuzG7aUJoErIioFGeMc9ejhdEZO7 HAhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=NYKzqusb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c11si1517820pga.244.2017.10.25.01.22.27; Wed, 25 Oct 2017 01:22:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=NYKzqusb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932280AbdJYIVg (ORCPT + 99 others); Wed, 25 Oct 2017 04:21:36 -0400 Received: from lelnx193.ext.ti.com ([198.47.27.77]:50589 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932178AbdJYIVb (ORCPT ); Wed, 25 Oct 2017 04:21:31 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id v9P8LSB8008345; Wed, 25 Oct 2017 03:21:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1508919688; bh=JfEdHZWxpFtBbG9xS2RCwZhf1Rc1QaKfA2pMqEEHU8g=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=NYKzqusbkRhaOzGXJUwmFiloE5CUu0r2hGlrZP7RCgN1Y4zUe1t5E+ZRv5peFAQeC oHsgxKRbOF9B4UBZyuMcB7Lq6YzNnQZdQsryKC6J5VrzktPfBLskTsempWZSAzDcOl mIyNqoc7o3DmANLmhX0a8YQniViJ6Uci7YKcWoio= Received: from DFLE104.ent.ti.com (dfle104.ent.ti.com [10.64.6.25]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v9P8LSIN023737; Wed, 25 Oct 2017 03:21:28 -0500 Received: from DFLE103.ent.ti.com (10.64.6.24) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Wed, 25 Oct 2017 03:21:28 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend Transport; Wed, 25 Oct 2017 03:21:28 -0500 Received: from [172.24.190.215] (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id v9P8LQqQ008224; Wed, 25 Oct 2017 03:21:26 -0500 Subject: Re: [PATCH v2] dwc: dra7xx: Print link state to console for debug To: Bjorn Helgaas CC: , , , , References: <1508417009-30869-1-git-send-email-faiz_abbas@ti.com> <20171024195950.GD21840@bhelgaas-glaptop.roam.corp.google.com> From: Faiz Abbas Message-ID: Date: Wed, 25 Oct 2017 13:51:53 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171024195950.GD21840@bhelgaas-glaptop.roam.corp.google.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Bjorn, On Wednesday 25 October 2017 01:29 AM, Bjorn Helgaas wrote: > On Thu, Oct 19, 2017 at 06:13:29PM +0530, Faiz Abbas wrote: >> Enable support for printing the LTSSM link state for debugging PCI >> when link is down. >> >> Signed-off-by: Faiz Abbas > > Applied with Kishon's ack to pci/host-dra7xx for v4.15, thanks! > > I tweaked the "link up" testing as follows (what I suggested before): > > > @@ -118,8 +157,18 @@ static int dra7xx_pcie_link_up(struct dw_pcie *pci) > { > struct dra7xx_pcie *dra7xx = to_dra7xx_pcie(pci); > u32 reg = dra7xx_pcie_readl(dra7xx, PCIECTRL_DRA7XX_CONF_PHY_CS); > + int link_up = !!(reg & LINK_UP); > + u32 cmd_reg; > + u32 ltssm_state; > + > + if (!link_up) { > + cmd_reg = dra7xx_pcie_readl(dra7xx, > + PCIECTRL_DRA7XX_CONF_DEVICE_CMD); > + ltssm_state = (cmd_reg & GENMASK(7, 2)) >> 2; > + dev_dbg(pci->dev, "Link state: %s\n", state[ltssm_state]); > + } > > - return !!(reg & LINK_UP); > + return link_up; > } > > static void dra7xx_pcie_stop_link(struct dw_pcie *pci) > I wanted to send another version with David's suggestions included. Please don't merge. Thanks, Faiz From 1582170351009398083@xxx Tue Oct 24 20:00:27 +0000 2017 X-GM-THRID: 1581691652519634530 X-Gmail-Labels: Inbox,Category Forums