Skip to content

Commit

Permalink
usbip: vudc: fix: Clear already_seen flag also for ep0
Browse files Browse the repository at this point in the history
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: abdb295 ("usbip: vudc: Add vudc_transfer")
Signed-off-by: Krzysztof Opasiak <[email protected]>
Cc: stable <[email protected]>
Acked-by: Shuah Khan <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
kopasiak authored and gregkh committed Dec 5, 2016
1 parent 66c7931 commit 3e448e1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/usb/usbip/vudc_transfer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3e448e1

Please sign in to comment.