From: hgchu Date: Fri, 12 Jan 2018 06:47:41 +0000 (+0900) Subject: [COMMON] scsi: ufs: add information into log msg on task abort X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=888b9a691755159c11a129c41acb73577a2db027;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] scsi: ufs: add information into log msg on task abort Change-Id: I168e1bd870e689865f73c122b9e9fc221796a2c1 Signed-off-by: hgchu --- diff --git a/drivers/scsi/ufs/Makefile b/drivers/scsi/ufs/Makefile index 6af7e8a17096..04691d93ee66 100644 --- a/drivers/scsi/ufs/Makefile +++ b/drivers/scsi/ufs/Makefile @@ -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 diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 71660204b6b0..ba52714674a5 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -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);