diff options
author | Peter Chen <[email protected]> | 2020-06-23 11:09:16 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2020-06-24 16:02:58 +0200 |
commit | c0e2a0341cd8ccd213ffc6c7f9cd52a31466cba9 (patch) | |
tree | 0a19703273e7c42eeecba35c0e5a28d61ac74f00 | |
parent | 302c570bf36e997d55ad0d60628a2feec76954a4 (diff) |
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: <[email protected]>
Reviewed-by: Jun Li <[email protected]>
Reviewed-by: Pawel Laszczak <[email protected]>
Signed-off-by: Peter Chen <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r-- | drivers/usb/cdns3/ep0.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/cdns3/ep0.c b/drivers/usb/cdns3/ep0.c index 82645a2a0f52..04e49582fb55 100644 --- a/drivers/usb/cdns3/ep0.c +++ b/drivers/usb/cdns3/ep0.c @@ -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: |