From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23E45C33CB2 for ; Tue, 14 Jan 2020 14:00:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E29272468C for ; Tue, 14 Jan 2020 14:00:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579010429; bh=H/51/5ZekFpSpHx8KB4PX8o7MbAINifRHPOl5iU9qxQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=UC6fcBniSyO7jydA9HsJqzS+NZnAxwrk6wazA/u0hiI1qQg9jogDVoI+g/QJImdLp qF7fZNSXjLz9vMbS27/nzCy1buuqhu+dIUAtDQYXwdBzjOXWj5u2wPj7LdyByXfeNq 6w7Uz1D3y95oU0InylVj/Z5VUfMB+55jnKJUN2JM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729129AbgANOA1 (ORCPT ); Tue, 14 Jan 2020 09:00:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:49332 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728884AbgANOA1 (ORCPT ); Tue, 14 Jan 2020 09:00:27 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DB17E2467A; Tue, 14 Jan 2020 14:00:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579010426; bh=H/51/5ZekFpSpHx8KB4PX8o7MbAINifRHPOl5iU9qxQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tgsc0vIAH4ypovFs6+X7TCXJaixVEaZ3kmYgpSSQiuV9uX9j1TI4IytD7AN8c23NB a/sUBOs7OcRou2dLRq6ElfACP80NU4L7BTkYxd5HdO5HAeUIjFbxy2G5qE293D2b+x h/eNhyVub2cXQ85X/05WByxgbgQm6gAmL+A2hoj4= Date: Tue, 14 Jan 2020 15:00:23 +0100 From: Greg Kroah-Hartman To: Andrey Konovalov Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Felipe Balbi , Jonathan Corbet , Alan Stern , Dmitry Vyukov , Alexander Potapenko , Marco Elver Subject: Re: [PATCH v5 1/1] usb: gadget: add raw-gadget interface Message-ID: <20200114140023.GA1694074@kroah.com> References: <461a787e63a9a01d83edc563575b8585bc138e8d.1579007786.git.andreyknvl@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <461a787e63a9a01d83edc563575b8585bc138e8d.1579007786.git.andreyknvl@google.com> Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On Tue, Jan 14, 2020 at 02:24:43PM +0100, Andrey Konovalov wrote: > USB Raw Gadget is a kernel module that provides a userspace interface for > the USB Gadget subsystem. Essentially it allows to emulate USB devices > from userspace. Enabled with CONFIG_USB_RAW_GADGET. Raw Gadget is > currently a strictly debugging feature and shouldn't be used in > production. > > Raw Gadget is similar to GadgetFS, but provides a more low-level and > direct access to the USB Gadget layer for the userspace. The key > differences are: > > 1. Every USB request is passed to the userspace to get a response, while > GadgetFS responds to some USB requests internally based on the provided > descriptors. However note, that the UDC driver might respond to some > requests on its own and never forward them to the Gadget layer. > > 2. GadgetFS performs some sanity checks on the provided USB descriptors, > while Raw Gadget allows you to provide arbitrary data as responses to > USB requests. > > 3. Raw Gadget provides a way to select a UDC device/driver to bind to, > while GadgetFS currently binds to the first available UDC. > > 4. Raw Gadget uses predictable endpoint names (handles) across different > UDCs (as long as UDCs have enough endpoints of each required transfer > type). > > 5. Raw Gadget has ioctl-based interface instead of a filesystem-based one. > > Reviewed-by: Greg Kroah-Hartman > Signed-off-by: Andrey Konovalov > --- > > Greg, I've assumed your LGTM meant that I can add a Reviewed-by from you. Yes, I was about to give it a "real" one, but that is fine here, thanks. greg k-h