Commit 49d4db3
i2c: designware: Correct length byte validation logic
Commit 0daede8 ("i2c: designware: Convert driver to using regmap API")
changes the logic to validate the whole 32-bit return value of
DW_IC_DATA_CMD register instead of 8-bit LSB without reason.
Later, commit f53f15b ("i2c: designware: Get right data length"),
introduced partial fix but not enough because the "tmp > 0" still test
tmp as 32-bit value and is wrong in case the IC_DATA_CMD[11] is set.
Revert the logic to just before commit 0daede8
("i2c: designware: Convert driver to using regmap API").
Fixes: f53f15b ("i2c: designware: Get right data length")
Fixes: 0daede8 ("i2c: designware: Convert driver to using regmap API")
Cc: [email protected]
Signed-off-by: Tam Nguyen <[email protected]>
Signed-off-by: Quan Nguyen <[email protected]>
Acked-by: Jarkko Nikula <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Andi Shyti <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>1 parent b610c4b commit 49d4db3
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
588 | 588 | | |
589 | 589 | | |
590 | 590 | | |
| 591 | + | |
591 | 592 | | |
592 | 593 | | |
593 | | - | |
| 594 | + | |
594 | 595 | | |
595 | 596 | | |
596 | 597 | | |
| |||
0 commit comments