Lines Matching +full:non +full:- +full:negative
1 // SPDX-License-Identifier: GPL-2.0
88 return -EOPNOTSUPP; in usb4_native_switch_op()
113 const struct tb_cm_ops *cm_ops = sw->tb->cm_ops; in __usb4_switch_op()
116 return -EINVAL; in __usb4_switch_op()
123 if (cm_ops->usb4_switch_op) { in __usb4_switch_op()
126 ret = cm_ops->usb4_switch_op(sw, opcode, metadata, status, in __usb4_switch_op()
129 if (ret != -EOPNOTSUPP) in __usb4_switch_op()
158 * usb4_switch_check_wakes() - Check for wakes and notify PM core about them
187 if (!port->cap_usb4) in usb4_switch_check_wakes()
191 port->cap_usb4 + PORT_CS_18, 1)) in usb4_switch_check_wakes()
202 usb4 = port->usb4; in usb4_switch_check_wakes()
203 if (device_may_wakeup(&usb4->dev) && wakeup_usb4) in usb4_switch_check_wakes()
204 pm_wakeup_event(&usb4->dev, 0); in usb4_switch_check_wakes()
210 pm_wakeup_event(&sw->dev, 0); in usb4_switch_check_wakes()
217 if (!port->cap_usb4) in link_is_usb4()
221 port->cap_usb4 + PORT_CS_18, 1)) in link_is_usb4()
228 * usb4_switch_setup() - Additional setup for USB4 device
241 * Return: %0 on success, negative errno otherwise.
259 sw->link_usb4 = link_is_usb4(down); in usb4_switch_setup()
260 tb_sw_dbg(sw, "link: %s\n", sw->link_usb4 ? "USB4" : "TBT"); in usb4_switch_setup()
272 if (tb_acpi_may_tunnel_usb3() && sw->link_usb4 && in usb4_switch_setup()
301 * usb4_switch_configuration_valid() - Set tunneling configuration to be valid
309 * Return: %0 on success, negative errno otherwise.
334 * usb4_switch_read_uid() - Read UID from USB4 router
338 * Reads 64-bit UID from USB4 router config space.
340 * Return: %0 on success, negative errno otherwise.
365 return status ? -EIO : 0; in usb4_switch_drom_read_block()
369 * usb4_switch_drom_read() - Read arbitrary bytes from USB4 router DROM
376 * should always work but for hosts it may return %-EOPNOTSUPP in which
379 * Return: %0 on success, negative errno otherwise.
389 * usb4_switch_lane_bonding_possible() - Are conditions met for lane bonding
404 ret = tb_port_read(up, &val, TB_CFG_PORT, up->cap_usb4 + PORT_CS_18, 1); in usb4_switch_lane_bonding_possible()
412 * usb4_switch_set_wake() - Enabled/disable wake
419 * Return: %0 on success, negative errno otherwise.
438 if (!port->cap_usb4) in usb4_switch_set_wake()
442 port->cap_usb4 + PORT_CS_19, 1); in usb4_switch_set_wake()
452 bool wakeup = runtime || device_may_wakeup(&port->usb4->dev); in usb4_switch_set_wake()
463 port->cap_usb4 + PORT_CS_19, 1); in usb4_switch_set_wake()
494 * usb4_switch_set_sleep() - Prepare the router to enter sleep
500 * Return: %0 on success, negative errno otherwise.
523 * usb4_switch_nvm_sector_size() - Return router NVM sector size
528 * * %-EOPNOTSUPP - If router does not support NVM operations.
529 * * Negative errno - Another error occurred.
543 return status == 0x2 ? -EOPNOTSUPP : -EIO; in usb4_switch_nvm_sector_size()
566 return status ? -EIO : 0; in usb4_switch_nvm_read_block()
570 * usb4_switch_nvm_read() - Read arbitrary bytes from router NVM
579 * * %0 - Read completed successfully.
580 * * %-EOPNOTSUPP - NVM not supported.
581 * * Negative errno - Another error occurred.
591 * usb4_switch_nvm_set_offset() - Set NVM write offset
598 * Return: %0 on success, negative errno otherwise.
615 return status ? -EIO : 0; in usb4_switch_nvm_set_offset()
630 return status ? -EIO : 0; in usb4_switch_nvm_write_next_block()
634 * usb4_switch_nvm_write() - Write to the router NVM
643 * * %0 - Write completed successfully.
644 * * %-EOPNOTSUPP - NVM write not supported.
645 * * Negative errno - Another error occurred.
661 * usb4_switch_nvm_authenticate() - Authenticate new NVM
673 * Return: %0 on success, negative errno otherwise.
685 case -EACCES: in usb4_switch_nvm_authenticate()
686 case -ENOTCONN: in usb4_switch_nvm_authenticate()
687 case -ETIMEDOUT: in usb4_switch_nvm_authenticate()
696 * usb4_switch_nvm_authenticate_status() - Read status of last NVM authenticate
706 * * %0 - If there is status. Status code is placed in @status.
707 * * Negative errno - Failure occurred.
711 const struct tb_cm_ops *cm_ops = sw->tb->cm_ops; in usb4_switch_nvm_authenticate_status()
716 if (cm_ops->usb4_switch_nvm_authenticate_status) { in usb4_switch_nvm_authenticate_status()
717 ret = cm_ops->usb4_switch_nvm_authenticate_status(sw, status); in usb4_switch_nvm_authenticate_status()
718 if (ret != -EOPNOTSUPP) in usb4_switch_nvm_authenticate_status()
730 return -EBUSY; in usb4_switch_nvm_authenticate_status()
732 return -EOPNOTSUPP; in usb4_switch_nvm_authenticate_status()
744 * usb4_switch_credits_init() - Read buffer allocation parameters
748 * allocation fields accordingly. Specifically @sw->credits_allocation
751 * Return: %0 on success, negative errno otherwise.
768 return -EIO; in usb4_switch_credits_init()
772 return -EMSGSIZE; in usb4_switch_credits_init()
774 max_usb3 = -1; in usb4_switch_credits_init()
775 min_dp_aux = -1; in usb4_switch_credits_init()
776 min_dp_main = -1; in usb4_switch_credits_init()
777 max_pcie = -1; in usb4_switch_credits_init()
778 max_dma = -1; in usb4_switch_credits_init()
818 * issues, log a warning and fall back using the hard-coded in usb4_switch_credits_init()
866 sw->credit_allocation = true; in usb4_switch_credits_init()
868 sw->max_usb3_credits = max_usb3; in usb4_switch_credits_init()
870 sw->min_dp_aux_credits = min_dp_aux; in usb4_switch_credits_init()
872 sw->min_dp_main_credits = min_dp_main; in usb4_switch_credits_init()
874 sw->max_pcie_credits = max_pcie; in usb4_switch_credits_init()
876 sw->max_dma_credits = max_dma; in usb4_switch_credits_init()
881 return -EINVAL; in usb4_switch_credits_init()
885 * usb4_switch_query_dp_resource() - Query availability of DP IN resource
897 u32 metadata = in->port; in usb4_switch_query_dp_resource()
907 if (ret == -EOPNOTSUPP) in usb4_switch_query_dp_resource()
916 * usb4_switch_alloc_dp_resource() - Allocate DP IN resource
924 * * %0 - Resource allocated successfully.
925 * * %-EBUSY - Resource is already allocated.
926 * * Negative errno - Other failure occurred.
930 u32 metadata = in->port; in usb4_switch_alloc_dp_resource()
936 if (ret == -EOPNOTSUPP) in usb4_switch_alloc_dp_resource()
941 return status ? -EBUSY : 0; in usb4_switch_alloc_dp_resource()
945 * usb4_switch_dealloc_dp_resource() - Releases allocated DP IN resource
951 * Return: %0 on success, negative errno otherwise.
955 u32 metadata = in->port; in usb4_switch_dealloc_dp_resource()
961 if (ret == -EOPNOTSUPP) in usb4_switch_dealloc_dp_resource()
966 return status ? -EIO : 0; in usb4_switch_dealloc_dp_resource()
970 * usb4_port_index() - Finds matching USB4 port index
988 if (!p->link_nr) { in usb4_port_index()
999 * usb4_switch_map_pcie_down() - Map USB4 port to a PCIe downstream adapter
1032 * usb4_switch_map_usb3_down() - Map USB4 port to a USB3 downstream adapter
1065 * usb4_switch_add_ports() - Add USB4 ports for this router
1071 * Return: %0 on success, negative errno otherwise.
1085 if (!port->cap_usb4) in usb4_switch_add_ports()
1094 port->usb4 = usb4; in usb4_switch_add_ports()
1101 * usb4_switch_remove_ports() - Removes USB4 ports from this router
1111 if (port->usb4) { in usb4_switch_remove_ports()
1112 usb4_port_device_remove(port->usb4); in usb4_switch_remove_ports()
1113 port->usb4 = NULL; in usb4_switch_remove_ports()
1119 * usb4_port_unlock() - Unlock USB4 downstream port
1125 * Return: %0 on success, negative errno otherwise.
1141 * usb4_port_hotplug_enable() - Enables hotplug for a port
1145 * to be used on lane, DP-IN, and DP-OUT adapters.
1147 * Return: %0 on success, negative errno otherwise.
1163 * usb4_port_reset() - Issue downstream port reset
1168 * Return: %0 on success, negative errno otherwise.
1175 if (!port->cap_usb4) in usb4_port_reset()
1176 return -EINVAL; in usb4_port_reset()
1179 port->cap_usb4 + PORT_CS_19, 1); in usb4_port_reset()
1186 port->cap_usb4 + PORT_CS_19, 1); in usb4_port_reset()
1193 port->cap_usb4 + PORT_CS_19, 1); in usb4_port_reset()
1200 port->cap_usb4 + PORT_CS_19, 1); in usb4_port_reset()
1208 if (!port->cap_usb4) in usb4_port_set_configured()
1209 return -EINVAL; in usb4_port_set_configured()
1212 port->cap_usb4 + PORT_CS_19, 1); in usb4_port_set_configured()
1222 port->cap_usb4 + PORT_CS_19, 1); in usb4_port_set_configured()
1226 * usb4_port_configure() - Set USB4 port configured
1231 * Return: %0 on success, negative errno otherwise.
1239 * usb4_port_unconfigure() - Set USB4 port unconfigured
1244 * Return: %0 on success, negative errno otherwise.
1256 if (!port->cap_usb4) in usb4_set_xdomain_configured()
1257 return -EINVAL; in usb4_set_xdomain_configured()
1260 port->cap_usb4 + PORT_CS_19, 1); in usb4_set_xdomain_configured()
1270 port->cap_usb4 + PORT_CS_19, 1); in usb4_set_xdomain_configured()
1274 * usb4_port_configure_xdomain() - Configure port for XDomain
1281 * Return: %0 on success, negative errno otherwise.
1285 xd->link_usb4 = link_is_usb4(port); in usb4_port_configure_xdomain()
1290 * usb4_port_unconfigure_xdomain() - Unconfigure port for XDomain
1319 return -ETIMEDOUT; in usb4_port_wait_for_bit()
1325 return -EINVAL; in usb4_port_read_data()
1327 return tb_port_read(port, data, TB_CFG_PORT, port->cap_usb4 + PORT_CS_2, in usb4_port_read_data()
1335 return -EINVAL; in usb4_port_write_data()
1337 return tb_port_write(port, data, TB_CFG_PORT, port->cap_usb4 + PORT_CS_2, in usb4_port_write_data()
1342 * usb4_port_sb_read() - Read from sideband register
1352 * Return: %0 on success, negative errno otherwise.
1361 if (!port->cap_usb4) in usb4_port_sb_read()
1362 return -EINVAL; in usb4_port_sb_read()
1372 port->cap_usb4 + PORT_CS_1, 1); in usb4_port_sb_read()
1376 ret = usb4_port_wait_for_bit(port, port->cap_usb4 + PORT_CS_1, in usb4_port_sb_read()
1382 port->cap_usb4 + PORT_CS_1, 1); in usb4_port_sb_read()
1387 return -ENODEV; in usb4_port_sb_read()
1389 return -EIO; in usb4_port_sb_read()
1395 * usb4_port_sb_write() - Write to sideband register
1405 * Return: %0 on success, negative errno otherwise.
1414 if (!port->cap_usb4) in usb4_port_sb_write()
1415 return -EINVAL; in usb4_port_sb_write()
1432 port->cap_usb4 + PORT_CS_1, 1); in usb4_port_sb_write()
1436 ret = usb4_port_wait_for_bit(port, port->cap_usb4 + PORT_CS_1, in usb4_port_sb_write()
1442 port->cap_usb4 + PORT_CS_1, 1); in usb4_port_sb_write()
1447 return -ENODEV; in usb4_port_sb_write()
1449 return -EIO; in usb4_port_sb_write()
1460 return -EAGAIN; in usb4_port_sb_opcode_err_to_errno()
1462 return -EOPNOTSUPP; in usb4_port_sb_opcode_err_to_errno()
1464 return -EIO; in usb4_port_sb_opcode_err_to_errno()
1496 return -ETIMEDOUT; in usb4_port_sb_op()
1515 * usb4_port_router_offline() - Put the USB4 port to offline mode
1522 * Return: %0 on success, negative errno otherwise.
1530 * usb4_port_router_online() - Put the USB4 port back online
1535 * Return: %0 on success, negative errno otherwise.
1543 * usb4_port_enumerate_retimers() - Send RT broadcast transaction
1549 * Return: %0 on success, negative errno otherwise.
1561 * usb4_port_clx_supported() - Check if CLx is supported by the link
1575 port->cap_usb4 + PORT_CS_18, 1); in usb4_port_clx_supported()
1583 * usb4_port_asym_supported() - If the port supports asymmetric link
1594 if (!port->cap_usb4) in usb4_port_asym_supported()
1597 if (tb_port_read(port, &val, TB_CFG_PORT, port->cap_usb4 + PORT_CS_18, 1)) in usb4_port_asym_supported()
1604 * usb4_port_asym_set_link_width() - Set link width to asymmetric or symmetric
1611 * Return: %0 on success, negative errno otherwise.
1618 if (!port->cap_phy) in usb4_port_asym_set_link_width()
1619 return -EINVAL; in usb4_port_asym_set_link_width()
1622 port->cap_phy + LANE_ADP_CS_1, 1); in usb4_port_asym_set_link_width()
1641 return -EINVAL; in usb4_port_asym_set_link_width()
1645 port->cap_phy + LANE_ADP_CS_1, 1); in usb4_port_asym_set_link_width()
1649 * usb4_port_asym_start() - Start symmetry change and wait for completion
1657 * * %0 - Symmetry change was successful.
1658 * * %-ETIMEDOUT - Timeout occurred.
1659 * * Negative errno - Other failure occurred.
1667 port->cap_usb4 + PORT_CS_19, 1); in usb4_port_asym_start()
1675 port->cap_usb4 + PORT_CS_19, 1); in usb4_port_asym_start()
1683 ret = usb4_port_wait_for_bit(port, port->cap_usb4 + PORT_CS_19, in usb4_port_asym_start()
1690 return usb4_port_wait_for_bit(port, port->cap_usb4 + PORT_CS_18, in usb4_port_asym_start()
1695 * usb4_port_margining_caps() - Read USB4 port margining capabilities
1704 * Return: %0 on success, negative errno otherwise.
1721 * usb4_port_hw_margin() - Run hardware lane margining on port
1732 * Return: %0 on success, negative errno otherwise.
1742 return -EINVAL; in usb4_port_hw_margin()
1744 val = params->lanes; in usb4_port_hw_margin()
1745 if (params->time) in usb4_port_hw_margin()
1747 if (params->right_high || params->upper_eye) in usb4_port_hw_margin()
1749 if (params->ber_level) in usb4_port_hw_margin()
1750 val |= FIELD_PREP(USB4_MARGIN_HW_BER_MASK, params->ber_level); in usb4_port_hw_margin()
1751 if (params->optional_voltage_offset_range) in usb4_port_hw_margin()
1769 * usb4_port_sw_margin() - Run software lane margining on port
1779 * Return: %0 on success, negative errno otherwise.
1789 return -EINVAL; in usb4_port_sw_margin()
1791 val = params->lanes; in usb4_port_sw_margin()
1792 if (params->time) in usb4_port_sw_margin()
1794 if (params->optional_voltage_offset_range) in usb4_port_sw_margin()
1796 if (params->right_high) in usb4_port_sw_margin()
1798 if (params->upper_eye) in usb4_port_sw_margin()
1800 val |= FIELD_PREP(USB4_MARGIN_SW_COUNTER_MASK, params->error_counter); in usb4_port_sw_margin()
1801 val |= FIELD_PREP(USB4_MARGIN_SW_VT_MASK, params->voltage_time_offset); in usb4_port_sw_margin()
1819 * usb4_port_sw_margin_errors() - Read the software margining error counters
1827 * Return: %0 on success, negative errno otherwise.
1852 * usb4_port_retimer_set_inbound_sbtx() - Enable sideband channel transactions
1859 * Return: %0 on success, negative errno otherwise.
1868 if (ret != -ENODEV) in usb4_port_retimer_set_inbound_sbtx()
1881 * usb4_port_retimer_unset_inbound_sbtx() - Disable sideband channel transactions
1888 * Return: %0 on success, negative errno otherwise.
1897 * usb4_port_retimer_is_last() - Is the retimer last on-board retimer
1902 * * %1 - Retimer at @index is the last one (connected directly to the
1903 * Type-C port).
1904 * * %0 - Retimer at @index is not the last one.
1905 * * %-ENODEV - Retimer is not present.
1906 * * Negative errno - Other failure occurred.
1924 * usb4_port_retimer_is_cable() - Is the retimer cable retimer
1929 * * %1 - Retimer at @index is the last cable retimer.
1930 * * %0 - Retimer at @index is on-board retimer.
1931 * * %-ENODEV - Retimer is not present.
1932 * * Negative errno - Other failure occurred.
1950 * usb4_port_retimer_nvm_sector_size() - Read retimer NVM sector size
1960 * * %-ENODEV - If there is no retimer at @index.
1961 * * Negative errno - In case of an error.
1979 * usb4_port_retimer_nvm_set_offset() - Set NVM write offset
1987 * Return: %0 on success, negative errno otherwise.
2018 struct tb_port *port = info->port; in usb4_port_retimer_nvm_write_next_block()
2019 u8 index = info->index; in usb4_port_retimer_nvm_write_next_block()
2032 * usb4_port_retimer_nvm_write() - Write to retimer NVM
2043 * * %0 - If the data was written successfully.
2044 * * %-ENODEV - If there is no retimer at @index.
2045 * * Negative errno - In case of an error.
2062 * usb4_port_retimer_nvm_authenticate() - Start retimer NVM upgrade
2072 * Return: %0 on success, negative errno otherwise.
2089 * usb4_port_retimer_nvm_authenticate_status() - Read status of NVM upgrade
2099 * status read fails, returns negative errno.
2118 case -EAGAIN: in usb4_port_retimer_nvm_authenticate_status()
2137 struct tb_port *port = info->port; in usb4_port_retimer_nvm_read_block()
2138 u8 index = info->index; in usb4_port_retimer_nvm_read_block()
2160 * usb4_port_retimer_nvm_read() - Read contents of retimer NVM
2170 * * %0 - If the read was successful.
2171 * * %-ENODEV - If there is no retimer at @index.
2172 * * Negative errno - In case of an error.
2187 if (port->max_bw) in usb4_usb3_port_max_bandwidth()
2188 return min(bw, port->max_bw); in usb4_usb3_port_max_bandwidth()
2193 * usb4_usb3_port_max_link_rate() - Maximum supported USB3 link rate
2197 * Negative errno in case of an error.
2205 return -EINVAL; in usb4_usb3_port_max_link_rate()
2208 port->cap_adap + ADP_USB3_CS_4, 1); in usb4_usb3_port_max_link_rate()
2224 return -EINVAL; in usb4_usb3_port_cm_request()
2225 if (tb_route(port->sw)) in usb4_usb3_port_cm_request()
2226 return -EINVAL; in usb4_usb3_port_cm_request()
2229 port->cap_adap + ADP_USB3_CS_2, 1); in usb4_usb3_port_cm_request()
2239 port->cap_adap + ADP_USB3_CS_2, 1); in usb4_usb3_port_cm_request()
2248 return usb4_port_wait_for_bit(port, port->cap_adap + ADP_USB3_CS_1, in usb4_usb3_port_cm_request()
2275 /* 1 uframe is 1/8 ms (125 us) -> 1 / 8000 s */ in mbps_to_usb3_bw()
2288 port->cap_adap + ADP_USB3_CS_2, 1); in usb4_usb3_port_read_allocated_bandwidth()
2293 port->cap_adap + ADP_USB3_CS_3, 1); in usb4_usb3_port_read_allocated_bandwidth()
2309 * usb4_usb3_port_allocated_bandwidth() - Bandwidth allocated for USB3
2317 * Return: %0 on success, negative errno otherwise.
2343 port->cap_adap + ADP_USB3_CS_1, 1); in usb4_usb3_port_read_consumed_bandwidth()
2348 port->cap_adap + ADP_USB3_CS_3, 1); in usb4_usb3_port_read_consumed_bandwidth()
2380 return -EINVAL; in usb4_usb3_port_write_allocated_bandwidth()
2383 port->cap_adap + ADP_USB3_CS_3, 1); in usb4_usb3_port_write_allocated_bandwidth()
2393 port->cap_adap + ADP_USB3_CS_2, 1); in usb4_usb3_port_write_allocated_bandwidth()
2402 port->cap_adap + ADP_USB3_CS_2, 1); in usb4_usb3_port_write_allocated_bandwidth()
2406 * usb4_usb3_port_allocate_bandwidth() - Allocate bandwidth for USB3
2419 * Return: %0 on success, negative errno otherwise.
2453 * usb4_usb3_port_release_bandwidth() - Release allocated USB3 bandwidth
2461 * Return: %0 on success, negative errno otherwise.
2503 if (!tb_switch_is_usb4(port->sw)) in is_usb4_dpin()
2509 * usb4_dp_port_set_cm_id() - Assign CM ID to the DP IN adapter
2516 * * %0 - On success.
2517 * * %-EOPNOTSUPP - If the @port does not support this.
2518 * * Negative errno - Another error occurred.
2526 return -EOPNOTSUPP; in usb4_dp_port_set_cm_id()
2529 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_cm_id()
2537 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_cm_id()
2541 * usb4_dp_port_bandwidth_mode_supported() - Is the bandwidth allocation mode
2559 port->cap_adap + DP_LOCAL_CAP, 1); in usb4_dp_port_bandwidth_mode_supported()
2567 * usb4_dp_port_bandwidth_mode_enabled() - Is the bandwidth allocation mode
2585 port->cap_adap + ADP_DP_CS_8, 1); in usb4_dp_port_bandwidth_mode_enabled()
2593 * usb4_dp_port_set_cm_bandwidth_mode_supported() - Set/clear CM support for
2602 * * %0 - On success.
2603 * * %-EOPNOTSUPP - If the passed IN adapter does not support this.
2604 * * Negative errno - Another error occurred.
2613 return -EOPNOTSUPP; in usb4_dp_port_set_cm_bandwidth_mode_supported()
2616 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_cm_bandwidth_mode_supported()
2626 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_cm_bandwidth_mode_supported()
2630 * usb4_dp_port_group_id() - Return Group ID assigned for the adapter
2638 * * %-EOPNOTSUPP - If adapter does not support setting GROUP_ID.
2639 * * Negative errno - Another error occurred.
2647 return -EOPNOTSUPP; in usb4_dp_port_group_id()
2650 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_group_id()
2658 * usb4_dp_port_set_group_id() - Set adapter Group ID
2665 * * %0 - On success.
2666 * * %-EOPNOTSUPP - If the adapter does not support this.
2667 * * Negative errno - Another error occurred.
2675 return -EOPNOTSUPP; in usb4_dp_port_set_group_id()
2678 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_group_id()
2686 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_group_id()
2690 * usb4_dp_port_nrd() - Read non-reduced rate and lanes
2692 * @rate: Non-reduced rate in Mb/s is placed here
2693 * @lanes: Non-reduced lanes are placed here
2695 * Reads the non-reduced rate and lanes from the DP IN adapter.
2698 * * %0 - On success.
2699 * * %-EOPNOTSUPP - If the adapter does not support this.
2700 * * Negative errno - Another error occurred.
2708 return -EOPNOTSUPP; in usb4_dp_port_nrd()
2711 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_nrd()
2748 * usb4_dp_port_set_nrd() - Set non-reduced rate and lanes
2750 * @rate: Non-reduced rate in Mb/s
2751 * @lanes: Non-reduced lanes
2754 * the non-reduced values for the DP IN adapter.
2757 * * %0 - On success.
2758 * * %-EOPNOTSUPP - If the adapter does not support this.
2759 * * Negative errno - Another error occurred.
2767 return -EOPNOTSUPP; in usb4_dp_port_set_nrd()
2770 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_nrd()
2792 return -EINVAL; in usb4_dp_port_set_nrd()
2807 return -EINVAL; in usb4_dp_port_set_nrd()
2811 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_nrd()
2815 * usb4_dp_port_granularity() - Return granularity for the bandwidth values
2822 * * %-EOPNOTSUPP - If the DP IN adapter does not support bandwidth
2824 * * Negative errno - Another error occurred.
2832 return -EOPNOTSUPP; in usb4_dp_port_granularity()
2835 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_granularity()
2851 return -EINVAL; in usb4_dp_port_granularity()
2855 * usb4_dp_port_set_granularity() - Set granularity for the bandwidth values
2863 * * %0 - On success.
2864 * * %-EOPNOTSUPP - If the adapter does not support this.
2865 * * Negative errno - Another error occurred.
2873 return -EOPNOTSUPP; in usb4_dp_port_set_granularity()
2876 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_granularity()
2893 return -EINVAL; in usb4_dp_port_set_granularity()
2897 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_granularity()
2901 * usb4_dp_port_set_estimated_bandwidth() - Set estimated bandwidth
2910 * * %0 - On success.
2911 * * %-EOPNOTSUPP - If the adapter does not support this.
2912 * * Negative errno - Another error occurred.
2920 return -EOPNOTSUPP; in usb4_dp_port_set_estimated_bandwidth()
2928 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_estimated_bandwidth()
2936 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_estimated_bandwidth()
2940 * usb4_dp_port_allocated_bandwidth() - Return allocated bandwidth
2946 * Return: Allocated bandwidth in Mb/s or negative errno in case of an error.
2954 return -EOPNOTSUPP; in usb4_dp_port_allocated_bandwidth()
2962 port->cap_adap + DP_STATUS, 1); in usb4_dp_port_allocated_bandwidth()
2978 port->cap_adap + ADP_DP_CS_2, 1); in __usb4_dp_port_set_cm_ack()
2988 port->cap_adap + ADP_DP_CS_2, 1); in __usb4_dp_port_set_cm_ack()
3010 port->cap_adap + ADP_DP_CS_8, 1); in usb4_dp_port_wait_and_clear_cm_ack()
3022 return -ETIMEDOUT; in usb4_dp_port_wait_and_clear_cm_ack()
3026 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_wait_and_clear_cm_ack()
3032 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_wait_and_clear_cm_ack()
3036 * usb4_dp_port_allocate_bandwidth() - Set allocated bandwidth
3043 * Return: %0 on success, negative errno otherwise.
3051 return -EOPNOTSUPP; in usb4_dp_port_allocate_bandwidth()
3059 port->cap_adap + DP_STATUS, 1); in usb4_dp_port_allocate_bandwidth()
3067 port->cap_adap + DP_STATUS, 1); in usb4_dp_port_allocate_bandwidth()
3079 * usb4_dp_port_requested_bandwidth() - Read requested bandwidth
3086 * * Requested bandwidth in Mb/s - On success.
3087 * * %-EOPNOTSUPP - If the adapter does not support bandwidth allocation
3089 * * %ENODATA - If there is no active bandwidth request from the graphics
3091 * * Negative errno - On failure.
3099 return -EOPNOTSUPP; in usb4_dp_port_requested_bandwidth()
3107 port->cap_adap + ADP_DP_CS_8, 1); in usb4_dp_port_requested_bandwidth()
3112 return -ENODATA; in usb4_dp_port_requested_bandwidth()
3118 * usb4_pci_port_set_ext_encapsulation() - Enable/disable extended encapsulation
3125 * Return: %0 on success, negative errno otherwise.
3133 return -EINVAL; in usb4_pci_port_set_ext_encapsulation()
3136 port->cap_adap + ADP_PCIE_CS_1, 1); in usb4_pci_port_set_ext_encapsulation()
3146 port->cap_adap + ADP_PCIE_CS_1, 1); in usb4_pci_port_set_ext_encapsulation()