tnt has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-e1d/+/26809 )
Change subject: usb: Add warning for error during interrupt transfers ......................................................................
usb: Add warning for error during interrupt transfers
Signed-off-by: Sylvain Munaut tnt@246tNt.com Change-Id: Id4d2c95a2d934700f817e971aa4ce29e4bd85675 --- M src/usb.c 1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-e1d refs/changes/09/26809/1
diff --git a/src/usb.c b/src/usb.c index 32a249a..c67f5b9 100644 --- a/src/usb.c +++ b/src/usb.c @@ -352,6 +352,11 @@ struct e1_line *line = (struct e1_line *) xfer->user_data; const struct ice1usb_irq *irq = (const struct ice1usb_irq *) xfer->buffer;
+ if (xfer->status != LIBUSB_TRANSFER_COMPLETED) { + LOGPLI(line, DE1D, LOGL_ERROR, "Error in Interrupt transfer\n"); + goto out; + } + if (!xfer->actual_length) { LOGPLI(line, DE1D, LOGL_ERROR, "Zero-Length Interrupt transfer\n"); goto out;
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-e1d/+/26809 )
Change subject: usb: Add warning for error during interrupt transfers ......................................................................
Patch Set 1: Code-Review+2
In my patch I'm adding a value_string array for provoding more detailed status for the isochronous endpoints. I suggests to merge yours as-is and then I'll make it also use this value-string-array here. (https://gerrit.osmocom.org/c/osmo-e1d/+/26819)
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-e1d/+/26809 )
Change subject: usb: Add warning for error during interrupt transfers ......................................................................
usb: Add warning for error during interrupt transfers
Signed-off-by: Sylvain Munaut tnt@246tNt.com Change-Id: Id4d2c95a2d934700f817e971aa4ce29e4bd85675 --- M src/usb.c 1 file changed, 5 insertions(+), 0 deletions(-)
Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved
diff --git a/src/usb.c b/src/usb.c index 32a249a..c67f5b9 100644 --- a/src/usb.c +++ b/src/usb.c @@ -352,6 +352,11 @@ struct e1_line *line = (struct e1_line *) xfer->user_data; const struct ice1usb_irq *irq = (const struct ice1usb_irq *) xfer->buffer;
+ if (xfer->status != LIBUSB_TRANSFER_COMPLETED) { + LOGPLI(line, DE1D, LOGL_ERROR, "Error in Interrupt transfer\n"); + goto out; + } + if (!xfer->actual_length) { LOGPLI(line, DE1D, LOGL_ERROR, "Zero-Length Interrupt transfer\n"); goto out;