Nico Huber has uploaded this change for review.

View Change

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>
---
M linux_spi.c
1 file changed, 1 insertion(+), 1 deletion(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/50/25150/1
diff --git a/linux_spi.c b/linux_spi.c
index e51fbc4..d276402 100644
--- a/linux_spi.c
+++ b/linux_spi.c
@@ -183,7 +183,7 @@
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)

To view, visit change 25150. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: 1.0.x
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ide50db38af1004fde09a70b15938e77f5e1285ac
Gerrit-Change-Number: 25150
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h@gmx.de>