From: Krzysztof Opasiak Date: Thu, 1 Dec 2016 18:14:37 +0000 (+0100) Subject: usbip: vudc: fix: Clear already_seen flag also for ep0 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3e448e13a662fb20145916636127995cbf37eb83;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Cc: stable Acked-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman --- 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;