USB: trancevibrator: fix control-request direction
authorJohan Hovold <johan@kernel.org>
Fri, 21 May 2021 13:31:09 +0000 (15:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Jun 2021 06:23:29 +0000 (08:23 +0200)
commit3f9cf968e796e229f06e55e0d149a51ad0bedb6c
tree01e43c5eac01d7d198f8a5a59ed4ae40c847905f
parent62556a72e973be18251d7fcdbcb7fd5c4b7efc11
USB: trancevibrator: fix control-request direction

commit 746e4acf87bcacf1406e05ef24a0b7139147c63e upstream.

The direction of the pipe argument must match the request-type direction
bit or control requests may fail depending on the host-controller-driver
implementation.

Fix the set-speed request which erroneously used USB_DIR_IN and update
the default timeout argument to match (same value).

Fixes: 5638e4d92e77 ("USB: add PlayStation 2 Trance Vibrator driver")
Cc: stable@vger.kernel.org # 2.6.19
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20210521133109.17396-1-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/misc/trancevibrator.c