Re: [PATCH v4 2/3] scsi: ufs: core: Cleanup ufshcd_slave_alloc()

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

 



On Mon, 2022-10-24 at 16:25 -0700, Bart Van Assche wrote:
> On 10/22/22 14:36, Bean Huo wrote:
> > +       u8 lun_qdepth = hba->nutrs;
> 
> How about changing this into hba->nutrs - 1 since one tag is reserved
> ('reserved_slot')?
> 
> Thanks,


Bart,

If having a look at 

scsi_change_queue_depth() {

  depth = min_t(int, depth, scsi_device_max_queue_depth(sdev));
	...
}

so the finnal depth per Lu is still 31.  I did test and debug, this is
true.



+set_qdepth:
+	/*
+	 * For WLUNs that don't support unit descriptor, queue depth
is set to 1. For LUs whose
+	 * bLUQueueDepth == 0, the queue depth is set to a maximum
value that host can queue.
+	 */
+	dev_dbg(hba->dev, "Set LU %x queue depth %d\n", lun,
lun_qdepth);
+	scsi_change_queue_depth(sdev, lun_qdepth); 



so lun_qdepth is 32, but scsi_change_queue_depth() will return 31,
since we set sdev->host->can_queue is 31.

If you need me to change the patch, let me know, it is no problem for
me to change to: 


u8 lun_qdepth = hba->nutrs - UFSHCD_NUM_RESERVED.

or

u8 lun_qdepth = UFSHCD_CMD_PER_LUN.


Kind regards,
Bean






[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