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: <66d8938c-3bf8-49c3-b42a-e2c32f1d1338@acm.org>
Date: Tue, 8 Oct 2024 10:42:25 -0700
From: Bart Van Assche <bvanassche@....org>
To: SEO HOYOUNG <hy50.seo@...sung.com>, linux-scsi@...r.kernel.org,
 linux-kernel@...r.kernel.org, alim.akhtar@...sung.com, avri.altman@....com,
 jejb@...ux.ibm.com, martin.petersen@...cle.com, beanhuo@...ron.com,
 kwangwon.min@...sung.com, kwmad.kim@...sung.com, sh425.lee@...sung.com,
 quic_nguyenb@...cinc.com, cpgs@...sung.com, h10.kim@...sung.com,
 junwoo80.lee@...sung.com, wkon.kim@...sung.com
Subject: Re: [PATCH v2] scsi: ufs: core: check asymmetric connected lanes

On 10/7/24 11:38 PM, SEO HOYOUNG wrote:
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> index 24a32e2fd75e..1381eb7d506a 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -4540,6 +4540,14 @@ static int ufshcd_get_max_pwr_mode(struct ufs_hba *hba)
>   		return -EINVAL;
>   	}
>   
> +	if (pwr_info->lane_rx != pwr_info->lane_tx) {
> +		dev_err(hba->dev, "%s: asymmetric connected lanes. rx=%d, tx=%d\n",
> +			__func__,
> +				pwr_info->lane_rx,
> +				pwr_info->lane_tx);
> +		return -EINVAL;
> +	}
> +
>   	/*
>   	 * First, get the maximum gears of HS speed.
>   	 * If a zero value, it means there is no HSGEAR capability.
> @@ -8579,7 +8587,8 @@ static int ufshcd_device_params_init(struct ufs_hba *hba)
>   		hba->dev_info.f_power_on_wp_en = flag;
>   
>   	/* Probe maximum power mode co-supported by both UFS host and device */
> -	if (ufshcd_get_max_pwr_mode(hba))
> +	ret = ufshcd_get_max_pwr_mode(hba);
> +	if (ret)
>   		dev_err(hba->dev,
>   			"%s: Failed getting max supported power mode\n",
>   			__func__);

I see two independent changes in the above patch. Should this patch
perhaps be split into two patches?

Thanks,

Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ