Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp6182140rwi; Tue, 18 Oct 2022 09:04:46 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6HSenN7n3TPdSQTCr4mZoA2ppzz0KIVH7hEI9k8zLmlN1q7JwhTDc8FGupc4grsq8wXyXO X-Received: by 2002:a17:90b:17c9:b0:20d:b4ee:aec2 with SMTP id me9-20020a17090b17c900b0020db4eeaec2mr29530238pjb.234.1666109086047; Tue, 18 Oct 2022 09:04:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666109086; cv=none; d=google.com; s=arc-20160816; b=wUSecWndXgiHgxeOvxoZRqvNR++XLOBT9lMk3e/g/OGe5umgRnUeaOT3GLz9wFvfI6 vpkcyUWMdZWvmT5sUo5Pq2Mj3BekLlGwRs17lLNM6aXxA3wTgIW9FVgtVWDSoh+7xjDc xHv7AzA+wXmfobfIqsStfHqYakZDjkWoccSePflu9KJ15NbU5XvSWTU8VBMX8KxvRC4/ mA6i8biG11howgggto6KLxdQCZf+sjETszJEcixzI5aVBT375gN9Sp/U4zzWVNwPYL9Z tFPem4OkXxeqXl8RrMGiyDI8Fbdw9w+mIxS1Sva/5qA4SNOgPiSW9lC5EyG7LOM9RxI4 /G8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=0CW8o8ic786G1Xsl9xGrn9k++mtha9hS/eyUFfyGuu4=; b=cDQcpeuHvRmofLauVs+QX9jf6q5BSvA8DCjuGDp3zlnzl6eyxwex3nAfu1NvmY0p+B pXdHlJUVMBvCtGzvctU93neZHSG1GuM7MEnW7YndPAIRLjbGY5d5RlcAhkMPIvG9QynL 42lvkrQhYO5boQ7sS8I3HDPdwg5zeFACqGBYPiOmKbLrth+atGlUvWwkjP17ROOptB9t PnozaekNTqJnRoJuss+RMM9aXH+rky3bbYkldhdebBDPI7KV1YEAlh61y6QKsYdFXhF3 J0Op6Fzi48au8BDtFgUzwUCOQ47LLKSTNOBZJUspOiU9oBnaIsjnUtr7bFF7H2S5U50w sbnA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h187-20020a636cc4000000b004396227b476si13035161pgc.774.2022.10.18.09.04.10; Tue, 18 Oct 2022 09:04:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229875AbiJRPXw (ORCPT + 99 others); Tue, 18 Oct 2022 11:23:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229935AbiJRPXu (ORCPT ); Tue, 18 Oct 2022 11:23:50 -0400 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 2F77FD01AA for ; Tue, 18 Oct 2022 08:23:49 -0700 (PDT) Received: (qmail 1216402 invoked by uid 1000); 18 Oct 2022 11:23:48 -0400 Date: Tue, 18 Oct 2022 11:23:48 -0400 From: Alan Stern To: Dan Vacura Cc: Dan Scally , linux-usb@vger.kernel.org, Thinh Nguyen , Jeff Vanhoof , Greg Kroah-Hartman , Jonathan Corbet , Laurent Pinchart , Felipe Balbi , Michael Grzeschik , Paul Elder , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [PATCH v3 6/6] usb: gadget: uvc: add configfs option for sg support Message-ID: References: <20221017205446.523796-1-w36195@motorola.com> <20221017205446.523796-7-w36195@motorola.com> <78c6403a-22d9-903d-f0cf-4205e17962d3@ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 18, 2022 at 10:14:54AM -0500, Dan Vacura wrote: > Hi Alan, > > On Tue, Oct 18, 2022 at 10:32:33AM -0400, Alan Stern wrote: > > On Tue, Oct 18, 2022 at 02:27:13PM +0100, Dan Scally wrote: > > > Hi Dan > > > > --- a/Documentation/usb/gadget-testing.rst > > > > +++ b/Documentation/usb/gadget-testing.rst > > > > @@ -796,6 +796,8 @@ The uvc function provides these attributes in its function directory: > > > > function_name name of the interface > > > > req_int_skip_div divisor of total requests to aid in calculating > > > > interrupt frequency, 0 indicates all interrupt > > > > + sg_supported allow for scatter gather to be used if the UDC > > > > + hw supports it > > > > Why is a configuration option needed for this? Why not always use SG > > when the UDC supports it? Or at least, make the decision automatically > > (say, based on the amount of data to be transferred) with no need for > > any user input? > > Patches for a fix and to select to use SG depending on amount of data > are already submitted and under review. I agree, ideally we don't need > this patch, but there have been several regressions uncovered with > enabling this support and it takes time to root cause these issues. Please put this information into the patch description, and maybe also into the documentation file. For your readers' and reviewers' sake it's important -- probably _more_ important -- to explain why you're making a change than what that change is. Alan Stern > In my specific environment, Android GKI 2.0, changes need to get > upstreamed first here before they're pulled into Android device > software. Having this logic in place gives us the ability to turn off > this functionality without going through this process. A revert was also > considered until all the bugs are resolved, but the code is quite > entrenched now to take out, plus others seem to benefit from it being > enabled. Thus the configurability.