* [PATCH 0/2] ipmi: ssif_bmc: Add support for adjustable response timeout
@ 2025-02-03 13:09 Potin Lai
2025-02-03 13:09 ` [PATCH 1/2] bindings: ipmi: ssif-bmc: Add property to adjust " Potin Lai
2025-02-03 13:09 ` [PATCH 2/2] ipmi: ssif_bmc: Add support for adjustable " Potin Lai
0 siblings, 2 replies; 4+ messages in thread
From: Potin Lai @ 2025-02-03 13:09 UTC (permalink / raw)
To: Corey Minyard, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Quan Nguyen, Patrick Williams
Cc: openipmi-developer, devicetree, linux-kernel, Cosmo Chou,
Potin Lai, Potin Lai
The SSIF response is handled by a userspace application, which may exceed
the default 500 ms timeout when the BMC or application is under heavy load.
To provide flexibility, this patch introduces the `timeout-ms` property in
the device tree binding, allowing platforms to adjust the response timeout
as needed.
If `timeout-ms` is not specified, the default response timeout remains
500 ms, ensuring backward compatibility while giving platforms the option
to configure a longer timeout when necessary. This prevents timeouts in
cases where userspace processing may take longer.
Signed-off-by: Potin Lai <potin.lai.pt@gmail.com>
---
Potin Lai (2):
bindings: ipmi: ssif-bmc: Add property to adjust response timeout
ipmi: ssif_bmc: Add support for adjustable response timeout
Documentation/devicetree/bindings/ipmi/ssif-bmc.yaml | 6 ++++++
drivers/char/ipmi/ssif_bmc.c | 8 +++++++-
2 files changed, 13 insertions(+), 1 deletion(-)
---
base-commit: 2014c95afecee3e76ca4a56956a936e23283f05b
change-id: 20250203-ssif-response-timeout-ms-3bdb88ab337f
Best regards,
--
Potin Lai <potin.lai.pt@gmail.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] bindings: ipmi: ssif-bmc: Add property to adjust response timeout
2025-02-03 13:09 [PATCH 0/2] ipmi: ssif_bmc: Add support for adjustable response timeout Potin Lai
@ 2025-02-03 13:09 ` Potin Lai
2025-02-03 23:01 ` Rob Herring (Arm)
2025-02-03 13:09 ` [PATCH 2/2] ipmi: ssif_bmc: Add support for adjustable " Potin Lai
1 sibling, 1 reply; 4+ messages in thread
From: Potin Lai @ 2025-02-03 13:09 UTC (permalink / raw)
To: Corey Minyard, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Quan Nguyen, Patrick Williams
Cc: openipmi-developer, devicetree, linux-kernel, Cosmo Chou,
Potin Lai, Potin Lai
The SSIF response is handled by a userspace application, which may exceed
the default 500 ms timeout when the BMC or application is under heavy load.
Add a new device tree property, `timeout-ms`, allowing platforms to adjust
the response timeout based on their specific requirements. This helps
prevent timeouts in scenarios where longer processing times are expected.
Signed-off-by: Potin Lai <potin.lai.pt@gmail.com>
---
Documentation/devicetree/bindings/ipmi/ssif-bmc.yaml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Documentation/devicetree/bindings/ipmi/ssif-bmc.yaml b/Documentation/devicetree/bindings/ipmi/ssif-bmc.yaml
index 02b662d780bb..c8a863d44f97 100644
--- a/Documentation/devicetree/bindings/ipmi/ssif-bmc.yaml
+++ b/Documentation/devicetree/bindings/ipmi/ssif-bmc.yaml
@@ -19,6 +19,12 @@ properties:
reg:
maxItems: 1
+ timeout-ms:
+ minimum: 0
+ maximum: 4294967295
+ default: 500
+ description: Response timeout in millisecond.
+
required:
- compatible
- reg
--
2.31.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/2] ipmi: ssif_bmc: Add support for adjustable response timeout
2025-02-03 13:09 [PATCH 0/2] ipmi: ssif_bmc: Add support for adjustable response timeout Potin Lai
2025-02-03 13:09 ` [PATCH 1/2] bindings: ipmi: ssif-bmc: Add property to adjust " Potin Lai
@ 2025-02-03 13:09 ` Potin Lai
1 sibling, 0 replies; 4+ messages in thread
From: Potin Lai @ 2025-02-03 13:09 UTC (permalink / raw)
To: Corey Minyard, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Quan Nguyen, Patrick Williams
Cc: openipmi-developer, devicetree, linux-kernel, Cosmo Chou,
Potin Lai, Potin Lai
Implement support for the `timeout-ms` device tree property, allowing
platforms to adjust the userspace response timeout as needed.
If `timeout-ms` is not specified, the default response timeout remains
500 ms. This ensures compatibility while providing flexibility for
platforms that require longer timeouts due to BMC or application load.
Signed-off-by: Potin Lai <potin.lai.pt@gmail.com>
---
drivers/char/ipmi/ssif_bmc.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/char/ipmi/ssif_bmc.c b/drivers/char/ipmi/ssif_bmc.c
index 310f17dd9511..8f0fbc941936 100644
--- a/drivers/char/ipmi/ssif_bmc.c
+++ b/drivers/char/ipmi/ssif_bmc.c
@@ -87,6 +87,7 @@ struct ssif_bmc_ctx {
/* Timeout waiting for response */
struct timer_list response_timer;
bool response_timer_inited;
+ u32 response_timeout;
/* Flag to identify a Multi-part Read Transaction */
bool is_singlepart_read;
u8 nbytes_processed;
@@ -331,7 +332,8 @@ static void handle_request(struct ssif_bmc_ctx *ssif_bmc)
timer_setup(&ssif_bmc->response_timer, response_timeout, 0);
ssif_bmc->response_timer_inited = true;
}
- mod_timer(&ssif_bmc->response_timer, jiffies + msecs_to_jiffies(RESPONSE_TIMEOUT));
+ mod_timer(&ssif_bmc->response_timer, jiffies +
+ msecs_to_jiffies(ssif_bmc->response_timeout));
}
static void calculate_response_part_pec(struct ssif_part_buffer *part)
@@ -809,6 +811,10 @@ static int ssif_bmc_probe(struct i2c_client *client)
if (!ssif_bmc)
return -ENOMEM;
+ if (of_property_read_u32(client->dev.of_node, "timeout-ms",
+ &ssif_bmc->response_timeout))
+ ssif_bmc->response_timeout = RESPONSE_TIMEOUT;
+
spin_lock_init(&ssif_bmc->lock);
init_waitqueue_head(&ssif_bmc->wait_queue);
--
2.31.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] bindings: ipmi: ssif-bmc: Add property to adjust response timeout
2025-02-03 13:09 ` [PATCH 1/2] bindings: ipmi: ssif-bmc: Add property to adjust " Potin Lai
@ 2025-02-03 23:01 ` Rob Herring (Arm)
0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring (Arm) @ 2025-02-03 23:01 UTC (permalink / raw)
To: Potin Lai
Cc: Quan Nguyen, devicetree, Conor Dooley, Krzysztof Kozlowski,
Patrick Williams, Potin Lai, openipmi-developer, Cosmo Chou,
Corey Minyard, linux-kernel
On Mon, 03 Feb 2025 21:09:13 +0800, Potin Lai wrote:
> The SSIF response is handled by a userspace application, which may exceed
> the default 500 ms timeout when the BMC or application is under heavy load.
>
> Add a new device tree property, `timeout-ms`, allowing platforms to adjust
> the response timeout based on their specific requirements. This helps
> prevent timeouts in scenarios where longer processing times are expected.
>
> Signed-off-by: Potin Lai <potin.lai.pt@gmail.com>
> ---
> Documentation/devicetree/bindings/ipmi/ssif-bmc.yaml | 6 ++++++
> 1 file changed, 6 insertions(+)
>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-02-03 23:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-03 13:09 [PATCH 0/2] ipmi: ssif_bmc: Add support for adjustable response timeout Potin Lai
2025-02-03 13:09 ` [PATCH 1/2] bindings: ipmi: ssif-bmc: Add property to adjust " Potin Lai
2025-02-03 23:01 ` Rob Herring (Arm)
2025-02-03 13:09 ` [PATCH 2/2] ipmi: ssif_bmc: Add support for adjustable " Potin Lai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®