RE: [PATCH 06/11] scsi: ufs: Rework ufshcd_change_queue_depth()

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

 



> 
> Prepare for making sdev->host->can_queue less than hba->nutrs. This patch
> does not change any functionality.
ufshcd_set_queue_depth() may also needs similar adjustments?

Thanks,
Avri

> 
> Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>
> ---
>  drivers/scsi/ufs/ufshcd.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index
> 312e8a5b7733..8400d8e9a6f7 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -4955,11 +4955,7 @@ static int ufshcd_slave_alloc(struct scsi_device
> *sdev)
>   */
>  static int ufshcd_change_queue_depth(struct scsi_device *sdev, int depth)  {
> -       struct ufs_hba *hba = shost_priv(sdev->host);
> -
> -       if (depth > hba->nutrs)
> -               depth = hba->nutrs;
> -       return scsi_change_queue_depth(sdev, depth);
> +       return scsi_change_queue_depth(sdev, min(depth,
> + sdev->host->can_queue));
>  }
> 
>  static void ufshcd_hpb_destroy(struct ufs_hba *hba, struct scsi_device *sdev)




[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