All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] USB: ehci-tegra: remove PORT_RWC_BITS when setting USB_PORT_FEAT_ENABLE
@ 2012-04-25 18:31 Stephen Warren
       [not found] ` <1335378670-26860-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Warren @ 2012-04-25 18:31 UTC (permalink / raw)
  To: Alan Stern, Greg Kroah-Hartman
  Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Stephen Warren

From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

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 <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 drivers/usb/host/ehci-tegra.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index 5baf8a2..a6e9b2c 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);
 
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] USB: ehci-tegra: remove PORT_RWC_BITS when setting USB_PORT_FEAT_ENABLE
       [not found] ` <1335378670-26860-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
@ 2012-04-25 19:59   ` Alan Stern
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Stern @ 2012-04-25 19:59 UTC (permalink / raw)
  To: Stephen Warren
  Cc: Greg Kroah-Hartman, linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Stephen Warren

On Wed, 25 Apr 2012, Stephen Warren wrote:

> From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> 
> 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 <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

Acked-by: Alan Stern <stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org>

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-04-25 19:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-25 18:31 [PATCH] USB: ehci-tegra: remove PORT_RWC_BITS when setting USB_PORT_FEAT_ENABLE Stephen Warren
     [not found] ` <1335378670-26860-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-04-25 19:59   ` Alan Stern

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.