scsi: ufs: Treat link loss as fatal error
authorKiwoong Kim <kwmad.kim@samsung.com>
Fri, 21 Jan 2022 05:37:55 +0000 (14:37 +0900)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 25 Jan 2022 05:07:24 +0000 (00:07 -0500)
This event is raised when link is lost as specified in UFSHCI spec and that
means communication is not possible. Thus initializing UFS interface needs
to be done.

Make UFS driver considers Link Lost as fatal in the INT_FATAL_ERRORS
mask. This will trigger a host reset whenever a link lost interrupt occurs.

Link: https://lore.kernel.org/r/1642743475-54275-1-git-send-email-kwmad.kim@samsung.com
Signed-off-by: Kiwoong Kim <kwmad.kim@samsung.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ufs/ufshci.h

index 6a295c88d850f840eeaa36daf16f388f55a77ea2..a7ff0e5b54946d3e367c6c482c19bfea78462b19 100644 (file)
@@ -142,7 +142,8 @@ static inline u32 ufshci_version(u32 major, u32 minor)
 #define INT_FATAL_ERRORS       (DEVICE_FATAL_ERROR |\
                                CONTROLLER_FATAL_ERROR |\
                                SYSTEM_BUS_FATAL_ERROR |\
-                               CRYPTO_ENGINE_FATAL_ERROR)
+                               CRYPTO_ENGINE_FATAL_ERROR |\
+                               UIC_LINK_LOST)
 
 /* HCS - Host Controller Status 30h */
 #define DEVICE_PRESENT                         0x1