linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robert Foss <robert.foss@collabora.com>
To: Oliver Neukum <oneukum@suse.com>
Cc: pprabhu@chromium.org, gregkh@linuxfoundation.org,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: [PACTH v1] cdc-wdm: Clear read pipeline in case of error
Date: Tue, 2 Aug 2016 10:37:32 -0400	[thread overview]
Message-ID: <cd22e453-e09d-0c47-d8ee-01e20f41e9b1@collabora.com> (raw)
In-Reply-To: <1470146394.30985.25.camel@suse.com>



On 2016-08-02 09:59 AM, Oliver Neukum wrote:
> On Tue, 2016-08-02 at 09:54 -0400, Robert Foss wrote:
>>
>> On 2016-08-02 08:23 AM, Oliver Neukum wrote:
>>> On Thu, 2016-07-28 at 14:19 -0400, robert.foss@collabora.com wrote:
>>>> From: Prathmesh Prabhu <pprabhu@chromium.org>
>>>>
>>>> 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.
>>>
>>> Could you explain why user space cannot just read more data?
>>> That will clear the error.
>>
>> Userspace certainly could read more data, but for the case when
>> userspace doesn't read and clear a potential an error, we still would
>> like to not be stuck if the device sends more data.
>>
>> I hope that answers your question, if not I'll try to be more elaborate.
>
> Clear, but why does that require the suppression of an error condition?
> errors should always be delivered.

The goal is not to clear the error condition, but that is required to 
not stay stuck.

Maintaining the error condition and not staying stuck if the device 
sends more data are mutually exclusive as far as I understand it.


Rob.

  reply	other threads:[~2016-08-02 14:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-28 18:19 [PACTH v1] cdc-wdm: Clear read pipeline in case of error robert.foss
2016-08-02 12:23 ` Oliver Neukum
2016-08-02 13:54   ` Robert Foss
2016-08-02 13:59     ` Oliver Neukum
2016-08-02 14:37       ` Robert Foss [this message]
2016-08-03 10:39         ` Oliver Neukum
2016-08-04 17:44           ` Robert Foss
2016-08-07  8:59             ` Oliver Neukum
2016-08-08 14:38               ` 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=cd22e453-e09d-0c47-d8ee-01e20f41e9b1@collabora.com \
    --to=robert.foss@collabora.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=oneukum@suse.com \
    --cc=pprabhu@chromium.org \
    /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).