From: Jeremy Kerr <jk@codeconstruct.com.au>
To: Ryan Chen <ryan_chen@aspeedtech.com>,
Neal Liu <neal_liu@aspeedtech.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Joel Stanley <joel@jms.id.au>,
Andrew Jeffery <andrew@codeconstruct.com.au>
Cc: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-aspeed@lists.ozlabs.org" <linux-aspeed@lists.ozlabs.org>
Subject: Re: [PATCH] usb: gadget: aspeed_udc: fix device address configuration
Date: Wed, 12 Jun 2024 14:23:32 +0800 [thread overview]
Message-ID: <9f2f14979faa5a6d0b17601cfec4988a374ce0c8.camel@codeconstruct.com.au> (raw)
In-Reply-To: <OS8PR06MB7541C6D06FEC637644BEC5D2F2C02@OS8PR06MB7541.apcprd06.prod.outlook.com>
Hi Ryan,
> > /* Main config reg */
> > -#define UDC_CFG_SET_ADDR(x) ((x) & 0x3f)
> > -#define UDC_CFG_ADDR_MASK (0x3f)
> > +#define UDC_CFG_SET_ADDR(x) ((x) & UDC_CFG_ADDR_MASK)
> > +#define UDC_CFG_ADDR_MASK GENMASK(6, 0)
> >
>
> It should be GENMASK(5,0), not GENMASK(6, 0), am I right?
No, that was the bug: we need bits 0:6 (== 0x7f) here.
With the mask of 0:5 (== 0x3f), we don't get the full USB address set.
Cheers,
Jeremy
next prev parent reply other threads:[~2024-06-12 6:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-12 2:07 [PATCH] usb: gadget: aspeed_udc: fix device address configuration Jeremy Kerr
2024-06-12 4:06 ` Andrew Jeffery
2024-06-12 5:35 ` Neal Liu
2024-06-12 5:48 ` Ryan Chen
2024-06-12 6:23 ` Jeremy Kerr [this message]
2024-06-12 6:33 ` Ryan Chen
2024-06-12 7:59 ` Greg Kroah-Hartman
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=9f2f14979faa5a6d0b17601cfec4988a374ce0c8.camel@codeconstruct.com.au \
--to=jk@codeconstruct.com.au \
--cc=andrew@codeconstruct.com.au \
--cc=gregkh@linuxfoundation.org \
--cc=joel@jms.id.au \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-usb@vger.kernel.org \
--cc=neal_liu@aspeedtech.com \
--cc=ryan_chen@aspeedtech.com \
/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