Re: [PATCH v2 6/9] scsi: ufs: Delete is_init_prefetch from struct ufs_hba

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2020-01-16 13:59, Bean Huo wrote:
> From: Bean Huo <beanhuo@xxxxxxxxxx>
> 
> Without variable is_init_prefetch, the current logic can guarantee
> ufshcd_init_icc_levels() will execute only once, delete it now.
> 
> Signed-off-by: Bean Huo <beanhuo@xxxxxxxxxx>
> ---
>  drivers/scsi/ufs/ufshcd.c | 5 +----
>  drivers/scsi/ufs/ufshcd.h | 2 --
>  2 files changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index 44b7c0a44b8d..31b6e2a7c166 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -6967,8 +6967,7 @@ static int ufs_lu_add(struct ufs_hba *hba)
>  {
>  	int ret;
>  
> -	if (!hba->is_init_prefetch)
> -		ufshcd_init_icc_levels(hba);
> +	ufshcd_init_icc_levels(hba);
>  
>  	/* Add required well known logical units to scsi mid layer */
>  	ret = ufshcd_scsi_add_wlus(hba);
> @@ -6994,8 +6993,6 @@ static int ufs_lu_add(struct ufs_hba *hba)
>  	scsi_scan_host(hba->host);
>  	pm_runtime_put_sync(hba->dev);
>  
> -	if (!hba->is_init_prefetch)
> -		hba->is_init_prefetch = true;
>  out:
>  	return ret;
>  }

The current code calls ufshcd_init_icc_levels() once per HBA. This patch
changes that into one call per LUN. It seems like the patch description
contradicts the code I see above.

Thanks,

Bart.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux