[COMMON] scsi: ufs: add information into log msg on task abort
authorhgchu <hg.chu@samsung.com>
Fri, 12 Jan 2018 06:47:41 +0000 (15:47 +0900)
committerJaeHun Jung <jh0801.jung@samsung.com>
Tue, 8 May 2018 08:20:38 +0000 (17:20 +0900)
Change-Id: I168e1bd870e689865f73c122b9e9fc221796a2c1
Signed-off-by: hgchu <hg.chu@samsung.com>
drivers/scsi/ufs/Makefile
drivers/scsi/ufs/ufshcd.c

index 6af7e8a17096435c2d4dd9936390635b2410c9ca..04691d93ee665cda275fbe299267238a2de68c9e 100644 (file)
@@ -6,4 +6,4 @@ obj-$(CONFIG_SCSI_UFS_QCOM) += ufs-qcom.o
 obj-$(CONFIG_SCSI_UFSHCD) += ufshcd.o
 obj-$(CONFIG_SCSI_UFSHCD_PCI) += ufshcd-pci.o
 obj-$(CONFIG_SCSI_UFSHCD_PLATFORM) += ufshcd-pltfrm.o
-obj-$(CONFIG_SCSI_UFS_EXYNOS) += ufs-exynos.o
\ No newline at end of file
+obj-$(CONFIG_SCSI_UFS_EXYNOS) += ufs-exynos.o ufs-exynos-dbg.o
index 71660204b6b06c5cae192cc46870a41857286e4e..ba52714674a5265ddffb7fbd39c51274b8df1350 100644 (file)
@@ -5902,6 +5902,23 @@ static int ufshcd_abort(struct scsi_cmnd *cmd)
        if (lrbp->lun == UFS_UPIU_UFS_DEVICE_WLUN)
                return ufshcd_eh_host_reset_handler(cmd);
 
+
+       if (cmd->cmnd[0] == READ_10 || cmd->cmnd[0] == WRITE_10) {
+               unsigned long lba = (cmd->cmnd[2] << 24) |
+                                       (cmd->cmnd[3] << 16) |
+                                       (cmd->cmnd[4] << 8) |
+                                       (cmd->cmnd[5] << 0);
+               unsigned int sct = (cmd->cmnd[7] << 8) |
+                                       (cmd->cmnd[8] << 0);
+
+               dev_err(hba->dev, "%s: tag:%d, cmd:0x%x, "
+                               "lba:0x%08lx, sct:0x%04x, retries %d\n",
+                               __func__, tag, cmd->cmnd[0], lba, sct, cmd->retries);
+       } else {
+               dev_err(hba->dev, "%s: tag:%d, cmd:0x%x, retries %d\n",
+                               __func__, tag, cmd->cmnd[0], cmd->retries);
+       }
+
        ufshcd_hold(hba, false);
        /* Dump debugging information to system memory */
        ufshcd_vops_dbg_register_dump(hba);