Hello!
On 06.07.2019 3:53, Benjamin Herrenschmidt wrote:
Otherwise, we can have a stale state after a disconnect and reconnect
causing errors on the first SETUP packet to the device.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
[...]
diff --git a/drivers/usb/gadget/udc/aspeed-vhub/ep0.c
b/drivers/usb/gadget/udc/aspeed-vhub/ep0.c
index e2927fb083cf..5054c6343ead 100644
--- a/drivers/usb/gadget/udc/aspeed-vhub/ep0.c
+++ b/drivers/usb/gadget/udc/aspeed-vhub/ep0.c
@@ -459,6 +459,15 @@ static const struct usb_ep_ops ast_vhub_ep0_ops = {
.free_request = ast_vhub_free_request,
};
+void ast_vhub_reset_ep0(struct ast_vhub_dev *dev)
+{
+ struct ast_vhub_ep *ep = &dev->ep0;
+
+ ast_vhub_nuke(ep, -EIO);
+ ep->ep0.state = ep0_state_token;
This line is indented with spaces, previous with a tab.
+}
+
+
void ast_vhub_init_ep0(struct ast_vhub *vhub, struct ast_vhub_ep *ep,
struct ast_vhub_dev *dev)
{
[...]
MBR, Sergei