aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/uwb
diff options
context:
space:
mode:
authorRobert Foss <robert.foss@collabora.com>2016-08-09 10:54:52 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-08-10 10:15:30 +0200
commitc1da59dad0ebd3f9bd238f3fff82b1f7ffda7829 (patch)
tree5620e6f5048a292a608aca7afa96c3ee742523be /drivers/uwb
parentusbip: vhci extension: modifications to vhci driver (diff)
downloadlinux-dev-c1da59dad0ebd3f9bd238f3fff82b1f7ffda7829.tar.xz
linux-dev-c1da59dad0ebd3f9bd238f3fff82b1f7ffda7829.zip
cdc-wdm: Clear read pipeline in case of error
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. Signed-off-by: Robert Foss <robert.foss@collabora.com> Tested-by: Robert Foss <robert.foss@collabora.com> Acked-by: Oliver Neukum <oneukum@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/uwb')
0 files changed, 0 insertions, 0 deletions