forked from Minki/linux
USB: EHCI: fix handover for designated full-speed ports
This patch (as895) fixes up a loose end in the port-handover code for the USB-Persist facility. A special case occurs when a high-speed device is attached to a port which the user has designated to run at full-speed only; the port must be disabled before the handover can take place. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
6bc6cff52e
commit
3c519b846c
@ -60,11 +60,13 @@ static void ehci_handover_companion_ports(struct ehci_hcd *ehci)
|
|||||||
while (port--) {
|
while (port--) {
|
||||||
if (test_bit(port, &ehci->owned_ports)) {
|
if (test_bit(port, &ehci->owned_ports)) {
|
||||||
reg = &ehci->regs->port_status[port];
|
reg = &ehci->regs->port_status[port];
|
||||||
status = ehci_readl(ehci, reg);
|
status = ehci_readl(ehci, reg) & ~PORT_RWC_BITS;
|
||||||
|
|
||||||
/* Port already owned by companion? */
|
/* Port already owned by companion? */
|
||||||
if (status & PORT_OWNER)
|
if (status & PORT_OWNER)
|
||||||
clear_bit(port, &ehci->owned_ports);
|
clear_bit(port, &ehci->owned_ports);
|
||||||
|
else if (test_bit(port, &ehci->companion_ports))
|
||||||
|
ehci_writel(ehci, status & ~PORT_PE, reg);
|
||||||
else
|
else
|
||||||
ehci_hub_control(hcd, SetPortFeature,
|
ehci_hub_control(hcd, SetPortFeature,
|
||||||
USB_PORT_FEAT_RESET, port + 1,
|
USB_PORT_FEAT_RESET, port + 1,
|
||||||
|
Loading…
Reference in New Issue
Block a user