[PATCH 1/2] spi: ich: Limit slave->max_read_size
Simon Glass
sjg at chromium.org
Thu Jul 29 03:32:29 CEST 2021
On Wed, 28 Jul 2021 at 04:29, Bin Meng <bmeng.cn at gmail.com> wrote:
>
> Since commit 43c145b8b3ee ("spi: ich: Correct max-size bug in ich_spi_adjust_size()")
> (in v2020.04-rc1), SPI flash read no longer works with ICH SPI controller
> in software sequencer mode.
>
> ICH controller can only transfer a small number of bytes at once.
> Before commit 43c145b8b3ee, the logic happens to make sure data.nbytes
> is limited to slave->max_write_size but after commit 43c145b8b3ee
> data.nbytes is no longer limited because slave->max_read_size is not
> initialized with a valid number.
>
> Fixes: 43c145b8b3ee ("spi: ich: Correct max-size bug in ich_spi_adjust_size()")
> Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
> ---
>
> drivers/spi/ich.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
Reviewed-by: Simon Glass <sjg at chromium.org>
More information about the U-Boot
mailing list