linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Dan Vacura <w36195@motorola.com>
Cc: linux-usb@vger.kernel.org,
	Daniel Scally <dan.scally@ideasonboard.com>,
	Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
	Jeff Vanhoof <qjv001@motorola.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Felipe Balbi <balbi@kernel.org>,
	Michael Grzeschik <m.grzeschik@pengutronix.de>,
	Paul Elder <paul.elder@ideasonboard.com>,
	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
Date: Sat, 22 Oct 2022 13:34:23 +0200	[thread overview]
Message-ID: <Y1PVP73LmYcgj5ph@kroah.com> (raw)
In-Reply-To: <20221018215044.765044-7-w36195@motorola.com>

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 <w36195@motorola.com>

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

      reply	other threads:[~2022-10-22 11:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-18 21:50 [PATCH v4 0/6] uvc gadget performance issues Dan Vacura
2022-10-18 21:50 ` [PATCH v4 1/6] usb: gadget: uvc: fix dropped frame after missed isoc Dan Vacura
2022-10-18 21:50 ` [PATCH v4 2/6] usb: dwc3: gadget: cancel requests instead of release " Dan Vacura
2022-10-22 11:31   ` Greg Kroah-Hartman
2022-10-22 13:35     ` Jeff Vanhoof
2022-10-24 22:47       ` Thinh Nguyen
2023-09-19  9:10         ` Michael Grzeschik
2023-09-19  9:18           ` Michael Grzeschik
2022-10-18 21:50 ` [PATCH v4 3/6] usb: gadget: uvc: fix sg handling in error case Dan Vacura
2022-10-18 21:50 ` [PATCH v4 4/6] usb: gadget: uvc: fix sg handling during video encode Dan Vacura
2022-10-18 21:50 ` [PATCH v4 5/6] usb: gadget: uvc: make interrupt skip logic configurable Dan Vacura
2022-10-22 11:32   ` Greg Kroah-Hartman
2022-10-18 21:50 ` [PATCH v4 6/6] usb: gadget: uvc: add configfs option for sg support Dan Vacura
2022-10-22 11:34   ` Greg Kroah-Hartman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y1PVP73LmYcgj5ph@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=balbi@kernel.org \
    --cc=corbet@lwn.net \
    --cc=dan.scally@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=m.grzeschik@pengutronix.de \
    --cc=paul.elder@ideasonboard.com \
    --cc=qjv001@motorola.com \
    --cc=w36195@motorola.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).