2019-11-13 06:04:30

by Can Guo

[permalink] [raw]
Subject: [PATCH v4 3/5] scsi: ufs: Release clock if DMA map fails

In queuecommand path, if DMA map fails, it bails out with clock held.
In this case, release the clock to keep its usage paired.

Signed-off-by: Can Guo <[email protected]>
---
drivers/scsi/ufs/ufshcd.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 5484177..9e44506 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -2480,6 +2480,7 @@ static int ufshcd_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)
if (err) {
lrbp->cmd = NULL;
clear_bit_unlock(tag, &hba->lrb_in_use);
+ ufshcd_release(hba);
goto out;
}
/* Make sure descriptors are ready before ringing the doorbell */
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


2019-11-13 17:13:16

by Bean Huo (beanhuo)

[permalink] [raw]
Subject: RE: [EXT] [PATCH v4 3/5] scsi: ufs: Release clock if DMA map fails

>
> In queuecommand path, if DMA map fails, it bails out with clock held.
> In this case, release the clock to keep its usage paired.
>
> Signed-off-by: Can Guo <[email protected]>
Reviewed-by: Bean Huo <[email protected]>