From: Peter Chen <peter.chen@nxp.com>
To: balbi@kernel.org, gregkh@linuxfoundation.org
Cc: linux-usb@vger.kernel.org, linux-imx@nxp.com, pawell@cadence.com,
rogerq@ti.com, jun.li@nxp.com, Peter Chen <peter.chen@nxp.com>,
stable@vger.kernel.org
Subject: [PATCH 1/3] usb: cdns3: ep0: fix the test mode set incorrectly
Date: Tue, 23 Jun 2020 11:09:16 +0800 [thread overview]
Message-ID: <20200623030918.8409-2-peter.chen@nxp.com> (raw)
In-Reply-To: <20200623030918.8409-1-peter.chen@nxp.com>
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>
---
drivers/usb/cdns3/ep0.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/cdns3/ep0.c b/drivers/usb/cdns3/ep0.c
index 2465a84e8fee..74a1ff5000ba 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:
--
2.17.1
next prev parent reply other threads:[~2020-06-23 3:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-23 3:09 [PATCH 0/3] usb: cdns3: bug-fixes for usb-linus Peter Chen
2020-06-23 3:09 ` Peter Chen [this message]
2020-06-23 6:45 ` [PATCH 1/3] usb: cdns3: ep0: fix the test mode set incorrectly Pawel Laszczak
2020-06-23 7:01 ` Peter Chen
2020-06-23 7:22 ` Pawel Laszczak
2020-06-23 3:09 ` [PATCH 2/3] usb: cdns3: trace: using correct dir value Peter Chen
2020-06-23 6:46 ` Pawel Laszczak
2020-06-23 3:09 ` [PATCH 3/3] usb: cdns3: ep0: add spinlock for cdns3_check_new_setup Peter Chen
2020-06-23 6:46 ` Pawel Laszczak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200623030918.8409-2-peter.chen@nxp.com \
--to=peter.chen@nxp.com \
--cc=balbi@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jun.li@nxp.com \
--cc=linux-imx@nxp.com \
--cc=linux-usb@vger.kernel.org \
--cc=pawell@cadence.com \
--cc=rogerq@ti.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).