Commit f8fa2c2e authored by Mika Westerberg's avatar Mika Westerberg
Browse files

thunderbolt: Only configure USB4 wake for lane 0 adapters



Only USB4 lane 0 adapter has the USB4 port capability for wakes so only
program wakes on such adapters.

Fixes: b2911a59 ("thunderbolt: Enable wakes from system suspend")
Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
parent 77455129
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -421,8 +421,12 @@ int usb4_switch_set_wake(struct tb_switch *sw, unsigned int flags)
	 * upstream USB4 port.
	 */
	tb_switch_for_each_port(sw, port) {
		if (!tb_port_is_null(port))
			continue;
		if (!route && tb_is_upstream_port(port))
			continue;
		if (!port->cap_usb4)
			continue;

		ret = tb_port_read(port, &val, TB_CFG_PORT,
				   port->cap_usb4 + PORT_CS_19, 1);