* [PATCH v2] scsi: ufs: core: Include UTP error in INT_FATAL_ERRORS
[not found] <CGME20250930061604epcas2p3f341c32c50f267aa6bd3ae0e82adfbf3@epcas2p3.samsung.com>
@ 2025-09-30 6:14 ` HOYOUNG SEO
2025-09-30 17:16 ` Bart Van Assche
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: HOYOUNG SEO @ 2025-09-30 6:14 UTC (permalink / raw)
To: linux-scsi, linux-kernel, alim.akhtar, avri.altman, jejb,
martin.petersen, beanhuo, bvanassche, kwangwon.min, kwmad.kim,
cpgs, h10.kim
Cc: hy50.seo
From: "hy50.seo" <hy50.seo@samsung.com>
If the UTP error occurs alone, the UFS is not recovered.
It does not check for error and only generates io timeout or OCS error.
This is because UTP error is not defined in error handler.
To fixed this, added UTP error flag in FATAL_ERROR.
So UFS will reset is performed when a UTP error occurs.
sd 0:0:0:0: [sda] tag#38 UNKNOWN(0x2003) Result: hostbyte=0x07
driverbyte=DRIVER_OK cmd_age=0s
sd 0:0:0:0: [sda] tag#38 CDB: opcode=0x28 28 00 00 51 24 e2 00 00 08 00
I/O error, dev sda, sector 42542864 op 0x0:(READ) flags 0x80700 phys_seg
8 prio class 2
OCS error from controller = 9 for tag 39
pa_err[1] = 0x80000010 at 2667224756 us
pa_err: total cnt=2
dl_err[0] = 0x80000002 at 2667148060 us
dl_err[1] = 0x80002000 at 2667282844 us
No record of nl_err
No record of tl_err
No record of dme_err
No record of auto_hibern8_err
fatal_err[0] = 0x804 at 2667282836 us
---------------------------------------------------
REGISTER
---------------------------------------------------
NAME OFFSET VALUE
STD HCI SFR 0xfffffff0 0x0
AHIT 0x18 0x814
INTERRUPT STATUS 0x20 0x1000
INTERRUPT ENABLE 0x24 0x70ef5
Signed-off-by: hy50.seo <hy50.seo@samsung.com>
---
include/ufs/ufshci.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/ufs/ufshci.h b/include/ufs/ufshci.h
index 612500a7088f..e64b70132101 100644
--- a/include/ufs/ufshci.h
+++ b/include/ufs/ufshci.h
@@ -180,6 +180,7 @@ static inline u32 ufshci_version(u32 major, u32 minor)
#define UTP_TASK_REQ_COMPL 0x200
#define UIC_COMMAND_COMPL 0x400
#define DEVICE_FATAL_ERROR 0x800
+#define UTP_ERROR 0x1000
#define CONTROLLER_FATAL_ERROR 0x10000
#define SYSTEM_BUS_FATAL_ERROR 0x20000
#define CRYPTO_ENGINE_FATAL_ERROR 0x40000
@@ -199,7 +200,8 @@ static inline u32 ufshci_version(u32 major, u32 minor)
CONTROLLER_FATAL_ERROR |\
SYSTEM_BUS_FATAL_ERROR |\
CRYPTO_ENGINE_FATAL_ERROR |\
- UIC_LINK_LOST)
+ UIC_LINK_LOST |\
+ UTP_ERROR)
/* HCS - Host Controller Status 30h */
#define DEVICE_PRESENT 0x1
--
2.34.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] scsi: ufs: core: Include UTP error in INT_FATAL_ERRORS
2025-09-30 6:14 ` [PATCH v2] scsi: ufs: core: Include UTP error in INT_FATAL_ERRORS HOYOUNG SEO
@ 2025-09-30 17:16 ` Bart Van Assche
2025-09-30 20:10 ` Martin K. Petersen
2025-10-07 2:38 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Bart Van Assche @ 2025-09-30 17:16 UTC (permalink / raw)
To: HOYOUNG SEO, linux-scsi, linux-kernel, alim.akhtar, avri.altman,
jejb, martin.petersen, beanhuo, kwangwon.min, kwmad.kim, cpgs,
h10.kim
On 9/29/25 11:14 PM, HOYOUNG SEO wrote:
> If the UTP error occurs alone, the UFS is not recovered.
> It does not check for error and only generates io timeout or OCS error.
> This is because UTP error is not defined in error handler.
> To fixed this, added UTP error flag in FATAL_ERROR.
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] scsi: ufs: core: Include UTP error in INT_FATAL_ERRORS
2025-09-30 6:14 ` [PATCH v2] scsi: ufs: core: Include UTP error in INT_FATAL_ERRORS HOYOUNG SEO
2025-09-30 17:16 ` Bart Van Assche
@ 2025-09-30 20:10 ` Martin K. Petersen
2025-10-07 2:38 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2025-09-30 20:10 UTC (permalink / raw)
To: HOYOUNG SEO
Cc: linux-scsi, linux-kernel, alim.akhtar, avri.altman, jejb,
martin.petersen, beanhuo, bvanassche, kwangwon.min, kwmad.kim,
cpgs, h10.kim
> If the UTP error occurs alone, the UFS is not recovered. It does not
> check for error and only generates io timeout or OCS error. This is
> because UTP error is not defined in error handler. To fixed this,
> added UTP error flag in FATAL_ERROR. So UFS will reset is performed
> when a UTP error occurs.
Applied to 6.18/scsi-staging, thanks!
--
Martin K. Petersen
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] scsi: ufs: core: Include UTP error in INT_FATAL_ERRORS
2025-09-30 6:14 ` [PATCH v2] scsi: ufs: core: Include UTP error in INT_FATAL_ERRORS HOYOUNG SEO
2025-09-30 17:16 ` Bart Van Assche
2025-09-30 20:10 ` Martin K. Petersen
@ 2025-10-07 2:38 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2025-10-07 2:38 UTC (permalink / raw)
To: linux-scsi, linux-kernel, alim.akhtar, avri.altman, jejb,
beanhuo, bvanassche, kwangwon.min, kwmad.kim, cpgs, h10.kim,
HOYOUNG SEO
Cc: Martin K . Petersen
On Tue, 30 Sep 2025 15:14:28 +0900, HOYOUNG SEO wrote:
> If the UTP error occurs alone, the UFS is not recovered.
> It does not check for error and only generates io timeout or OCS error.
> This is because UTP error is not defined in error handler.
> To fixed this, added UTP error flag in FATAL_ERROR.
> So UFS will reset is performed when a UTP error occurs.
>
> sd 0:0:0:0: [sda] tag#38 UNKNOWN(0x2003) Result: hostbyte=0x07
> driverbyte=DRIVER_OK cmd_age=0s
> sd 0:0:0:0: [sda] tag#38 CDB: opcode=0x28 28 00 00 51 24 e2 00 00 08 00
> I/O error, dev sda, sector 42542864 op 0x0:(READ) flags 0x80700 phys_seg
> 8 prio class 2
> OCS error from controller = 9 for tag 39
> pa_err[1] = 0x80000010 at 2667224756 us
> pa_err: total cnt=2
> dl_err[0] = 0x80000002 at 2667148060 us
> dl_err[1] = 0x80002000 at 2667282844 us
> No record of nl_err
> No record of tl_err
> No record of dme_err
> No record of auto_hibern8_err
> fatal_err[0] = 0x804 at 2667282836 us
>
> [...]
Applied to 6.18/scsi-queue, thanks!
[1/1] scsi: ufs: core: Include UTP error in INT_FATAL_ERRORS
https://git.kernel.org/mkp/scsi/c/558ae4579810
--
Martin K. Petersen
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-10-07 2:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20250930061604epcas2p3f341c32c50f267aa6bd3ae0e82adfbf3@epcas2p3.samsung.com>
2025-09-30 6:14 ` [PATCH v2] scsi: ufs: core: Include UTP error in INT_FATAL_ERRORS HOYOUNG SEO
2025-09-30 17:16 ` Bart Van Assche
2025-09-30 20:10 ` Martin K. Petersen
2025-10-07 2:38 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®