scsi: ufs: core: Add ufshcd_update_evt_hist() for UFS suspend error

If UFS resume fails, the event history is updated in ufshcd_resume(), but
there is no code anywhere to record UFS suspend. Therefore, add code to
record UFS suspend error event history.

Fixes: dd11376b9f1b ("scsi: ufs: Split the drivers/scsi/ufs directory")
Cc: stable@vger.kernel.org
Signed-off-by: Seunghwan Baek <sh8267.baek@samsung.com>
Reviewed-by: Peter Wang <peter.wang@mediatek.com>
Link: https://patch.msgid.link/20251210063854.1483899-2-sh8267.baek@samsung.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by Seunghwan Baek and committed by Martin K. Petersen c9f36f04 0e167765

+4 -1
+4 -1
drivers/ufs/core/ufshcd.c
··· 10359 10359 ret = ufshcd_setup_clocks(hba, false); 10360 10360 if (ret) { 10361 10361 ufshcd_enable_irq(hba); 10362 - return ret; 10362 + goto out; 10363 10363 } 10364 10364 if (ufshcd_is_clkgating_allowed(hba)) { 10365 10365 hba->clk_gating.state = CLKS_OFF; ··· 10371 10371 /* Put the host controller in low power mode if possible */ 10372 10372 ufshcd_hba_vreg_set_lpm(hba); 10373 10373 ufshcd_pm_qos_update(hba, false); 10374 + out: 10375 + if (ret) 10376 + ufshcd_update_evt_hist(hba, UFS_EVT_SUSPEND_ERR, (u32)ret); 10374 10377 return ret; 10375 10378 } 10376 10379