From patchwork Thu Sep 26 07:07:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manu Gautam X-Patchwork-Id: 2946701 Return-Path: X-Original-To: patchwork-linux-arm-msm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1A37DBFF05 for ; Thu, 26 Sep 2013 07:07:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B263C20328 for ; Thu, 26 Sep 2013 07:07:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0DC09202AE for ; Thu, 26 Sep 2013 07:07:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753313Ab3IZHHo (ORCPT ); Thu, 26 Sep 2013 03:07:44 -0400 Received: from smtp.codeaurora.org ([198.145.11.231]:43367 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752294Ab3IZHHn (ORCPT ); Thu, 26 Sep 2013 03:07:43 -0400 Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id F20A913EF80; Thu, 26 Sep 2013 07:07:42 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id E501F13EFFA; Thu, 26 Sep 2013 07:07:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-9.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from [10.44.23.105] (unknown [202.46.23.62]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: mgautam@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 3E84813EEE3; Thu, 26 Sep 2013 07:07:39 +0000 (UTC) Message-ID: <5243DD3A.8080603@codeaurora.org> Date: Thu, 26 Sep 2013 12:37:38 +0530 From: Manu Gautam User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: balbi@ti.com CC: Jack Pham , pheatwol@codeaurora.org, linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org, gregkh@linuxfoundation.org Subject: Re: [PATCH v2 1/1] usb: gadget: f_fs: Add support for SuperSpeed Mode References: <1379678152-9617-1-git-send-email-mgautam@codeaurora.org> <52415BAC.6030708@codeaurora.org> <20130925204030.GW10746@radagast> In-Reply-To: <20130925204030.GW10746@radagast> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 9/26/2013 2:10 AM, Felipe Balbi wrote: > Hi, > > (please avoid top-posting) > > On Tue, Sep 24, 2013 at 03:00:20PM +0530, Manu Gautam wrote: >> Hi Felipe, >> >> I wanted to mention one point with respect to this patch: Below >> changes in the functionfs.h to add ss_count (super speed descriptors >> count) in desc_header (which is passed from userspace) make the driver >> incompatible with existing userspace applications compiled against old >> header file. Let me know if that is acceptable. We are using this >> driver with Android for adbd (android debug bridge) and these changes >> are required to support adb over Super Speed controllers e.g. DWC3 >> along with changed in adbd to pass SS EP and companion descriptors. > > Good you mentioned, it saves me the trouble of reviewing this patch :-) > > It's not acceptable to break userspace ABI at all. If you want > SuperSpeed support on function fs, we need to figure out a way to do so > without breaking userspace. > > This might mean adding a separate userspace interface to be used with > superspeed. While at that, we might want to add a few bytes of reserved, > unused space in our structures for situations where we need to add more > data into it, just to make it slightly future proof. > Thanks for your reply. As you suggested we can have a different interface for super speed which would be optional to workaround ABI compatibility issue. Let me know if below interface looks fine to you, I will then implement accordingly: + * | 16 | ss_descrs | Descriptor[] | list of super-speed descriptors | + */ + struct usb_functionfs_strings_head { __le32 magic; __le32 length; --- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/uapi/linux/usb/functionfs.h b/include/uapi/linux/usb/functionfs.h index d6b0128..b8cb740 100644 --- a/include/uapi/linux/usb/functionfs.h +++ b/include/uapi/linux/usb/functionfs.h @@ -9,8 +9,9 @@ enum { - FUNCTIONFS_DESCRIPTORS_MAGIC = 1, - FUNCTIONFS_STRINGS_MAGIC = 2 + FUNCTIONFS_DESCRIPTORS_MAGIC = 1, + FUNCTIONFS_STRINGS_MAGIC = 2, + FUNCTIONFS_SS_DESCRIPTORS_MAGIC = 3 }; @@ -60,6 +61,25 @@ struct usb_functionfs_descs_head { * | 2 | payload | | descriptor's payload | */ +struct usb_functionfs_ss_descs_head { + __le32 magic; + __le32 length; + __le32 reserved; + __le32 ss_count; +} __attribute__((packed)); + +/* + * SS Descriptors format: + * + * | off | name | type | description | + * |-----+-----------+--------------+--------------------------------------| + * | 0 | magic | LE32 | FUNCTIONFS_SS_DESCRIPTORS_MAGIC | + * | 4 | length | LE32 | length of the whole data chunk | + * | 8 | ss_count | LE32 | number of super-speed descriptors | + * | 12 | reserved field |