Commit b51e1cf6 authored by Peter Chen's avatar Peter Chen Committed by Felipe Balbi
Browse files

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: 7733f6c3 ("usb: cdns3: Add Cadence USB3 DRD Driver")
Reviewed-by: default avatarJun Li <jun.li@nxp.com>
Signed-off-by: default avatarPeter Chen <peter.chen@nxp.com>
Signed-off-by: default avatarFelipe Balbi <balbi@kernel.org>
parent 48778464
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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: