Lines Matching full:tcm
36 static inline struct tb *tcm_to_tb(struct tb_cm *tcm) in tcm_to_tb() argument
38 return ((void *)tcm - sizeof(struct tb)); in tcm_to_tb()
71 struct tb_cm *tcm = tb_priv(sw->tb); in tb_add_dp_resources() local
81 list_add_tail(&port->list, &tcm->dp_resources); in tb_add_dp_resources()
88 struct tb_cm *tcm = tb_priv(sw->tb); in tb_remove_dp_resources() local
97 list_for_each_entry_safe(port, tmp, &tcm->dp_resources, list) { in tb_remove_dp_resources()
108 struct tb_cm *tcm = tb_priv(tb); in tb_discover_tunnels() local
147 list_add_tail(&tunnel->list, &tcm->tunnel_list); in tb_discover_tunnels()
260 struct tb_cm *tcm = tb_priv(tb); in tb_find_tunnel() local
263 list_for_each_entry(tunnel, &tcm->tunnel_list, list) { in tb_find_tunnel()
305 struct tb_cm *tcm = tb_priv(tb); in tb_available_bandwidth() local
352 list_for_each_entry(tunnel, &tcm->tunnel_list, list) { in tb_available_bandwidth()
438 struct tb_cm *tcm = tb_priv(tb); in tb_tunnel_usb3() local
496 list_add_tail(&tunnel->list, &tcm->tunnel_list); in tb_tunnel_usb3()
556 struct tb_cm *tcm = tb_priv(port->sw->tb); in tb_scan_port() local
620 if (!tcm->hotplug_active) in tb_scan_port()
660 if (tcm->hotplug_active && tb_tunnel_usb3(sw->tb, sw)) in tb_scan_port()
716 struct tb_cm *tcm = tb_priv(tb); in tb_free_invalid_tunnels() local
720 list_for_each_entry_safe(tunnel, n, &tcm->tunnel_list, list) { in tb_free_invalid_tunnels()
804 struct tb_cm *tcm = tb_priv(tb); in tb_find_dp_out() local
809 list_for_each_entry(port, &tcm->dp_resources, list) { in tb_find_dp_out()
841 struct tb_cm *tcm = tb_priv(tb); in tb_tunnel_dp() local
853 list_for_each_entry(port, &tcm->dp_resources, list) { in tb_tunnel_dp()
922 list_add_tail(&tunnel->list, &tcm->tunnel_list); in tb_tunnel_dp()
967 struct tb_cm *tcm = tb_priv(tb); in tb_dp_resource_available() local
973 list_for_each_entry(p, &tcm->dp_resources, list) { in tb_dp_resource_available()
980 list_add_tail(&port->list, &tcm->dp_resources); in tb_dp_resource_available()
988 struct tb_cm *tcm = tb_priv(tb); in tb_disconnect_and_release_dp() local
995 list_for_each_entry_safe_reverse(tunnel, n, &tcm->tunnel_list, list) { in tb_disconnect_and_release_dp()
1000 while (!list_empty(&tcm->dp_resources)) { in tb_disconnect_and_release_dp()
1003 port = list_first_entry(&tcm->dp_resources, in tb_disconnect_and_release_dp()
1012 struct tb_cm *tcm = tb_priv(tb); in tb_tunnel_pci() local
1041 list_add_tail(&tunnel->list, &tcm->tunnel_list); in tb_tunnel_pci()
1047 struct tb_cm *tcm = tb_priv(tb); in tb_approve_xdomain_paths() local
1073 list_add_tail(&tunnel->list, &tcm->tunnel_list); in tb_approve_xdomain_paths()
1117 struct tb_cm *tcm = tb_priv(tb); in tb_handle_hotplug() local
1125 if (!tcm->hotplug_active) in tb_handle_hotplug()
1245 struct tb_cm *tcm = tb_priv(tb); in tb_stop() local
1249 cancel_delayed_work(&tcm->remove_work); in tb_stop()
1251 list_for_each_entry_safe(tunnel, n, &tcm->tunnel_list, list) { in tb_stop()
1262 tcm->hotplug_active = false; /* signal tb_handle_hotplug to quit */ in tb_stop()
1288 struct tb_cm *tcm = tb_priv(tb); in tb_start() local
1335 tcm->hotplug_active = true; in tb_start()
1341 struct tb_cm *tcm = tb_priv(tb); in tb_suspend_noirq() local
1346 tcm->hotplug_active = false; /* signal tb_handle_hotplug to quit */ in tb_suspend_noirq()
1380 struct tb_cm *tcm = tb_priv(tb); in tb_resume_noirq() local
1392 list_for_each_entry_safe(tunnel, n, &tcm->tunnel_list, list) in tb_resume_noirq()
1394 if (!list_empty(&tcm->tunnel_list)) { in tb_resume_noirq()
1403 tcm->hotplug_active = true; in tb_resume_noirq()
1433 struct tb_cm *tcm = tb_priv(tb); in tb_freeze_noirq() local
1435 tcm->hotplug_active = false; in tb_freeze_noirq()
1441 struct tb_cm *tcm = tb_priv(tb); in tb_thaw_noirq() local
1443 tcm->hotplug_active = true; in tb_thaw_noirq()
1462 struct tb_cm *tcm = tb_priv(tb); in tb_runtime_suspend() local
1466 tcm->hotplug_active = false; in tb_runtime_suspend()
1474 struct tb_cm *tcm = container_of(work, struct tb_cm, remove_work.work); in tb_remove_work() local
1475 struct tb *tb = tcm_to_tb(tcm); in tb_remove_work()
1487 struct tb_cm *tcm = tb_priv(tb); in tb_runtime_resume() local
1494 list_for_each_entry_safe(tunnel, n, &tcm->tunnel_list, list) in tb_runtime_resume()
1496 tcm->hotplug_active = true; in tb_runtime_resume()
1504 queue_delayed_work(tb->wq, &tcm->remove_work, msecs_to_jiffies(50)); in tb_runtime_resume()
1526 struct tb_cm *tcm; in tb_probe() local
1529 tb = tb_domain_alloc(nhi, sizeof(*tcm)); in tb_probe()
1536 tcm = tb_priv(tb); in tb_probe()
1537 INIT_LIST_HEAD(&tcm->tunnel_list); in tb_probe()
1538 INIT_LIST_HEAD(&tcm->dp_resources); in tb_probe()
1539 INIT_DELAYED_WORK(&tcm->remove_work, tb_remove_work); in tb_probe()