From: Stephen Warren Date: Wed, 25 Apr 2012 18:31:10 +0000 (-0600) Subject: USB: ehci-tegra: remove PORT_RWC_BITS when setting USB_PORT_FEAT_ENABLE X-Git-Tag: upstream/snapshot3+hdmi~7443^2~279 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b08765749332c54c65c1a6515c01c6eb3fc1843e;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git USB: ehci-tegra: remove PORT_RWC_BITS when setting USB_PORT_FEAT_ENABLE In the SetPortFeature/USB_PORT_FEAT_ENABLE case, ehci_hub_control() would read from status_reg, modify the value, and write the result back to status_reg. This would clear any bits in PORT_RWC_BITS that were set in the register. Fix this by masking these bits off before the write. This is logically the same change as 6d5f89c "USB: EHCI: remove PORT_RWC_BITS when clearing USB_PORT_FEAT_ENABLE", but applied to the Tegra driver rather than the USB core. Signed-off-by: Stephen Warren Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c index 43bb0a9..4c1eb61 100644 --- a/drivers/usb/host/ehci-tegra.c +++ b/drivers/usb/host/ehci-tegra.c @@ -164,7 +164,7 @@ static int tegra_ehci_hub_control( goto done; } - temp &= ~PORT_WKCONN_E; + temp &= ~(PORT_RWC_BITS | PORT_WKCONN_E); temp |= PORT_WKDISC_E | PORT_WKOC_E; ehci_writel(ehci, temp | PORT_SUSPEND, status_reg);