Change in simtrace2[master]: qmod: error on EEPROM erase fail
Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/10365 ) Change subject: qmod: error on EEPROM erase fail .. qmod: error on EEPROM erase fail repeating the EEPROM erase (byte write) in case of byte write failure could lead in an infinite loop. log the error an return error code instead. Change-Id: Id6f3654d877ca772ba04237da91a6e86e3f441ec --- M firmware/libboard/qmod/source/board_qmod.c 1 file changed, 5 insertions(+), 3 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/firmware/libboard/qmod/source/board_qmod.c b/firmware/libboard/qmod/source/board_qmod.c index acd090f..bdc08f9 100644 --- a/firmware/libboard/qmod/source/board_qmod.c +++ b/firmware/libboard/qmod/source/board_qmod.c @@ -113,9 +113,11 @@ /* write the EEPROM once */ for (i = 0; i < 256; i++) { int rc = eeprom_write_byte(0x50, i, 0xff); - /* if the result was negative, repeat that write */ - if (rc < 0) - i--; + if (rc < 0) { + TRACE_ERROR("Erasing EEPROM failed at byte %u: 0x%02x\n\r", + i, __eeprom_bin[i]); + return 1; + } } return 0; -- To view, visit https://gerrit.osmocom.org/10365 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Id6f3654d877ca772ba04237da91a6e86e3f441ec Gerrit-Change-Number: 10365 Gerrit-PatchSet: 2 Gerrit-Owner: Kévin Redon Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder
Change in simtrace2[master]: qmod: error on EEPROM erase fail
Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/10365 ) Change subject: qmod: error on EEPROM erase fail .. Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/10365 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id6f3654d877ca772ba04237da91a6e86e3f441ec Gerrit-Change-Number: 10365 Gerrit-PatchSet: 2 Gerrit-Owner: Kévin Redon Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Comment-Date: Tue, 07 Aug 2018 15:14:44 + Gerrit-HasComments: No Gerrit-HasLabels: Yes
Change in simtrace2[master]: qmod: error on EEPROM erase fail
Harald Welte has uploaded a new patch set (#2) to the change originally created by Kévin Redon. ( https://gerrit.osmocom.org/10365 ) Change subject: qmod: error on EEPROM erase fail .. qmod: error on EEPROM erase fail repeating the EEPROM erase (byte write) in case of byte write failure could lead in an infinite loop. log the error an return error code instead. Change-Id: Id6f3654d877ca772ba04237da91a6e86e3f441ec --- M firmware/libboard/qmod/source/board_qmod.c 1 file changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/65/10365/2 -- To view, visit https://gerrit.osmocom.org/10365 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id6f3654d877ca772ba04237da91a6e86e3f441ec Gerrit-Change-Number: 10365 Gerrit-PatchSet: 2 Gerrit-Owner: Kévin Redon Gerrit-Reviewer: Jenkins Builder
Change in simtrace2[master]: qmod: error on EEPROM erase fail
Kévin Redon has uploaded this change for review. ( https://gerrit.osmocom.org/10365 Change subject: qmod: error on EEPROM erase fail .. qmod: error on EEPROM erase fail repeating the EEPROM erase (byte write) in case of byte write failure could lead in an infinite log. log the error an return error code instead. Change-Id: Id6f3654d877ca772ba04237da91a6e86e3f441ec --- M firmware/libboard/qmod/source/board_qmod.c 1 file changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/65/10365/1 diff --git a/firmware/libboard/qmod/source/board_qmod.c b/firmware/libboard/qmod/source/board_qmod.c index acd090f..bdc08f9 100644 --- a/firmware/libboard/qmod/source/board_qmod.c +++ b/firmware/libboard/qmod/source/board_qmod.c @@ -113,9 +113,11 @@ /* write the EEPROM once */ for (i = 0; i < 256; i++) { int rc = eeprom_write_byte(0x50, i, 0xff); - /* if the result was negative, repeat that write */ - if (rc < 0) - i--; + if (rc < 0) { + TRACE_ERROR("Erasing EEPROM failed at byte %u: 0x%02x\n\r", + i, __eeprom_bin[i]); + return 1; + } } return 0; -- To view, visit https://gerrit.osmocom.org/10365 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Id6f3654d877ca772ba04237da91a6e86e3f441ec Gerrit-Change-Number: 10365 Gerrit-PatchSet: 1 Gerrit-Owner: Kévin Redon