lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 25 Oct 2017 13:51:53 +0530
From:   Faiz Abbas <faiz_abbas@...com>
To:     Bjorn Helgaas <helgaas@...nel.org>
CC:     <kishon@...com>, <bhelgaas@...gle.com>,
        <linux-omap@...r.kernel.org>, <linux-pci@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] dwc: dra7xx: Print link state to console for debug

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 <faiz_abbas@...com>
> 
> 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ