summaryrefslogtreecommitdiff
path: root/drivers/staging/most/hdm-usb/hdm_usb.c
diff options
context:
space:
mode:
authorChristian Gromm <christian.gromm@microchip.com>2016-08-19 11:12:48 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-08-21 16:53:56 +0200
commit72df4a55e9ab955d2143e638d9b24343e7658d6f (patch)
tree9b2f5435bc1e161b0afb9500e10d1e54148360f9 /drivers/staging/most/hdm-usb/hdm_usb.c
parentcc28983c322030ce7a3d748833186eab86a41570 (diff)
staging: most: hdm-usb: stop core from submitting buffers in case of broken pipe
This patch ensures that no more packets are submitted by the core in case an USB endpoint has reported a broken pipe (-EPIPE). Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de> Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/most/hdm-usb/hdm_usb.c')
-rw-r--r--drivers/staging/most/hdm-usb/hdm_usb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/most/hdm-usb/hdm_usb.c b/drivers/staging/most/hdm-usb/hdm_usb.c
index 8f1c09670dfb..03cdd0d1283d 100644
--- a/drivers/staging/most/hdm-usb/hdm_usb.c
+++ b/drivers/staging/most/hdm-usb/hdm_usb.c
@@ -580,6 +580,7 @@ static void hdm_read_completion(struct urb *urb)
switch (urb->status) {
case -EPIPE:
dev_warn(dev, "Broken IN pipe detected\n");
+ most_stop_enqueue(&mdev->iface, channel);
mbo->status = MBO_E_INVAL;
mdev->clear_work[channel].pipe = urb->pipe;
schedule_work(&mdev->clear_work[channel].ws);
@@ -936,8 +937,7 @@ static void wq_clear_halt(struct work_struct *wq_obj)
if (usb_clear_halt(mdev->usb_device, pipe))
dev_warn(&mdev->usb_device->dev, "Failed to reset endpoint.\n");
- if (mdev->conf[channel].direction & MOST_CH_TX)
- most_resume_enqueue(&mdev->iface, channel);
+ most_resume_enqueue(&mdev->iface, channel);
mutex_unlock(&mdev->io_mutex);
}