FROMLIST: scsi: ufs: add missing host_lock in setup_xfer_req
This patch adds a host_lock which existed before on ufshcd_vops_setup_xfer_req.
Bug: 190637035
Cc: Stanley Chu <stanley.chu@mediatek.com>
Cc: Can Guo <cang@codeaurora.org>
Cc: Bean Huo <beanhuo@micron.com>
Cc: Bart Van Assche <bvanassche@acm.org>
Cc: Asutosh Das <asutoshd@codeaurora.org>
Link: https://lore.kernel.org/linux-scsi/20210701005117.3846179-1-jaegeuk@kernel.org/T/#u
Fixes: 7613068f95
("BACKPORT: FROMGIT: scsi: ufs: Optimize host lock on transfer requests send/compl paths")
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: I0e5f9ec11fa62a074bca5feb5638e8d04cf858ee
This commit is contained in:
@@ -1235,8 +1235,13 @@ static inline int ufshcd_vops_pwr_change_notify(struct ufs_hba *hba,
|
|||||||
static inline void ufshcd_vops_setup_xfer_req(struct ufs_hba *hba, int tag,
|
static inline void ufshcd_vops_setup_xfer_req(struct ufs_hba *hba, int tag,
|
||||||
bool is_scsi_cmd)
|
bool is_scsi_cmd)
|
||||||
{
|
{
|
||||||
if (hba->vops && hba->vops->setup_xfer_req)
|
if (hba->vops && hba->vops->setup_xfer_req) {
|
||||||
return hba->vops->setup_xfer_req(hba, tag, is_scsi_cmd);
|
unsigned long flags;
|
||||||
|
|
||||||
|
spin_lock_irqsave(hba->host->host_lock, flags);
|
||||||
|
hba->vops->setup_xfer_req(hba, tag, is_scsi_cmd);
|
||||||
|
spin_unlock_irqrestore(hba->host->host_lock, flags);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void ufshcd_vops_setup_task_mgmt(struct ufs_hba *hba,
|
static inline void ufshcd_vops_setup_task_mgmt(struct ufs_hba *hba,
|
||||||
|
Reference in New Issue
Block a user