]> git.baikalelectronics.ru Git - kernel.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>
Wed, 14 Jul 2021 14:53:00 +0000 (16:53 +0200)
commitb52ab72e2349c5da2f22ac47037e5dcb9eaea702
treeb36879dbc81eab0503c9d0a770ac306889bbf530
parent9f785878bfd8c4b8619d417c2c038fe85ed3dfa0
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