Commit 3ce3b210 authored by Thinh Nguyen's avatar Thinh Nguyen Committed by Greg Kroah-Hartman
Browse files

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: default avatarThinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/d4e55c13be8f83f99ee55f7b979a99e2c14fc4c8.1733876548.git.Thinh.Nguyen@synopsys.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a4d7274d
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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) {