[PATCH 15/17] platform/x86/intel/ifs: Remove limit on number of batch files
From: Ehab Ababneh
Date: Mon Oct 26 2026 - 14:45:38 EST
From: Tony Luck <tony.luck@xxxxxxxxx>
Writing to the current_batch sysfs file rejects batch numbers above
0xff. That limit was expected to be enough, but Diamond Rapids needs
more than 256 IFS test image (batch) files.
Remove the limit check on the batch number supplied by the user.
[ Qiuxu: Update IFS ABI documentation to reflect the change. ]
Signed-off-by: Tony Luck <tony.luck@xxxxxxxxx>
Signed-off-by: Ehab Ababneh <ehab.ababneh@xxxxxxxxx>
---
Documentation/ABI/testing/sysfs-platform-intel-ifs | 9 ++++++---
drivers/platform/x86/intel/ifs/sysfs.c | 2 +-
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/Documentation/ABI/testing/sysfs-platform-intel-ifs b/Documentation/ABI/testing/sysfs-platform-intel-ifs
index 41b4d5b1e21c..76770648e63e 100644
--- a/Documentation/ABI/testing/sysfs-platform-intel-ifs
+++ b/Documentation/ABI/testing/sysfs-platform-intel-ifs
@@ -44,9 +44,12 @@ What: /sys/devices/virtual/misc/intel_ifs_<N>/current_batch
Date: Nov 16 2022
KernelVersion: 6.2
Contact: "Jithu Joseph" <jithu.joseph@xxxxxxxxx>
-Description: Write a number less than or equal to 0xff to load an IFS test image.
- The number written treated as the 2 digit suffix in the following file name:
- /lib/firmware/intel/ifs_<N>/ff-mm-ss-02x.scan
+Description: Write a number to load an IFS test image.
+ The number written is used as the <batch> suffix in the following file name:
+ /lib/firmware/intel/ifs_<N>/ff-mm-ss-<batch>.scan
+ where ff, mm and ss are the CPU family, model and stepping, and <batch> is
+ the number written, in lowercase hex, zero-padded to at least 2 digits
+ (e.g. 02, ff, 100).
Reading the file will provide the suffix of the currently loaded IFS test image.
This file is present only for device instances where a test image is applicable.
Devices: intel_ifs_0
diff --git a/drivers/platform/x86/intel/ifs/sysfs.c b/drivers/platform/x86/intel/ifs/sysfs.c
index 3cbab2acca72..7b4c7f21000a 100644
--- a/drivers/platform/x86/intel/ifs/sysfs.c
+++ b/drivers/platform/x86/intel/ifs/sysfs.c
@@ -91,7 +91,7 @@ static ssize_t current_batch_store(struct device *dev,
int rc;
rc = kstrtouint(buf, 0, &cur_batch);
- if (rc < 0 || cur_batch > 0xff)
+ if (rc < 0)
return -EINVAL;
if (down_interruptible(&ifs_sem))
--
2.43.0