summaryrefslogtreecommitdiffstats
path: root/drivers/usb/usbip
diff options
context:
space:
mode:
authorKrzysztof Opasiak <k.opasiak@samsung.com>2016-12-01 19:14:37 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-12-05 15:08:45 +0100
commit3e448e13a662fb20145916636127995cbf37eb83 (patch)
tree8d2fa555df3a9ba6558f8cbdb0ffee66e7c7ab1e /drivers/usb/usbip
parent66c79319f838df744b062a73c3dcdfd2156b7da7 (diff)
downloadlinux-stable-3e448e13a662fb20145916636127995cbf37eb83.tar.gz
linux-stable-3e448e13a662fb20145916636127995cbf37eb83.tar.bz2
linux-stable-3e448e13a662fb20145916636127995cbf37eb83.zip
usbip: vudc: fix: Clear already_seen flag also for ep0
ep_list inside gadget structure doesn't contain ep0. It is stored separately in ep0 field. This causes an urb hang if gadget driver decides to delay setup handling. On host side this is visible as timeout error when setting configuration. This bug can be reproduced using for example any gadget with mass storage function. Fixes: abdb29574322 ("usbip: vudc: Add vudc_transfer") Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com> Cc: stable <stable@vger.kernel.org> Acked-by: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/usbip')
-rw-r--r--drivers/usb/usbip/vudc_transfer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/usbip/vudc_transfer.c b/drivers/usb/usbip/vudc_transfer.c
index 8b3dacc90183..4cfd475ee865 100644
--- a/drivers/usb/usbip/vudc_transfer.c
+++ b/drivers/usb/usbip/vudc_transfer.c
@@ -339,6 +339,8 @@ static void v_timer(unsigned long _vudc)
total = timer->frame_limit;
}
+ /* We have to clear ep0 flags separately as it's not on the list */
+ udc->ep[0].already_seen = 0;
list_for_each_entry(_ep, &udc->gadget.ep_list, ep_list) {
ep = to_vep(_ep);
ep->already_seen = 0;