Skip to content

Commit e56e27a

Browse files
drivers: i3c: cdns: remove +1 on len for abort limit
The datasheet erroneously suggested to add a + 1 to the abort len. This was suggested because if a controller gave a EoD, then it was afraid that the abort would take precedence over the EoD. This was not true. The EoD will always take precedence over a controller abort. Remove the + 1 as this can cause issues. For example, when talking to a part that will auto-increment a read address, having the +1 can unknownly move this address pointer further than anticipated. Signed-off-by: Ryan McClelland <[email protected]>
1 parent fc8b796 commit e56e27a

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

drivers/i3c/i3c_cdns.c

+5-7
Original file line numberDiff line numberDiff line change
@@ -2330,14 +2330,12 @@ static int cdns_i3c_transfer(const struct device *dev, struct i3c_device_desc *t
23302330
cmd->cmd0 |= CMD0_FIFO_DEV_ADDR(target->dynamic_addr);
23312331
if ((msgs[i].flags & I3C_MSG_RW_MASK) == I3C_MSG_READ) {
23322332
cmd->cmd0 |= CMD0_FIFO_RNW;
2333-
/*
2334-
* For I3C_XMIT_MODE_NO_ADDR reads in SDN mode,
2335-
* CMD0_FIFO_PL_LEN specifies the abort limit not bytes to read
2336-
*/
2337-
cmd->cmd0 |= CMD0_FIFO_PL_LEN(pl + 1);
2338-
} else {
2339-
cmd->cmd0 |= CMD0_FIFO_PL_LEN(pl);
23402333
}
2334+
/*
2335+
* For I3C_XMIT_MODE_NO_ADDR reads in SDN mode,
2336+
* CMD0_FIFO_PL_LEN specifies the abort limit not bytes to read
2337+
*/
2338+
cmd->cmd0 |= CMD0_FIFO_PL_LEN(pl);
23412339

23422340
/* Send broadcast header on first transfer or after a STOP. */
23432341
if (!(msgs[i].flags & I3C_MSG_NBCH) && (send_broadcast)) {

0 commit comments

Comments
 (0)