Lines Matching refs:tb_switch
37 static struct nvm_auth_status *__nvm_get_auth_status(const struct tb_switch *sw) in __nvm_get_auth_status()
49 static void nvm_get_auth_status(const struct tb_switch *sw, u32 *status) in nvm_get_auth_status()
60 static void nvm_set_auth_status(const struct tb_switch *sw, u32 status) in nvm_set_auth_status()
85 static void nvm_clear_auth_status(const struct tb_switch *sw) in nvm_clear_auth_status()
98 static int nvm_validate_and_write(struct tb_switch *sw) in nvm_validate_and_write()
126 static int nvm_authenticate_host_dma_port(struct tb_switch *sw) in nvm_authenticate_host_dma_port()
166 static int nvm_authenticate_device_dma_port(struct tb_switch *sw) in nvm_authenticate_device_dma_port()
211 static void nvm_authenticate_start_dma_port(struct tb_switch *sw) in nvm_authenticate_start_dma_port()
226 static void nvm_authenticate_complete_dma_port(struct tb_switch *sw) in nvm_authenticate_complete_dma_port()
235 static inline bool nvm_readable(struct tb_switch *sw) in nvm_readable()
251 static inline bool nvm_upgradeable(struct tb_switch *sw) in nvm_upgradeable()
258 static int nvm_authenticate(struct tb_switch *sw, bool auth_only) in nvm_authenticate()
296 int tb_switch_nvm_read(struct tb_switch *sw, unsigned int address, void *buf, in tb_switch_nvm_read()
307 struct tb_switch *sw = tb_to_switch(nvm->dev); in nvm_read()
330 struct tb_switch *sw = tb_to_switch(nvm->dev); in nvm_write()
348 static int tb_switch_nvm_add(struct tb_switch *sw) in tb_switch_nvm_add()
395 static void tb_switch_nvm_remove(struct tb_switch *sw) in tb_switch_nvm_remove()
824 static inline bool tb_switch_is_reachable(const struct tb_switch *parent, in tb_switch_is_reachable()
825 const struct tb_switch *sw) in tb_switch_is_reachable()
1454 static const char *tb_switch_generation_name(const struct tb_switch *sw) in tb_switch_generation_name()
1470 static void tb_dump_switch(const struct tb *tb, const struct tb_switch *sw) in tb_dump_switch()
1494 int tb_switch_reset(struct tb_switch *sw) in tb_switch_reset()
1525 int tb_switch_wait_for_bit(struct tb_switch *sw, u32 offset, u32 bit, in tb_switch_wait_for_bit()
1554 static int tb_plug_events_active(struct tb_switch *sw, bool active) in tb_plug_events_active()
1598 struct tb_switch *sw = tb_to_switch(dev); in authorized_show()
1606 struct tb_switch *sw; in disapprove_switch()
1628 static int tb_switch_set_authorized(struct tb_switch *sw, unsigned int val) in tb_switch_set_authorized()
1686 struct tb_switch *sw = tb_to_switch(dev); in authorized_store()
1708 struct tb_switch *sw = tb_to_switch(dev); in boot_show()
1717 struct tb_switch *sw = tb_to_switch(dev); in device_show()
1726 struct tb_switch *sw = tb_to_switch(dev); in device_name_show()
1735 struct tb_switch *sw = tb_to_switch(dev); in generation_show()
1744 struct tb_switch *sw = tb_to_switch(dev); in key_show()
1762 struct tb_switch *sw = tb_to_switch(dev); in key_store()
1796 struct tb_switch *sw = tb_to_switch(dev); in speed_show()
1811 struct tb_switch *sw = tb_to_switch(dev); in rx_lanes_show()
1837 struct tb_switch *sw = tb_to_switch(dev); in tx_lanes_show()
1863 struct tb_switch *sw = tb_to_switch(dev); in nvm_authenticate_show()
1873 struct tb_switch *sw = tb_to_switch(dev); in nvm_authenticate_sysfs()
1965 struct tb_switch *sw = tb_to_switch(dev); in nvm_version_show()
1987 struct tb_switch *sw = tb_to_switch(dev); in vendor_show()
1996 struct tb_switch *sw = tb_to_switch(dev); in vendor_name_show()
2005 struct tb_switch *sw = tb_to_switch(dev); in unique_id_show()
2035 struct tb_switch *sw = tb_to_switch(dev); in switch_attr_is_visible()
2099 struct tb_switch *sw = tb_to_switch(dev); in tb_switch_release()
2120 const struct tb_switch *sw = tb_to_switch(dev); in tb_switch_uevent()
2158 struct tb_switch *sw = tb_to_switch(dev); in tb_switch_runtime_suspend()
2169 struct tb_switch *sw = tb_to_switch(dev); in tb_switch_runtime_resume()
2189 static int tb_switch_get_generation(struct tb_switch *sw) in tb_switch_get_generation()
2234 static bool tb_switch_exceeds_max_depth(const struct tb_switch *sw, int depth) in tb_switch_exceeds_max_depth()
2261 struct tb_switch *tb_switch_alloc(struct tb *tb, struct device *parent, in tb_switch_alloc()
2264 struct tb_switch *sw; in tb_switch_alloc()
2270 struct tb_switch *parent_sw = tb_to_switch(parent); in tb_switch_alloc()
2380 struct tb_switch *
2383 struct tb_switch *sw; in tb_switch_alloc_safe_mode()
2416 int tb_switch_configure(struct tb_switch *sw) in tb_switch_configure()
2479 int tb_switch_configuration_valid(struct tb_switch *sw) in tb_switch_configuration_valid()
2486 static int tb_switch_set_uuid(struct tb_switch *sw) in tb_switch_set_uuid()
2532 static int tb_switch_add_dma_port(struct tb_switch *sw) in tb_switch_add_dma_port()
2626 static void tb_switch_default_link_ports(struct tb_switch *sw) in tb_switch_default_link_ports()
2656 static bool tb_switch_lane_bonding_possible(struct tb_switch *sw) in tb_switch_lane_bonding_possible()
2668 static int tb_switch_update_link_attributes(struct tb_switch *sw) in tb_switch_update_link_attributes()
2708 int tb_switch_lane_bonding_enable(struct tb_switch *sw) in tb_switch_lane_bonding_enable()
2773 void tb_switch_lane_bonding_disable(struct tb_switch *sw) in tb_switch_lane_bonding_disable()
2817 int tb_switch_configure_link(struct tb_switch *sw) in tb_switch_configure_link()
2846 void tb_switch_unconfigure_link(struct tb_switch *sw) in tb_switch_unconfigure_link()
2868 static void tb_switch_credits_init(struct tb_switch *sw) in tb_switch_credits_init()
2878 static int tb_switch_port_hotplug_enable(struct tb_switch *sw) in tb_switch_port_hotplug_enable()
2910 int tb_switch_add(struct tb_switch *sw) in tb_switch_add()
3036 void tb_switch_remove(struct tb_switch *sw) in tb_switch_remove()
3076 void tb_sw_set_unplugged(struct tb_switch *sw) in tb_sw_set_unplugged()
3097 static int tb_switch_set_wake(struct tb_switch *sw, unsigned int flags) in tb_switch_set_wake()
3109 int tb_switch_resume(struct tb_switch *sw) in tb_switch_resume()
3207 void tb_switch_suspend(struct tb_switch *sw, bool runtime) in tb_switch_suspend()
3255 bool tb_switch_query_dp_resource(struct tb_switch *sw, struct tb_port *in) in tb_switch_query_dp_resource()
3271 int tb_switch_alloc_dp_resource(struct tb_switch *sw, struct tb_port *in) in tb_switch_alloc_dp_resource()
3297 void tb_switch_dealloc_dp_resource(struct tb_switch *sw, struct tb_port *in) in tb_switch_dealloc_dp_resource()
3323 struct tb_switch *sw = tb_to_switch(dev); in tb_switch_match()
3355 struct tb_switch *tb_switch_find_by_link_depth(struct tb *tb, u8 link, u8 depth) in tb_switch_find_by_link_depth()
3380 struct tb_switch *tb_switch_find_by_uuid(struct tb *tb, const uuid_t *uuid) in tb_switch_find_by_uuid()
3404 struct tb_switch *tb_switch_find_by_route(struct tb *tb, u64 route) in tb_switch_find_by_route()
3428 struct tb_port *tb_switch_find_port(struct tb_switch *sw, in tb_switch_find_port()
3445 static int tb_switch_pcie_bridge_write(struct tb_switch *sw, unsigned int bridge, in tb_switch_pcie_bridge_write()
3496 int tb_switch_pcie_l1_enable(struct tb_switch *sw) in tb_switch_pcie_l1_enable()
3498 struct tb_switch *parent = tb_switch_parent(sw); in tb_switch_pcie_l1_enable()
3530 int tb_switch_xhci_connect(struct tb_switch *sw) in tb_switch_xhci_connect()
3574 void tb_switch_xhci_disconnect(struct tb_switch *sw) in tb_switch_xhci_disconnect()