From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752889AbcHIOWe (ORCPT ); Tue, 9 Aug 2016 10:22:34 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:41008 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752452AbcHIOWd (ORCPT ); Tue, 9 Aug 2016 10:22:33 -0400 Subject: Re: [PACTH v2] cdc-wdm: Clear read pipeline in case of error To: Greg KH References: <1470671332-32070-1-git-send-email-robert.foss@collabora.com> <20160809135108.GA28109@kroah.com> Cc: oneukum@suse.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Ben Chan , Guenter Roeck , Prathmesh Prabhu From: Robert Foss Message-ID: Date: Tue, 9 Aug 2016 10:22:27 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160809135108.GA28109@kroah.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016-08-09 09:51 AM, Greg KH wrote: > On Mon, Aug 08, 2016 at 11:48:52AM -0400, robert.foss@collabora.com wrote: >> From: Robert Foss >> >> 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 >> Signed-off-by: Robert Foss >> Acked-by: Oliver Neukum Thanks Oliver! >> --- >> >> 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? > Will do!