diff options
author | Matt Evans <matt@ozlabs.org> | 2011-05-31 23:01:07 -0400 |
---|---|---|
committer | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2011-06-02 17:40:23 -0400 |
commit | 4819fef5e7cb9a39e1fd59ecd85861b3ffebdcaa (patch) | |
tree | 143ca81187315e6e06298c05776c83ecadc60d6d /drivers/usb/host/xhci.c | |
parent | f69753140d5c95087a3352710ae5edd541710da6 (diff) |
xhci: Bigendian fix for xhci_check_bandwidth()
Commit 834cb0fc4712a3b21c6b8c5cb55bd13607191311 "xhci: Fix memory leak
bug when dropping endpoints" added a small endian bug. This patch fixes
xhci_check_bandwidth() to read add/drop_flags LE.
Signed-off-by: Matt Evans <matt@ozlabs.org>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Diffstat (limited to 'drivers/usb/host/xhci.c')
-rw-r--r-- | drivers/usb/host/xhci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index d9660eb97eb9..ecd202101617 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c | |||
@@ -1849,8 +1849,8 @@ int xhci_check_bandwidth(struct usb_hcd *hcd, struct usb_device *udev) | |||
1849 | 1849 | ||
1850 | /* Free any rings that were dropped, but not changed. */ | 1850 | /* Free any rings that were dropped, but not changed. */ |
1851 | for (i = 1; i < 31; ++i) { | 1851 | for (i = 1; i < 31; ++i) { |
1852 | if ((ctrl_ctx->drop_flags & (1 << (i + 1))) && | 1852 | if ((le32_to_cpu(ctrl_ctx->drop_flags) & (1 << (i + 1))) && |
1853 | !(ctrl_ctx->add_flags & (1 << (i + 1)))) | 1853 | !(le32_to_cpu(ctrl_ctx->add_flags) & (1 << (i + 1)))) |
1854 | xhci_free_or_cache_endpoint_ring(xhci, virt_dev, i); | 1854 | xhci_free_or_cache_endpoint_ring(xhci, virt_dev, i); |
1855 | } | 1855 | } |
1856 | xhci_zero_in_ctx(xhci, virt_dev); | 1856 | xhci_zero_in_ctx(xhci, virt_dev); |