* Re: [PATCH v6] scsi: ufs: Change the error check sequence for auto hibern8
2026-10-27 11:03 ` [PATCH v6] scsi: ufs: Change the error check sequence for auto hibern8 HOYOUNG SEO
@ 2026-10-27 18:12 ` Bean Huo
2026-10-28 4:09 ` Bart Van Assche
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Bean Huo @ 2026-10-27 18:12 UTC (permalink / raw)
To: HOYOUNG SEO, linux-scsi, linux-kernel, alim.akhtar, avri.altman,
jejb, martin.petersen, bvanassche, kwangwon.min, kwmad.kim, cpgs,
h10.kim
Cc: stable, Stanley Jhu
On Tue, 2026-10-27 at 20:03 +0900, HOYOUNG SEO wrote:
> Auto-hibern8 enter and exit are performed by the host controller without
> a UIC command, and the auto-hibern8 idle timer only runs while no UIC
> command is outstanding. An auto-hibern8 error (IS.UHES or IS.UHXS) is
> therefore usually reported while hba->active_uic_cmd is NULL.
>
> Since commit fcd8b0450a9a ("scsi: ufs: core: Make ufshcd_uic_cmd_compl()
> easier to analyze"), ufshcd_uic_cmd_compl() returns early when
> hba->active_uic_cmd is NULL, before ufshcd_is_auto_hibern8_error() is
> called. Such auto-hibern8 errors are no longer recorded in hba->errors,
> so ufshcd_check_errors() is not called for them and the error handler is
> not scheduled.
>
> Check for auto-hibern8 errors before checking for an active UIC command,
> as was done before that commit, but keep returning early when there is
> no active UIC command so that a NULL cmd is never dereferenced. Only
> report the missing UIC command if no auto-hibern8 error was found.
>
> Fixes: fcd8b0450a9a ("scsi: ufs: core: Make ufshcd_uic_cmd_compl() easier to
> analyze")
> Cc: stable@vger.kernel.org # v6.13+
> Signed-off-by: HOYOUNG SEO <hy50.seo@samsung.com>
> Reviewed-by: Stanley Jhu <stanleyjhu@google.com>
Reviewed-by: Bean Huo <beanhuo@micron.com>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH v6] scsi: ufs: Change the error check sequence for auto hibern8
2026-10-27 11:03 ` [PATCH v6] scsi: ufs: Change the error check sequence for auto hibern8 HOYOUNG SEO
2026-10-27 18:12 ` Bean Huo
@ 2026-10-28 4:09 ` Bart Van Assche
2026-10-29 1:28 ` Martin K. Petersen
2026-10-31 1:40 ` Martin K. Petersen (Oracle)
3 siblings, 0 replies; 5+ messages in thread
From: Bart Van Assche @ 2026-10-28 4:09 UTC (permalink / raw)
To: HOYOUNG SEO, linux-scsi, linux-kernel, alim.akhtar, avri.altman,
jejb, martin.petersen, kwangwon.min, kwmad.kim, cpgs, h10.kim
Cc: stable, Stanley Jhu
On 10/27/26 4:03 AM, HOYOUNG SEO wrote:
> Auto-hibern8 enter and exit are performed by the host controller without
> a UIC command, and the auto-hibern8 idle timer only runs while no UIC
> command is outstanding. An auto-hibern8 error (IS.UHES or IS.UHXS) is
> therefore usually reported while hba->active_uic_cmd is NULL.
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v6] scsi: ufs: Change the error check sequence for auto hibern8
2026-10-27 11:03 ` [PATCH v6] scsi: ufs: Change the error check sequence for auto hibern8 HOYOUNG SEO
2026-10-27 18:12 ` Bean Huo
2026-10-28 4:09 ` Bart Van Assche
@ 2026-10-29 1:28 ` Martin K. Petersen
2026-10-31 1:40 ` Martin K. Petersen (Oracle)
3 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2026-10-29 1:28 UTC (permalink / raw)
To: HOYOUNG SEO
Cc: linux-scsi, linux-kernel, alim.akhtar, avri.altman, jejb,
martin.petersen, bvanassche, kwangwon.min, kwmad.kim, cpgs,
h10.kim, stable, Stanley Jhu
Hoyoung,
> Auto-hibern8 enter and exit are performed by the host controller
> without a UIC command, and the auto-hibern8 idle timer only runs while
> no UIC command is outstanding. An auto-hibern8 error (IS.UHES or
> IS.UHXS) is therefore usually reported while hba->active_uic_cmd is
> NULL.
Applied to 7.4/scsi-staging, thanks!
--
Martin K. Petersen
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v6] scsi: ufs: Change the error check sequence for auto hibern8
2026-10-27 11:03 ` [PATCH v6] scsi: ufs: Change the error check sequence for auto hibern8 HOYOUNG SEO
` (2 preceding siblings ...)
2026-10-29 1:28 ` Martin K. Petersen
@ 2026-10-31 1:40 ` Martin K. Petersen (Oracle)
3 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen (Oracle) @ 2026-10-31 1:40 UTC (permalink / raw)
To: linux-scsi, linux-kernel, alim.akhtar, jejb, bvanassche,
kwangwon.min, kwmad.kim, cpgs, h10.kim, Avri Altman,
Martin K. Petersen, HOYOUNG SEO
Cc: stable, Stanley Jhu
On Tue, 27 Oct 2026 20:03:57 +0900, HOYOUNG SEO wrote:
> Auto-hibern8 enter and exit are performed by the host controller without
> a UIC command, and the auto-hibern8 idle timer only runs while no UIC
> command is outstanding. An auto-hibern8 error (IS.UHES or IS.UHXS) is
> therefore usually reported while hba->active_uic_cmd is NULL.
>
> Since commit fcd8b0450a9a ("scsi: ufs: core: Make ufshcd_uic_cmd_compl()
> easier to analyze"), ufshcd_uic_cmd_compl() returns early when
> hba->active_uic_cmd is NULL, before ufshcd_is_auto_hibern8_error() is
> called. Such auto-hibern8 errors are no longer recorded in hba->errors,
> so ufshcd_check_errors() is not called for them and the error handler is
> not scheduled.
>
> [...]
Applied to 7.4/scsi-queue, thanks!
[1/1] scsi: ufs: Change the error check sequence for auto hibern8
https://git.kernel.org/mkp/scsi/c/6b2ff2b3eafa
--
Martin K. Petersen
^ permalink raw reply [flat|nested] 5+ messages in thread