Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

usb: cdns3: ep0: fix the test mode set incorrectly

The 'tmode' is ctrl->wIndex, changing it as the real test
mode value for register assignment.

Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver")
Cc: <stable@vger.kernel.org>
Reviewed-by: Jun Li <jun.li@nxp.com>
Reviewed-by: Pawel Laszczak <pawell@cadence.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Link: https://lore.kernel.org/r/20200623030918.8409-2-peter.chen@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Peter Chen and committed by
Greg Kroah-Hartman
c0e2a034 302c570b

+2 -1
+2 -1
drivers/usb/cdns3/ep0.c
··· 327 327 if (!set || (tmode & 0xff) != 0) 328 328 return -EINVAL; 329 329 330 - switch (tmode >> 8) { 330 + tmode >>= 8; 331 + switch (tmode) { 331 332 case TEST_J: 332 333 case TEST_K: 333 334 case TEST_SE0_NAK: