]> git.karo-electronics.de Git - linux-beck.git/commit
USB: EHCI: remove PORT_RWC_BITS when clearing USB_PORT_FEAT_ENABLE
authorStephen Warren <swarren@nvidia.com>
Wed, 18 Apr 2012 21:32:46 +0000 (15:32 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Apr 2012 02:06:23 +0000 (19:06 -0700)
commit6d5f89c7b4fa5f8d6dc757982402c032183ffd8d
treec2a82aa3eef6370bdd8ccd7f58887b237798683c
parentcae18768acf684b505c928e5cf7ea741fac45b83
USB: EHCI: remove PORT_RWC_BITS when clearing USB_PORT_FEAT_ENABLE

In the ClearPortFeature/USB_PORT_FEAT_ENABLE case, ehci_hub_control()
would read from status_reg, clear PORT_PE, and write the result back to
status_reg. This would clear any bits in PORT_RWC_BITS that were set in
the registers. Fix this by masking these bits off before the write.

Since this masking is common across all ClearPortFeature cases, move it
into a single early location to avoid duplicating it.

Remove the same bugfix from ehci-tegra.c's tegra_ehci_hub_control(), now
that this case is correctly handled by the core.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ehci-hub.c
drivers/usb/host/ehci-tegra.c