Stefan Reinauer has uploaded this change for review. ( https://review.coreboot.org/c/em100/+/47841 )
Change subject: Limit USB errors in trace / terminal mode
......................................................................
Limit USB errors in trace / terminal mode
If the device gets into a bad state (or, say, gets disconnected),
bail out after 10 errors instead of continuing ad infinitum.
Signed-off-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Change-Id: I1474386c69d267dba3bccaa740213753c06fee0c
---
M em100.c
1 file changed, 11 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/em100 refs/changes/41/47841/1
diff --git a/em100.c b/em100.c
index f7bbb2d..2866f91 100644
--- a/em100.c
+++ b/em100.c
@@ -1190,6 +1190,8 @@
}
if (trace || terminal) {
+ int usb_errors = 0;
+
if ((holdpin == NULL) && (!set_hold_pin_state(em100, 3))) {
printf("Error: Failed to set EM100 to input\n");
return 1;
@@ -1212,12 +1214,15 @@
printf(". Press CTL-C to exit.\n\n");
- while (!do_exit_flag) {
- if (trace)
- read_spi_trace(em100, terminal,
- address_offset);
- else
- read_spi_terminal(em100, 0);
+ while (!do_exit_flag && usb_errors < 10) {
+ if (trace) {
+ if (!read_spi_trace(em100, terminal,
+ address_offset))
+ usb_errors++;
+ } else {
+ if (!read_spi_terminal(em100, 0))
+ usb_errors++;
+ }
}
if (!do_start && !do_stop)
--
To view, visit https://review.coreboot.org/c/em100/+/47841
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: em100
Gerrit-Branch: master
Gerrit-Change-Id: I1474386c69d267dba3bccaa740213753c06fee0c
Gerrit-Change-Number: 47841
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-MessageType: newchange
Hello build bot (Jenkins), Patrick Georgi, Martin Roth, Michael Niewöhner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47820
to look at the new patch set (#3).
Change subject: mb/clevo/cml-u: Move hda_verb.c to mainboard's Makefile
......................................................................
mb/clevo/cml-u: Move hda_verb.c to mainboard's Makefile
Move hda_verb.c from the variant's Makefile to the mainboard's Makefile,
because every variant needs one.
Change-Id: Ia94813f68620abcff48de4fdb117466c91f6863c
Signed-off-by: Felix Singer <felixsinger(a)posteo.net>
---
M src/mainboard/clevo/cml-u/Makefile.inc
M src/mainboard/clevo/cml-u/variants/l140cu/Makefile.inc
2 files changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/20/47820/3
--
To view, visit https://review.coreboot.org/c/coreboot/+/47820
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ia94813f68620abcff48de4fdb117466c91f6863c
Gerrit-Change-Number: 47820
Gerrit-PatchSet: 3
Gerrit-Owner: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Michael Niewöhner <foss(a)mniewoehner.de>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: newpatchset