1
0
Fork 0

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

commit b51e1cf64f upstream.

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

Cc: <stable@vger.kernel.org>
Fixes: 7733f6c32e ("usb: cdns3: Add Cadence USB3 DRD Driver")
Reviewed-by: Jun Li <jun.li@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5.4-rM2-2.2.x-imx-squashed
Peter Chen 2020-06-23 11:09:16 +08:00 committed by Sasha Levin
parent 79175ae5f9
commit a0668653be
1 changed files with 2 additions and 1 deletions

View File

@ -327,7 +327,8 @@ static int cdns3_ep0_feature_handle_device(struct cdns3_device *priv_dev,
if (!set || (tmode & 0xff) != 0)
return -EINVAL;
switch (tmode >> 8) {
tmode >>= 8;
switch (tmode) {
case TEST_J:
case TEST_K:
case TEST_SE0_NAK: