From 8656c00cc7630ef58c01d7d1a9d78af41a4fd166 Mon Sep 17 00:00:00 2001 From: Nickolai Zeldovich Date: Mon, 7 Jan 2013 22:39:31 -0500 Subject: [PATCH] UPSTREAM: drivers: xhci: fix incorrect bit test commit ba7b5c22d33136a5612ca5ef8d31564dcc501126 upstream. Fix incorrect bit test that originally showed up in 4ee823b83bc9851743fab756c76b27d6a1e2472b "USB/xHCI: Support device-initiated USB 3.0 resume." Use '&' instead of '&&'. This should be backported to kernels as old as 3.4. Signed-off-by: Nickolai Zeldovich Signed-off-by: Sarah Sharp Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 5c59de0a37d7721221550c2be2b07ea41966bf40) BUG=None TEST=Together with other cherry-picks: run BVT trybots on all platforms, manually confirm that USB network/storage/input devices still work (including across suspend/resume) Change-Id: I09d3572b30dbf8922a8894bc0dcddc71e6c64833 Signed-off-by: Julius Werner Reviewed-on: https://gerrit.chromium.org/gerrit/46077 Reviewed-by: Vincent Palatin --- drivers/usb/host/xhci-ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 331220b24b95..71c2ecae1599 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -1697,7 +1697,7 @@ static void handle_port_status(struct xhci_hcd *xhci, faked_port_index + 1); if (slot_id && xhci->devs[slot_id]) xhci_ring_device(xhci, slot_id); - if (bus_state->port_remote_wakeup && (1 << faked_port_index)) { + if (bus_state->port_remote_wakeup & (1 << faked_port_index)) { bus_state->port_remote_wakeup &= ~(1 << faked_port_index); xhci_test_and_clear_bit(xhci, port_array, -- 2.20.1