mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-23 04:34:11 +08:00
USB: Don't use EHCI port sempahore for USB 3.0 hubs.
The EHCI host controller needs to prevent EHCI initialization when the UHCI or OHCI companion controller is in the middle of a port reset. It uses ehci_cf_port_reset_rwsem to do this. USB 3.0 hubs can't be under an EHCI host controller, so it makes no sense to down the semaphore for USB 3.0 hubs. It also makes the warm port reset code more complex. Don't down ehci_cf_port_reset_rwsem for USB 3.0 hubs. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Acked-by: Alan Stern <stern@rowland.harvard.edu>
This commit is contained in:
parent
c52804a472
commit
0fe51aa5ee
@ -2661,17 +2661,16 @@ static int hub_port_reset(struct usb_hub *hub, int port1,
|
||||
{
|
||||
int i, status;
|
||||
|
||||
if (!warm) {
|
||||
/* Block EHCI CF initialization during the port reset.
|
||||
* Some companion controllers don't like it when they mix.
|
||||
*/
|
||||
down_read(&ehci_cf_port_reset_rwsem);
|
||||
} else {
|
||||
if (!hub_is_superspeed(hub->hdev)) {
|
||||
if (!hub_is_superspeed(hub->hdev)) {
|
||||
if (warm) {
|
||||
dev_err(hub->intfdev, "only USB3 hub support "
|
||||
"warm reset\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
/* Block EHCI CF initialization during the port reset.
|
||||
* Some companion controllers don't like it when they mix.
|
||||
*/
|
||||
down_read(&ehci_cf_port_reset_rwsem);
|
||||
}
|
||||
|
||||
/* Reset the port */
|
||||
@ -2709,7 +2708,7 @@ static int hub_port_reset(struct usb_hub *hub, int port1,
|
||||
port1);
|
||||
|
||||
done:
|
||||
if (!warm)
|
||||
if (!hub_is_superspeed(hub->hdev))
|
||||
up_read(&ehci_cf_port_reset_rwsem);
|
||||
|
||||
return status;
|
||||
|
Loading…
Reference in New Issue
Block a user