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: <oqqpypb7qkcjrztjpqkkqlg6m55fm6hjhts7plytr27hrdmvcp@og7gwdajvsje>
Date: Wed, 3 Apr 2024 21:48:56 +0300
From: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
To: Kuogee Hsieh <quic_khsieh@...cinc.com>
Cc: dri-devel@...ts.freedesktop.org, robdclark@...il.com, sean@...rly.run, 
	swboyd@...omium.org, dianders@...omium.org, vkoul@...nel.org, daniel@...ll.ch, 
	airlied@...il.com, agross@...nel.org, abel.vesa@...aro.org, andersson@...nel.org, 
	quic_abhinavk@...cinc.com, quic_jesszhan@...cinc.com, quic_sbillaka@...cinc.com, 
	marijn.suijten@...ainline.org, freedreno@...ts.freedesktop.org, linux-arm-msm@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] phy/qcom-qmp-combo: propagate correct return value at
 phy_power_on()

On Wed, Apr 03, 2024 at 10:22:37AM -0700, Kuogee Hsieh wrote:
> Dmitry,
> 
> Any more comments?
> 
> On 3/29/2024 12:50 PM, Kuogee Hsieh wrote:
> > Currently qmp_combo_dp_power_on() always return 0 in regardless of
> > return value of cfg->configure_dp_phy(). This patch propagate
> > return value of cfg->configure_dp_phy() all the way back to caller.
> > 
> > Changes in V3:
> > -- add v2 changes log
> > 
> > Changes in V2:
> > -- add Fixes tag
> > -- add dev_err() to qmp_v3_configure_dp_phy()
> > -- add dev_err() to qmp_v4_configure_dp_phy()
> > 
> > Fixes: 52e013d0bffa ("phy: qcom-qmp: Add support for DP in USB3+DP combo phy")
> > Signed-off-by: Kuogee Hsieh <quic_khsieh@...cinc.com>
> > Reviewed-by: Abhinav Kumar <quic_abhinavk@...cinc.com>
> > ---
> >   drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 13 +++++++++----
> >   1 file changed, 9 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> > index 36632fa..513d99d 100644
> > --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> > +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> > @@ -2343,8 +2343,10 @@ static int qmp_v3_configure_dp_phy(struct qmp_combo *qmp)
> >   	writel(0x05, qmp->dp_dp_phy + QSERDES_V3_DP_PHY_TX2_TX3_LANE_CTL);
> >   	ret = qmp_combo_configure_dp_clocks(qmp);
> > -	if (ret)
> > +	if (ret) {
> > +		dev_err(qmp->dev, "dp phy configure failed, err=%d\n", ret);
> >   		return ret;
> > +	}

dev_err() calls are not related to the fix itself. Please split them to
a separate patch.

> >   	writel(0x04, qmp->dp_dp_phy + QSERDES_DP_PHY_AUX_CFG2);
> >   	writel(0x01, qmp->dp_dp_phy + QSERDES_DP_PHY_CFG);
> > @@ -2519,8 +2521,10 @@ static int qmp_v4_configure_dp_phy(struct qmp_combo *qmp)
> >   	int ret;
> >   	ret = qmp_v456_configure_dp_phy(qmp);
> > -	if (ret < 0)
> > +	if (ret < 0) {
> > +		dev_err(qmp->dev, "dp phy configure failed, err=%d\n", ret);
> >   		return ret;
> > +	}
> >   	/*
> >   	 * At least for 7nm DP PHY this has to be done after enabling link
> > @@ -2754,6 +2758,7 @@ static int qmp_combo_dp_power_on(struct phy *phy)
> >   	const struct qmp_phy_cfg *cfg = qmp->cfg;
> >   	void __iomem *tx = qmp->dp_tx;
> >   	void __iomem *tx2 = qmp->dp_tx2;
> > +	int ret;
> >   	mutex_lock(&qmp->phy_mutex);
> > @@ -2766,11 +2771,11 @@ static int qmp_combo_dp_power_on(struct phy *phy)
> >   	cfg->configure_dp_tx(qmp);
> >   	/* Configure link rate, swing, etc. */
> > -	cfg->configure_dp_phy(qmp);
> > +	ret = cfg->configure_dp_phy(qmp);
> >   	mutex_unlock(&qmp->phy_mutex);
> > -	return 0;
> > +	return ret;
> >   }
> >   static int qmp_combo_dp_power_off(struct phy *phy)

-- 
With best wishes
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ