diff options
author | Peter Chen <peter.chen@nxp.com> | 2020-06-23 11:09:16 +0800 |
---|---|---|
committer | Felipe Balbi <balbi@kernel.org> | 2020-06-24 09:38:41 +0300 |
commit | b51e1cf64f93acebb6d8afbacd648a6ecefc39b4 (patch) | |
tree | 19fdc548361a53563a420a26827a6bcaba4dd045 /drivers/usb | |
parent | 48778464bb7d346b47157d21ffde2af6b2d39110 (diff) | |
download | linux-b51e1cf64f93acebb6d8afbacd648a6ecefc39b4.tar.bz2 |
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: <stable@vger.kernel.org>
Fixes: 7733f6c32e36 ("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>
Diffstat (limited to 'drivers/usb')
-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: |