mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: Greg KH <greg@kroah.com>, Michal Nazarewicz <m.nazarewicz@samsung.com>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Dries Van Puymbroeck <Dries.VanPuymbroeck@dekimo.com>,
	Kyungmin Park <kyungmin.park@samsung.com>
Subject: Re: [PATCHv5 2/3] USB: gadget: Use new composite features in some gadgets
Date: Thu, 29 Jul 2010 15:21:18 -0700 (PDT)	[thread overview]
Message-ID: <231296.268.qm@web180308.mail.gq1.yahoo.com> (raw)
In-Reply-To: <7b3ddf05e135e8147d1011a81f9069d9cd78aa62.1280316431.git.m.nazarewicz@samsung.com>



--- On Wed, 7/28/10, Michal Nazarewicz <m.nazarewicz@samsung.com> wrote:

> From: Michal Nazarewicz <m.nazarewicz@samsung.com>
> Subject: [PATCHv5 2/3] USB: gadget: Use new composite features in some gadgets

NAK


Let's have one patch per gadget or function driver.
WITH a good explanation of what's changed in each.

What I see is a whole lot of random changes that
don't make ANY sense as one combined patch.  Plus,
some look quite dubious...


> use the new features of composite framework.  Because
> it
> handles default strings there is no longer the need for
> the
> gadgets drivers to handle many of the strings.

The gadgets should always identify the same, and
thus handle their strings -- *unless* module params
are applied by users to override those defaults.
The reason to use the module params is because a
product wants to be a *different* gadget, which
must be possible but won't be routine.  It
suffices to be different instances (serial #s)
in most routine usage.

> 
> This also adds the "needs_serial" to Mass Storage
> Gadget and

When the mass-storage only patch gets sent, I'll
want to see Alan's ack.

> Multifunction Composite Gadget which makes composite issue
> a warning if user space has not provided iSerialNumber parameter.
> 
>  
>  
> -static unsigned short gfs_vendor_id    =
> 0x0525;    /* XXX NetChip */
> -static unsigned short gfs_product_id   =
> 0xa4ac;    /* XXX */

Look -- you can't assign NetChip numbers!!!  I
personally have a handful of them, and if I didn't
assign them, they CANNOT be used.  That XXX
makes me think you (or someone) just randomly
picked a (broken) number.  The original file
storage gadget had a correctly assigned number.
If you're using anything else, fix it; there are
numbers Greg can assign from Linux Foundation's
USB-IF membership.

Comments like "XXX" need explanations, too...
if the intent is to seem like the file storage
gadget, just say so.


>  
> -    /* Vendor and product id can be
> overridden by module parameters.  */
> -    /* .idVendor   
>     = cpu_to_le16(gfs_vendor_id), */
> -    /* .idProduct   
>     = cpu_to_le16(gfs_product_id), */


Again, screwey.  Use the standard IDs unless
they get overridden.  Don't require them to be
overridden ... they were assigned in the first
place to be safe.  Module overrides are for folk
who put out their own products and want them to be
visibly different from  the generic Linux ones,
and thus need to manage their own USB-IF vid/pid
codes

What you're doing is changing the whole model so
there's no longer a standard "this is what Linux
does by default" -- and *requiring* a lot more
pain and suffering from folk configuring gadgets.
PLUS ... almost ensuring they'll get it wrong.  Not
anything vaguely like an improvement.


> -    /* .bcdDevice   
>     = f(hardware) */
> -    /* .iManufacturer    =
> DYNAMIC */
> -    /* .iProduct   
>     = DYNAMIC */
> -    /* NO SERIAL NUMBER */
> -    .bNumConfigurations    =
> 1,
> +    .idVendor   
>     = cpu_to_le16(0x0525),
> +    .idProduct   
>     = cpu_to_le16(0xa4ac),

Same as above.  You've broken ID management.
Use the (correct) symbols, not magic numbers.

Do you not understand how fundamental proper
management of vendor and product IDs is????













  parent reply	other threads:[~2010-07-29 22:21 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-28 12:13 [PATCHv5 1/3] USB: gadget: composite: Better string override handling Michal Nazarewicz
2010-07-28 12:13 ` [PATCHv5 2/3] USB: gadget: Use new composite features in some gadgets Michal Nazarewicz
2010-07-28 12:13   ` [PATCHv5 3/3] USB: gadget: storage_common: fixed warning building mass storage function Michal Nazarewicz
2010-07-28 12:25     ` Andy Shevchenko
2010-07-28 13:02       ` Michał Nazarewicz
2010-07-28 13:42         ` Andy Shevchenko
2010-07-28 14:02           ` Michał Nazarewicz
2010-07-29 22:21   ` David Brownell [this message]
2010-07-30 16:48     ` [PATCHv5 2/3] USB: gadget: Use new composite features in some gadgets Michał Nazarewicz
2010-07-30 16:54       ` Greg KH
2010-07-30 18:57         ` David Brownell
2010-07-30 21:21           ` Greg KH
2010-07-30 22:01             ` David Brownell
2010-07-30 22:16               ` Greg KH
2010-07-30 23:58               ` Xiaofan Chen
2010-08-02 17:14         ` Michał Nazarewicz
2010-08-02 22:52           ` Greg KH
2010-08-04  9:21             ` Michal Nazarewicz
2010-08-01 19:05 ` [PATCHv5 1/3] USB: gadget: composite: Better string override handling David Brownell
2010-08-02  9:48   ` Michał Nazarewicz
2010-08-02 11:26     ` David Brownell
2010-08-02 12:47       ` Michał Nazarewicz

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=231296.268.qm@web180308.mail.gq1.yahoo.com \
    --to=david-b@pacbell.net \
    --cc=Dries.VanPuymbroeck@dekimo.com \
    --cc=greg@kroah.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=m.nazarewicz@samsung.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

all inboxes | Powered by JetHome®