summaryrefslogtreecommitdiff
path: root/include/ufs
diff options
context:
space:
mode:
authorMinwoo Im <minwoo.im@samsung.com>2024-05-20 07:14:56 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-08-03 08:53:56 +0200
commit993cace4f39f6f210f8fdace3c60a4b6a0e6f47a (patch)
treedd6084bb88e253d8341265f8e44a7a612b58ed46 /include/ufs
parent526a877c6273d4cd0d0aede84c1d620479764b1c (diff)
downloadlinux-993cace4f39f6f210f8fdace3c60a4b6a0e6f47a.tar.gz
linux-993cace4f39f6f210f8fdace3c60a4b6a0e6f47a.tar.bz2
linux-993cace4f39f6f210f8fdace3c60a4b6a0e6f47a.zip
scsi: ufs: mcq: Fix missing argument 'hba' in MCQ_OPR_OFFSET_n
[ Upstream commit 2fc39848952dfb91a9233563cc1444669b8e79c3 ] The MCQ_OPR_OFFSET_n macro takes 'hba' in the caller context without receiving 'hba' instance as an argument. To prevent potential bugs in future use cases, add an argument 'hba'. Fixes: 2468da61ea09 ("scsi: ufs: core: mcq: Configure operation and runtime interface") Cc: Asutosh Das <quic_asutoshd@quicinc.com> Signed-off-by: Minwoo Im <minwoo.im@samsung.com> Link: https://lore.kernel.org/r/20240519221457.772346-2-minwoo.im@samsung.com Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/ufs')
-rw-r--r--include/ufs/ufshcd.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/ufs/ufshcd.h b/include/ufs/ufshcd.h
index 7d07b256e906..e4da39736068 100644
--- a/include/ufs/ufshcd.h
+++ b/include/ufs/ufshcd.h
@@ -1117,6 +1117,12 @@ static inline bool is_mcq_enabled(struct ufs_hba *hba)
return hba->mcq_enabled;
}
+static inline unsigned int ufshcd_mcq_opr_offset(struct ufs_hba *hba,
+ enum ufshcd_mcq_opr opr, int idx)
+{
+ return hba->mcq_opr[opr].offset + hba->mcq_opr[opr].stride * idx;
+}
+
#ifdef CONFIG_SCSI_UFS_VARIABLE_SG_ENTRY_SIZE
static inline size_t ufshcd_sg_entry_size(const struct ufs_hba *hba)
{