summaryrefslogtreecommitdiff
path: root/include/ufs/ufs.h
diff options
context:
space:
mode:
authorAsutosh Das <quic_asutoshd@quicinc.com>2023-01-13 12:48:43 -0800
committerMartin K. Petersen <martin.petersen@oracle.com>2023-01-13 21:03:37 -0500
commit7224c806876e46cfaf46b1c90da8d5c2e1f2108f (patch)
treef70fed34f15b3333b9a4d069b3bb54ea0ee46e0b /include/ufs/ufs.h
parentc263b4ef737e622e2a908c58ca4bb68a89376387 (diff)
scsi: ufs: core: mcq: Calculate queue depth
The UFS device defines the supported queuedepth by bqueuedepth which has a max value of 256. The HC defines MAC (Max Active Commands) that defines the max number of commands that in flight to the UFS device. Calculate and configure the nutrs based on both these values. Co-developed-by: Can Guo <quic_cang@quicinc.com> Signed-off-by: Can Guo <quic_cang@quicinc.com> Signed-off-by: Asutosh Das <quic_asutoshd@quicinc.com> Reviewed-by: Manivannan Sadhasivam <mani@kernel.org> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Stanley Chu <stanley.chu@mediatek.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/ufs/ufs.h')
-rw-r--r--include/ufs/ufs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/ufs/ufs.h b/include/ufs/ufs.h
index bea7b2086a4a..4e8d6240e589 100644
--- a/include/ufs/ufs.h
+++ b/include/ufs/ufs.h
@@ -617,6 +617,8 @@ struct ufs_dev_info {
u8 *model;
u16 wspecversion;
u32 clk_gating_wait_us;
+ /* Stores the depth of queue in UFS device */
+ u8 bqueuedepth;
/* UFS HPB related flag */
bool hpb_enabled;