aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/host/ehci-hub.c17
-rw-r--r--drivers/usb/host/ehci-tegra.c13
2 files changed, 8 insertions, 22 deletions
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
index 8f57c6e86e87..1e332ac113f7 100644
--- a/drivers/usb/host/ehci-hub.c
+++ b/drivers/usb/host/ehci-hub.c
@@ -704,6 +704,7 @@ static int ehci_hub_control (
704 goto error; 704 goto error;
705 wIndex--; 705 wIndex--;
706 temp = ehci_readl(ehci, status_reg); 706 temp = ehci_readl(ehci, status_reg);
707 temp &= ~PORT_RWC_BITS;
707 708
708 /* 709 /*
709 * Even if OWNER is set, so the port is owned by the 710 * Even if OWNER is set, so the port is owned by the
@@ -717,8 +718,7 @@ static int ehci_hub_control (
717 ehci_writel(ehci, temp & ~PORT_PE, status_reg); 718 ehci_writel(ehci, temp & ~PORT_PE, status_reg);
718 break; 719 break;
719 case USB_PORT_FEAT_C_ENABLE: 720 case USB_PORT_FEAT_C_ENABLE:
720 ehci_writel(ehci, (temp & ~PORT_RWC_BITS) | PORT_PEC, 721 ehci_writel(ehci, temp | PORT_PEC, status_reg);
721 status_reg);
722 break; 722 break;
723 case USB_PORT_FEAT_SUSPEND: 723 case USB_PORT_FEAT_SUSPEND:
724 if (temp & PORT_RESET) 724 if (temp & PORT_RESET)
@@ -747,7 +747,7 @@ static int ehci_hub_control (
747 spin_lock_irqsave(&ehci->lock, flags); 747 spin_lock_irqsave(&ehci->lock, flags);
748 } 748 }
749 /* resume signaling for 20 msec */ 749 /* resume signaling for 20 msec */
750 temp &= ~(PORT_RWC_BITS | PORT_WAKE_BITS); 750 temp &= ~PORT_WAKE_BITS;
751 ehci_writel(ehci, temp | PORT_RESUME, status_reg); 751 ehci_writel(ehci, temp | PORT_RESUME, status_reg);
752 ehci->reset_done[wIndex] = jiffies 752 ehci->reset_done[wIndex] = jiffies
753 + msecs_to_jiffies(20); 753 + msecs_to_jiffies(20);
@@ -757,9 +757,8 @@ static int ehci_hub_control (
757 break; 757 break;
758 case USB_PORT_FEAT_POWER: 758 case USB_PORT_FEAT_POWER:
759 if (HCS_PPC (ehci->hcs_params)) 759 if (HCS_PPC (ehci->hcs_params))
760 ehci_writel(ehci, 760 ehci_writel(ehci, temp & ~PORT_POWER,
761 temp & ~(PORT_RWC_BITS | PORT_POWER), 761 status_reg);
762 status_reg);
763 break; 762 break;
764 case USB_PORT_FEAT_C_CONNECTION: 763 case USB_PORT_FEAT_C_CONNECTION:
765 if (ehci->has_lpm) { 764 if (ehci->has_lpm) {
@@ -767,12 +766,10 @@ static int ehci_hub_control (
767 temp &= ~PORT_LPM; 766 temp &= ~PORT_LPM;
768 temp &= ~PORT_DEV_ADDR; 767 temp &= ~PORT_DEV_ADDR;
769 } 768 }
770 ehci_writel(ehci, (temp & ~PORT_RWC_BITS) | PORT_CSC, 769 ehci_writel(ehci, temp | PORT_CSC, status_reg);
771 status_reg);
772 break; 770 break;
773 case USB_PORT_FEAT_C_OVER_CURRENT: 771 case USB_PORT_FEAT_C_OVER_CURRENT:
774 ehci_writel(ehci, (temp & ~PORT_RWC_BITS) | PORT_OCC, 772 ehci_writel(ehci, temp | PORT_OCC, status_reg);
775 status_reg);
776 break; 773 break;
777 case USB_PORT_FEAT_C_RESET: 774 case USB_PORT_FEAT_C_RESET:
778 /* GetPortStatus clears reset */ 775 /* GetPortStatus clears reset */
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index 4c8bef615cec..9f817680ff04 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -148,18 +148,7 @@ static int tegra_ehci_hub_control(
148 148
149 spin_lock_irqsave(&ehci->lock, flags); 149 spin_lock_irqsave(&ehci->lock, flags);
150 150
151 /* 151 if (typeReq == GetPortStatus) {
152 * In ehci_hub_control() for USB_PORT_FEAT_ENABLE clears the other bits
153 * that are write on clear, by writing back the register read value, so
154 * USB_PORT_FEAT_ENABLE is handled by masking the set on clear bits
155 */
156 if (typeReq == ClearPortFeature && wValue == USB_PORT_FEAT_ENABLE) {
157 temp = ehci_readl(ehci, status_reg) & ~PORT_RWC_BITS;
158 ehci_writel(ehci, temp & ~PORT_PE, status_reg);
159 goto done;
160 }
161
162 else if (typeReq == GetPortStatus) {
163 temp = ehci_readl(ehci, status_reg); 152 temp = ehci_readl(ehci, status_reg);
164 if (tegra->port_resuming && !(temp & PORT_SUSPEND)) { 153 if (tegra->port_resuming && !(temp & PORT_SUSPEND)) {
165 /* Resume completed, re-enable disconnect detection */ 154 /* Resume completed, re-enable disconnect detection */