david.hendricks@gmail.com has posted comments on this change. ( https://review.coreboot.org/22344 )
Change subject: linux_spi: Dynamically detect max buffer size ......................................................................
Patch Set 1:
(4 comments)
https://review.coreboot.org/#/c/22344/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/#/c/22344/1//COMMIT_MSG@9 PS1, Line 9: The max buffer size of the linux kernel's SPI device is a compile-time parameter. : Read it on initialization and use it to inform the max transfer size. We allow : up to 5 bytes for the SPI command. On master, SPI commands are always 4 bytes, : but 4ba support will raise that to 5. Choosing 5 makes sure this will keep long lines
https://review.coreboot.org/#/c/22344/1//COMMIT_MSG@12 PS1, Line 12: but 4ba support will raise that to 5. Choosing 5 makes sure this will keep : working when 4ba support is merged. 4BA has been merged, so I updated the wording here.
https://review.coreboot.org/#/c/22344/1/linux_spi.c File linux_spi.c:
https://review.coreboot.org/#/c/22344/1/linux_spi.c@138 PS1, Line 138: atoi(buf); Updated to use strtol() and add some paranoid error checking.
https://review.coreboot.org/#/c/22344/1/linux_spi.c@141 PS1, Line 141: if (param_fd != -1) : close(param_fd); May as well put this in the else clause above.