Commit 5ec4f210 authored by Bjorn Andersson's avatar Bjorn Andersson
Browse files

firehose: Continue reading log entries after response



On db410c the target sends log entries after the response and refuse to
serve any subsequent requests until these are consumed, so continue
reading log entries until we get a timeout.
Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent 1ac148c4
......@@ -120,9 +120,12 @@ static int firehose_read(struct qdl_device *qdl, int wait, int (*response_parser
if (wait > 0)
timeout = 10000;
while (!done) {
for (;;) {
n = qdl_read(qdl, buf, sizeof(buf), timeout);
if (n < 0) {
if (done)
break;
warn("failed to read");
return -ETIMEDOUT;
}
......@@ -155,6 +158,7 @@ static int firehose_read(struct qdl_device *qdl, int wait, int (*response_parser
else
ret = response_parser(node);
done = true;
timeout = 1;
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment