Lines Matching +full:retimer +full:- +full:switch

1 // SPDX-License-Identifier: GPL-2.0
89 return -EOPNOTSUPP; in usb4_native_switch_op()
114 const struct tb_cm_ops *cm_ops = sw->tb->cm_ops; in __usb4_switch_op()
117 return -EINVAL; in __usb4_switch_op()
124 if (cm_ops->usb4_switch_op) { in __usb4_switch_op()
127 ret = cm_ops->usb4_switch_op(sw, opcode, metadata, status, in __usb4_switch_op()
130 if (ret != -EOPNOTSUPP) in __usb4_switch_op()
159 * usb4_switch_check_wakes() - Check for wakes and notify PM core about them
188 if (!port->cap_usb4) in usb4_switch_check_wakes()
192 port->cap_usb4 + PORT_CS_18, 1)) in usb4_switch_check_wakes()
203 usb4 = port->usb4; in usb4_switch_check_wakes()
204 if (device_may_wakeup(&usb4->dev) && wakeup_usb4) in usb4_switch_check_wakes()
205 pm_wakeup_event(&usb4->dev, 0); in usb4_switch_check_wakes()
211 pm_wakeup_event(&sw->dev, 0); in usb4_switch_check_wakes()
218 if (!port->cap_usb4) in link_is_usb4()
222 port->cap_usb4 + PORT_CS_18, 1)) in link_is_usb4()
229 * usb4_switch_setup() - Additional setup for USB4 device
234 * enabled (e.g the parent switch also supports them). If USB tunneling
236 * switch upstream) then the internal xHCI controller is enabled
258 sw->link_usb4 = link_is_usb4(down); in usb4_switch_setup()
259 tb_sw_dbg(sw, "link: %s\n", sw->link_usb4 ? "USB4" : "TBT"); in usb4_switch_setup()
271 if (tb_acpi_may_tunnel_usb3() && sw->link_usb4 && in usb4_switch_setup()
300 * usb4_switch_configuration_valid() - Set tunneling configuration to be valid
333 * usb4_switch_read_uid() - Read UID from USB4 router
337 * Reads 64-bit UID from USB4 router config space.
362 return status ? -EIO : 0; in usb4_switch_drom_read_block()
366 * usb4_switch_drom_read() - Read arbitrary bytes from USB4 router DROM
373 * should always work but for hosts it may return %-EOPNOTSUPP in which
384 * usb4_switch_lane_bonding_possible() - Are conditions met for lane bonding
397 ret = tb_port_read(up, &val, TB_CFG_PORT, up->cap_usb4 + PORT_CS_18, 1); in usb4_switch_lane_bonding_possible()
405 * usb4_switch_set_wake() - Enabled/disable wake
429 if (!port->cap_usb4) in usb4_switch_set_wake()
433 port->cap_usb4 + PORT_CS_19, 1); in usb4_switch_set_wake()
443 usb4 = port->usb4; in usb4_switch_set_wake()
446 device_may_wakeup(&usb4->dev)) && !configured) in usb4_switch_set_wake()
449 device_may_wakeup(&usb4->dev)) && configured) in usb4_switch_set_wake()
456 port->cap_usb4 + PORT_CS_19, 1); in usb4_switch_set_wake()
487 * usb4_switch_set_sleep() - Prepare the router to enter sleep
514 * usb4_switch_nvm_sector_size() - Return router NVM sector size
519 * %-EOPNOTSUPP.
533 return status == 0x2 ? -EOPNOTSUPP : -EIO; in usb4_switch_nvm_sector_size()
556 return status ? -EIO : 0; in usb4_switch_nvm_read_block()
560 * usb4_switch_nvm_read() - Read arbitrary bytes from router NVM
567 * %-EOPNOTSUPP.
577 * usb4_switch_nvm_set_offset() - Set NVM write offset
601 return status ? -EIO : 0; in usb4_switch_nvm_set_offset()
616 return status ? -EIO : 0; in usb4_switch_nvm_write_next_block()
620 * usb4_switch_nvm_write() - Write to the router NVM
627 * write is not supported returns %-EOPNOTSUPP.
643 * usb4_switch_nvm_authenticate() - Authenticate new NVM
660 switch (ret) { in usb4_switch_nvm_authenticate()
665 case -EACCES: in usb4_switch_nvm_authenticate()
666 case -ENOTCONN: in usb4_switch_nvm_authenticate()
667 case -ETIMEDOUT: in usb4_switch_nvm_authenticate()
676 * usb4_switch_nvm_authenticate_status() - Read status of last NVM authenticate
689 const struct tb_cm_ops *cm_ops = sw->tb->cm_ops; in usb4_switch_nvm_authenticate_status()
694 if (cm_ops->usb4_switch_nvm_authenticate_status) { in usb4_switch_nvm_authenticate_status()
695 ret = cm_ops->usb4_switch_nvm_authenticate_status(sw, status); in usb4_switch_nvm_authenticate_status()
696 if (ret != -EOPNOTSUPP) in usb4_switch_nvm_authenticate_status()
708 return -EBUSY; in usb4_switch_nvm_authenticate_status()
710 return -EOPNOTSUPP; in usb4_switch_nvm_authenticate_status()
722 * usb4_switch_credits_init() - Read buffer allocation parameters
726 * allocation fields accordingly. Specifically @sw->credits_allocation
746 return -EIO; in usb4_switch_credits_init()
750 return -EMSGSIZE; in usb4_switch_credits_init()
752 max_usb3 = -1; in usb4_switch_credits_init()
753 min_dp_aux = -1; in usb4_switch_credits_init()
754 min_dp_main = -1; in usb4_switch_credits_init()
755 max_pcie = -1; in usb4_switch_credits_init()
756 max_dma = -1; in usb4_switch_credits_init()
766 switch (index) { in usb4_switch_credits_init()
796 * issues, log a warning and fall back using the hard-coded in usb4_switch_credits_init()
844 sw->credit_allocation = true; in usb4_switch_credits_init()
846 sw->max_usb3_credits = max_usb3; in usb4_switch_credits_init()
848 sw->min_dp_aux_credits = min_dp_aux; in usb4_switch_credits_init()
850 sw->min_dp_main_credits = min_dp_main; in usb4_switch_credits_init()
852 sw->max_pcie_credits = max_pcie; in usb4_switch_credits_init()
854 sw->max_dma_credits = max_dma; in usb4_switch_credits_init()
859 return -EINVAL; in usb4_switch_credits_init()
863 * usb4_switch_query_dp_resource() - Query availability of DP IN resource
873 u32 metadata = in->port; in usb4_switch_query_dp_resource()
883 if (ret == -EOPNOTSUPP) in usb4_switch_query_dp_resource()
892 * usb4_switch_alloc_dp_resource() - Allocate DP IN resource
898 * returns negative errno, in particular %-EBUSY if the resource is
903 u32 metadata = in->port; in usb4_switch_alloc_dp_resource()
909 if (ret == -EOPNOTSUPP) in usb4_switch_alloc_dp_resource()
914 return status ? -EBUSY : 0; in usb4_switch_alloc_dp_resource()
918 * usb4_switch_dealloc_dp_resource() - Releases allocated DP IN resource
926 u32 metadata = in->port; in usb4_switch_dealloc_dp_resource()
932 if (ret == -EOPNOTSUPP) in usb4_switch_dealloc_dp_resource()
937 return status ? -EIO : 0; in usb4_switch_dealloc_dp_resource()
951 if (!p->link_nr) { in usb4_port_idx()
962 * usb4_switch_map_pcie_down() - Map USB4 port to a PCIe downstream adapter
993 * usb4_switch_map_usb3_down() - Map USB4 port to a USB3 downstream adapter
1024 * usb4_switch_add_ports() - Add USB4 ports for this router
1044 if (!port->cap_usb4) in usb4_switch_add_ports()
1053 port->usb4 = usb4; in usb4_switch_add_ports()
1060 * usb4_switch_remove_ports() - Removes USB4 ports from this router
1070 if (port->usb4) { in usb4_switch_remove_ports()
1071 usb4_port_device_remove(port->usb4); in usb4_switch_remove_ports()
1072 port->usb4 = NULL; in usb4_switch_remove_ports()
1078 * usb4_port_unlock() - Unlock USB4 downstream port
1098 * usb4_port_hotplug_enable() - Enables hotplug for a port
1102 * to be used on lane, DP-IN, and DP-OUT adapters.
1118 * usb4_port_reset() - Issue downstream port reset
1128 if (!port->cap_usb4) in usb4_port_reset()
1129 return -EINVAL; in usb4_port_reset()
1132 port->cap_usb4 + PORT_CS_19, 1); in usb4_port_reset()
1139 port->cap_usb4 + PORT_CS_19, 1); in usb4_port_reset()
1146 port->cap_usb4 + PORT_CS_19, 1); in usb4_port_reset()
1153 port->cap_usb4 + PORT_CS_19, 1); in usb4_port_reset()
1161 if (!port->cap_usb4) in usb4_port_set_configured()
1162 return -EINVAL; in usb4_port_set_configured()
1165 port->cap_usb4 + PORT_CS_19, 1); in usb4_port_set_configured()
1175 port->cap_usb4 + PORT_CS_19, 1); in usb4_port_set_configured()
1179 * usb4_port_configure() - Set USB4 port configured
1190 * usb4_port_unconfigure() - Set USB4 port unconfigured
1205 if (!port->cap_usb4) in usb4_set_xdomain_configured()
1206 return -EINVAL; in usb4_set_xdomain_configured()
1209 port->cap_usb4 + PORT_CS_19, 1); in usb4_set_xdomain_configured()
1219 port->cap_usb4 + PORT_CS_19, 1); in usb4_set_xdomain_configured()
1223 * usb4_port_configure_xdomain() - Configure port for XDomain
1232 xd->link_usb4 = link_is_usb4(port); in usb4_port_configure_xdomain()
1237 * usb4_port_unconfigure_xdomain() - Unconfigure port for XDomain
1266 return -ETIMEDOUT; in usb4_port_wait_for_bit()
1272 return -EINVAL; in usb4_port_read_data()
1274 return tb_port_read(port, data, TB_CFG_PORT, port->cap_usb4 + PORT_CS_2, in usb4_port_read_data()
1282 return -EINVAL; in usb4_port_write_data()
1284 return tb_port_write(port, data, TB_CFG_PORT, port->cap_usb4 + PORT_CS_2, in usb4_port_write_data()
1295 if (!port->cap_usb4) in usb4_port_sb_read()
1296 return -EINVAL; in usb4_port_sb_read()
1306 port->cap_usb4 + PORT_CS_1, 1); in usb4_port_sb_read()
1310 ret = usb4_port_wait_for_bit(port, port->cap_usb4 + PORT_CS_1, in usb4_port_sb_read()
1316 port->cap_usb4 + PORT_CS_1, 1); in usb4_port_sb_read()
1321 return -ENODEV; in usb4_port_sb_read()
1323 return -EIO; in usb4_port_sb_read()
1335 if (!port->cap_usb4) in usb4_port_sb_write()
1336 return -EINVAL; in usb4_port_sb_write()
1353 port->cap_usb4 + PORT_CS_1, 1); in usb4_port_sb_write()
1357 ret = usb4_port_wait_for_bit(port, port->cap_usb4 + PORT_CS_1, in usb4_port_sb_write()
1363 port->cap_usb4 + PORT_CS_1, 1); in usb4_port_sb_write()
1368 return -ENODEV; in usb4_port_sb_write()
1370 return -EIO; in usb4_port_sb_write()
1377 switch (val) { in usb4_port_sb_opcode_err_to_errno()
1381 return -EAGAIN; in usb4_port_sb_opcode_err_to_errno()
1383 return -EOPNOTSUPP; in usb4_port_sb_opcode_err_to_errno()
1385 return -EIO; in usb4_port_sb_opcode_err_to_errno()
1415 return -ETIMEDOUT; in usb4_port_sb_op()
1434 * usb4_port_router_offline() - Put the USB4 port to offline mode
1439 * called before retimer access is done when the USB4 links is not up.
1450 * usb4_port_router_online() - Put the USB4 port back to online
1461 * usb4_port_enumerate_retimers() - Send RT broadcast transaction
1478 * usb4_port_clx_supported() - Check if CLx is supported by the link
1490 port->cap_usb4 + PORT_CS_18, 1); in usb4_port_clx_supported()
1498 * usb4_port_asym_supported() - If the port supports asymmetric link
1508 if (!port->cap_usb4) in usb4_port_asym_supported()
1511 if (tb_port_read(port, &val, TB_CFG_PORT, port->cap_usb4 + PORT_CS_18, 1)) in usb4_port_asym_supported()
1518 * usb4_port_asym_set_link_width() - Set link width to asymmetric or symmetric
1530 if (!port->cap_phy) in usb4_port_asym_set_link_width()
1531 return -EINVAL; in usb4_port_asym_set_link_width()
1534 port->cap_phy + LANE_ADP_CS_1, 1); in usb4_port_asym_set_link_width()
1539 switch (width) { in usb4_port_asym_set_link_width()
1553 return -EINVAL; in usb4_port_asym_set_link_width()
1557 port->cap_phy + LANE_ADP_CS_1, 1); in usb4_port_asym_set_link_width()
1561 * usb4_port_asym_start() - Start symmetry change and wait for completion
1568 * Returns %0 in case of success, %-ETIMEDOUT if case of timeout or
1577 port->cap_usb4 + PORT_CS_19, 1); in usb4_port_asym_start()
1585 port->cap_usb4 + PORT_CS_19, 1); in usb4_port_asym_start()
1593 ret = usb4_port_wait_for_bit(port, port->cap_usb4 + PORT_CS_19, in usb4_port_asym_start()
1599 return usb4_port_wait_for_bit(port, port->cap_usb4 + PORT_CS_18, in usb4_port_asym_start()
1604 * usb4_port_margining_caps() - Read USB4 port marginig capabilities
1624 * usb4_port_hw_margin() - Run hardware lane margining on port
1667 * usb4_port_sw_margin() - Run software lane margining on port
1703 * usb4_port_sw_margin_errors() - Read the software margining error counters
1732 * usb4_port_retimer_set_inbound_sbtx() - Enable sideband channel transactions
1734 * @index: Retimer index
1746 if (ret != -ENODEV) in usb4_port_retimer_set_inbound_sbtx()
1750 * Per the USB4 retimer spec, the retimer is not required to in usb4_port_retimer_set_inbound_sbtx()
1751 * send an RT (Retimer Transaction) response for the first in usb4_port_retimer_set_inbound_sbtx()
1759 * usb4_port_retimer_unset_inbound_sbtx() - Disable sideband channel transactions
1761 * @index: Retimer index
1773 * usb4_port_retimer_read() - Read from retimer sideband registers
1775 * @index: Retimer index
1780 * Function reads retimer sideband registers starting from @reg. The
1781 * retimer is connected to @port at @index. Returns %0 in case of
1782 * success, and read data is copied to @buf. If there is no retimer
1783 * present at given @index returns %-ENODEV. In any other failure
1794 * usb4_port_retimer_write() - Write to retimer sideband registers
1796 * @index: Retimer index
1801 * Writes retimer sideband registers starting from @reg. The retimer is
1803 * is no retimer present at given @index returns %-ENODEV. In any other
1814 * usb4_port_retimer_is_last() - Is the retimer last on-board retimer
1816 * @index: Retimer index
1818 * If the retimer at @index is last one (connected directly to the
1819 * Type-C port) this function returns %1. If it is not returns %0. If
1820 * the retimer is not present returns %-ENODEV. Otherwise returns
1839 * usb4_port_retimer_nvm_sector_size() - Read retimer NVM sector size
1841 * @index: Retimer index
1843 * Reads NVM sector size (in bytes) of a retimer at @index. This
1844 * operation can be used to determine whether the retimer supports NVM
1846 * in case of error. Specifically returns %-ENODEV if there is no
1847 * retimer at @index.
1865 * usb4_port_retimer_nvm_set_offset() - Set NVM write offset
1867 * @index: Retimer index
1904 struct tb_port *port = info->port; in usb4_port_retimer_nvm_write_next_block()
1905 u8 index = info->index; in usb4_port_retimer_nvm_write_next_block()
1918 * usb4_port_retimer_nvm_write() - Write to retimer NVM
1920 * @index: Retimer index
1925 * Writes @size bytes from @buf to the retimer NVM. Used for NVM
1927 * errno in case of failure. Specifically returns %-ENODEV if there is
1928 * no retimer at @index.
1945 * usb4_port_retimer_nvm_authenticate() - Start retimer NVM upgrade
1947 * @index: Retimer index
1951 * successful the retimer restarts with the new NVM and may not have the
1961 * authentication completes the retimer index is not set anymore in usb4_port_retimer_nvm_authenticate()
1970 * usb4_port_retimer_nvm_authenticate_status() - Read status of NVM upgrade
1972 * @index: Retimer index
1994 switch (ret) { in usb4_port_retimer_nvm_authenticate_status()
1999 case -EAGAIN: in usb4_port_retimer_nvm_authenticate_status()
2017 struct tb_port *port = info->port; in usb4_port_retimer_nvm_read_block()
2018 u8 index = info->index; in usb4_port_retimer_nvm_read_block()
2040 * usb4_port_retimer_nvm_read() - Read contents of retimer NVM
2042 * @index: Retimer index
2047 * Reads retimer NVM and copies the contents to @buf. Returns %0 if the
2049 * Specifically returns %-ENODEV if there is no retimer at @index.
2064 if (port->max_bw) in usb4_usb3_port_max_bandwidth()
2065 return min(bw, port->max_bw); in usb4_usb3_port_max_bandwidth()
2070 * usb4_usb3_port_max_link_rate() - Maximum support USB3 link rate
2082 return -EINVAL; in usb4_usb3_port_max_link_rate()
2085 port->cap_adap + ADP_USB3_CS_4, 1); in usb4_usb3_port_max_link_rate()
2096 * usb4_usb3_port_actual_link_rate() - Established USB3 link rate
2108 return -EINVAL; in usb4_usb3_port_actual_link_rate()
2111 port->cap_adap + ADP_USB3_CS_4, 1); in usb4_usb3_port_actual_link_rate()
2130 return -EINVAL; in usb4_usb3_port_cm_request()
2131 if (tb_route(port->sw)) in usb4_usb3_port_cm_request()
2132 return -EINVAL; in usb4_usb3_port_cm_request()
2135 port->cap_adap + ADP_USB3_CS_2, 1); in usb4_usb3_port_cm_request()
2145 port->cap_adap + ADP_USB3_CS_2, 1); in usb4_usb3_port_cm_request()
2154 return usb4_port_wait_for_bit(port, port->cap_adap + ADP_USB3_CS_1, in usb4_usb3_port_cm_request()
2180 /* 1 uframe is 1/8 ms (125 us) -> 1 / 8000 s */ in mbps_to_usb3_bw()
2193 port->cap_adap + ADP_USB3_CS_2, 1); in usb4_usb3_port_read_allocated_bandwidth()
2198 port->cap_adap + ADP_USB3_CS_3, 1); in usb4_usb3_port_read_allocated_bandwidth()
2214 * usb4_usb3_port_allocated_bandwidth() - Bandwidth allocated for USB3
2247 port->cap_adap + ADP_USB3_CS_1, 1); in usb4_usb3_port_read_consumed_bandwidth()
2252 port->cap_adap + ADP_USB3_CS_3, 1); in usb4_usb3_port_read_consumed_bandwidth()
2284 return -EINVAL; in usb4_usb3_port_write_allocated_bandwidth()
2287 port->cap_adap + ADP_USB3_CS_3, 1); in usb4_usb3_port_write_allocated_bandwidth()
2297 port->cap_adap + ADP_USB3_CS_2, 1); in usb4_usb3_port_write_allocated_bandwidth()
2306 port->cap_adap + ADP_USB3_CS_2, 1); in usb4_usb3_port_write_allocated_bandwidth()
2310 * usb4_usb3_port_allocate_bandwidth() - Allocate bandwidth for USB3
2358 * usb4_usb3_port_release_bandwidth() - Release allocated USB3 bandwidth
2408 if (!tb_switch_is_usb4(port->sw)) in is_usb4_dpin()
2414 * usb4_dp_port_set_cm_id() - Assign CM ID to the DP IN adapter
2419 * otherwise. Speficially returns %-EOPNOTSUPP if the @port does not
2428 return -EOPNOTSUPP; in usb4_dp_port_set_cm_id()
2431 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_cm_id()
2439 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_cm_id()
2443 * usb4_dp_port_bandwidth_mode_supported() - Is the bandwidth allocation mode
2459 port->cap_adap + DP_LOCAL_CAP, 1); in usb4_dp_port_bandwidth_mode_supported()
2467 * usb4_dp_port_bandwidth_mode_enabled() - Is the bandwidth allocation mode
2483 port->cap_adap + ADP_DP_CS_8, 1); in usb4_dp_port_bandwidth_mode_enabled()
2491 * usb4_dp_port_set_cm_bandwidth_mode_supported() - Set/clear CM support for
2498 * otherwise. Specifically returns %-OPNOTSUPP if the passed in adapter
2508 return -EOPNOTSUPP; in usb4_dp_port_set_cm_bandwidth_mode_supported()
2511 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_cm_bandwidth_mode_supported()
2521 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_cm_bandwidth_mode_supported()
2525 * usb4_dp_port_group_id() - Return Group ID assigned for the adapter
2530 * %-EOPNOTSUPP is returned.
2538 return -EOPNOTSUPP; in usb4_dp_port_group_id()
2541 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_group_id()
2549 * usb4_dp_port_set_group_id() - Set adapter Group ID
2555 * Specifically returns %-EOPNOTSUPP if the adapter does not support
2564 return -EOPNOTSUPP; in usb4_dp_port_set_group_id()
2567 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_group_id()
2575 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_group_id()
2579 * usb4_dp_port_nrd() - Read non-reduced rate and lanes
2581 * @rate: Non-reduced rate in Mb/s is placed here
2582 * @lanes: Non-reduced lanes are placed here
2584 * Reads the non-reduced rate and lanes from the DP IN adapter. Returns
2586 * %-EOPNOTSUPP if the adapter does not support this.
2594 return -EOPNOTSUPP; in usb4_dp_port_nrd()
2597 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_nrd()
2602 switch (tmp) { in usb4_dp_port_nrd()
2618 switch (tmp) { in usb4_dp_port_nrd()
2634 * usb4_dp_port_set_nrd() - Set non-reduced rate and lanes
2636 * @rate: Non-reduced rate in Mb/s
2637 * @lanes: Non-reduced lanes
2640 * the non-reduced values for the DP IN adapter. Returns %0 in success
2642 * %-EOPNOTSUPP is returned.
2650 return -EOPNOTSUPP; in usb4_dp_port_set_nrd()
2653 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_nrd()
2659 switch (rate) { in usb4_dp_port_set_nrd()
2675 return -EINVAL; in usb4_dp_port_set_nrd()
2680 switch (lanes) { in usb4_dp_port_set_nrd()
2690 return -EINVAL; in usb4_dp_port_set_nrd()
2694 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_nrd()
2698 * usb4_dp_port_granularity() - Return granularity for the bandwidth values
2702 * not support bandwidth allocation mode returns %-EOPNOTSUPP and negative
2711 return -EOPNOTSUPP; in usb4_dp_port_granularity()
2714 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_granularity()
2721 switch (val) { in usb4_dp_port_granularity()
2730 return -EINVAL; in usb4_dp_port_granularity()
2734 * usb4_dp_port_set_granularity() - Set granularity for the bandwidth values
2740 * adapter does not support this %-EOPNOTSUPP is returned.
2748 return -EOPNOTSUPP; in usb4_dp_port_set_granularity()
2751 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_granularity()
2757 switch (granularity) { in usb4_dp_port_set_granularity()
2768 return -EINVAL; in usb4_dp_port_set_granularity()
2772 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_granularity()
2776 * usb4_dp_port_set_estimated_bandwidth() - Set estimated bandwidth
2783 * and negative errno otherwise. Specifically returns %-EOPNOTSUPP if
2792 return -EOPNOTSUPP; in usb4_dp_port_set_estimated_bandwidth()
2800 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_estimated_bandwidth()
2808 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_estimated_bandwidth()
2812 * usb4_dp_port_allocated_bandwidth() - Return allocated bandwidth
2825 return -EOPNOTSUPP; in usb4_dp_port_allocated_bandwidth()
2833 port->cap_adap + DP_STATUS, 1); in usb4_dp_port_allocated_bandwidth()
2849 port->cap_adap + ADP_DP_CS_2, 1); in __usb4_dp_port_set_cm_ack()
2859 port->cap_adap + ADP_DP_CS_2, 1); in __usb4_dp_port_set_cm_ack()
2881 port->cap_adap + ADP_DP_CS_8, 1); in usb4_dp_port_wait_and_clear_cm_ack()
2892 return -ETIMEDOUT; in usb4_dp_port_wait_and_clear_cm_ack()
2895 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_wait_and_clear_cm_ack()
2901 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_wait_and_clear_cm_ack()
2905 * usb4_dp_port_allocate_bandwidth() - Set allocated bandwidth
2919 return -EOPNOTSUPP; in usb4_dp_port_allocate_bandwidth()
2927 port->cap_adap + DP_STATUS, 1); in usb4_dp_port_allocate_bandwidth()
2935 port->cap_adap + DP_STATUS, 1); in usb4_dp_port_allocate_bandwidth()
2947 * usb4_dp_port_requested_bandwidth() - Read requested bandwidth
2952 * error returns negative errno. Specifically returns %-EOPNOTSUPP if
2962 return -EOPNOTSUPP; in usb4_dp_port_requested_bandwidth()
2970 port->cap_adap + ADP_DP_CS_8, 1); in usb4_dp_port_requested_bandwidth()
2975 return -ENODATA; in usb4_dp_port_requested_bandwidth()
2981 * usb4_pci_port_set_ext_encapsulation() - Enable/disable extended encapsulation
2995 return -EINVAL; in usb4_pci_port_set_ext_encapsulation()
2998 port->cap_adap + ADP_PCIE_CS_1, 1); in usb4_pci_port_set_ext_encapsulation()
3008 port->cap_adap + ADP_PCIE_CS_1, 1); in usb4_pci_port_set_ext_encapsulation()