From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932791AbcHINvE (ORCPT ); Tue, 9 Aug 2016 09:51:04 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:59891 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932398AbcHINvA (ORCPT ); Tue, 9 Aug 2016 09:51:00 -0400 Date: Tue, 9 Aug 2016 15:51:08 +0200 From: Greg KH To: robert.foss@collabora.com Cc: oneukum@suse.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Ben Chan , Guenter Roeck , Prathmesh Prabhu Subject: Re: [PACTH v2] cdc-wdm: Clear read pipeline in case of error Message-ID: <20160809135108.GA28109@kroah.com> References: <1470671332-32070-1-git-send-email-robert.foss@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1470671332-32070-1-git-send-email-robert.foss@collabora.com> User-Agent: Mutt/1.6.2 (2016-07-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > > 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