From: Krzysztof Opasiak <k.opasiak-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
To: Greg Kroah-Hartman
<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>
Cc: "Amit Pundir"
<amit.pundir-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
"Mike Lockwood"
<lockwood-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>,
"Benoit Goby" <benoit-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>,
"Colin Cross" <ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>,
"Arve Hjønnevåg" <arve-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>,
"Peter Oh" <poh-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>,
"Greg Hackmann"
<ghackmann-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
"Badhri Jagan Sridharan"
<Badhri-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
"Android Kernel Team"
<kernel-team-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>,
"Jonathan Corbet" <corbet-T1hC0tSOHrs@public.gmane.org>,
"Felipe Balbi" <balbi-l0cyMroinI0@public.gmane.org>,
"Andrzej Pietrasiewicz"
<andrzej.p-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
"Laurent Pinchart"
<laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>,
"Yegor Yefremov"
<yegorslists-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>,
"Philippe Reynes"
<tremyfr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
"John Stultz"
<john.stultz-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
"Sumit Semwal"
<sumit.semwal-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Subject: Re: [RFC][PATCH 1/2] usb: gadget: configfs: add MTP function
Date: Thu, 13 Aug 2015 22:23:02 +0200 [thread overview]
Message-ID: <55CCFCA6.9070907@samsung.com> (raw)
In-Reply-To: <20150813195748.GB30092-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
On 08/13/2015 09:57 PM, Greg Kroah-Hartman wrote:
> On Thu, Aug 13, 2015 at 09:34:46PM +0200, Krzysztof Opasiak wrote:
>> Hello,
>>
>> On 08/13/2015 09:12 PM, Amit Pundir wrote:
>>> his MTP function is based on years of work originally done in the
>>> Android kernel tree by:
>>> Mike Lockwood<lockwood-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>
>>> Benoit Goby<benoit-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>
>>> Colin Cross<ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>
>>> Arve Hjønnevåg<arve-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>
>>> Peter Oh<poh-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
>>> Greg Hackmann<ghackmann-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
>>> Badhri Jagan Sridharan<Badhri-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
>>> I've folded the series up to make it easier to review, and to provide
>>> a coherent patch description.
>>>
>>> Post Gingerbread (Android v2.3), Android dropped USB Mass Storage
>>> in favor of Media Transfer Protocal (MTP), which is widely used for
>>> transferring media files to digital music players and similar
>>> applications. This USB gadget function implements MTP functionalty.
>>>
>>> Historically this function has been a part of Android composite
>>> gadget driver. Android composite driver was Android's solution
>>> for dynamic gadget function switching prior to the ConfigFS gadget
>>> being merged. There were failed few attempts in past
>>> http://marc.info/?l=linux-usb&m=132451695808552 to upstream Android
>>> composite driver as well. Now this Android MTP gadget function has been
>>> re-implemented so as to be used as a generic ConfigFS function instead.
>>>
>>> Again, many thanks to Mike, Benoit, Colin, Arve, Peter, Greg and Badhri,
>>> as they are the real authors of this work. However, I've folded their
>>> patches together and modified it enough that I don't want them to be
>>> blamed for any mistakes I've made condensing their patches down.
>>>
>>> Cc: Mike Lockwood<lockwood-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>
>>> Cc: Benoit Goby<benoit-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>
>>> Cc: Colin Cross<ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>
>>> Cc: Arve Hjønnevåg<arve-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>
>>> Cc: Peter Oh<poh-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
>>> Cc: Greg Hackmann<ghackmann-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
>>> Cc: Badhri Jagan Sridharan<Badhri-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
>>> Cc: Android Kernel Team<kernel-team-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>
>>> Cc: Greg Kroah-Hartman<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>
>>> Cc: Jonathan Corbet<corbet-T1hC0tSOHrs@public.gmane.org>
>>> Cc: Felipe Balbi<balbi-l0cyMroinI0@public.gmane.org>
>>> Cc: Andrzej Pietrasiewicz<andrzej.p-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
>>> Cc: Laurent Pinchart<laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
>>> Cc: Yegor Yefremov<yegorslists-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
>>> Cc: Philippe Reynes<tremyfr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>> Cc: John Stultz<john.stultz-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
>>> Cc: Sumit Semwal<sumit.semwal-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
>>> Signed-off-by: Amit Pundir<amit.pundir-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
>>
>> In my humble opinion adding such function to Linux kernel doesn't make any
>> sense. By design, MTP is a protocol which requires access to userspace
>> features esp. file system. It is very important to run MTP daemon with
>> suitable user and LSM label and many many other issues which should be
>> handled by userspace access policy.
>>
>> Moreover this is not a fully functional USB function but only some interface
>> which can be used by mtp-responder (mtp-daemon - call it as you like) to
>> communicate with host. As we have FunctionFS which allows to implement any
>> USB function in as a userspace service. As MTP nature is more related to
>> userspace I think that porting MTP daemon to use this is a right way to go.
>> This should be much more reasonable than adding new function which also
>> requires daemon for proper working. So why add another interface while we
>> can use a generic one?
>
> Isn't there already a userspace MTP daemon that uses the existing
> functionfs for usb gadgets? I thought I remember seeing that
> somewhere...
>
I know for sure that ADB and SDB has been ported to use functionfs. I
can even see ADB with ffs backend working on my nexus 9 with 3.10 kernel.
I've seen such mtp-responder implementation but that time it has not
been published to open source. I don't know what is the current state...
Best regards,
--
Krzysztof Opasiak
Samsung R&D Institute Poland
Samsung Electronics
next prev parent reply other threads:[~2015-08-13 20:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-13 19:12 [RFC][PATCH 0/2] usb: gadget: add MTP function and Uevent userspace notifications Amit Pundir
2015-08-13 19:12 ` [RFC][PATCH 1/2] usb: gadget: configfs: add MTP function Amit Pundir
[not found] ` <1439493140-22207-2-git-send-email-amit.pundir-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-08-13 19:34 ` Krzysztof Opasiak
2015-08-13 19:57 ` Greg Kroah-Hartman
[not found] ` <20150813195748.GB30092-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2015-08-13 20:23 ` Krzysztof Opasiak [this message]
2015-08-13 20:41 ` Krzysztof Opasiak
[not found] ` <55CD0108.4060303-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-08-14 9:53 ` Amit Pundir
2015-08-13 19:12 ` [RFC][PATCH 2/2] usb: gadget: configfs: notify userspace of usb state changes Amit Pundir
2015-08-13 19:42 ` Krzysztof Opasiak
[not found] ` <55CCF319.1070604-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-08-13 22:07 ` Felipe Balbi
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=55CCFCA6.9070907@samsung.com \
--to=k.opasiak-sze3o3uu22jbdgjk7y7tuq@public.gmane.org \
--cc=Badhri-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=amit.pundir-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=andrzej.p-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=arve-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
--cc=balbi-l0cyMroinI0@public.gmane.org \
--cc=benoit-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
--cc=ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
--cc=corbet-T1hC0tSOHrs@public.gmane.org \
--cc=ghackmann-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=john.stultz-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=kernel-team-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
--cc=laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org \
--cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=lockwood-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
--cc=poh-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
--cc=sumit.semwal-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=tremyfr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=yegorslists-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.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;
as well as URLs for NNTP newsgroup(s).