From: Greg KH <gregkh@linuxfoundation.org>
To: robert.foss@collabora.com
Cc: oneukum@suse.com, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, Ben Chan <benchan@chromium.org>,
Guenter Roeck <groeck@google.com>,
Prathmesh Prabhu <pprabhu@chromium.org>
Subject: Re: [PACTH v2] cdc-wdm: Clear read pipeline in case of error
Date: Tue, 9 Aug 2016 15:51:08 +0200 [thread overview]
Message-ID: <20160809135108.GA28109@kroah.com> (raw)
In-Reply-To: <1470671332-32070-1-git-send-email-robert.foss@collabora.com>
On Mon, Aug 08, 2016 at 11:48:52AM -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>
> ---
>
> Changes since v1:
> - Only set a new error code it there is no previous error code
This no longer applies to my tree due to a patch sent before yours for
the same driver. Can you resync against my usb-testing brance on my
usb.git tree on git.kernel.org and resend?
thanks,
greg k-h
next prev parent reply other threads:[~2016-08-09 13:51 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
2016-08-09 13:51 ` Greg KH [this message]
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=20160809135108.GA28109@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=benchan@chromium.org \
--cc=groeck@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=oneukum@suse.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox