diff options
author | Krzysztof Opasiak <k.opasiak@samsung.com> | 2016-12-01 18:14:37 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-06 09:40:11 (GMT) |
commit | 77bd73ce21fafe2ca80fe09b6e9dbebf93fd4cd6 (patch) | |
tree | 55e2428c27f93d45dc8bd9ad326acee7c907ec90 /drivers | |
parent | 420f170ce1ba999872f4be893807041b0d8db930 (diff) | |
download | linux-77bd73ce21fafe2ca80fe09b6e9dbebf93fd4cd6.tar.xz |
usbip: vudc: fix: Clear already_seen flag also for ep0
commit 3e448e13a662fb20145916636127995cbf37eb83 upstream.
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>
Acked-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/usbip/vudc_transfer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/usbip/vudc_transfer.c b/drivers/usb/usbip/vudc_transfer.c index aba6bd4..bc0296d 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; |