i3c: Fix default I2C adapter timeout value
Subsystems (2)
PATCH v2 1/1 i3c: Fix default I2C adapter timeout value
Commit 3a379bbcea0a ("i3c: Add core I3C infrastructure") set the default adapter timeout for I2C transfers as 1000 (ms). However that parameter is defined in jiffies not in milliseconds.
With mipi-i3c-hci driver this wasn't visible until commit c0a90eb55a69 ("i3c: mipi-i3c-hci: use adapter timeout value for I2C transfers").
Fix this by setting the default timeout as HZ (CONFIG_HZ) not 1000.
---
v2:
- Stable Cc'ed just in case. While the incorrect default timeout value was introduced back in v5.0 it became visible only due to commits in v6.17-rc1 and if CONFIG_HZ != 1000.
- Added Fixes tag for the Renesas I3C controller. Thanks to Wolfram Sang <[email protected]> for noticing.
- Added Reviewed-by tags from Frank and Wolfram.
--- drivers/i3c/master.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i3c/master.c +1 -1
@@ -2492,7 +2492,7 @@ static int i3c_master_i2c_adapter_init(struct i3c_master_controller *master)strscpy (adap->name,dev_name (master->dev.parent),sizeof (adap->name));/* FIXME: Should we allow i3c masters to override these values? */ - adap->timeout =1000 ; + adap->timeout =HZ ; adap->retries =3 ; id =of_alias_get_id (master->dev.of_node,"i2c" );
Signature · 1 line
2.47.2
Quoted 8 lines · Jarkko Nikula
Commit
3a379bbcea0a("i3c: Add core I3C infrastructure") set the default adapter timeout for I2C transfers as 1000 (ms). However that parameter is defined in jiffies not in milliseconds.With mipi-i3c-hci driver this wasn't visible until commit
c0a90eb55a69("i3c: mipi-i3c-hci: use adapter timeout value for I2C transfers").[...]
Applied, thanks!
[1/1] i3c: Fix default I2C adapter timeout value
https://git.kernel.org/i3c/c/f6fecd2759be
Best regards,
Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com