[PATCH 3/4] PCI/AER: Report the ratelimit interval in milliseconds

From: Yazen Ghannam

Date: Tue Nov 10 2026 - 16:59:20 EST


The "*_ratelimit_interval_ms" attributes convert milliseconds to jiffies
when storing. But they don't convert jiffies to milliseconds when
showing. So the user is presented with the raw jiffies value.

Do the jiffies to milliseconds conversion when showing the value.

Fixes: b4fe7398def6 ("PCI/AER: Add sysfs attributes for log ratelimits")
Signed-off-by: Yazen Ghannam <yazen.ghannam@xxxxxxx>
---
drivers/pci/pcie/aer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c
index 401cd3a1b3d0..32a4c9101946 100644
--- a/drivers/pci/pcie/aer.c
+++ b/drivers/pci/pcie/aer.c
@@ -699,9 +699,9 @@ const struct attribute_group aer_stats_attr_group = {
char *buf) \
{ \
struct pci_dev *pdev = to_pci_dev(dev); \
+ unsigned long iv = pdev->aer_info->ratelimit.interval; \
\
- return sysfs_emit(buf, "%d\n", \
- pdev->aer_info->ratelimit.interval); \
+ return sysfs_emit(buf, "%u\n", jiffies_to_msecs(iv)); \
} \
\
static ssize_t \
--
2.55.0