Lines Matching full:tcm
39 static inline struct tb *tcm_to_tb(struct tb_cm *tcm) in tcm_to_tb() argument
41 return ((void *)tcm - sizeof(struct tb)); in tcm_to_tb()
74 struct tb_cm *tcm = tb_priv(sw->tb); in tb_add_dp_resources() local
84 list_add_tail(&port->list, &tcm->dp_resources); in tb_add_dp_resources()
91 struct tb_cm *tcm = tb_priv(sw->tb); in tb_remove_dp_resources() local
100 list_for_each_entry_safe(port, tmp, &tcm->dp_resources, list) { in tb_remove_dp_resources()
110 struct tb_cm *tcm = tb_priv(tb); in tb_discover_dp_resource() local
113 list_for_each_entry(p, &tcm->dp_resources, list) { in tb_discover_dp_resource()
120 list_add_tail(&port->list, &tcm->dp_resources); in tb_discover_dp_resource()
125 struct tb_cm *tcm = tb_priv(tb); in tb_discover_dp_resources() local
128 list_for_each_entry(tunnel, &tcm->tunnel_list, list) { in tb_discover_dp_resources()
182 struct tb_cm *tcm = tb_priv(tb); in tb_discover_tunnels() local
185 tb_switch_discover_tunnels(tb->root_switch, &tcm->tunnel_list, true); in tb_discover_tunnels()
187 list_for_each_entry(tunnel, &tcm->tunnel_list, list) { in tb_discover_tunnels()
304 struct tb_cm *tcm = tb_priv(tb); in tb_find_tunnel() local
307 list_for_each_entry(tunnel, &tcm->tunnel_list, list) { in tb_find_tunnel()
349 struct tb_cm *tcm = tb_priv(tb); in tb_available_bandwidth() local
396 list_for_each_entry(tunnel, &tcm->tunnel_list, list) { in tb_available_bandwidth()
482 struct tb_cm *tcm = tb_priv(tb); in tb_tunnel_usb3() local
545 list_add_tail(&tunnel->list, &tcm->tunnel_list); in tb_tunnel_usb3()
608 struct tb_cm *tcm = tb_priv(port->sw->tb); in tb_scan_port() local
673 if (!tcm->hotplug_active) in tb_scan_port()
731 if (tcm->hotplug_active && tb_tunnel_usb3(sw->tb, sw)) in tb_scan_port()
787 struct tb_cm *tcm = tb_priv(tb); in tb_free_invalid_tunnels() local
791 list_for_each_entry_safe(tunnel, n, &tcm->tunnel_list, list) { in tb_free_invalid_tunnels()
875 struct tb_cm *tcm = tb_priv(tb); in tb_find_dp_out() local
880 list_for_each_entry(port, &tcm->dp_resources, list) { in tb_find_dp_out()
912 struct tb_cm *tcm = tb_priv(tb); in tb_tunnel_dp() local
929 list_for_each_entry(port, &tcm->dp_resources, list) { in tb_tunnel_dp()
963 list_for_each_entry(tunnel, &tcm->tunnel_list, list) { in tb_tunnel_dp()
1013 list_add_tail(&tunnel->list, &tcm->tunnel_list); in tb_tunnel_dp()
1064 struct tb_cm *tcm = tb_priv(tb); in tb_dp_resource_available() local
1070 list_for_each_entry(p, &tcm->dp_resources, list) { in tb_dp_resource_available()
1077 list_add_tail(&port->list, &tcm->dp_resources); in tb_dp_resource_available()
1085 struct tb_cm *tcm = tb_priv(tb); in tb_disconnect_and_release_dp() local
1092 list_for_each_entry_safe_reverse(tunnel, n, &tcm->tunnel_list, list) { in tb_disconnect_and_release_dp()
1097 while (!list_empty(&tcm->dp_resources)) { in tb_disconnect_and_release_dp()
1100 port = list_first_entry(&tcm->dp_resources, in tb_disconnect_and_release_dp()
1130 struct tb_cm *tcm = tb_priv(tb); in tb_tunnel_pci() local
1169 list_add_tail(&tunnel->list, &tcm->tunnel_list); in tb_tunnel_pci()
1177 struct tb_cm *tcm = tb_priv(tb); in tb_approve_xdomain_paths() local
1202 list_add_tail(&tunnel->list, &tcm->tunnel_list); in tb_approve_xdomain_paths()
1211 struct tb_cm *tcm = tb_priv(tb); in __tb_disconnect_xdomain_paths() local
1220 list_for_each_entry_safe(tunnel, n, &tcm->tunnel_list, list) { in __tb_disconnect_xdomain_paths()
1257 struct tb_cm *tcm = tb_priv(tb); in tb_handle_hotplug() local
1265 if (!tcm->hotplug_active) in tb_handle_hotplug()
1391 struct tb_cm *tcm = tb_priv(tb); in tb_stop() local
1395 cancel_delayed_work(&tcm->remove_work); in tb_stop()
1397 list_for_each_entry_safe(tunnel, n, &tcm->tunnel_list, list) { in tb_stop()
1408 tcm->hotplug_active = false; /* signal tb_handle_hotplug to quit */ in tb_stop()
1434 struct tb_cm *tcm = tb_priv(tb); in tb_start() local
1492 tcm->hotplug_active = true; in tb_start()
1498 struct tb_cm *tcm = tb_priv(tb); in tb_suspend_noirq() local
1503 tcm->hotplug_active = false; /* signal tb_handle_hotplug to quit */ in tb_suspend_noirq()
1557 struct tb_cm *tcm = tb_priv(tb); in tb_resume_noirq() local
1587 list_for_each_entry_safe(tunnel, n, &tcm->tunnel_list, list) { in tb_resume_noirq()
1596 if (!list_empty(&tcm->tunnel_list)) { in tb_resume_noirq()
1605 tcm->hotplug_active = true; in tb_resume_noirq()
1635 struct tb_cm *tcm = tb_priv(tb); in tb_freeze_noirq() local
1637 tcm->hotplug_active = false; in tb_freeze_noirq()
1643 struct tb_cm *tcm = tb_priv(tb); in tb_thaw_noirq() local
1645 tcm->hotplug_active = true; in tb_thaw_noirq()
1664 struct tb_cm *tcm = tb_priv(tb); in tb_runtime_suspend() local
1668 tcm->hotplug_active = false; in tb_runtime_suspend()
1676 struct tb_cm *tcm = container_of(work, struct tb_cm, remove_work.work); in tb_remove_work() local
1677 struct tb *tb = tcm_to_tb(tcm); in tb_remove_work()
1689 struct tb_cm *tcm = tb_priv(tb); in tb_runtime_resume() local
1696 list_for_each_entry_safe(tunnel, n, &tcm->tunnel_list, list) in tb_runtime_resume()
1698 tcm->hotplug_active = true; in tb_runtime_resume()
1706 queue_delayed_work(tb->wq, &tcm->remove_work, msecs_to_jiffies(50)); in tb_runtime_resume()
1792 struct tb_cm *tcm; in tb_probe() local
1795 tb = tb_domain_alloc(nhi, TB_TIMEOUT, sizeof(*tcm)); in tb_probe()
1806 tcm = tb_priv(tb); in tb_probe()
1807 INIT_LIST_HEAD(&tcm->tunnel_list); in tb_probe()
1808 INIT_LIST_HEAD(&tcm->dp_resources); in tb_probe()
1809 INIT_DELAYED_WORK(&tcm->remove_work, tb_remove_work); in tb_probe()