thunderbolt: Scan only valid NULL adapter ports in hotplug
The only way to expand Thunderbolt topology is through the NULL adapter ports (typically ports 1, 2, 3 and 4). There is no point handling Thunderbolt hotplug events on any other port. Add a helper function (tb_port_is_null()) that can be used to determine if the port is NULL port, and use it in software connection manager code when hotplug event is handled. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
This commit is contained in:
@@ -356,10 +356,12 @@ static void tb_handle_hotplug(struct work_struct *work)
|
||||
tb_port_info(port,
|
||||
"got plug event for connected port, ignoring\n");
|
||||
} else {
|
||||
tb_port_info(port, "hotplug: scanning\n");
|
||||
tb_scan_port(port);
|
||||
if (!port->remote)
|
||||
tb_port_info(port, "hotplug: no switch found\n");
|
||||
if (tb_port_is_null(port)) {
|
||||
tb_port_info(port, "hotplug: scanning\n");
|
||||
tb_scan_port(port);
|
||||
if (!port->remote)
|
||||
tb_port_info(port, "hotplug: no switch found\n");
|
||||
}
|
||||
}
|
||||
|
||||
put_sw:
|
||||
|
Reference in New Issue
Block a user