Skip to content

Commit b51e1cf

Browse files
Peter Chenfelipebalbi
authored andcommitted
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. Cc: <[email protected]> Fixes: 7733f6c ("usb: cdns3: Add Cadence USB3 DRD Driver") Reviewed-by: Jun Li <[email protected]> Signed-off-by: Peter Chen <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
1 parent 4877846 commit b51e1cf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/usb/cdns3/ep0.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,8 @@ static int cdns3_ep0_feature_handle_device(struct cdns3_device *priv_dev,
327327
if (!set || (tmode & 0xff) != 0)
328328
return -EINVAL;
329329

330-
switch (tmode >> 8) {
330+
tmode >>= 8;
331+
switch (tmode) {
331332
case TEST_J:
332333
case TEST_K:
333334
case TEST_SE0_NAK:

0 commit comments

Comments
 (0)