Restart the USB transfer if the error is not USB_ERR_CANCELLED.

This commit is contained in:
Kevin Lo 2012-09-12 07:59:28 +00:00
parent d4b6c03ea9
commit 92665d2b55
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=240382

View File

@ -631,10 +631,7 @@ ufoma_ctrl_read_callback(struct usb_xfer *xfer, usb_error_t error)
if (error == USB_ERR_CANCELLED) {
return;
} else {
goto tr_setup;
}
goto tr_transferred;
}
}
@ -651,7 +648,6 @@ ufoma_ctrl_write_callback(struct usb_xfer *xfer, usb_error_t error)
case USB_ST_TRANSFERRED:
tr_transferred:
case USB_ST_SETUP:
tr_setup:
pc = usbd_xfer_get_frame(xfer, 1);
if (ucom_get_data(&sc->sc_ucom, pc, 0, 1, &actlen)) {
@ -677,10 +673,7 @@ ufoma_ctrl_write_callback(struct usb_xfer *xfer, usb_error_t error)
if (error == USB_ERR_CANCELLED) {
return;
} else {
goto tr_setup;
}
goto tr_transferred;
}
}