All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pawel Laszczak <pawell@cadence.com>
To: Peter Chen <peter.chen@nxp.com>,
	"balbi@kernel.org" <balbi@kernel.org>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Cc: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	dl-linux-imx <linux-imx@nxp.com>, "rogerq@ti.com" <rogerq@ti.com>,
	Jun Li <jun.li@nxp.com>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: RE: [PATCH 1/3] usb: cdns3: ep0: fix the test mode set incorrectly
Date: Tue, 23 Jun 2020 07:22:14 +0000	[thread overview]
Message-ID: <DM6PR07MB55290EA10573F0BFCA681544DD940@DM6PR07MB5529.namprd07.prod.outlook.com> (raw)
In-Reply-To: <AM7PR04MB7157421522B2ADE6F75A0A518B940@AM7PR04MB7157.eurprd04.prod.outlook.com>

>
>> >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) {
>>
>> For me it's looks the same, but it's ok.
>>
>
>Pawel, please check the coming code, it uses tmode to set the register which
>is incorrect before shift. (line 336)

Rigth, thanks for clarification.

>
>328                 tmode >>= 8;
>329                 switch (tmode) {
>330                 case TEST_J:
>331                 case TEST_K:
>332                 case TEST_SE0_NAK:
>333                 case TEST_PACKET:
>334                         cdns3_set_register_bit(&priv_dev->regs->usb_cmd,
>335                                                USB_CMD_STMODE |
>336                                                USB_STS_TMODE_SEL(tmode - 1));
>337                         break;
>
>Peter


  reply	other threads:[~2020-06-23  7:22 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 ` [PATCH 1/3] usb: cdns3: ep0: fix the test mode set incorrectly Peter Chen
2020-06-23  6:45   ` Pawel Laszczak
2020-06-23  7:01     ` Peter Chen
2020-06-23  7:22       ` Pawel Laszczak [this message]
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=DM6PR07MB55290EA10573F0BFCA681544DD940@DM6PR07MB5529.namprd07.prod.outlook.com \
    --to=pawell@cadence.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=peter.chen@nxp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.