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] [day] [month] [year] [list]
Message-ID: <2d2e64cf-2bc9-403d-98ed-c9150d1973c4@linaro.org>
Date: Tue, 1 Apr 2025 09:40:31 +0100
From: Bryan O'Donoghue <bryan.odonoghue@...aro.org>
To: Yassine Oudjana <y.oudjana@...tonmail.com>, Robert Foss
 <rfoss@...nel.org>, Todor Tomov <todor.too@...il.com>,
 Mauro Carvalho Chehab <mchehab@...nel.org>, Hans Verkuil
 <hverkuil@...all.nl>, Vladimir Zapolskiy <vladimir.zapolskiy@...aro.org>,
 Depeng Shao <quic_depengs@...cinc.com>
Cc: Yassine Oudjana <yassine.oudjana@...il.com>, linux-media@...r.kernel.org,
 linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] media: qcom: camss: csiphy-3ph: Make non-Gen2 PHY work
 again

On 01/04/2025 09:33, Yassine Oudjana wrote:
> Commit fbce0ca24c3a ("media: qcom: camss: csiphy-3ph: Move CSIPHY variables
> to data field inside csiphy struct") moved a version check that was
> previously guarded by a check for Gen2 to csiphy_init without moving the
> Gen2 check along with it. Since it was guarded by the Gen2 check, it was
> only handling versions that were Gen2 and returned -ENODEV for others since
> they shouldn't pass the Gen2 check to begin with.
> 
> Check if the CSIPHY is Gen2 before running this version check and assigning
> Gen2 lane regs array.
> 
> Fixes: fbce0ca24c3a ("media: qcom: camss: csiphy-3ph: Move CSIPHY variables to data field inside csiphy struct")
> Signed-off-by: Yassine Oudjana <y.oudjana@...tonmail.com>
> ---
>   drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c b/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c
> index a6cc957b986e..17762aee6dba 100644
> --- a/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c
> +++ b/drivers/media/platform/qcom/camss/camss-csiphy-3ph-1-0.c
> @@ -700,6 +700,9 @@ static int csiphy_init(struct csiphy_device *csiphy)
>   	csiphy->regs = regs;
>   	regs->offset = 0x800;
>   
> +	if (!csiphy_is_gen2(csiphy->camss->res->version))
> +		return 0;
> +
>   	switch (csiphy->camss->res->version) {
>   	case CAMSS_845:
>   		regs->lane_regs = &lane_regs_sdm845[0];

Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@...aro.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ