usb: gadget: aspeed: Cleanup EP0 state on port reset

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 <benh@kernel.crashing.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
This commit is contained in:
Benjamin Herrenschmidt
2019-07-26 15:05:31 +10:00
committed by Felipe Balbi
parent 9fbbeb4eff
commit d042c35eb8
3 changed files with 13 additions and 0 deletions

View File

@@ -55,6 +55,9 @@ static void ast_vhub_dev_enable(struct ast_vhub_dev *d)
if (d->enabled)
return;
/* Cleanup EP0 state */
ast_vhub_reset_ep0(d);
/* Enable device and its EP0 interrupts */
reg = VHUB_DEV_EN_ENABLE_PORT |
VHUB_DEV_EN_EP0_IN_ACK_IRQEN |