All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tao Ren <rentao.bupt@gmail.com>
To: Andrew Jeffery <andrew@aj.id.au>
Cc: Joel Stanley <joel@jms.id.au>, Tao Ren <taoren@fb.com>,
	openbmc@lists.ozlabs.org
Subject: Re: [PATCH linux dev-5.4 v2 1/3] usb: gadget: aspeed: read vhub config from of_device_id
Date: Mon, 27 Jan 2020 19:13:18 -0800	[thread overview]
Message-ID: <20200128031317.GA32684@taoren-ubuntu-R90MNF91> (raw)
In-Reply-To: <1a456e8f-c708-4276-bec8-3b98cee43e47@www.fastmail.com>

On Tue, Jan 28, 2020 at 11:27:57AM +1030, Andrew Jeffery wrote:
> 
> 
> On Fri, 24 Jan 2020, at 11:53, Tao Ren wrote:
> > On Fri, Jan 24, 2020 at 10:39:45AM +1030, Andrew Jeffery wrote:
> > > > diff --git a/drivers/usb/gadget/udc/aspeed-vhub/hub.c 
> > > > b/drivers/usb/gadget/udc/aspeed-vhub/hub.c
> > > > index 19b3517e04c0..aa1c127e9f2f 100644
> > > > --- a/drivers/usb/gadget/udc/aspeed-vhub/hub.c
> > > > +++ b/drivers/usb/gadget/udc/aspeed-vhub/hub.c
> > > > @@ -133,10 +133,9 @@ static const struct ast_vhub_full_cdesc {
> > > >  
> > > >  #define AST_VHUB_HUB_DESC_SIZE	(USB_DT_HUB_NONVAR_SIZE + 2)
> > > >  
> > > > -static const struct usb_hub_descriptor ast_vhub_hub_desc = {
> > > > +static struct usb_hub_descriptor ast_vhub_hub_desc = {
> > > 
> > > This seems unfortunate, though we only have one on the SoC... is
> > > it worth dynamically allocating it? Or adding a comment?
> > > 
> > > Andrew
> > 
> > According to the comment at the beginning of the file (line 39-47), we
> > may customize more descriptors in the future. Adding comments involves
> > little change in this case, because by allocating the descriptors, we
> > will also need a function to free the descriptors when ast_vhub_remove
> > is called. Anyways I'm fine with either way.
> > 
> > There is another option which is to fixup descriptors in request_desc
> > callback, like ast_vhub_patch_dev_desc_usb1() in the file. But I don't
> > like the approach personally.
> > 
> > Which way do you prefer?
> 
> I'm not wedded to doing anything different from what you've already got
> in the patch - we don't have hardware that requires a different solution at
> this point. We can always fix the driver if that changes. The approach just
> felt a bit icky, but I can live with that :)
> 
> Andrew

Thanks Andrew. I just sent out patch v3 which adds some comments for the
hub descriptor; 2 compile warnings are also fixed in v3. Please kindly
review when you have bandwidth.

Cheers,

Tao

  reply	other threads:[~2020-01-28  3:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-23  7:49 [PATCH linux dev-5.4 v2 0/3] aspeed-g6: enable usb support rentao.bupt
2020-01-23  7:49 ` [PATCH linux dev-5.4 v2 1/3] usb: gadget: aspeed: read vhub config from of_device_id rentao.bupt
2020-01-24  0:09   ` Andrew Jeffery
2020-01-24  1:23     ` Tao Ren
2020-01-28  0:57       ` Andrew Jeffery
2020-01-28  3:13         ` Tao Ren [this message]
2020-01-23  7:49 ` [PATCH linux dev-5.4 v2 2/3] usb: gadget: aspeed: add ast2600 vhub support rentao.bupt
2020-01-24  0:11   ` Andrew Jeffery
2020-01-23  7:49 ` [PATCH linux dev-5.4 v2 3/3] ARM: dts: aspeed-g6: add usb functions rentao.bupt
2020-01-24  0:12   ` Andrew Jeffery
2020-01-24  1:24     ` Tao Ren
2020-01-31  4:00 ` [PATCH linux dev-5.4 v2 0/3] aspeed-g6: enable usb support Joel Stanley
2020-01-31 22:36   ` Tao Ren

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=20200128031317.GA32684@taoren-ubuntu-R90MNF91 \
    --to=rentao.bupt@gmail.com \
    --cc=andrew@aj.id.au \
    --cc=joel@jms.id.au \
    --cc=openbmc@lists.ozlabs.org \
    --cc=taoren@fb.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 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.