]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
USB: dummy-hcd: use usb_urb_dir_in instead of usb_pipein
authorAndrey Konovalov <andreyknvl@google.com>
Mon, 21 Oct 2019 14:20:59 +0000 (16:20 +0200)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 05:29:37 +0000 (00:29 -0500)
commite06af72ff6d633aa1d4130c1dfe9d1d33694b5ed
tree5c0082459c8bf1abca9002fa7bb43f48b2bafa6a
parented491f257f202aeb32122d8516cb1914352d027d
USB: dummy-hcd: use usb_urb_dir_in instead of usb_pipein

BugLink: https://bugs.launchpad.net/bugs/1861739
commit 6dabeb891c001c592645df2f477fed9f5d959987 upstream.

Commit fea3409112a9 ("USB: add direction bit to urb->transfer_flags") has
added a usb_urb_dir_in() helper function that can be used to determine
the direction of the URB. With that patch USB_DIR_IN control requests with
wLength == 0 are considered out requests by real USB HCDs. This patch
changes dummy-hcd to use the usb_urb_dir_in() helper to match that
behavior.

Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Link: https://lore.kernel.org/r/4ae9e68ebca02f08a93ac61fe065057c9a01f0a8.1571667489.git.andreyknvl@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/usb/gadget/udc/dummy_hcd.c