mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-05 14:40:12 -04:00
usb: gadget: f_tcm: Requeue command request on error
If there's error on command request, make sure to requeue to receive the next one. Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/d4e55c13be8f83f99ee55f7b979a99e2c14fc4c8.1733876548.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a4d7274d07
commit
3ce3b2108f
@@ -283,8 +283,13 @@ static void bot_cmd_complete(struct usb_ep *ep, struct usb_request *req)
|
||||
|
||||
fu->flags &= ~USBG_BOT_CMD_PEND;
|
||||
|
||||
if (req->status < 0)
|
||||
if (req->status < 0) {
|
||||
struct usb_gadget *gadget = fuas_to_gadget(fu);
|
||||
|
||||
dev_err(&gadget->dev, "BOT command req err (%d)\n", req->status);
|
||||
bot_enqueue_cmd_cbw(fu);
|
||||
return;
|
||||
}
|
||||
|
||||
ret = bot_submit_command(fu, req->buf, req->actual);
|
||||
if (ret) {
|
||||
|
||||
Reference in New Issue
Block a user