All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Michael Grzeschik <m.grzeschik@pengutronix.de>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Daniel Scally <dan.scally@ideasonboard.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] usb: gadget: uvc: Improve error checking and tagging
Date: Wed, 31 Jul 2024 10:30:32 +0200	[thread overview]
Message-ID: <2024073119-turbine-subscript-e19a@gregkh> (raw)
In-Reply-To: <20240324-uvc-gadget-errorcheck-v2-1-f141b13ade0e@pengutronix.de>

On Fri, Apr 05, 2024 at 09:44:56AM +0200, Michael Grzeschik wrote:
> Right now after one transfer was completed with EXDEV the currently
> encoded frame will get the UVC_STREAM_ERR tag attached. Since the
> complete and encode path are handling separate requests from different
> threads, there is no direct correspondence between the missed transfer
> of one request and the currently encoded request which might already
> belong to an completely different frame.
> 
> When queueing requests into the hardware by calling ep_queue the
> underlying ringbuffer of the usb driver will be filled. However when
> one of these requests will have some issue while transfer the hardware
> will trigger an interrupt but will continue transferring the pending
> requests in the ringbuffer. This interrupt-latency will make it
> impossible to react in time to tag the fully enqueued frame with the
> UVC_STREAM_ERR in the header.
> 
> This patch is also addressing this particular issue by delaying the
> transmit of the EOF/ERR tagged header by waiting for the last enqueued
> buffer of the frame to be completed. This way it is possible to react to
> send the EOF/ERR tag depending on the whole frame transfer status.
> 
> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
> ---
> Changes in v2:
> - removed unnecessary uvc_gadget_errorcheck_param module parameter
> - Link to v1: https://lore.kernel.org/r/20240324-uvc-gadget-errorcheck-v1-1-5538c57bbeba@pengutronix.de
> ---
>  drivers/usb/gadget/function/uvc.h       |  2 +
>  drivers/usb/gadget/function/uvc_video.c | 69 ++++++++++++++++++++++++++++-----
>  2 files changed, 61 insertions(+), 10 deletions(-)

Same here, can you rebase and resubmit if still needed?

thanks,

greg k-h

      reply	other threads:[~2024-07-31  8:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-05  7:44 [PATCH v2] usb: gadget: uvc: Improve error checking and tagging Michael Grzeschik
2024-07-31  8:30 ` 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=2024073119-turbine-subscript-e19a@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=dan.scally@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=m.grzeschik@pengutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.