diff options
author | Asutosh Das <quic_asutoshd@quicinc.com> | 2023-01-13 12:48:44 -0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2023-01-13 21:03:37 -0500 |
commit | 4682abfae2eb3a1c138130cfd6d71411d81aaa00 (patch) | |
tree | 11e165aa78c758c281395c79e04e645f2f60bdbf /drivers/ufs/core/ufshcd-priv.h | |
parent | 7224c806876e46cfaf46b1c90da8d5c2e1f2108f (diff) | |
download | linux-4682abfae2eb3a1c138130cfd6d71411d81aaa00.tar.gz linux-4682abfae2eb3a1c138130cfd6d71411d81aaa00.tar.bz2 linux-4682abfae2eb3a1c138130cfd6d71411d81aaa00.zip |
scsi: ufs: core: mcq: Allocate memory for MCQ mode
To read the bqueuedepth, the device descriptor is fetched in Single
Doorbell Mode. This allocated memory may not be enough for MCQ mode because
the number of tags supported in MCQ mode may be larger than in SDB mode.
Hence, release the memory allocated in SDB mode and allocate memory for MCQ
mode operation. Define the UFS hardware queue and Completion Queue Entry.
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>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/ufs/core/ufshcd-priv.h')
-rw-r--r-- | drivers/ufs/core/ufshcd-priv.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/ufs/core/ufshcd-priv.h b/drivers/ufs/core/ufshcd-priv.h index 11076c3111c5..667e601a480f 100644 --- a/drivers/ufs/core/ufshcd-priv.h +++ b/drivers/ufs/core/ufshcd-priv.h @@ -63,6 +63,7 @@ int ufshcd_query_flag(struct ufs_hba *hba, enum query_opcode opcode, void ufshcd_auto_hibern8_update(struct ufs_hba *hba, u32 ahit); int ufshcd_mcq_init(struct ufs_hba *hba); int ufshcd_mcq_decide_queue_depth(struct ufs_hba *hba); +int ufshcd_mcq_memory_alloc(struct ufs_hba *hba); #define SD_ASCII_STD true #define SD_RAW false |