Re: [PATCH 03/10] ufs: host: Add common Hibern8 TX FSM polling helper
From: Bart Van Assche
Date: Wed Aug 26 2026 - 11:34:36 EST
On 8/26/26 6:40 AM, Larisa Grigore wrote:
+ for (i = 0; i < num_lanes; i++) {Instead of duplicating this code block, please move it into a new
+ err = ufshcd_dme_get(hba,
+ UIC_ARG_MIB_SEL(TX_FSM_STATE,
+ UIC_ARG_MPHY_TX_GEN_SEL_INDEX(i)),
+ &tx_fsm_val);
+ if (err) {
+ dev_err(hba->dev,
+ "%s: unable to get TX_FSM_STATE for lane %u, err %d\n",
+ __func__, i, err);
+ return err;
+ }
+
+ if (tx_fsm_val != TX_STATE_HIBERN8) {
+ dev_err(hba->dev,
+ "%s: timeout waiting for lane %u to enter HIBERN8, TX_FSM_STATE=%u\n",
+ __func__, i, tx_fsm_val);
+ return -ETIMEDOUT;
+ }
+ }
function.
Thanks,
Bart.