summaryrefslogtreecommitdiff
path: root/drivers/scsi/ufs/unipro.h
diff options
context:
space:
mode:
authorCan Guo <cang@codeaurora.org>2020-08-25 05:07:06 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2020-09-03 05:49:07 +0300
commit2355b66ed20ce442603aadc05b150db7282d8acf (patch)
tree1d7b5443782dc0320372c5220c2d104c4c28d888 /drivers/scsi/ufs/unipro.h
parent307348f6ab144bbb625214f46bc88e810591ae65 (diff)
downloadlinux-2355b66ed20ce442603aadc05b150db7282d8acf.tar.xz
scsi: ufs: Handle LINERESET indication in err handler
PA Layer issues a LINERESET to the PHY at the recovery step in the Power Mode change operation. If it happens during auto or manual hibern8 enter, even if hibern8 enter succeeds, UFS power mode shall be set to PWM-G1 mode and kept in that mode after exit from hibern8, leading to bad performance. Handle the LINERESET in the eh_work by restoring power mode to HS mode after all pending reqs and tasks are cleared from doorbell. Link: https://lore.kernel.org/r/1598321228-21093-3-git-send-email-cang@codeaurora.org Signed-off-by: Can Guo <cang@codeaurora.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/ufs/unipro.h')
-rw-r--r--drivers/scsi/ufs/unipro.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/ufs/unipro.h b/drivers/scsi/ufs/unipro.h
index 4ee64782fd48..f6b52ce36de6 100644
--- a/drivers/scsi/ufs/unipro.h
+++ b/drivers/scsi/ufs/unipro.h
@@ -205,6 +205,9 @@ enum {
UNCHANGED = 7,
};
+#define PWRMODE_MASK 0xF
+#define PWRMODE_RX_OFFSET 4
+
/* PA TX/RX Frequency Series */
enum {
PA_HS_MODE_A = 1,