From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751646AbcHGJEE (ORCPT ); Sun, 7 Aug 2016 05:04:04 -0400 Received: from mx2.suse.de ([195.135.220.15]:49383 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751420AbcHGJED (ORCPT ); Sun, 7 Aug 2016 05:04:03 -0400 Message-ID: <1470560360.2014.1.camel@suse.com> Subject: Re: [PACTH v1] cdc-wdm: Clear read pipeline in case of error From: Oliver Neukum To: Robert Foss Cc: Ben Chan , pprabhu@chromium.org, Guenter Roeck , gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Date: Sun, 07 Aug 2016 10:59:20 +0200 In-Reply-To: <1775d53f-0129-4e94-b08c-7d4c58fa9fa6@collabora.com> References: <1469729992-6228-1-git-send-email-robert.foss@collabora.com> <1470140595.30985.20.camel@suse.com> <04ca38d7-6538-d220-3fe7-7ece503ce4ad@collabora.com> <1470146394.30985.25.camel@suse.com> <1470220742.4612.7.camel@suse.com> <1775d53f-0129-4e94-b08c-7d4c58fa9fa6@collabora.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.11 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2016-08-04 at 13:44 -0400, Robert Foss wrote: > > On 2016-08-03 06:39 AM, Oliver Neukum wrote: > > On Tue, 2016-08-02 at 10:37 -0400, Robert Foss wrote: > > How can that depend on what we return to user space? > > In the driver we can continue just ignoring errors. > > Now, if user space stops reading because we reported an error, > > that is the decision user space has made. We cannot ignore errors > > in the kernel because we don't like what user space does when it > > sees the error. > > So perhaps the better solution is to be more intelligent about how > desc->rerr is written to during after an error to be able to maintain > the error condition? Yes, good idea. I think an error condition should never be overwritten. So we go to the current behaviour only if a second error before user space has seen the3 first error arises. Would that fix your issue? Regards Oliver