From: hgchu Date: Fri, 12 Jan 2018 04:06:10 +0000 (+0900) Subject: scsi: ufs: clean-up remained cmd on abort-handling X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f771f92514f614bce18c5f527187a184d7d68acb;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git scsi: ufs: clean-up remained cmd on abort-handling Change-Id: Iee3000f142cd9ef969f351c22810d7f17724c29f Signed-off-by: hgchu --- diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 5122b6bd95ff..54fe87af197b 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -5816,6 +5816,7 @@ static int ufshcd_abort(struct scsi_cmnd *cmd) dev_err(hba->dev, "%s: cmd was completed, but without a notifying intr, tag = %d", __func__, tag); + goto clean; } /* Print Transfer Request of aborted task */ @@ -5876,12 +5877,18 @@ static int ufshcd_abort(struct scsi_cmnd *cmd) __func__, tag, err); if (!err) err = resp; /* service response error */ + dev_err(hba->dev, + "%s: query task failed with err %d\n", + __func__, err); goto out; } } if (!poll_cnt) { err = -EBUSY; + dev_err(hba->dev, + "%s: cmd might be missed, not pending in device\n", + __func__); goto out; } @@ -5902,7 +5909,7 @@ static int ufshcd_abort(struct scsi_cmnd *cmd) __func__, tag, err); goto out; } - +clean: scsi_dma_unmap(cmd); spin_lock_irqsave(host->host_lock, flags);