fru: Fix write chunk reduction code

Check against FRU_AREA_MAXIMUM_BLOCK_SZ instead of FRU_BLOCK_SZ
when checking if the write chunk needs to be reduced.
Apparently, that was the original intention, and then there
was just a typo. In other places the same check is done properly.

Signed-off-by: Patrick Venture <venture@google.com>
This commit is contained in:
Patrick Venture 2018-12-28 07:32:36 -08:00 committed by Alexander Amelkin
parent feecd2bbf4
commit eb5f26060a

View File

@ -610,7 +610,7 @@ write_fru_area(struct ipmi_intf * intf, struct fru_info *fru, uint8_t id,
}
if (fru_cc_rq2big(rsp->ccode)) {
if (fru->max_write_size > FRU_BLOCK_SZ) {
if (fru->max_write_size > FRU_AREA_MAXIMUM_BLOCK_SZ) {
fru->max_write_size -= FRU_BLOCK_SZ;
lprintf(LOG_INFO, "Retrying FRU write with request size %d",
fru->max_write_size);