[PATCH v3 15/17] platform/x86/intel/ifs: Remove limit on number of batch files
From: Ehab Ababneh
Date: Fri Nov 20 2026 - 12:55:39 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.
Signed-off-by: Tony Luck <tony.luck@xxxxxxxxx>
Signed-off-by: Ehab Ababneh <ehab.ababneh@xxxxxxxxx>
Tested-by: Yi Lai <yi1.lai@xxxxxxxxx>
---
Documentation/ABI/testing/sysfs-platform-intel-ifs | 10 +++++++---
drivers/platform/x86/intel/ifs/sysfs.c | 2 +-
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/Documentation/ABI/testing/sysfs-platform-intel-ifs b/Documentation/ABI/testing/sysfs-platform-intel-ifs
index 11cd2f412d81..2b922c2cd821 100644
--- a/Documentation/ABI/testing/sysfs-platform-intel-ifs
+++ b/Documentation/ABI/testing/sysfs-platform-intel-ifs
@@ -46,9 +46,13 @@ 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 917de0efdeef..5dffe584d6f7 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