[PATCH] i2c: designware: demote arbitration lost message to debug level

From: WangYuli

Date: Tue Nov 24 2026 - 08:01:04 EST


From: WangYuli <wangyl5933@xxxxxxxxxxxxxx>

On a MECHREVO XINGYAO 14 (Ryzen AI 9 H 365) the DesignWare controller
behind AMDI0010:01 repeatedly reports arbitration loss on the touchpad
bus while the system runs on battery:

[162434.524491] i2c_designware AMDI0010:01: i2c_dw_handle_tx_abort: lost arbitration
[162437.878670] i2c_designware AMDI0010:01: i2c_dw_handle_tx_abort: lost arbitration
[162452.208445] i2c_designware AMDI0010:01: i2c_dw_handle_tx_abort: lost arbitration
...

Up to 94 messages within one hour were recorded, while the touchpad
remained usable during testing.

Losing arbitration is a defined part of the I2C protocol [1], and the
I2C core already handles it by retrying the transfer [2]. The driver
logs each aborted attempt before the I2C core determines the final
transfer result, so at error level these messages flood the log.

Log the arbitration-loss reason at debug level.

The driver continues to return -EAGAIN, allowing the I2C core to retry
the transfer within the adapter's retry and timeout limits. The log
level of the other abort reasons and all return values stay unchanged;
in particular NACK-type aborts are already reported at debug level.

This follows the practice of i2c-imx (commit 1de67a3dee7a ("i2c: imx:
Check for I2SR_IAL after every byte")), i2c-mpc (commit 1538d82f4647
("i2c: mpc: Interrupt driven transfer")) and i2c-synquacer
(commit 0d676a6c4390 ("i2c: add support for Socionext SynQuacer I2C
controller")), which report arbitration loss at debug level.

As a consequence, the arbitration-loss message is also hidden for the
last attempt of a transfer whose retries are exhausted. Arbitration
losses remain available through dynamic debug, and the final result of
a transfer through the i2c_result tracepoint.

NOTE: The cause of the arbitration loss on this machine is still unknown.

[1] UM10204 "I2C-bus specification and user manual" Rev 7.0
(1 October 2021), section 3.1.8 "Arbitration": "No information is
lost during the arbitration process. A controller that loses the
arbitration [...] must restart its transaction when the bus is free."
It is the I2C-bus protocol specification, which NXP maintains as
successor of Philips Semiconductors, and which the kernel I2C
documentation itself references (Documentation/i2c/summary.rst):
https://www.nxp.com/docs/en/user-guide/UM10204.pdf
[2] Documentation/i2c/fault-codes.rst: "EAGAIN: Returned by I2C
adapters when they lose arbitration in master transmit mode".

Fixes: ce6eb574a1d9 ("i2c-designware: Tx abort cleanups")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: WangYuli <wangyl5933@xxxxxxxxxxxxxx>
---
drivers/i2c/busses/i2c-designware-common.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/i2c/busses/i2c-designware-common.c b/drivers/i2c/busses/i2c-designware-common.c
index a1eca6cd4b75..93256f3786a5 100644
--- a/drivers/i2c/busses/i2c-designware-common.c
+++ b/drivers/i2c/busses/i2c-designware-common.c
@@ -783,8 +783,15 @@ int i2c_dw_handle_tx_abort(struct dw_i2c_dev *dev)
return -EREMOTEIO;
}

- for_each_set_bit(i, &abort_source, ARRAY_SIZE(abort_sources))
- dev_err(dev->dev, "%s: %s\n", __func__, abort_sources[i]);
+ for_each_set_bit(i, &abort_source, ARRAY_SIZE(abort_sources)) {
+ /* Avoid arbitration loss noise. */
+ if (i == ARB_LOST)
+ dev_dbg(dev->dev,
+ "%s: %s\n", __func__, abort_sources[i]);
+ else
+ dev_err(dev->dev,
+ "%s: %s\n", __func__, abort_sources[i]);
+ }

if (abort_source & DW_IC_TX_ARB_LOST)
return -EAGAIN;
--
2.55.0