From: "Michał Nazarewicz" <m.nazarewicz@samsung.com>
To: Chouteau Fabien <fabien.chouteau@gmail.com>, linux-usb@vger.kernel.org
Cc: Fabien Chouteau <fabien.chouteau@barco.com>,
David Brownell <dbrownell@users.sourceforge.net>,
Greg Kroah-Hartman <gregkh@suse.de>,
Peter Korsgaard <jacmet@sunsite.dk>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Mass Storage Gadget: Handle eject request
Date: Wed, 21 Apr 2010 15:02:12 +0200 [thread overview]
Message-ID: <op.vbijtyjo7p4s8u@pikus> (raw)
In-Reply-To: <w2vfb5cec441004210535j3cd72f64gd2328242eeca21a1@mail.gmail.com>
> 2010/4/21 Michał Nazarewicz <m.nazarewicz@samsung.com>
>> Clearly, suspend seems like a state of the mass storage function
>> as a whole rather then attribute of each logical unit so I think
>> it'll be better to make it global for the mass storage function
>> rather then per-LUN.
>>
>> Even more so, it's a state of the whole gadget so in my opinion the
>> whole code should be moved the the gadget rather then kept in
>> a function!
>>
>> Going even further, I would propose an sysfs entry to be added to
>> the composite framework as a single generic interface rather then
>> hacking it in each gadget/function that might need to export this
>> information to user space.
>>
>> This provided that there is no easy way of gaining that information
>> in user space through same other sysfs entry.
On Wed, 21 Apr 2010 14:35:57 +0200, Chouteau Fabien <fabien.chouteau@gmail.com> wrote:
> You're right, the suspended state should be handled in the composite
> framework, I'm going resend the patch with this modification.
That'll be great.
> I have a question about the mass/file storage gadget, why is there a
> g_mass_storage gadget and a g_file_storage gadget? Code and feature seems
> redundant.
My Mass Storage Function is relatively young and thus not so mature as
File Storage Gadget. As a matter of fact, if one were to choose between
FSG and MSG then FSG is probably a better choice. MSG was provided to
test the MSF and show how to write composite gadgets using it. The
strength of MSF is of course that it is a composite function hence can
be mixed with other functions. Maybe in the future, when MSF (and MSG)
proves stability, FSG will be removed from the kernel but for now it
has been decided to let it be there. You may refer to my discussion with
Alan when I was posting the code.
> btw, the eject code of this patch comes from file_storage.c
It may be a good idea to point that in a comment.
Or maybe even extract the common do_*() functions to storage_common.c.
I always felt like the do_*() functions should be in the
storage_common.c but unfortunately there are many subtle differences,
which make those functions differ in little details between MSF and
FSG.
--
Best regards, _ _
.o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o
..o | Computer Science, Michał "mina86" Nazarewicz (o o)
ooo +---[mina86@mina86.com]---[mina86@jabber.org]---ooO--(_)--Ooo--
prev parent reply other threads:[~2010-04-21 13:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-20 8:34 [PATCH] Mass Storage Gadget: Handle eject request fabien.chouteau
2010-04-21 9:10 ` Michał Nazarewicz
[not found] ` <w2vfb5cec441004210535j3cd72f64gd2328242eeca21a1@mail.gmail.com>
2010-04-21 13:02 ` Michał Nazarewicz [this message]
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=op.vbijtyjo7p4s8u@pikus \
--to=m.nazarewicz@samsung.com \
--cc=dbrownell@users.sourceforge.net \
--cc=fabien.chouteau@barco.com \
--cc=fabien.chouteau@gmail.com \
--cc=gregkh@suse.de \
--cc=jacmet@sunsite.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox