]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: gadget: eem: fix echo command packet response issue
authorLinyu Yuan <linyyuan@codeaurora.com>
Wed, 16 Jun 2021 11:51:42 +0000 (19:51 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jul 2021 14:15:39 +0000 (16:15 +0200)
commitd654be97e1b679616e3337b871a9ec8f31a88841
tree49be3d8895f67298e7fb65ea5e96f0c11c5a88b5
parent16151f468e8a7122bca0ee92732bd9ed09735f49
usb: gadget: eem: fix echo command packet response issue

commit 4249d6fbc10fd997abdf8a1ea49c0389a0edf706 upstream.

when receive eem echo command, it will send a response,
but queue this response to the usb request which allocate
from gadget device endpoint zero,
and transmit the request to IN endpoint of eem interface.

on dwc3 gadget, it will trigger following warning in function
__dwc3_gadget_ep_queue(),

if (WARN(req->dep != dep, "request %pK belongs to '%s'\n",
&req->request, req->dep->name))
return -EINVAL;

fix it by allocating a usb request from IN endpoint of eem interface,
and transmit the usb request to same IN endpoint of eem interface.

Signed-off-by: Linyu Yuan <linyyuan@codeaurora.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210616115142.34075-1-linyyuan@codeaurora.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/f_eem.c