-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added kernel detach to avoid error: LIBUSB_ERROR_BUSY #64
Conversation
*fixed kernel claim |
firehose.c
Outdated
@@ -130,13 +130,13 @@ static int firehose_read(struct qdl_device *qdl, int timeout_ms, | |||
timeradd(&now, &delta, &timeout); | |||
|
|||
for (;;) { | |||
n = qdl_read(qdl, buf, sizeof(buf), 100); | |||
n = qdl_read(qdl, buf, sizeof(buf), 700); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But when we hit this timeout, won't timercmp() below result in the loop to be continued?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see pull request #67.
usb.c
Outdated
@@ -193,8 +193,10 @@ int qdl_read(struct qdl_device *qdl, void *buf, size_t len, unsigned int timeout | |||
int ret; | |||
|
|||
ret = libusb_bulk_transfer(qdl->usb_handle, qdl->in_ep, buf, len, &actual, timeout); | |||
if (ret < 0) | |||
if (ret < 0){ | |||
warnx("bulk read failed: %s", libusb_strerror(ret)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this not result in two timeout prints when a timeout happens?
And for the initial firehose_read() in firehose_run(), we do expect to get a timeout once we've consumed the LOG entries. I would hope we can remove the existing "firehose operation timed out" print.
We did some testing and have confirmed that the LIBUSB_ERROR_BUSY is something we want, so I was hoping to merge that. |
ok, created separate commit only for LIBUSB_ERROR_BUSY : #68 I got mate, who can reflash over Windows with QFIL without problems, but at linux got constant timeout in random places, usually at big image part 2 gb: FIREHOSE READ: |
No description provided.