Re: [PATCH 05/11] scsi: ufs: core: Add debugfs entries for TX Equalization params

From: Can Guo

Date: Mon Mar 02 2026 - 00:46:25 EST


Hi Bart,

On 2/28/2026 5:49 AM, Bart Van Assche wrote:
On 2/27/26 8:08 AM, Can Guo wrote:
@@ -230,6 +427,15 @@ void ufs_debugfs_hba_init(struct ufs_hba *hba)
                  hba, &ee_usr_mask_fops);
      debugfs_create_u32("exception_event_rate_limit_ms", 0600, hba->debugfs_root,
                 &hba->debugfs_ee_rate_limit_ms);
+
+    if (!(hba->caps & UFSHCD_CAP_TX_EQUALIZATION))
+        return;
+    hba->debugfs_tx_eq_gear = UFS_HS_GEAR_MAX - 1;
+    debugfs_create_file("tx_eq_gear_sel", 0600, hba->debugfs_root, hba,
+                &tx_eq_gear_fops);
+    for (attr = ufs_tx_eq_attrs; attr->name; attr++)
+        debugfs_create_file(attr->name, attr->mode, root, (void *)attr,
+                    attr->fops);
  }

So the 'tx_eq_gear_sel` is an attribute that controls what output is shown in the other debugfs attributes? I don't think that is acceptable.
Please make sure that there is one set of debugfs attributes for every
valid 'gear' value, e.g. by creating one directory per gear.
Will create the debugfs entries on a per-gear basis in next version.

Thanks,
Can Guo.

Thanks,

Bart.