Re: [PATCHv3 1/3] USB: gadget: mass/file storage: set serial number

David Brownell
2010-07-20T15:01:39Z

--- On Tue, 7/20/10, Michał Nazarewicz <m.nazarewicz@samsung.com> wrote:

> > Plus, you seem to be overlooking the basic need
> > (for userspace) to manage these IDs so they're
> > properly unique.  Two gadgets should never end
> up
> > using the same serial number.
>
> I'm not overlooking that.  I simply consider that a
> separate issue.
> Driver should provide some kind of default

It can't do that and guarantee uniqueness.
(Unless you consult the random number system,
which may not be available that early, and is
in any case not appropriate for this task.

Your concept is (still/again) broken.

(just like File
> Storage
> Gadget) and the fact that user space should
> override it is another
> matter in my opinion.

The value must come from userspace in the first
place, else it can't be correctly managed!!

>