Skip to contentSkip to conversation

patch "usbip: vudc: fix: Clear already_seen flag also for ep0" added to usb-testing

PATCH [email protected] 1 participant 1 message Dec 5, 2016

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

usbip: vudc: fix: Clear already_seen flag also for ep0

to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-testing branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will be merged to the usb-next branch sometime soon, after it passes testing, and the merge window is open.

If you have any questions about this process, please let me know.

Quoted 1 line

From 3e448e13a662fb20145916636127995cbf37eb83 Mon Sep 17 00:00:00 2001

From: Krzysztof Opasiak <[email protected]>
Date: Thu, 1 Dec 2016 19:14:37 +0100
Subject: 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")
Cc stable <[email protected]>
---
 drivers/usb/usbip/vudc_transfer.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/usb/usbip/vudc_transfer.c +2 -0
index 8b3dacc90183..4cfd475ee865 100644
@@ -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;
Signature · 1 line
2.10.2