Nico Huber has posted comments on this change. ( https://review.coreboot.org/22344 )
Change subject: linux_spi: Dynamically detect max buffer size
......................................................................
Patch Set 6: Verified-1 Code-Review+2
(3 comments)
https://review.coreboot.org/#/c/22344/5/linux_spi.c
File linux_spi.c:
https://review.coreboot.org/#/c/22344/5/linux_spi.c@143
PS5, Line 143: if (feof(fp))
> In any case, I went ahead and added an feof() to check for this
> condition. I was thinking of using stat(), but that would add a few
> more lines and seemed redundant with fopen() error handling in this
> case. LMK if you have a preference.
feof() is fine. stat() seems overkill and I'm not sure how well it is
implemented for sysfs ;)
>
> BTW - It may be worth moving all this logic to a file handling
> library some day, especially as we improve support for Linux
> interfaces that involve searching thru sysfs and proc and
> potentially opening/closing a lot of files.
Sounds good, especially if we hit the same pattern (e.g. reading an
unsigned) from a file again.
https://review.coreboot.org/#/c/22344/5/linux_spi.c@154
PS5, Line 154: msg_pwarn("Buffer size %ld from %s seems wrong.\n", tmp, BUF_SIZE_FROM_SYSFS);
> Yeah, that's certainly an assumption that I suppose language lawyers may ta
Same for the part of the string we didn't read, e.g. what if we
don't hit EOF after 10 chars oO
https://review.coreboot.org/#/c/22344/5/linux_spi.c@163
PS5, Line 163:
> Should I follow-up with a patch to use sysconf(_SC_PAGESIZE) instead, as su
Not a big issue, IMO. But if you do, I'm happy to review.
--
To view, visit https://review.coreboot.org/22344
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: staging
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic541e548ced8488f074d388f1c92174cad123064
Gerrit-Change-Number: 22344
Gerrit-PatchSet: 6
Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Reviewer: david.hendricks(a)gmail.com
Gerrit-Comment-Date: Mon, 13 Nov 2017 18:55:07 +0000
Gerrit-HasComments: Yes
Nico Huber has posted comments on this change. ( https://review.coreboot.org/22383 )
Change subject: spi25: Use common code for nbyte read/write and block erase
......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/#/c/22383/1/spi25.c
File spi25.c:
https://review.coreboot.org/#/c/22383/1/spi25.c@384
PS1, Line 384: iff
> if
`iff` is short for `if and only if`... I can write it out ofc.
--
To view, visit https://review.coreboot.org/22383
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibc1ae48acbfbd427a30bcd64bdc080dc3dc20503
Gerrit-Change-Number: 22383
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Mon, 13 Nov 2017 09:00:26 +0000
Gerrit-HasComments: Yes
David Hendricks has posted comments on this change. ( https://review.coreboot.org/22384 )
Change subject: spi25: Integrate 4BA support
......................................................................
Patch Set 1:
I haven't gone thru this patch again (I suspect it's fine), but wanted to add response to your comment in 22020. The W25Q256FV is an example of a chip which supports:
- Native 4BA instructions
- Extended address register: 3BA commands used with a separate register to hold the most significant address byte.
- 4BA address mode: 3BA commands re-purposed to clock in 4 address bytes instead of 3.
--
To view, visit https://review.coreboot.org/22384
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I644600beaab9a571b97b67f7516abe571d3460c1
Gerrit-Change-Number: 22384
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Mon, 13 Nov 2017 01:47:46 +0000
Gerrit-HasComments: No
David Hendricks has posted comments on this change. ( https://review.coreboot.org/22344 )
Change subject: linux_spi: Dynamically detect max buffer size
......................................................................
Patch Set 6:
Cherry-picked to master here: https://review.coreboot.org/#/c/22441/
If you're OK with this patch I will abandon this one and merge the one on master instead.
--
To view, visit https://review.coreboot.org/22344
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: staging
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic541e548ced8488f074d388f1c92174cad123064
Gerrit-Change-Number: 22344
Gerrit-PatchSet: 6
Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Reviewer: david.hendricks(a)gmail.com
Gerrit-Comment-Date: Mon, 13 Nov 2017 00:52:54 +0000
Gerrit-HasComments: No