Commit c7a7ac84 authored by Mika Westerberg's avatar Mika Westerberg Committed by Greg Kroah-Hartman

thunderbolt: Fix xhci check in usb4_switch_setup()

The code tried to check whether xhci variable has ROUTER_CS_6_HCI bit
set but since xhci type is bool and it already holds true or false based
on that very bit, fix the check to use the variable directly.
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Fixes: b0407983 ("thunderbolt: Add initial support for USB4")
Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
Link: https://lore.kernel.org/r/20200108125317.36444-2-mika.westerberg@linux.intel.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a00dfd4d
......@@ -239,7 +239,7 @@ int usb4_switch_setup(struct tb_switch *sw)
* and the parent does not have any USB3 dowstream
* adapters (so we cannot do USB 3.x tunneling).
*/
if (xhci & ROUTER_CS_6_HCI)
if (xhci)
val |= ROUTER_CS_5_HCO;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment