All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Neukum <oneukum@suse.com>
To: robert.foss@collabora.com
Cc: Ben Chan <benchan@chromium.org>,
	Prathmesh Prabhu <pprabhu@chromium.org>,
	Guenter Roeck <groeck@google.com>,
	gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
	linux-usb@vger.kernel.org
Subject: Re: [PACTH v2] cdc-wdm: Clear read pipeline in case of error
Date: Tue, 09 Aug 2016 14:18:19 +0200	[thread overview]
Message-ID: <1470745099.2195.9.camel@suse.com> (raw)
In-Reply-To: <1470671332-32070-1-git-send-email-robert.foss@collabora.com>

On Mon, 2016-08-08 at 11:48 -0400, robert.foss@collabora.com wrote:
> From: Robert Foss <robert.foss@collabora.com>
> 
> Implemented queued response handling. This queue is processed every time the
> WDM_READ flag is cleared.
> 
> In case of a read error, userspace may not actually read the data, since the
> driver returns an error through wdm_poll. After this, the underlying device may
> attempt to send us more data, but the queue is not processed. While userspace is
> also blocked, because the read error is never cleared.
> 
> After this patch, we proactively process the queue on a read error. If there was
> an outstanding response to handle, that will clear the error (or go through the
> same logic again, if another read error occurs). If there was no outstanding
> response, this will bring the queue size back to 0, unblocking a future response
> from the underlying device.
> 
> Tested-by: Robert Foss <robert.foss@collabora.com>
> Signed-off-by: Robert Foss <robert.foss@collabora.com>
Acked-by: Oliver Neukum <oneukum@suse.com>

  reply	other threads:[~2016-08-09 12:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-08 15:48 [PACTH v2] cdc-wdm: Clear read pipeline in case of error robert.foss
2016-08-09 12:18 ` Oliver Neukum [this message]
2016-08-09 13:51 ` Greg KH
2016-08-09 14:22   ` Robert Foss

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=1470745099.2195.9.camel@suse.com \
    --to=oneukum@suse.com \
    --cc=benchan@chromium.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=groeck@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=pprabhu@chromium.org \
    --cc=robert.foss@collabora.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 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.