Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753675AbbHMTey (ORCPT ); Thu, 13 Aug 2015 15:34:54 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:51919 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751862AbbHMTev (ORCPT ); Thu, 13 Aug 2015 15:34:51 -0400 MIME-version: 1.0 Content-type: text/plain; charset=utf-8; format=flowed X-AuditID: cbfec7f5-f794b6d000001495-ba-55ccf158fdfb Content-transfer-encoding: 8BIT Message-id: <55CCF156.8010302@samsung.com> Date: Thu, 13 Aug 2015 21:34:46 +0200 From: Krzysztof Opasiak User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 To: Amit Pundir , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-api@vger.kernel.org Cc: Mike Lockwood , Benoit Goby , Colin Cross , =?UTF-8?B?QXJ2ZSBIasO4bm5ldsOlZw==?= , Peter Oh , Greg Hackmann , Badhri Jagan Sridharan , Android Kernel Team , Greg Kroah-Hartman , 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> In-reply-to: <1439493140-22207-2-git-send-email-amit.pundir@linaro.org> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrMIsWRmVeSWpSXmKPExsVy+t/xq7oRH8+EGjQdZ7L4sGIRo8Wsl+0s Fu//3mezuD31JJPFwfv1Fhu2bmW02L7xG6vFkwPtjBbHl81ms2hevJ7N4sxvXYsd20UsOicu YbfY/L2DzWJh2xIWi8u75rBZLFrWymzx79E2dou2lY1MFqfufma3OHnnIqPFt9cP2RzEPLbt 3sbqMev+WTaPnbPusnss2FTq8XTCZHaP2R0zWT3uXNvD5rF/7hp2j8V9k1k9+rasYvQ4fmM7 k8fnTXIBPFFcNimpOZllqUX6dglcGX8OrGYpuCRV8fvoa7YGxh+iXYycHBICJhKnJz1kg7DF JC7cWw9mCwksZZTY+jwKxOYVEJT4MfkeSxcjBwezgLzEkUvZIGFmATOJLy8Ps0KUP2eUmN6a DVGuJXGk/z47iM0ioCox4VM3O0grm4C+xLxdYFtFBSIk5h97zdzFyMUhIjCbUeL+t1lMEDMv sEq8nZkOYgsLuEoc/fmCCaRISKCZUaLv91qwoZwC7hKH9u1in8AoMAvJebMQzpuF5LwFjMyr GEVTS5MLipPSc430ihNzi0vz0vWS83M3MUKi9usOxqXHrA4xCnAwKvHwbnh0OlSINbGsuDL3 EKMEB7OSCO+j52dChXhTEiurUovy44tKc1KLDzFKc7AoifPO3PU+REggPbEkNTs1tSC1CCbL xMEp1cAYaPDY2qHZy6lz9uZ9B2ZduHnlUUvM1BV2TnsLy1e4Wlz/0vo9+eeWCI74mIeWXV6d p9NL225+v5J068ixnSevOFw/rhZQL2xtwurxnu35JYa/C6e5WTdND8m0cHp8yMTvm928WR+3 mF7xPjU7p2Zdpcmy3FL3NyLap6005pbNyRa4+erbTM8yJZbijERDLeai4kQAnwfqi9YCAAA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3583 Lines: 77 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? 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/