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]
Message-ID: <24ec95cd-aa7c-6262-4065-7281788ab684@ti.com>
Date:   Thu, 13 May 2021 13:24:00 +0530
From:   Kishon Vijay Abraham I <kishon@...com>
To:     Swapnil Jakhade <sjakhade@...ence.com>, <vkoul@...nel.org>,
        <p.zabel@...gutronix.de>, <linux-phy@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>
CC:     <mparab@...ence.com>, <lokeshvutla@...com>
Subject: Re: [PATCH 13/14] phy: cadence-torrent: Add debug information for PHY
 configuration

Hi Swapnil,

On 09/04/21 11:04 am, Swapnil Jakhade wrote:
> Display information in probe regarding PHY configuration parameters like
> single link or multilink protocol information along with number of lanes
> used for each protocol link.
> 
> Signed-off-by: Swapnil Jakhade <sjakhade@...ence.com>
> ---
>  drivers/phy/cadence/phy-cadence-torrent.c | 32 +++++++++++++++++++++--
>  1 file changed, 30 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/phy/cadence/phy-cadence-torrent.c b/drivers/phy/cadence/phy-cadence-torrent.c
> index bf37569c6c51..39145e56e061 100644
> --- a/drivers/phy/cadence/phy-cadence-torrent.c
> +++ b/drivers/phy/cadence/phy-cadence-torrent.c
> @@ -574,6 +574,24 @@ static const struct coefficients vltg_coeff[4][4] = {
>  	}
>  };
>  
> +static const char *cdns_torrent_get_phy_type(enum cdns_torrent_phy_type phy_type)
> +{
> +	switch (phy_type) {
> +	case TYPE_DP:
> +		return "DisplayPort";
> +	case TYPE_PCIE:
> +		return "PCIe";
> +	case TYPE_SGMII:
> +		return "SGMII";
> +	case TYPE_QSGMII:
> +		return "QSGMII";
> +	case TYPE_USB:
> +		return "USB";
> +	default:
> +		return "None";
> +	}
> +}
> +
>  /*
>   * Set registers responsible for enabling and configuring SSC, with second and
>   * third register values provided by parameters.
> @@ -2504,8 +2522,7 @@ static int cdns_torrent_phy_probe(struct platform_device *pdev)
>  				init_dp_regmap++;
>  			}
>  
> -			dev_info(dev, "%d lanes, max bit rate %d.%03d Gbps\n",
> -				 cdns_phy->phys[node].num_lanes,
> +			dev_info(dev, "DP max bit rate %d.%03d Gbps\n",
>  				 cdns_phy->max_bit_rate / 1000,
>  				 cdns_phy->max_bit_rate % 1000);
>  
> @@ -2539,6 +2556,17 @@ static int cdns_torrent_phy_probe(struct platform_device *pdev)
>  		goto put_lnk_rst;
>  	}
>  
> +	if (cdns_phy->nsubnodes > 1)
> +		dev_info(dev, "%s (%d lanes) & %s (%d lanes)",
> +			 cdns_torrent_get_phy_type(cdns_phy->phys[0].phy_type),
> +			 cdns_phy->phys[0].num_lanes,
> +			 cdns_torrent_get_phy_type(cdns_phy->phys[1].phy_type),
> +			 cdns_phy->phys[1].num_lanes);
> +	else
> +		dev_info(dev, "%s (%d lanes)",
> +			 cdns_torrent_get_phy_type(cdns_phy->phys[0].phy_type),
> +			 cdns_phy->phys[0].num_lanes);

Make all of this dev_dbg() or dev_vdbg() and avoid noisy boot log.

Thanks
Kishon

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ