summaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/musb_core.c
diff options
context:
space:
mode:
authorKrzysztof Opasiak2015-10-14 22:49:40 +0200
committerFelipe Balbi2015-10-15 17:19:52 +0200
commit91c42b0da8e353697c9b49fe541056c5d0518c49 (patch)
treea90a3c3f10aa4b5d0d64e37da0d1acc6b5dc7827 /drivers/usb/musb/musb_core.c
parentusb: gadget: loopback: fix: Don't share qlen and buflen between instances (diff)
downloadkernel-qcow2-linux-91c42b0da8e353697c9b49fe541056c5d0518c49.tar.gz
kernel-qcow2-linux-91c42b0da8e353697c9b49fe541056c5d0518c49.tar.xz
kernel-qcow2-linux-91c42b0da8e353697c9b49fe541056c5d0518c49.zip
usb: gadget: loopback: Fix looping back logic implementation
Since commit e0857ce58e8658657f5f12fe25272b93cfeb16aa ("usb: gadget: loopback: don't queue requests to bogus endpoints") Loopback function is not realy working as that commit removed all looping back logic. After that commit ep-out works like /dev/null and ep-in works like /dev/zero. This commit fix this issue by allocating set of out requests and set of in requests but each out req shares buffer with one in req: out_req->buf ---> buf <--- in_req.buf out_req->context <---> in_req.context The completion routine simply enqueue the suitable req in an oposite direction. Cc: <stable@vger.kernel.org> # 3.18+ Fixes: e0857ce58e8658657f5f12fe25272b93cfeb16aa ("usb: gadget: loopback: don't queue requests to bogus endpoints") Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb/musb_core.c')
0 files changed, 0 insertions, 0 deletions