[no subject]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Cc: Bao D. Nguyen <quic_nguyenb@xxxxxxxxxxx>
Fixes: 8d7290348992 ("scsi: ufs: mcq: Add supporting functions for MCQ ab=
ort")
Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>
---
 drivers/ufs/core/ufs-mcq.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/ufs/core/ufs-mcq.c b/drivers/ufs/core/ufs-mcq.c
index 57ced1729b73..bef4c53f9c06 100644
--- a/drivers/ufs/core/ufs-mcq.c
+++ b/drivers/ufs/core/ufs-mcq.c
@@ -538,7 +538,7 @@ int ufshcd_mcq_sq_cleanup(struct ufs_hba *hba, int ta=
sk_tag)
 	struct ufshcd_lrb *lrbp =3D &hba->lrb[task_tag];
 	struct scsi_cmnd *cmd =3D lrbp->cmd;
 	struct ufs_hw_queue *hwq;
-	void __iomem *reg, *opr_sqd_base;
+	void __iomem *opr_sqd_base;
 	u32 nexus, id, val;
 	int err;
=20
@@ -572,14 +572,12 @@ int ufshcd_mcq_sq_cleanup(struct ufs_hba *hba, int =
task_tag)
 	/* SQRTCy.ICU =3D 1 */
 	writel(SQ_ICU, opr_sqd_base + REG_SQRTC);
=20
-	/* Poll SQRTSy.CUS =3D 1. Return result from SQRTSy.RTC */
-	reg =3D opr_sqd_base + REG_SQRTS;
-	err =3D read_poll_timeout(readl, val, val & SQ_CUS, 20,
-				MCQ_POLL_US, false, reg);
+	/* Wait until SQRTSy.CUS =3D 1. */
+	err =3D read_poll_timeout(readl, val, val & SQ_CUS, 20, MCQ_POLL_US,
+				false, opr_sqd_base + REG_SQRTS);
 	if (err)
-		dev_err(hba->dev, "%s: failed. hwq=3D%d, tag=3D%d err=3D%ld\n",
-			__func__, id, task_tag,
-			FIELD_GET(SQ_ICU_ERR_CODE_MASK, readl(reg)));
+		dev_err(hba->dev, "%s: failed. hwq=3D%d, tag=3D%d err=3D%d\n",
+			__func__, id, task_tag, err);
=20
 	if (ufshcd_mcq_sq_start(hba, hwq))
 		err =3D -ETIMEDOUT;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux