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

From: Bart Van Assche

Date: Fri Feb 27 2026 - 16:50:06 EST


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.

Thanks,

Bart.