diff options
author | Nico Huber <nico.huber@secunet.com> | 2018-03-08 16:14:15 +0100 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2018-03-20 10:01:48 +0000 |
commit | 6b9e934fe56bf8ef70e240ff3ef6634f4dfd589e (patch) | |
tree | ffb8e45b1b3f21180fb04bd03db9e7cfdfb9f531 | |
parent | e7792e3b8352526134e27cac0e1c5f79ad3b8a29 (diff) | |
download | flashrom-6b9e934fe56bf8ef70e240ff3ef6634f4dfd589e.tar.gz flashrom-6b9e934fe56bf8ef70e240ff3ef6634f4dfd589e.tar.bz2 flashrom-6b9e934fe56bf8ef70e240ff3ef6634f4dfd589e.zip |
linux_spi: Reduce maximum read chunksize
It turned out that older kernels use a single buffer for combined
input and output data. So we have to account for the read command +
max 3 address bytes.
Change-Id: Ide50db38af1004fde09a70b15938e77f5e1285ac
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/25150
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
-rw-r--r-- | linux_spi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/linux_spi.c b/linux_spi.c index e51fbc420..d2764029d 100644 --- a/linux_spi.c +++ b/linux_spi.c @@ -183,7 +183,7 @@ static int linux_spi_read(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len) { return spi_read_chunked(flash, buf, start, len, - (unsigned int)getpagesize()); + (unsigned int)getpagesize() - 4); } static int linux_spi_write_256(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len) |