summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSubhash Jadavani <subhashj@codeaurora.org>2014-11-04 19:31:23 -0800
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 10:57:59 -0700
commit9226d74e2c1feef7a1119e8493f71c86a668af5e (patch)
tree93fdd78859c15cb8db884b24c5a7dbb3851dcda4 /include
parent3c2eebd16d6c40d0df2c93699bf926d78d5b17d2 (diff)
scsi: ufs: add error recovery after DL NAC error
Some vendor's UFS device sends back to back NACs for the DL data frames causing the host controller to raise the DFES error status. Sometimes such UFS devices send back to back NAC without waiting for new retransmitted DL frame from the host and in such cases it might be possible the Host UniPro goes into bad state without raising the DFES error interrupt. If this happens then all the pending commands would timeout only after respective SW command (which is generally too large). This change workarounds such device behaviour like this: - As soon as SW sees the DL NAC error, it would schedule the error handler - Error handler would sleep for 50ms to see if there any fatal errors raised by UFS controller. - If there are fatal errors then SW does normal error recovery. - If there are no fatal errors then SW sends the NOP command to device to check if link is alive. - If NOP command times out, SW does normal error recovery - If NOP command succeed, skip the error handling. If DL NAC error is seen multiple times with some vendor's UFS devices then enable this quirk to initiate quick error recovery and also silence related error logs to reduce spamming of kernel logs. Change-Id: Id2f0c05c414d700ba923513f8c9e3d1e6a8a749a Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/scsi/ufs/ufshcd.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/scsi/ufs/ufshcd.h b/include/linux/scsi/ufs/ufshcd.h
index 4d877170d268..fff05fc62161 100644
--- a/include/linux/scsi/ufs/ufshcd.h
+++ b/include/linux/scsi/ufs/ufshcd.h
@@ -702,6 +702,7 @@ struct ufs_hba {
u32 uic_error;
u32 saved_err;
u32 saved_uic_err;
+ bool silence_err_logs;
/* Device management request data */
struct ufs_dev_cmd dev_cmd;