id
stringlengths
4
63
text
stringlengths
153
8.81M
tb_cfg_get_upstream_port(9)
NAME tb_cfg_get_upstream_port - get upstream port number of switch at route SYNOPSIS int tb_cfg_get_upstream_port (struct tb_ctl *ctl , u64 route ); ARGUMENTS ctl Pointer to the control channel route Route string of the router DESCRIPTION Reads the first dword from the switches TB_CFG_SWITCH co...
tb_cfg_read_raw(9)
NAME tb_cfg_read_raw - read from config space into buffer SYNOPSIS struct tb_cfg_result tb_cfg_read_raw (struct tb_ctl *ctl , void *buffer , u64 route , u32 port , enum tb_cfg_space space , u32 offset , u32 length , int timeout_msec ); ARGUMENTS ctl Pointer to the control channel buffer Buffer wh...
tb_cfg_request(9)
NAME tb_cfg_request - Start control request not waiting for it to complete SYNOPSIS int tb_cfg_request (struct tb_ctl *ctl , struct tb_cfg_request *req , void (*callback)(void *) , void *callback_data ); ARGUMENTS ctl Control channel to use req Request to start callback Callback cal...
tb_cfg_request_alloc(9)
NAME tb_cfg_request_alloc - Allocates a new config request SYNOPSIS struct tb_cfg_request * tb_cfg_request_alloc (void ); ARGUMENTS void no arguments DESCRIPTION This is refcounted object so when you are done with this, call tb_cfg_request_put to it. RETURN struct tb_cfg_request on success, NULL otherwise. ...
tb_cfg_request_cancel(9)
NAME tb_cfg_request_cancel - Cancel a control request SYNOPSIS void tb_cfg_request_cancel (struct tb_cfg_request *req , int err ); ARGUMENTS req Request to cancel err Error to assign to the request DESCRIPTION This function can be used to cancel ongoing request. It will wait until the request...
tb_cfg_request_get(9)
NAME tb_cfg_request_get - Increase refcount of a request SYNOPSIS void tb_cfg_request_get (struct tb_cfg_request *req ); ARGUMENTS req Request whose refcount is increased SEE ALSO Kernel file ./drivers/thunderbolt/ctl.c struct tb_ctl(9), tb_cfg_request_alloc(9), tb_cfg_request_put(9), tb_cfg_reques...
tb_cfg_request_put(9)
NAME tb_cfg_request_put - Decrease refcount and possibly release the request SYNOPSIS void tb_cfg_request_put (struct tb_cfg_request *req ); ARGUMENTS req Request whose refcount is decreased DESCRIPTION Call this function when you are done with the request. When refcount goes to 0 the object is released. SE...
tb_cfg_request_sync(9)
NAME tb_cfg_request_sync - Start control request and wait until it completes SYNOPSIS struct tb_cfg_result tb_cfg_request_sync (struct tb_ctl *ctl , struct tb_cfg_request *req , int timeout_msec ); ARGUMENTS ctl Control channel to use req Request to start timeout_msec ...
tb_cfg_reset(9)
NAME tb_cfg_reset - send a reset packet and wait for a response SYNOPSIS struct tb_cfg_result tb_cfg_reset (struct tb_ctl *ctl , u64 route ); ARGUMENTS ctl Control channel pointer route Router string for the router to send reset DESCRIPTION If the switch at route is incorrectly configured then ...
tb_cfg_write_raw(9)
NAME tb_cfg_write_raw - write from buffer into config space SYNOPSIS struct tb_cfg_result tb_cfg_write_raw (struct tb_ctl *ctl , const void *buffer , u64 route , u32 port , enum tb_cfg_space space , u32 offset , u32 length , int timeout_msec ); ARGUMENTS ctl Pointer to the control channel buffer ...
tb_check_quirks(9)
NAME tb_check_quirks - Check for quirks to apply SYNOPSIS void tb_check_quirks (struct tb_switch *sw ); ARGUMENTS sw Thunderbolt switch DESCRIPTION Apply any quirks for the Thunderbolt controller. SEE ALSO Kernel file ./drivers/thunderbolt/quirks.c April 2026 ...
tb_configure_asym(9)
NAME tb_configure_asym - Transition links to asymmetric if needed SYNOPSIS int tb_configure_asym (struct tb *tb , struct tb_port *src_port , struct tb_port *dst_port , int requested_up , int requested_down ); ARGUMENTS tb Domain structure src_port Source adapter to start the transition dst...
tb_configure_sym(9)
NAME tb_configure_sym - Transition links to symmetric if possible SYNOPSIS int tb_configure_sym (struct tb *tb , struct tb_port *src_port , struct tb_port *dst_port , bool keep_asym ); ARGUMENTS tb Domain structure src_port Source adapter to start the transition dst_port Destination ada...
tb_consumed_dp_bandwidth(9)
NAME tb_consumed_dp_bandwidth - Consumed DP bandwidth over a single link SYNOPSIS int tb_consumed_dp_bandwidth (struct tb *tb , struct tb_port *src_port , struct tb_port *dst_port , struct tb_port *port , int *consumed_up , int *consumed_down ); ARGUMENTS tb Domain structure src_port Source protoc...
tb_consumed_usb3_pcie_bandwidth(9)
NAME tb_consumed_usb3_pcie_bandwidth - Consumed USB3/PCIe bandwidth over a single link SYNOPSIS int tb_consumed_usb3_pcie_bandwidth (struct tb *tb , struct tb_port *src_port , struct tb_port *dst_port , struct tb_port *port , int *consumed_up , int *consumed_down ); ARGUMENTS tb Domain structure src_...
tb_ctl_alloc(9)
NAME tb_ctl_alloc - allocate a control channel SYNOPSIS struct tb_ctl * tb_ctl_alloc (struct tb_nhi *nhi , int index , int timeout_msec , event_cb cb , void *cb_data ); ARGUMENTS nhi Pointer to NHI index Domain number timeout_msec Default timeout used with non-raw cont...
tb_ctl_free(9)
NAME tb_ctl_free - free a control channel SYNOPSIS void tb_ctl_free (struct tb_ctl *ctl ); ARGUMENTS ctl Control channel to free DESCRIPTION Must be called after tb_ctl_stop. Must NOT be called from ctl->callback. SEE ALSO Kernel file ./drivers/thunderbolt/ctl.c struct tb_ctl(9), tb_cfg_request_alloc(...
tb_ctl_start(9)
NAME tb_ctl_start - start/resume the control channel SYNOPSIS void tb_ctl_start (struct tb_ctl *ctl ); ARGUMENTS ctl Control channel to start SEE ALSO Kernel file ./drivers/thunderbolt/ctl.c struct tb_ctl(9), tb_cfg_request_alloc(9), tb_cfg_request_get(9), tb_cfg_request_put(9), tb_cfg_request(9), tb_...
tb_ctl_stop(9)
NAME tb_ctl_stop - pause the control channel SYNOPSIS void tb_ctl_stop (struct tb_ctl *ctl ); ARGUMENTS ctl Control channel to stop DESCRIPTION All invocations of ctl->callback will have finished after this method returns. Must NOT be called from ctl->callback. SEE ALSO Kernel file ./drivers/thunderbolt/...
tb_domain_add(9)
NAME tb_domain_add - Add domain to the system SYNOPSIS int tb_domain_add (struct tb *tb , bool reset ); ARGUMENTS tb Domain to add reset Issue reset to the host router DESCRIPTION Starts the domain and adds it to the system. Hotplugging devices will work after this has been returned successful...
tb_domain_alloc(9)
NAME tb_domain_alloc - Allocate a domain SYNOPSIS struct tb * tb_domain_alloc (struct tb_nhi *nhi , int timeout_msec , size_t privsize ); ARGUMENTS nhi Pointer to the host controller timeout_msec Control channel timeout for non-raw messages privsize Size of the connection...
tb_domain_approve_switch(9)
NAME tb_domain_approve_switch - Approve switch SYNOPSIS int tb_domain_approve_switch (struct tb *tb , struct tb_switch *sw ); ARGUMENTS tb Domain the switch belongs to sw Switch to approve DESCRIPTION This will approve switch by connection manager specific means. In case of success the conn...
tb_domain_approve_switch_key(9)
NAME tb_domain_approve_switch_key - Approve switch and add key SYNOPSIS int tb_domain_approve_switch_key (struct tb *tb , struct tb_switch *sw ); ARGUMENTS tb Domain the switch belongs to sw Switch to approve DESCRIPTION For switches that support secure connect, this function first adds key...
tb_domain_approve_xdomain_paths(9)
NAME tb_domain_approve_xdomain_paths - Enable DMA paths for XDomain SYNOPSIS int tb_domain_approve_xdomain_paths (struct tb *tb , struct tb_xdomain *xd , int transmit_path , int transmit_ring , int receive_path , int receive_ring ); ARGUMENTS tb Domain enabling the DMA paths xd XDomain DMA p...
tb_domain_challenge_switch_key(9)
NAME tb_domain_challenge_switch_key - Challenge and approve switch SYNOPSIS int tb_domain_challenge_switch_key (struct tb *tb , struct tb_switch *sw ); ARGUMENTS tb Domain the switch belongs to sw Switch to approve DESCRIPTION For switches that support secure connect, this function generat...
tb_domain_disapprove_switch(9)
NAME tb_domain_disapprove_switch - Disapprove switch SYNOPSIS int tb_domain_disapprove_switch (struct tb *tb , struct tb_switch *sw ); ARGUMENTS tb Domain the switch belongs to sw Switch to disapprove DESCRIPTION This will disconnect PCIe tunnel from parent to this sw. RETURN 0 on success ...
tb_domain_disconnect_all_paths(9)
NAME tb_domain_disconnect_all_paths - Disconnect all paths for the domain SYNOPSIS int tb_domain_disconnect_all_paths (struct tb *tb ); ARGUMENTS tb Domain whose paths are disconnected DESCRIPTION This function can be used to disconnect all paths (PCIe, XDomain) for example in preparation for host NVM firmw...
tb_domain_disconnect_pcie_paths(9)
NAME tb_domain_disconnect_pcie_paths - Disconnect all PCIe paths SYNOPSIS int tb_domain_disconnect_pcie_paths (struct tb *tb ); ARGUMENTS tb Domain whose PCIe paths to disconnect DESCRIPTION This needs to be called in preparation for NVM upgrade of the host controller. Makes sure all PCIe paths are disconne...
tb_domain_disconnect_xdomain_paths(9)
NAME tb_domain_disconnect_xdomain_paths - Disable DMA paths for XDomain SYNOPSIS int tb_domain_disconnect_xdomain_paths (struct tb *tb , struct tb_xdomain *xd , int transmit_path , int transmit_ring , int receive_path , int receive_ring ); ARGUMENTS tb Domain disabling the DMA paths xd XDoma...
tb_domain_event(9)
NAME tb_domain_event - Notify userspace about an event in domain SYNOPSIS void tb_domain_event (struct tb *tb , char *envp[] ); ARGUMENTS tb Domain where event occurred envp Array of uevent environment strings (can be NULL) DESCRIPTION This function provides a way to notify userspace about an...
tb_domain_remove(9)
NAME tb_domain_remove - Removes and releases a domain SYNOPSIS void tb_domain_remove (struct tb *tb ); ARGUMENTS tb Domain to remove DESCRIPTION Stops the domain, removes it from the system and releases all resources once the last reference has been released. SEE ALSO Kernel file ./drivers/thunderbolt/...
tb_domain_resume_noirq(9)
NAME tb_domain_resume_noirq - Resume a domain SYNOPSIS int tb_domain_resume_noirq (struct tb *tb ); ARGUMENTS tb Domain to resume DESCRIPTION Re-starts the control channel, and resumes all devices connected to the domain. RETURN 0 on success, negative errno otherwise. SEE ALSO Kernel file ./drivers/th...
tb_domain_suspend_noirq(9)
NAME tb_domain_suspend_noirq - Suspend a domain SYNOPSIS int tb_domain_suspend_noirq (struct tb *tb ); ARGUMENTS tb Domain to suspend DESCRIPTION Suspends all devices in the domain and stops the control channel. RETURN 0 on success, negative errno otherwise. SEE ALSO Kernel file ./drivers/thunderbolt/...
tb_downstream_route(9)
NAME tb_downstream_route - get route to downstream switch SYNOPSIS u64 tb_downstream_route (struct tb_port *port ); ARGUMENTS port Port to check DESCRIPTION Port must not be the upstream port (otherwise a loop is created). RETURN Route to the switch behind port. SEE ALSO Kernel file ./drivers/thunderbolt/...
tb_dp_bandwidth_mode_maximum_bandwidth(9)
NAME tb_dp_bandwidth_mode_maximum_bandwidth - Maximum possible bandwidth SYNOPSIS int tb_dp_bandwidth_mode_maximum_bandwidth (struct tb_tunnel *tunnel , int *max_bw_rounded ); ARGUMENTS tunnel DP tunnel to check max_bw_rounded Maximum bandwidth in Mb/s rounded up to the next granularit...
tb_dp_port_enable(9)
NAME tb_dp_port_enable - Enables/disables DP paths of a port SYNOPSIS int tb_dp_port_enable (struct tb_port *port , bool enable ); ARGUMENTS port DP IN/OUT port enable Enable/disable DP path DESCRIPTION Once Hop IDs are programmed DP paths can be enabled or disabled by calling this function. RET...
tb_dp_port_hpd_clear(9)
NAME tb_dp_port_hpd_clear - Clear HPD from DP IN port SYNOPSIS int tb_dp_port_hpd_clear (struct tb_port *port ); ARGUMENTS port Port to clear HPD DESCRIPTION If the DP IN port has HPD set, this function can be used to clear it. RETURN 0 on success, negative errno otherwise. SEE ALSO Kernel file ./drivers/...
tb_dp_port_hpd_is_active(9)
NAME tb_dp_port_hpd_is_active - Is HPD already active SYNOPSIS int tb_dp_port_hpd_is_active (struct tb_port *port ); ARGUMENTS port DP out port to check DESCRIPTION Checks if the DP OUT adapter port has HPD bit already set. RETURN 1 if HPD is active, 0 otherwise. SEE ALSO Kernel file ./drivers/thunderbolt...
tb_dp_port_is_enabled(9)
NAME tb_dp_port_is_enabled - Is DP adapter port enabled SYNOPSIS bool tb_dp_port_is_enabled (struct tb_port *port ); ARGUMENTS port DP adapter port to check RETURN true if DP port is enabled, false otherwise. SEE ALSO Kernel file ./drivers/thunderbolt/switch.c tb_switch_nvm_read(9), tb_port_state(9), tb...
tb_dp_port_set_hops(9)
NAME tb_dp_port_set_hops - Set video/aux Hop IDs for DP port SYNOPSIS int tb_dp_port_set_hops (struct tb_port *port , unsigned int video , unsigned int aux_tx , unsigned int aux_rx ); ARGUMENTS port DP IN/OUT port to set hops video Video Hop ID aux_tx AUX TX Hop ID aux_rx ...
tb_drom_read(9)
NAME tb_drom_read - Copy DROM to sw->drom and parse it SYNOPSIS int tb_drom_read (struct tb_switch *sw ); ARGUMENTS sw Router whose DROM to read and parse DESCRIPTION This function reads router DROM and if successful parses the entries and populates the fields in sw accordingly. Can be called for any router...
tb_drom_read_uid_only(9)
NAME tb_drom_read_uid_only - Read UID directly from DROM SYNOPSIS int tb_drom_read_uid_only (struct tb_switch *sw , u64 *uid ); ARGUMENTS sw Router whose UID to read uid UID is placed here DESCRIPTION Does not use the cached copy in sw->drom. Used during resume to check switch identity. RET...
tb_for_each_port_on_path(9)
NAME tb_for_each_port_on_path - Iterate over each port on path SYNOPSIS tb_for_each_port_on_path (src , dst , p ); ARGUMENTS src Source port dst Destination port p Port used as iterator DESCRIPTION Walks over each port on path from src to dst. SEE ALSO Kernel file ./drive...
tb_for_each_upstream_port_on_path(9)
NAME tb_for_each_upstream_port_on_path - Iterate over each upstream port on path SYNOPSIS tb_for_each_upstream_port_on_path (src , dst , p ); ARGUMENTS src Source port dst Destination port p Port used as iterator DESCRIPTION Walks over each upstream lane adapter on path from...
tb_is_upstream_port(9)
NAME tb_is_upstream_port - Is the port upstream facing SYNOPSIS bool tb_is_upstream_port (const struct tb_port *port ); ARGUMENTS port Port to check RETURN true if port is upstream facing port. In case of dual link ports, both return true. SEE ALSO Kernel file ./drivers/thunderbolt/tb.h struct tb_nvm(9),...
tb_lc_configure_port(9)
NAME tb_lc_configure_port - Let LC know about configured port SYNOPSIS int tb_lc_configure_port (struct tb_port *port ); ARGUMENTS port Port that is set as configured DESCRIPTION Sets the port configured for power management purposes. RETURN 0 on success, negative errno otherwise. SEE ALSO Kernel file ./d...
tb_lc_configure_xdomain(9)
NAME tb_lc_configure_xdomain - Inform LC that the link is XDomain SYNOPSIS int tb_lc_configure_xdomain (struct tb_port *port ); ARGUMENTS port Switch downstream port connected to another host DESCRIPTION Sets the lane configured for XDomain accordingly so that LC knows about this. RETURN 0 on success, negati...
tb_lc_dp_sink_alloc(9)
NAME tb_lc_dp_sink_alloc - Allocate DP sink SYNOPSIS int tb_lc_dp_sink_alloc (struct tb_switch *sw , struct tb_port *in ); ARGUMENTS sw Switch whose DP sink is allocated in DP IN port the DP sink is allocated for DESCRIPTION Allocate DP sink for in via LC SNK_ALLOCATION registers. RETURN *...
tb_lc_dp_sink_dealloc(9)
NAME tb_lc_dp_sink_dealloc - De-allocate DP sink SYNOPSIS int tb_lc_dp_sink_dealloc (struct tb_switch *sw , struct tb_port *in ); ARGUMENTS sw Switch whose DP sink is de-allocated in DP IN port whose DP sink is de-allocated DESCRIPTION De-allocate DP sink from in using LC SNK_ALLOCATION reg...
tb_lc_dp_sink_query(9)
NAME tb_lc_dp_sink_query - Is DP sink available for DP IN port SYNOPSIS bool tb_lc_dp_sink_query (struct tb_switch *sw , struct tb_port *in ); ARGUMENTS sw Switch whose DP sink is queried in DP IN port to check DESCRIPTION Queries through LC SNK_ALLOCATION registers whether DP sink is avail...
tb_lc_force_power(9)
NAME tb_lc_force_power - Forces LC to be powered on SYNOPSIS int tb_lc_force_power (struct tb_switch *sw ); ARGUMENTS sw Thunderbolt switch DESCRIPTION This is useful to let authentication cycle pass even without a Thunderbolt link present. RETURN 0 on success, negative errno otherwise. SEE ALSO Kernel f...
tb_lc_is_clx_supported(9)
NAME tb_lc_is_clx_supported - Check whether CLx is supported by the lane adapter SYNOPSIS bool tb_lc_is_clx_supported (struct tb_port *port ); ARGUMENTS port Lane adapter DESCRIPTION TB_LC_LINK_ATTR_CPS bit reflects if the link supports CLx including active cables (if connected on the link). RETURN true if C...
tb_lc_is_usb_plugged(9)
NAME tb_lc_is_usb_plugged - Is there USB device connected to port SYNOPSIS bool tb_lc_is_usb_plugged (struct tb_port *port ); ARGUMENTS port Device router lane 0 adapter RETURN true if the port has USB Type-C device connected, false otherwise. SEE ALSO Kernel file ./drivers/thunderbolt/lc.c tb_lc_read_uui...
tb_lc_is_xhci_connected(9)
NAME tb_lc_is_xhci_connected - Is the internal xHCI connected SYNOPSIS bool tb_lc_is_xhci_connected (struct tb_port *port ); ARGUMENTS port Device router lane 0 adapter RETURN true if the internal xHCI has been connected to port, false otherwise. SEE ALSO Kernel file ./drivers/thunderbolt/lc.c tb_lc_read_...
tb_lc_lane_bonding_possible(9)
NAME tb_lc_lane_bonding_possible - Is lane bonding possible towards switch SYNOPSIS bool tb_lc_lane_bonding_possible (struct tb_switch *sw ); ARGUMENTS sw Switch to check DESCRIPTION Checks whether conditions for lane bonding from parent to sw are possible. RETURN true if lane bonding is possible, false ot...
tb_lc_read_uuid(9)
NAME tb_lc_read_uuid - Read switch UUID from link controller common register SYNOPSIS int tb_lc_read_uuid (struct tb_switch *sw , u32 *uuid ); ARGUMENTS sw Switch whose UUID is read uuid UUID is placed here RETURN 0 on success, negative errno otherwise. SEE ALSO Kernel file ./drivers/thund...
tb_lc_reset_port(9)
NAME tb_lc_reset_port - Trigger downstream port reset through LC SYNOPSIS int tb_lc_reset_port (struct tb_port *port ); ARGUMENTS port Port that is reset DESCRIPTION Triggers downstream port reset through link controller registers. Only supports non-USB4 routers with link controller (that's Thunderbolt 2 and...
tb_lc_set_sleep(9)
NAME tb_lc_set_sleep - Inform LC that the switch is going to sleep SYNOPSIS int tb_lc_set_sleep (struct tb_switch *sw ); ARGUMENTS sw Switch to set sleep DESCRIPTION Let the switch link controllers know that the switch is going to sleep. RETURN 0 on success, negative errno otherwise. SEE ALSO Kernel fil...
tb_lc_set_wake(9)
NAME tb_lc_set_wake - Enable/disable wake SYNOPSIS int tb_lc_set_wake (struct tb_switch *sw , unsigned int flags ); ARGUMENTS sw Switch whose wakes to configure flags Wakeup flags (0 to disable) DESCRIPTION For each LC sets wake bits accordingly. RETURN 0 on success, negative errno otherwise....
tb_lc_start_lane_initialization(9)
NAME tb_lc_start_lane_initialization - Start lane initialization SYNOPSIS int tb_lc_start_lane_initialization (struct tb_port *port ); ARGUMENTS port Device router lane 0 adapter DESCRIPTION Starts lane initialization for port after the router resumed from sleep. Should be called for those downstream lane ada...
tb_lc_unconfigure_port(9)
NAME tb_lc_unconfigure_port - Let LC know about unconfigured port SYNOPSIS void tb_lc_unconfigure_port (struct tb_port *port ); ARGUMENTS port Port that is set as configured DESCRIPTION Sets the port unconfigured for power management purposes. RETURN 0 on success, negative errno otherwise. SEE ALSO Kernel ...
tb_lc_unconfigure_xdomain(9)
NAME tb_lc_unconfigure_xdomain - Unconfigure XDomain from port SYNOPSIS void tb_lc_unconfigure_xdomain (struct tb_port *port ); ARGUMENTS port Switch downstream port that was connected to another host DESCRIPTION Unsets the lane XDomain configuration. SEE ALSO Kernel file ./drivers/thunderbolt/lc.c tb_lc_...
tb_lc_xhci_connect(9)
NAME tb_lc_xhci_connect - Connect internal xHCI SYNOPSIS int tb_lc_xhci_connect (struct tb_port *port ); ARGUMENTS port Device router lane 0 adapter DESCRIPTION Tells LC to connect the internal xHCI to port. Can be called for Thunderbolt 3 routers only. RETURN 0 on success, negative errno otherwise. SEE ALS...
tb_lc_xhci_disconnect(9)
NAME tb_lc_xhci_disconnect - Disconnect internal xHCI SYNOPSIS void tb_lc_xhci_disconnect (struct tb_port *port ); ARGUMENTS port Device router lane 0 adapter DESCRIPTION Tells LC to disconnect the internal xHCI from port. Can be called for Thunderbolt 3 routers only. SEE ALSO Kernel file ./drivers/thunder...
tb_maximum_bandwidth(9)
NAME tb_maximum_bandwidth - Maximum bandwidth over a single link SYNOPSIS int tb_maximum_bandwidth (struct tb *tb , struct tb_port *src_port , struct tb_port *dst_port , struct tb_port *port , int *max_up , int *max_down , bool include_asym ); ARGUMENTS tb Domain structure src_port Source protocol...
tb_next_port_on_path(9)
NAME tb_next_port_on_path - Return next port for given port on a path SYNOPSIS struct tb_port * tb_next_port_on_path (struct tb_port *start , struct tb_port *end , struct tb_port *prev ); ARGUMENTS start Start port of the walk end End port of the walk prev Previous port (NULL if t...
tb_nvm_add_active(9)
NAME tb_nvm_add_active - Adds active NVMem device to NVM SYNOPSIS int tb_nvm_add_active (struct tb_nvm *nvm , nvmem_reg_read_t reg_read ); ARGUMENTS nvm NVM structure reg_read Pointer to the function to read the NVM (passed directly to the NVMem device) DESCRIPTION Registers new active NVmem devic...
tb_nvm_add_non_active(9)
NAME tb_nvm_add_non_active - Adds non-active NVMem device to NVM SYNOPSIS int tb_nvm_add_non_active (struct tb_nvm *nvm , nvmem_reg_write_t reg_write ); ARGUMENTS nvm NVM structure reg_write Pointer to the function to write the NVM (passed directly to the NVMem device) DESCRIPTION Registers new non...
tb_nvm_alloc(9)
NAME tb_nvm_alloc - Allocate new NVM structure SYNOPSIS struct tb_nvm * tb_nvm_alloc (struct device *dev ); ARGUMENTS dev Device owning the NVM DESCRIPTION Allocates new NVM structure with unique id and returns it. RETURN * Pointer to struct tb_nvm - On success. * -EOPNOTSUPP - If the NVM format of the dev...
tb_nvm_free(9)
NAME tb_nvm_free - Release NVM and its resources SYNOPSIS void tb_nvm_free (struct tb_nvm *nvm ); ARGUMENTS nvm NVM structure to release DESCRIPTION Releases NVM and the NVMem devices if they were registered. SEE ALSO Kernel file ./drivers/thunderbolt/nvm.c struct tb_nvm_vendor_ops(9), struct tb...
tb_nvm_read_data(9)
NAME tb_nvm_read_data - Read data from NVM SYNOPSIS int tb_nvm_read_data (unsigned int address , void *buf , size_t size , unsigned int retries , read_block_fn read_block , void *read_block_data ); ARGUMENTS address Start address on the flash buf Buffer where the read data is copied size ...
tb_nvm_read_version(9)
NAME tb_nvm_read_version - Read and populate NVM version SYNOPSIS int tb_nvm_read_version (struct tb_nvm *nvm ); ARGUMENTS nvm NVM structure DESCRIPTION Uses vendor specific means to read and fill out the existing active NVM version. RETURN 0 on success, negative errno otherwise. SEE ALSO Kernel file ./d...
tb_nvm_validate(9)
NAME tb_nvm_validate - Validate new NVM image SYNOPSIS int tb_nvm_validate (struct tb_nvm *nvm ); ARGUMENTS nvm NVM structure DESCRIPTION Runs vendor specific validation over the new NVM image. As a side effect, updates nvm->buf_data_start and nvm->buf_data_size fields to match the actual data to be written ...
tb_nvm_write_buf(9)
NAME tb_nvm_write_buf - Write data to @nvm buffer SYNOPSIS int tb_nvm_write_buf (struct tb_nvm *nvm , unsigned int offset , void *val , size_t bytes ); ARGUMENTS nvm NVM structure offset Offset where to write the data val Data buffer to write bytes Number of bytes to...
tb_nvm_write_data(9)
NAME tb_nvm_write_data - Write data to NVM SYNOPSIS int tb_nvm_write_data (unsigned int address , const void *buf , size_t size , unsigned int retries , write_block_fn write_block , void *write_block_data ); ARGUMENTS address Start address on the flash buf Buffer where the data is copied from ...
tb_nvm_write_headers(9)
NAME tb_nvm_write_headers - Write headers before the rest of the image SYNOPSIS int tb_nvm_write_headers (struct tb_nvm *nvm ); ARGUMENTS nvm NVM structure DESCRIPTION If the vendor NVM format requires writing headers before the rest of the image, this function does that. Can be called even if the device doe...
tb_path_activate(9)
NAME tb_path_activate - activate a path SYNOPSIS int tb_path_activate (struct tb_path *path ); ARGUMENTS path Path to activate DESCRIPTION Activate a path starting with the last hop and iterating backwards. The caller must fill path->hops before calling tb_path_activate. RETURN 0 on success, negative errno o...
tb_path_alloc(9)
NAME tb_path_alloc - allocate a thunderbolt path between two ports SYNOPSIS struct tb_path * tb_path_alloc (struct tb *tb , struct tb_port *src , int src_hopid , struct tb_port *dst , int dst_hopid , int link_nr , const char *name ); ARGUMENTS tb Domain pointer src Source port of the path ...
tb_path_deactivate_hop(9)
NAME tb_path_deactivate_hop - Deactivate one path in path config space SYNOPSIS int tb_path_deactivate_hop (struct tb_port *port , int hop_index ); ARGUMENTS port Lane or protocol adapter hop_index HopID of the path to be cleared DESCRIPTION This deactivates or clears a single path config space entr...
tb_path_discover(9)
NAME tb_path_discover - Discover a path SYNOPSIS struct tb_path * tb_path_discover (struct tb_port *src , int src_hopid , struct tb_port *dst , int dst_hopid , struct tb_port **last , const char *name , bool alloc_hopid ); ARGUMENTS src First input port of a path src_hopid Starting HopID of a path (...
tb_path_for_each_hop(9)
NAME tb_path_for_each_hop - Iterate over each hop on path SYNOPSIS tb_path_for_each_hop (path , hop ); ARGUMENTS path Path whose hops to iterate hop Hop used as iterator DESCRIPTION Iterates over each hop on path. SEE ALSO Kernel file ./drivers/thunderbolt/tb.h struct tb_nvm(9), enum tb...
tb_path_free(9)
NAME tb_path_free - free a path SYNOPSIS void tb_path_free (struct tb_path *path ); ARGUMENTS path Path to free DESCRIPTION Frees a path. The path does not need to be deactivated. SEE ALSO Kernel file ./drivers/thunderbolt/path.c tb_path_discover(9), tb_path_alloc(9), tb_path_deactivate_hop(9), tb_path_activ...
tb_path_is_invalid(9)
NAME tb_path_is_invalid - check whether any ports on the path are invalid SYNOPSIS bool tb_path_is_invalid (struct tb_path *path ); ARGUMENTS path Path to check RETURN true if the path is invalid, false otherwise. SEE ALSO Kernel file ./drivers/thunderbolt/path.c tb_path_discover(9), tb_path_alloc(9), tb_pat...
tb_path_port_on_path(9)
NAME tb_path_port_on_path - Does the path go through certain port SYNOPSIS bool tb_path_port_on_path (const struct tb_path *path , const struct tb_port *port ); ARGUMENTS path Path to check port Switch to check DESCRIPTION Goes over all hops on path and checks if port is any of them. Direction...
tb_pci_port_enable(9)
NAME tb_pci_port_enable - Enable PCIe adapter port SYNOPSIS int tb_pci_port_enable (struct tb_port *port , bool enable ); ARGUMENTS port PCIe port to enable enable Enable/disable the PCIe adapter RETURN 0 on success, negative errno otherwise. SEE ALSO Kernel file ./drivers/thunderbolt/switch.c...
tb_pci_port_is_enabled(9)
NAME tb_pci_port_is_enabled - Is the PCIe adapter port enabled SYNOPSIS bool tb_pci_port_is_enabled (struct tb_port *port ); ARGUMENTS port PCIe port to check RETURN true if port is enabled, false otherwise. SEE ALSO Kernel file ./drivers/thunderbolt/switch.c tb_switch_nvm_read(9), tb_port_state(9), tb_...
tb_port_add_nfc_credits(9)
NAME tb_port_add_nfc_credits - add/remove non flow controlled credits to port SYNOPSIS int tb_port_add_nfc_credits (struct tb_port *port , int credits ); ARGUMENTS port Port to add/remove NFC credits credits Credits to add/remove DESCRIPTION Change the number of NFC credits allocated to port by cr...
tb_port_alloc_in_hopid(9)
NAME tb_port_alloc_in_hopid - Allocate input HopID from port SYNOPSIS int tb_port_alloc_in_hopid (struct tb_port *port , int min_hopid , int max_hopid ); ARGUMENTS port Port to allocate HopID for min_hopid Minimum acceptable input HopID max_hopid Maximum acceptable input HopID RETURN HopID...
tb_port_alloc_out_hopid(9)
NAME tb_port_alloc_out_hopid - Allocate output HopID from port SYNOPSIS int tb_port_alloc_out_hopid (struct tb_port *port , int min_hopid , int max_hopid ); ARGUMENTS port Port to allocate HopID for min_hopid Minimum acceptable output HopID max_hopid Maximum acceptable output HopID RETURN ...
tb_port_clear_counter(9)
NAME tb_port_clear_counter - clear a counter in TB_CFG_COUNTER SYNOPSIS int tb_port_clear_counter (struct tb_port *port , int counter ); ARGUMENTS port Port whose counters to clear counter Counter index to clear RETURN 0 on success, negative errno otherwise. SEE ALSO Kernel file ./drivers/thund...
tb_port_clx_is_enabled(9)
NAME tb_port_clx_is_enabled - Is given CL state enabled SYNOPSIS bool tb_port_clx_is_enabled (struct tb_port *port , unsigned int clx ); ARGUMENTS port USB4 port to check clx Mask of CL states to check RETURN true if any of the given CL states is enabled for port, false otherwise. SEE ALSO Ke...
tb_port_disable(9)
NAME tb_port_disable - Disable lane adapter SYNOPSIS int tb_port_disable (struct tb_port *port ); ARGUMENTS port Port to disable (can be NULL) DESCRIPTION This is used for lane 0 and 1 adapters to disable it. RETURN 0 on success, negative errno otherwise. SEE ALSO Kernel file ./drivers/thunderbolt/switc...
tb_port_enable(9)
NAME tb_port_enable - Enable lane adapter SYNOPSIS int tb_port_enable (struct tb_port *port ); ARGUMENTS port Port to enable (can be NULL) DESCRIPTION This is used for lane 0 and 1 adapters to enable it. RETURN 0 on success, negative errno otherwise. SEE ALSO Kernel file ./drivers/thunderbolt/switch.c ...
tb_port_find_cap(9)
NAME tb_port_find_cap - Find port capability SYNOPSIS int tb_port_find_cap (struct tb_port *port , enum tb_port_cap cap ); ARGUMENTS port Port to find the capability for cap Capability to look RETURN * Offset to the start of capability - On success. * -ENOENT - If no such capability was found...
tb_port_get_link_generation(9)
NAME tb_port_get_link_generation - Returns link generation SYNOPSIS int tb_port_get_link_generation (struct tb_port *port ); ARGUMENTS port Lane adapter RETURN Link generation as a number or negative errno in case of failure. DESCRIPTION Does not distinguish between Thunderbolt 1 and Thunderbolt 2 links so f...
tb_port_get_link_speed(9)
NAME tb_port_get_link_speed - Get current link speed SYNOPSIS int tb_port_get_link_speed (struct tb_port *port ); ARGUMENTS port Port to check (USB4 or CIO) RETURN Link speed in Gb/s or negative errno in case of failure. SEE ALSO Kernel file ./drivers/thunderbolt/switch.c tb_switch_nvm_read(9), tb_port_s...
tb_port_get_link_width(9)
NAME tb_port_get_link_width - Get current link width SYNOPSIS int tb_port_get_link_width (struct tb_port *port ); ARGUMENTS port Port to check (USB4 or CIO) RETURN Link width encoded in enum tb_link_width or negative errno in case of failure. SEE ALSO Kernel file ./drivers/thunderbolt/switch.c tb_switch_n...
tb_port_has_remote(9)
NAME tb_port_has_remote - Does the port have switch connected downstream SYNOPSIS bool tb_port_has_remote (const struct tb_port *port ); ARGUMENTS port Port to check RETURN true only when the port is primary port and has remote set. SEE ALSO Kernel file ./drivers/thunderbolt/tb.h struct tb_nvm(9), enum ...
tb_port_is_enabled(9)
NAME tb_port_is_enabled - Is the adapter port enabled SYNOPSIS bool tb_port_is_enabled (struct tb_port *port ); ARGUMENTS port Port to check RETURN true if port is enabled, false otherwise. SEE ALSO Kernel file ./drivers/thunderbolt/switch.c tb_switch_nvm_read(9), tb_port_state(9), tb_wait_for_port(9), ...
tb_port_lane_bonding_disable(9)
NAME tb_port_lane_bonding_disable - Disable bonding on port SYNOPSIS void tb_port_lane_bonding_disable (struct tb_port *port ); ARGUMENTS port port to disable DESCRIPTION Disable bonding by setting the link width of the port and the other port in case of dual link port. SEE ALSO Kernel file ./drivers/thund...