Skip to content

Commit 053c16a

Browse files
Jaegeuk Kimmartinkpetersen
authored andcommitted
scsi: ufs: core: Add missing host_lock in ufshcd_vops_setup_xfer_req()
This patch adds a host_lock which existed before on ufshcd_vops_setup_xfer_req(). Link: https://lore.kernel.org/r/[email protected] Fixes: a45f937 ("scsi: ufs: Optimize host lock on transfer requests send/compl paths") Cc: Stanley Chu <[email protected]> Cc: Can Guo <[email protected]> Cc: Bean Huo <[email protected]> Cc: Bart Van Assche <[email protected]> Cc: Asutosh Das <[email protected]> Reviewed-by: Bart Van Assche <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent aa0dc6a commit 053c16a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

drivers/scsi/ufs/ufshcd.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1229,8 +1229,13 @@ static inline int ufshcd_vops_pwr_change_notify(struct ufs_hba *hba,
12291229
static inline void ufshcd_vops_setup_xfer_req(struct ufs_hba *hba, int tag,
12301230
bool is_scsi_cmd)
12311231
{
1232-
if (hba->vops && hba->vops->setup_xfer_req)
1233-
return hba->vops->setup_xfer_req(hba, tag, is_scsi_cmd);
1232+
if (hba->vops && hba->vops->setup_xfer_req) {
1233+
unsigned long flags;
1234+
1235+
spin_lock_irqsave(hba->host->host_lock, flags);
1236+
hba->vops->setup_xfer_req(hba, tag, is_scsi_cmd);
1237+
spin_unlock_irqrestore(hba->host->host_lock, flags);
1238+
}
12341239
}
12351240

12361241
static inline void ufshcd_vops_setup_task_mgmt(struct ufs_hba *hba,

0 commit comments

Comments
 (0)