Skip to content

Commit f8fa2c2

Browse files
committed
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: b2911a5 ("thunderbolt: Enable wakes from system suspend") Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
1 parent 7745512 commit f8fa2c2

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

drivers/thunderbolt/usb4.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,8 +421,12 @@ int usb4_switch_set_wake(struct tb_switch *sw, unsigned int flags)
421421
* upstream USB4 port.
422422
*/
423423
tb_switch_for_each_port(sw, port) {
424+
if (!tb_port_is_null(port))
425+
continue;
424426
if (!route && tb_is_upstream_port(port))
425427
continue;
428+
if (!port->cap_usb4)
429+
continue;
426430

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

0 commit comments

Comments
 (0)