[PATCH v3 06/11] i3c: master: svc: use repeat start when IBI WIN happens

Miquel Raynal miquel.raynal at bootlin.com
Fri Aug 23 09:09:30 PDT 2024


Hi Frank,

Frank.Li at nxp.com wrote on Mon, 19 Aug 2024 12:02:00 -0400:

> There is a possibility of an IBI WIN occurring when addressing issues, even
> when sending CCC commands. Most of the time, returning -EAGAIN is
> acceptable, but the case below becomes highly complex.
> 
> When a Hotjoin event occurs:
> - i3c_master_do_daa()
>   - i3c_master_add_i3c_dev_locked()
>     - A dynamic address (e.g., 0x9) is already set during DAA.
>     - i3c_master_getpid_locked()
>       - Another device issues HJ or IBI here. Returning -EAGAIN causes
>         failure in adding the new device. However, the dynamic address(0x9)
>         has already been assigned to this device. If another device issues
>         HJ, it will get this address 0x9 again, causing two devices on the
>         bus to use the same dynamic address 0x9.
>       - Attempting to send RSTDAA when the first device fails at
>         i3c_master_getpid_locked() could also fail when sending RSTDAA for
>         the same reason.
> 
> According to the I3C spec, address arbitration only happens at START, never
> at REPEAT start. Using repeat start when an IBI WIN occurs simplifies this
> case, as i3c_master_getpid_locked() will not return an error when another
> device tries to send HJ or IBI.
> 
> Signed-off-by: Frank Li <Frank.Li at nxp.com>

Feels sensible.

Acked-by: Miquel Raynal <miquel.raynal at bootlin.com>

Thanks,
Miquèl



More information about the linux-i3c mailing list