Change in osmo-e1d[master]: usb: Add warning for error during interrupt transfers
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; -- To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/26809 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1d Gerrit-Branch: master Gerrit-Change-Id: Id4d2c95a2d934700f817e971aa4ce29e4bd85675 Gerrit-Change-Number: 26809 Gerrit-PatchSet: 1 Gerrit-Owner: tnt <tnt@246tNt.com> Gerrit-MessageType: newchange
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) -- To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/26809 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1d Gerrit-Branch: master Gerrit-Change-Id: Id4d2c95a2d934700f817e971aa4ce29e4bd85675 Gerrit-Change-Number: 26809 Gerrit-PatchSet: 1 Gerrit-Owner: tnt <tnt@246tNt.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-Comment-Date: Sun, 09 Jan 2022 22:00:07 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
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; -- To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/26809 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1d Gerrit-Branch: master Gerrit-Change-Id: Id4d2c95a2d934700f817e971aa4ce29e4bd85675 Gerrit-Change-Number: 26809 Gerrit-PatchSet: 1 Gerrit-Owner: tnt <tnt@246tNt.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-MessageType: merged
participants (2)
-
laforge -
tnt