Commit 9fbbeb4e authored by Benjamin Herrenschmidt's avatar Benjamin Herrenschmidt Committed by Felipe Balbi

usb: gadget: aspeed: Don't set port enable change bit on reset

This bit should be only set when the port enable goes down, for
example, on errors. Not when it gets set after a port reset. Some
USB stacks seem to be sensitive to this and fails enumeration.
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 240b65dc
......@@ -449,8 +449,15 @@ static void ast_vhub_change_port_stat(struct ast_vhub *vhub,
USB_PORT_STAT_C_OVERCURRENT |
USB_PORT_STAT_C_RESET |
USB_PORT_STAT_C_L1;
p->change |= chg;
/*
* We only set USB_PORT_STAT_C_ENABLE if we are disabling
* the port as per USB spec, otherwise MacOS gets upset
*/
if (p->status & USB_PORT_STAT_ENABLE)
chg &= ~USB_PORT_STAT_C_ENABLE;
p->change = chg;
ast_vhub_update_hub_ep1(vhub, port);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment