Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp4117676rwi; Sat, 22 Oct 2022 05:29:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7z2iUaRmBFopZC8WNTZIKsVSo8mgJ3eV+5QqY4RwUnumiY1pmCAXAPDkwcHn6m9PeqILB8 X-Received: by 2002:a05:6a00:14cc:b0:56b:9969:823 with SMTP id w12-20020a056a0014cc00b0056b99690823mr1125076pfu.36.1666441797004; Sat, 22 Oct 2022 05:29:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666441796; cv=none; d=google.com; s=arc-20160816; b=Ar1fggIo0A/PP0oIQN+ANGw2neF0nYdZ7a2iRw/WhXBJ5Q3V/zJJR0QAOrOK/5RPBC ZEhG0MvfThklb6UyeErXs2pt1FMEmk11OuorHKnNSASAuP2+8EW5Ro0s/Ndc4eWFHqsw OYA4RYh9sEKi/WtlFpX00sP3Oghp5w3YVS6URijnlGHBTaR6hbRxciM5esc560fvNhjx XiKnL1aaXqz47UVbHhUNdch+utLwipVWLbckvN6unQPo52h7Xo3YSKdt33M5fHKDfb+j d+huIkCpF7DGMtPhzHNfjQSXUaJv/nNnYXN3uiDmCsEhjvKs9OL3TE0TjTVtltz8qt4O 3PeA== 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:dkim-signature; bh=L6QIMkq3M6dYEEGlCGVoDk7Dlf6H7m47Vg5G5b1CO0g=; b=vhZHbaSxw94jbCuAGTVuAZOt/5M4+lwxZ7jyY/nXp7oywGKJ/H12L/vm87wV2Wuv+w 5Eyzxw9ELXBfM4R0UTRdfXdH9HRIde+AF+v/EifZl7ALVomoBgGAqv6VsESS1+rdCpmb YQXvzpNoryIttcgJXIrvlULsMbZW0j2OtnYuCpcwGQxt3DrMKC7yCBDX+Yua9zu+njTP 5INwNyEYdLYT5k4CPMJT+5OexnhfkpwAVlwuWLWX1Zmq0TZGLQh1SB1eOom+0d5JzkEN +mKN5OV59Oj+xJtuBBK+zGV8y/NzfHL65YD0IBfViZL2JDbwgBA3eSvWD3Vf6/EcmmgZ 9AAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=T7PWampF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cn15-20020a056a00340f00b00547d55a4d3bsi25208880pfb.285.2022.10.22.05.29.45; Sat, 22 Oct 2022 05:29:56 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=T7PWampF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229981AbiJVLla (ORCPT + 99 others); Sat, 22 Oct 2022 07:41:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230230AbiJVLlH (ORCPT ); Sat, 22 Oct 2022 07:41:07 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3664719C02; Sat, 22 Oct 2022 04:34:27 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 64B6A60D29; Sat, 22 Oct 2022 11:34:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 42AE1C433C1; Sat, 22 Oct 2022 11:34:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666438465; bh=R2v7i0oPbHVVUSYJVj60rX725giKFYlsHnVzGNP3Pg8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=T7PWampF/olIPlKk02yh34ebg9Dj8+58S8jXVjVXDn8qkq5dU10TROD/fU8rxfY11 z2W6zgEQf4CdfmAkHcVl410rD1SD9tcWq9b0/OshEWLrAA5kTURXpqwbG/aYmCWitT wpmhROPoyA5EndggplDvk/DYtzGcE4lVU60UR6nw= Date: Sat, 22 Oct 2022 13:34:23 +0200 From: Greg Kroah-Hartman To: Dan Vacura Cc: linux-usb@vger.kernel.org, Daniel Scally , Thinh Nguyen , Jeff Vanhoof , Jonathan Corbet , Laurent Pinchart , Felipe Balbi , Michael Grzeschik , Paul Elder , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [PATCH v4 6/6] usb: gadget: uvc: add configfs option for sg support Message-ID: References: <20221018215044.765044-1-w36195@motorola.com> <20221018215044.765044-7-w36195@motorola.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221018215044.765044-7-w36195@motorola.com> X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 04:50:42PM -0500, Dan Vacura wrote: > The scatter gather support doesn't appear to work well with some UDC hw. > Add the ability to turn off the feature depending on the controller in > use or other platform quirks. The default is for the uvc gadget to > support sg as long as the UDC hw supports it. > > The specific failure was with the dwc3 controller, but fixes and > improvements are pending for those failures. This capability is now > more intended for future unexpected failures or poor sg support on a > given platform. > > Signed-off-by: Dan Vacura Again, this should be dynamic. Can't we detect this based on the packet size and either do sg or not? If the UDC hardware says it is supported, it should be supported. Otherwise we need to fix the UDC hardware or it saying it is allowed. > --- a/Documentation/usb/gadget-testing.rst > +++ b/Documentation/usb/gadget-testing.rst > @@ -796,6 +796,10 @@ 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, this is default on and only > + intended to be temporally turned off if a given > + platform doesn't work well with scatter gather How do you know if it "doesn't work well"? That's vague and not good and nothing we want to support for forever, sorry. thanks, greg k-h