laforge has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-e1d/+/29953 )
Change subject: usb.c: Bail out of e1-tracer doesn't accept set_configuration(2)
......................................................................
usb.c: Bail out of e1-tracer doesn't accept set_configuration(2)
This likely means it's not an e1-tracer after all, or it's an old
firmware that doesn't yet expose the e1d-compatible USB configuration.
Related: OS#5734
Change-Id: If5a9bc20084d84885d5d97b4f982e94801612d24
---
M src/usb.c
1 file changed, 7 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-e1d refs/changes/53/29953/1
diff --git a/src/usb.c b/src/usb.c
index dc89bb0..35e1894 100644
--- a/src/usb.c
+++ b/src/usb.c
@@ -876,8 +876,13 @@
}
/* we have prior knowledge that the e1-tracer firmware configuration 2 is the e1d
compatible mode. */
- if (is_tracer)
- libusb_set_configuration(devh, 2);
+ if (is_tracer) {
+ if (libusb_set_configuration(devh, 2) != LIBUSB_SUCCESS) {
+ LOGP(DE1D, LOGL_ERROR, "Cannot set configuration 2 of e1-tracer device. Maybe too
old firmware?\n");
+ libusb_close(devh);
+ return -EIO;
+ }
+ }
INIT_LLIST_HEAD(&intf_data->ctrl_inprogress);
--
To view, visit
https://gerrit.osmocom.org/c/osmo-e1d/+/29953
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: If5a9bc20084d84885d5d97b4f982e94801612d24
Gerrit-Change-Number: 29953
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange