Lines Matching refs:tb_port
174 struct tb_port *ports;
268 struct tb_port { struct
271 struct tb_port *remote; argument
281 struct tb_port *dual_link_port; argument
305 struct tb_port *port; argument
331 struct tb_port *port;
364 struct tb_port *in_port;
365 struct tb_port *out_port;
541 static inline struct tb_port *tb_upstream_port(struct tb_switch *sw) in tb_upstream_port()
553 static inline bool tb_is_upstream_port(const struct tb_port *port) in tb_is_upstream_port()
555 const struct tb_port *upstream_port = tb_upstream_port(port->sw); in tb_is_upstream_port()
564 static inline struct tb_port *tb_port_at(u64 route, struct tb_switch *sw) in tb_port_at()
580 static inline bool tb_port_has_remote(const struct tb_port *port) in tb_port_has_remote()
592 static inline bool tb_port_is_null(const struct tb_port *port) in tb_port_is_null()
597 static inline bool tb_port_is_nhi(const struct tb_port *port) in tb_port_is_nhi()
602 static inline bool tb_port_is_pcie_down(const struct tb_port *port) in tb_port_is_pcie_down()
607 static inline bool tb_port_is_pcie_up(const struct tb_port *port) in tb_port_is_pcie_up()
612 static inline bool tb_port_is_dpin(const struct tb_port *port) in tb_port_is_dpin()
617 static inline bool tb_port_is_dpout(const struct tb_port *port) in tb_port_is_dpout()
622 static inline bool tb_port_is_usb3_down(const struct tb_port *port) in tb_port_is_usb3_down()
627 static inline bool tb_port_is_usb3_up(const struct tb_port *port) in tb_port_is_usb3_up()
660 static inline int tb_port_read(struct tb_port *port, void *buffer, in tb_port_read()
674 static inline int tb_port_write(struct tb_port *port, const void *buffer, in tb_port_write()
707 const struct tb_port *__port = (_port); \
806 struct tb_port *tb_switch_find_port(struct tb_switch *sw,
860 static inline struct tb_port *tb_switch_downstream_port(struct tb_switch *sw) in tb_switch_downstream_port()
964 bool tb_switch_query_dp_resource(struct tb_switch *sw, struct tb_port *in);
965 int tb_switch_alloc_dp_resource(struct tb_switch *sw, struct tb_port *in);
966 void tb_switch_dealloc_dp_resource(struct tb_switch *sw, struct tb_port *in);
1001 bool tb_port_clx_is_enabled(struct tb_port *port, unsigned int clx);
1029 int tb_port_state(struct tb_port *port);
1030 int tb_wait_for_port(struct tb_port *port, bool wait_if_unplugged);
1031 int tb_port_add_nfc_credits(struct tb_port *port, int credits);
1032 int tb_port_clear_counter(struct tb_port *port, int counter);
1033 int tb_port_unlock(struct tb_port *port);
1034 int tb_port_enable(struct tb_port *port);
1035 int tb_port_disable(struct tb_port *port);
1036 int tb_port_alloc_in_hopid(struct tb_port *port, int hopid, int max_hopid);
1037 void tb_port_release_in_hopid(struct tb_port *port, int hopid);
1038 int tb_port_alloc_out_hopid(struct tb_port *port, int hopid, int max_hopid);
1039 void tb_port_release_out_hopid(struct tb_port *port, int hopid);
1040 struct tb_port *tb_next_port_on_path(struct tb_port *start, struct tb_port *end,
1041 struct tb_port *prev);
1043 static inline bool tb_port_use_credit_allocation(const struct tb_port *port) in tb_port_use_credit_allocation()
1060 int tb_port_get_link_speed(struct tb_port *port);
1061 int tb_port_get_link_width(struct tb_port *port);
1062 int tb_port_set_link_width(struct tb_port *port, enum tb_link_width width);
1063 int tb_port_lane_bonding_enable(struct tb_port *port);
1064 void tb_port_lane_bonding_disable(struct tb_port *port);
1065 int tb_port_wait_for_link_width(struct tb_port *port, unsigned int width_mask,
1067 int tb_port_update_credits(struct tb_port *port);
1072 int tb_port_find_cap(struct tb_port *port, enum tb_port_cap cap);
1073 int tb_port_next_cap(struct tb_port *port, unsigned int offset);
1074 bool tb_port_is_enabled(struct tb_port *port);
1076 bool tb_usb3_port_is_enabled(struct tb_port *port);
1077 int tb_usb3_port_enable(struct tb_port *port, bool enable);
1079 bool tb_pci_port_is_enabled(struct tb_port *port);
1080 int tb_pci_port_enable(struct tb_port *port, bool enable);
1082 int tb_dp_port_hpd_is_active(struct tb_port *port);
1083 int tb_dp_port_hpd_clear(struct tb_port *port);
1084 int tb_dp_port_set_hops(struct tb_port *port, unsigned int video,
1086 bool tb_dp_port_is_enabled(struct tb_port *port);
1087 int tb_dp_port_enable(struct tb_port *port, bool enable);
1089 struct tb_path *tb_path_discover(struct tb_port *src, int src_hopid,
1090 struct tb_port *dst, int dst_hopid,
1091 struct tb_port **last, const char *name,
1093 struct tb_path *tb_path_alloc(struct tb *tb, struct tb_port *src, int src_hopid,
1094 struct tb_port *dst, int dst_hopid, int link_nr,
1101 const struct tb_port *port);
1118 int tb_lc_configure_port(struct tb_port *port);
1119 void tb_lc_unconfigure_port(struct tb_port *port);
1120 int tb_lc_configure_xdomain(struct tb_port *port);
1121 void tb_lc_unconfigure_xdomain(struct tb_port *port);
1122 int tb_lc_start_lane_initialization(struct tb_port *port);
1123 bool tb_lc_is_clx_supported(struct tb_port *port);
1124 bool tb_lc_is_usb_plugged(struct tb_port *port);
1125 bool tb_lc_is_xhci_connected(struct tb_port *port);
1126 int tb_lc_xhci_connect(struct tb_port *port);
1127 void tb_lc_xhci_disconnect(struct tb_port *port);
1131 bool tb_lc_dp_sink_query(struct tb_switch *sw, struct tb_port *in);
1132 int tb_lc_dp_sink_alloc(struct tb_switch *sw, struct tb_port *in);
1133 int tb_lc_dp_sink_dealloc(struct tb_switch *sw, struct tb_port *in);
1148 static inline u64 tb_downstream_route(struct tb_port *port) in tb_downstream_route()
1176 static inline struct tb_port *tb_xdomain_downstream_port(struct tb_xdomain *xd) in tb_xdomain_downstream_port()
1183 int tb_retimer_scan(struct tb_port *port, bool add);
1184 void tb_retimer_remove_all(struct tb_port *port);
1238 bool usb4_switch_query_dp_resource(struct tb_switch *sw, struct tb_port *in);
1239 int usb4_switch_alloc_dp_resource(struct tb_switch *sw, struct tb_port *in);
1240 int usb4_switch_dealloc_dp_resource(struct tb_switch *sw, struct tb_port *in);
1241 struct tb_port *usb4_switch_map_pcie_down(struct tb_switch *sw,
1242 const struct tb_port *port);
1243 struct tb_port *usb4_switch_map_usb3_down(struct tb_switch *sw,
1244 const struct tb_port *port);
1248 int usb4_port_unlock(struct tb_port *port);
1249 int usb4_port_hotplug_enable(struct tb_port *port);
1250 int usb4_port_configure(struct tb_port *port);
1251 void usb4_port_unconfigure(struct tb_port *port);
1252 int usb4_port_configure_xdomain(struct tb_port *port, struct tb_xdomain *xd);
1253 void usb4_port_unconfigure_xdomain(struct tb_port *port);
1254 int usb4_port_router_offline(struct tb_port *port);
1255 int usb4_port_router_online(struct tb_port *port);
1256 int usb4_port_enumerate_retimers(struct tb_port *port);
1257 bool usb4_port_clx_supported(struct tb_port *port);
1258 int usb4_port_margining_caps(struct tb_port *port, u32 *caps);
1259 int usb4_port_hw_margin(struct tb_port *port, unsigned int lanes,
1262 int usb4_port_sw_margin(struct tb_port *port, unsigned int lanes, bool timing,
1264 int usb4_port_sw_margin_errors(struct tb_port *port, u32 *errors);
1266 int usb4_port_retimer_set_inbound_sbtx(struct tb_port *port, u8 index);
1267 int usb4_port_retimer_unset_inbound_sbtx(struct tb_port *port, u8 index);
1268 int usb4_port_retimer_read(struct tb_port *port, u8 index, u8 reg, void *buf,
1270 int usb4_port_retimer_write(struct tb_port *port, u8 index, u8 reg,
1272 int usb4_port_retimer_is_last(struct tb_port *port, u8 index);
1273 int usb4_port_retimer_nvm_sector_size(struct tb_port *port, u8 index);
1274 int usb4_port_retimer_nvm_set_offset(struct tb_port *port, u8 index,
1276 int usb4_port_retimer_nvm_write(struct tb_port *port, u8 index,
1279 int usb4_port_retimer_nvm_authenticate(struct tb_port *port, u8 index);
1280 int usb4_port_retimer_nvm_authenticate_status(struct tb_port *port, u8 index,
1282 int usb4_port_retimer_nvm_read(struct tb_port *port, u8 index,
1285 int usb4_usb3_port_max_link_rate(struct tb_port *port);
1286 int usb4_usb3_port_actual_link_rate(struct tb_port *port);
1287 int usb4_usb3_port_allocated_bandwidth(struct tb_port *port, int *upstream_bw,
1289 int usb4_usb3_port_allocate_bandwidth(struct tb_port *port, int *upstream_bw,
1291 int usb4_usb3_port_release_bandwidth(struct tb_port *port, int *upstream_bw,
1294 int usb4_dp_port_set_cm_id(struct tb_port *port, int cm_id);
1295 bool usb4_dp_port_bandwidth_mode_supported(struct tb_port *port);
1296 bool usb4_dp_port_bandwidth_mode_enabled(struct tb_port *port);
1297 int usb4_dp_port_set_cm_bandwidth_mode_supported(struct tb_port *port,
1299 int usb4_dp_port_group_id(struct tb_port *port);
1300 int usb4_dp_port_set_group_id(struct tb_port *port, int group_id);
1301 int usb4_dp_port_nrd(struct tb_port *port, int *rate, int *lanes);
1302 int usb4_dp_port_set_nrd(struct tb_port *port, int rate, int lanes);
1303 int usb4_dp_port_granularity(struct tb_port *port);
1304 int usb4_dp_port_set_granularity(struct tb_port *port, int granularity);
1305 int usb4_dp_port_set_estimated_bandwidth(struct tb_port *port, int bw);
1306 int usb4_dp_port_allocated_bandwidth(struct tb_port *port);
1307 int usb4_dp_port_allocate_bandwidth(struct tb_port *port, int bw);
1308 int usb4_dp_port_requested_bandwidth(struct tb_port *port);
1310 int usb4_pci_port_set_ext_encapsulation(struct tb_port *port, bool enable);
1324 struct usb4_port *usb4_port_device_add(struct tb_port *port);
1346 int tb_acpi_power_on_retimers(struct tb_port *port);
1347 int tb_acpi_power_off_retimers(struct tb_port *port);
1359 static inline int tb_acpi_power_on_retimers(struct tb_port *port) { return 0; } in tb_acpi_power_on_retimers()
1360 static inline int tb_acpi_power_off_retimers(struct tb_port *port) { return 0; } in tb_acpi_power_off_retimers()