Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754021AbbHMUXL (ORCPT ); Thu, 13 Aug 2015 16:23:11 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:55872 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753174AbbHMUXI (ORCPT ); Thu, 13 Aug 2015 16:23:08 -0400 MIME-version: 1.0 Content-type: text/plain; charset=windows-1252; format=flowed X-AuditID: cbfec7f5-f794b6d000001495-e0-55ccfca8a39c Content-transfer-encoding: 8BIT Message-id: <55CCFCA6.9070907@samsung.com> Date: Thu, 13 Aug 2015 22:23:02 +0200 From: Krzysztof Opasiak User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 To: Greg Kroah-Hartman Cc: Amit Pundir , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-api@vger.kernel.org, Mike Lockwood , Benoit Goby , Colin Cross , =?windows-1252?Q?Arve_Hj=F8nnev=E5g?= , Peter Oh , Greg Hackmann , Badhri Jagan Sridharan , Android Kernel Team , Jonathan Corbet , Felipe Balbi , Andrzej Pietrasiewicz , Laurent Pinchart , Yegor Yefremov , Philippe Reynes , John Stultz , Sumit Semwal Subject: Re: [RFC][PATCH 1/2] usb: gadget: configfs: add MTP function References: <1439493140-22207-1-git-send-email-amit.pundir@linaro.org> <1439493140-22207-2-git-send-email-amit.pundir@linaro.org> <55CCF156.8010302@samsung.com> <20150813195748.GB30092@kroah.com> In-reply-to: <20150813195748.GB30092@kroah.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrKIsWRmVeSWpSXmKPExsVy+t/xq7or/pwJNXj1ScLiw4pFjBazXraz WLz/e5/N4vbUk0wWB+/XW2zYupXRYvvGb6wWTw60M1ocXzabzaJ58Xo2izO/dS12bBex6Jy4 hN1i8/cONouFbUtYLC7vmsNmsWhZK7PFv0fb2C3aVjYyWZy6+5nd4uSdi4wW314/ZHMQ89i2 exurx6z7Z9k8ds66y+6xYFOpx9MJk9k9ZnfMZPW4c20Pm8f+uWvYPRb3TWb16NuyitHj+I3t TB6fN8kF8ERx2aSk5mSWpRbp2yVwZfQd3stUMFWh4snUScwNjPuluhg5OSQETCTOrnzDBGGL SVy4t56ti5GLQ0hgKaPE0gPz2EESvAKCEj8m32PpYuTgYBaQlzhyKRskzCxgK7Hg/ToWiPrn jBLPV02BqteS6Fm3FGwoi4CqRMvzt2wgvWwC+hLzdomChEUFIiTmH3vNDGKLCBhL9J+dxQ4y h1lgO5vEp9/zWEASwgKuEkd/vmCCWHCcUWLSxzawoZxAgx7unMcygVFgFpL7ZiHcNwvJfQsY mVcxiqaWJhcUJ6XnGukVJ+YWl+al6yXn525ihETu1x2MS49ZHWIU4GBU4uHd8Oh0qBBrYllx Ze4hRgkOZiUR3l0/z4QK8aYkVlalFuXHF5XmpBYfYpTmYFES5525632IkEB6YklqdmpqQWoR TJaJg1OqgdFnE+vUK1aMj87t/CInsUZb5N8Vr+rAN3VPmY++umDwxeLyK9/FUdH5nz20Kh8X 1nsWTIvPnKiT5ifx1mef/bJVb7dV3ax5r5pS/OT1weKenQkVaRoT9kTa+61Vad41b/0J908B 4h4tyrpZHQ4/pNZdmMVQZhpUttI74VbtwqNesVrKWm81u5VYijMSDbWYi4oTAXDvIcjYAgAA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4278 Lines: 93 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 >>> Benoit Goby >>> Colin Cross >>> Arve Hj?nnev?g >>> Peter Oh >>> Greg Hackmann >>> Badhri Jagan Sridharan >>> 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 >>> Cc: Benoit Goby >>> Cc: Colin Cross >>> Cc: Arve Hj?nnev?g >>> Cc: Peter Oh >>> Cc: Greg Hackmann >>> Cc: Badhri Jagan Sridharan >>> Cc: Android Kernel Team >>> Cc: Greg Kroah-Hartman >>> Cc: Jonathan Corbet >>> Cc: Felipe Balbi >>> Cc: Andrzej Pietrasiewicz >>> Cc: Laurent Pinchart >>> Cc: Yegor Yefremov >>> Cc: Philippe Reynes >>> Cc: John Stultz >>> Cc: Sumit Semwal >>> Signed-off-by: Amit Pundir >> >> 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/