* Be sure to save the status of the xfer before reissuing the xfer
in an interrupt pipe callback.
This fixes an issue where ukbd thought the keyboard events from
ehci were illegal because the status of the transfer was always
IN_PROGRESS instead of COMPLETE.
Interrupt pipes reissue their xfers prior to making the callback
in order to ensure that the xfer is not somewhere in no-man's land
if the callback enters the debugger (i.e. ctl-alt-esc).
xfer->callback(xfer, xfer->priv, xfer->status);
pipe->methods->done(xfer);
} else {
- pipe->methods->done(xfer);
+ int status = xfer->status; /* get this before restart */
+ pipe->methods->done(xfer); /* restart */
if (xfer->callback)
- xfer->callback(xfer, xfer->priv, xfer->status);
+ xfer->callback(xfer, xfer->priv, status);
}
if (sync && !polling)