Lines Matching +full:dma +full:- +full:router

1 // SPDX-License-Identifier: GPL-2.0
87 return -EOPNOTSUPP; in usb4_native_switch_op()
112 const struct tb_cm_ops *cm_ops = sw->tb->cm_ops; in __usb4_switch_op()
115 return -EINVAL; in __usb4_switch_op()
118 * If the connection manager implementation provides USB4 router in __usb4_switch_op()
122 if (cm_ops->usb4_switch_op) { in __usb4_switch_op()
125 ret = cm_ops->usb4_switch_op(sw, opcode, metadata, status, in __usb4_switch_op()
128 if (ret != -EOPNOTSUPP) in __usb4_switch_op()
133 * router operation instead. in __usb4_switch_op()
157 * usb4_switch_check_wakes() - Check for wakes and notify PM core about them
158 * @sw: Router whose wakes to check
186 if (!port->cap_usb4) in usb4_switch_check_wakes()
190 port->cap_usb4 + PORT_CS_18, 1)) in usb4_switch_check_wakes()
201 usb4 = port->usb4; in usb4_switch_check_wakes()
202 if (device_may_wakeup(&usb4->dev) && wakeup_usb4) in usb4_switch_check_wakes()
203 pm_wakeup_event(&usb4->dev, 0); in usb4_switch_check_wakes()
209 pm_wakeup_event(&sw->dev, 0); in usb4_switch_check_wakes()
216 if (!port->cap_usb4) in link_is_usb4()
220 port->cap_usb4 + PORT_CS_18, 1)) in link_is_usb4()
227 * usb4_switch_setup() - Additional setup for USB4 device
228 * @sw: USB4 router to setup
237 * This does not set the configuration valid bit of the router. To do
256 sw->link_usb4 = link_is_usb4(down); in usb4_switch_setup()
257 tb_sw_dbg(sw, "link: %s\n", sw->link_usb4 ? "USB4" : "TBT"); in usb4_switch_setup()
269 if (tb_acpi_may_tunnel_usb3() && sw->link_usb4 && in usb4_switch_setup()
276 * Only enable PCIe tunneling if the parent router supports it in usb4_switch_setup()
298 * usb4_switch_configuration_valid() - Set tunneling configuration to be valid
299 * @sw: USB4 router
301 * Sets configuration valid bit for the router. Must be called before
302 * any tunnels can be set through the router and after
331 * usb4_switch_read_uid() - Read UID from USB4 router
332 * @sw: USB4 router
335 * Reads 64-bit UID from USB4 router config space.
360 return status ? -EIO : 0; in usb4_switch_drom_read_block()
364 * usb4_switch_drom_read() - Read arbitrary bytes from USB4 router DROM
365 * @sw: USB4 router
370 * Uses USB4 router operations to read router DROM. For devices this
371 * should always work but for hosts it may return %-EOPNOTSUPP in which
372 * case the host router does not have DROM.
382 * usb4_switch_lane_bonding_possible() - Are conditions met for lane bonding
383 * @sw: USB4 router
386 * established with the upstream router. Call only for device routers.
395 ret = tb_port_read(up, &val, TB_CFG_PORT, up->cap_usb4 + PORT_CS_18, 1); in usb4_switch_lane_bonding_possible()
403 * usb4_switch_set_wake() - Enabled/disable wake
404 * @sw: USB4 router
407 * Enables/disables router to wake up from sleep.
427 if (!port->cap_usb4) in usb4_switch_set_wake()
431 port->cap_usb4 + PORT_CS_19, 1); in usb4_switch_set_wake()
441 usb4 = port->usb4; in usb4_switch_set_wake()
444 device_may_wakeup(&usb4->dev)) && !configured) in usb4_switch_set_wake()
447 device_may_wakeup(&usb4->dev)) && configured) in usb4_switch_set_wake()
454 port->cap_usb4 + PORT_CS_19, 1); in usb4_switch_set_wake()
460 * Enable wakes from PCIe, USB 3.x and DP on this router. Only in usb4_switch_set_wake()
485 * usb4_switch_set_sleep() - Prepare the router to enter sleep
486 * @sw: USB4 router
488 * Sets sleep bit for the router. Returns when the router sleep ready
512 * usb4_switch_nvm_sector_size() - Return router NVM sector size
513 * @sw: USB4 router
515 * If the router supports NVM operations this function returns the NVM
517 * %-EOPNOTSUPP.
531 return status == 0x2 ? -EOPNOTSUPP : -EIO; in usb4_switch_nvm_sector_size()
554 return status ? -EIO : 0; in usb4_switch_nvm_read_block()
558 * usb4_switch_nvm_read() - Read arbitrary bytes from router NVM
559 * @sw: USB4 router
564 * Reads NVM contents of the router. If NVM is not supported returns
565 * %-EOPNOTSUPP.
575 * usb4_switch_nvm_set_offset() - Set NVM write offset
576 * @sw: USB4 router
599 return status ? -EIO : 0; in usb4_switch_nvm_set_offset()
614 return status ? -EIO : 0; in usb4_switch_nvm_write_next_block()
618 * usb4_switch_nvm_write() - Write to the router NVM
619 * @sw: USB4 router
624 * Writes @buf to the router NVM using USB4 router operations. If NVM
625 * write is not supported returns %-EOPNOTSUPP.
641 * usb4_switch_nvm_authenticate() - Authenticate new NVM
642 * @sw: USB4 router
645 * function triggers NVM authentication process. The router gets power
651 * first router operation to avoid the status being lost.
660 * The router is power cycled once NVM_AUTH is started so it is in usb4_switch_nvm_authenticate()
663 case -EACCES: in usb4_switch_nvm_authenticate()
664 case -ENOTCONN: in usb4_switch_nvm_authenticate()
665 case -ETIMEDOUT: in usb4_switch_nvm_authenticate()
674 * usb4_switch_nvm_authenticate_status() - Read status of last NVM authenticate
675 * @sw: USB4 router
679 * authenticate router operation. If there is status then %0 is returned
683 * Must be called before any other router operation.
687 const struct tb_cm_ops *cm_ops = sw->tb->cm_ops; in usb4_switch_nvm_authenticate_status()
692 if (cm_ops->usb4_switch_nvm_authenticate_status) { in usb4_switch_nvm_authenticate_status()
693 ret = cm_ops->usb4_switch_nvm_authenticate_status(sw, status); in usb4_switch_nvm_authenticate_status()
694 if (ret != -EOPNOTSUPP) in usb4_switch_nvm_authenticate_status()
706 return -EBUSY; in usb4_switch_nvm_authenticate_status()
708 return -EOPNOTSUPP; in usb4_switch_nvm_authenticate_status()
720 * usb4_switch_credits_init() - Read buffer allocation parameters
721 * @sw: USB4 router
724 * allocation fields accordingly. Specifically @sw->credits_allocation
744 return -EIO; in usb4_switch_credits_init()
748 return -EMSGSIZE; in usb4_switch_credits_init()
750 max_usb3 = -1; in usb4_switch_credits_init()
751 min_dp_aux = -1; in usb4_switch_credits_init()
752 min_dp_main = -1; in usb4_switch_credits_init()
753 max_pcie = -1; in usb4_switch_credits_init()
754 max_dma = -1; in usb4_switch_credits_init()
782 tb_sw_dbg(sw, " DMA: %u\n", value); in usb4_switch_credits_init()
794 * issues, log a warning and fall back using the hard-coded in usb4_switch_credits_init()
798 /* Host router must report baMaxHI */ in usb4_switch_credits_init()
800 tb_sw_warn(sw, "host router is missing baMaxHI\n"); in usb4_switch_credits_init()
842 sw->credit_allocation = true; in usb4_switch_credits_init()
844 sw->max_usb3_credits = max_usb3; in usb4_switch_credits_init()
846 sw->min_dp_aux_credits = min_dp_aux; in usb4_switch_credits_init()
848 sw->min_dp_main_credits = min_dp_main; in usb4_switch_credits_init()
850 sw->max_pcie_credits = max_pcie; in usb4_switch_credits_init()
852 sw->max_dma_credits = max_dma; in usb4_switch_credits_init()
857 return -EINVAL; in usb4_switch_credits_init()
861 * usb4_switch_query_dp_resource() - Query availability of DP IN resource
862 * @sw: USB4 router
871 u32 metadata = in->port; in usb4_switch_query_dp_resource()
881 if (ret == -EOPNOTSUPP) in usb4_switch_query_dp_resource()
890 * usb4_switch_alloc_dp_resource() - Allocate DP IN resource
891 * @sw: USB4 router
894 * Allocates DP IN resource for DP tunneling using USB4 router
896 * returns negative errno, in particular %-EBUSY if the resource is
901 u32 metadata = in->port; in usb4_switch_alloc_dp_resource()
907 if (ret == -EOPNOTSUPP) in usb4_switch_alloc_dp_resource()
912 return status ? -EBUSY : 0; in usb4_switch_alloc_dp_resource()
916 * usb4_switch_dealloc_dp_resource() - Releases allocated DP IN resource
917 * @sw: USB4 router
924 u32 metadata = in->port; in usb4_switch_dealloc_dp_resource()
930 if (ret == -EOPNOTSUPP) in usb4_switch_dealloc_dp_resource()
935 return status ? -EIO : 0; in usb4_switch_dealloc_dp_resource()
949 if (!p->link_nr) { in usb4_port_idx()
960 * usb4_switch_map_pcie_down() - Map USB4 port to a PCIe downstream adapter
961 * @sw: USB4 router
991 * usb4_switch_map_usb3_down() - Map USB4 port to a USB3 downstream adapter
992 * @sw: USB4 router
1022 * usb4_switch_add_ports() - Add USB4 ports for this router
1023 * @sw: USB4 router
1025 * For USB4 router finds all USB4 ports and registers devices for each.
1026 * Can be called to any router.
1042 if (!port->cap_usb4) in usb4_switch_add_ports()
1051 port->usb4 = usb4; in usb4_switch_add_ports()
1058 * usb4_switch_remove_ports() - Removes USB4 ports from this router
1059 * @sw: USB4 router
1068 if (port->usb4) { in usb4_switch_remove_ports()
1069 usb4_port_device_remove(port->usb4); in usb4_switch_remove_ports()
1070 port->usb4 = NULL; in usb4_switch_remove_ports()
1076 * usb4_port_unlock() - Unlock USB4 downstream port
1080 * access the router below this port.
1096 * usb4_port_hotplug_enable() - Enables hotplug for a port
1100 * to be used on lane, DP-IN, and DP-OUT adapters.
1116 * usb4_port_reset() - Issue downstream port reset
1126 if (!port->cap_usb4) in usb4_port_reset()
1127 return -EINVAL; in usb4_port_reset()
1130 port->cap_usb4 + PORT_CS_19, 1); in usb4_port_reset()
1137 port->cap_usb4 + PORT_CS_19, 1); in usb4_port_reset()
1144 port->cap_usb4 + PORT_CS_19, 1); in usb4_port_reset()
1151 port->cap_usb4 + PORT_CS_19, 1); in usb4_port_reset()
1159 if (!port->cap_usb4) in usb4_port_set_configured()
1160 return -EINVAL; in usb4_port_set_configured()
1163 port->cap_usb4 + PORT_CS_19, 1); in usb4_port_set_configured()
1173 port->cap_usb4 + PORT_CS_19, 1); in usb4_port_set_configured()
1177 * usb4_port_configure() - Set USB4 port configured
1178 * @port: USB4 router
1188 * usb4_port_unconfigure() - Set USB4 port unconfigured
1189 * @port: USB4 router
1203 if (!port->cap_usb4) in usb4_set_xdomain_configured()
1204 return -EINVAL; in usb4_set_xdomain_configured()
1207 port->cap_usb4 + PORT_CS_19, 1); in usb4_set_xdomain_configured()
1217 port->cap_usb4 + PORT_CS_19, 1); in usb4_set_xdomain_configured()
1221 * usb4_port_configure_xdomain() - Configure port for XDomain
1230 xd->link_usb4 = link_is_usb4(port); in usb4_port_configure_xdomain()
1235 * usb4_port_unconfigure_xdomain() - Unconfigure port for XDomain
1264 return -ETIMEDOUT; in usb4_port_wait_for_bit()
1270 return -EINVAL; in usb4_port_read_data()
1272 return tb_port_read(port, data, TB_CFG_PORT, port->cap_usb4 + PORT_CS_2, in usb4_port_read_data()
1280 return -EINVAL; in usb4_port_write_data()
1282 return tb_port_write(port, data, TB_CFG_PORT, port->cap_usb4 + PORT_CS_2, in usb4_port_write_data()
1287 * usb4_port_sb_read() - Read from sideband register
1305 if (!port->cap_usb4) in usb4_port_sb_read()
1306 return -EINVAL; in usb4_port_sb_read()
1316 port->cap_usb4 + PORT_CS_1, 1); in usb4_port_sb_read()
1320 ret = usb4_port_wait_for_bit(port, port->cap_usb4 + PORT_CS_1, in usb4_port_sb_read()
1326 port->cap_usb4 + PORT_CS_1, 1); in usb4_port_sb_read()
1331 return -ENODEV; in usb4_port_sb_read()
1333 return -EIO; in usb4_port_sb_read()
1339 * usb4_port_sb_write() - Write to sideband register
1357 if (!port->cap_usb4) in usb4_port_sb_write()
1358 return -EINVAL; in usb4_port_sb_write()
1375 port->cap_usb4 + PORT_CS_1, 1); in usb4_port_sb_write()
1379 ret = usb4_port_wait_for_bit(port, port->cap_usb4 + PORT_CS_1, in usb4_port_sb_write()
1385 port->cap_usb4 + PORT_CS_1, 1); in usb4_port_sb_write()
1390 return -ENODEV; in usb4_port_sb_write()
1392 return -EIO; in usb4_port_sb_write()
1403 return -EAGAIN; in usb4_port_sb_opcode_err_to_errno()
1405 return -EOPNOTSUPP; in usb4_port_sb_opcode_err_to_errno()
1407 return -EIO; in usb4_port_sb_opcode_err_to_errno()
1439 return -ETIMEDOUT; in usb4_port_sb_op()
1458 * usb4_port_router_offline() - Put the USB4 port to offline mode
1474 * usb4_port_router_online() - Put the USB4 port back to online
1485 * usb4_port_enumerate_retimers() - Send RT broadcast transaction
1502 * usb4_port_clx_supported() - Check if CLx is supported by the link
1514 port->cap_usb4 + PORT_CS_18, 1); in usb4_port_clx_supported()
1522 * usb4_port_asym_supported() - If the port supports asymmetric link
1532 if (!port->cap_usb4) in usb4_port_asym_supported()
1535 if (tb_port_read(port, &val, TB_CFG_PORT, port->cap_usb4 + PORT_CS_18, 1)) in usb4_port_asym_supported()
1542 * usb4_port_asym_set_link_width() - Set link width to asymmetric or symmetric
1554 if (!port->cap_phy) in usb4_port_asym_set_link_width()
1555 return -EINVAL; in usb4_port_asym_set_link_width()
1558 port->cap_phy + LANE_ADP_CS_1, 1); in usb4_port_asym_set_link_width()
1577 return -EINVAL; in usb4_port_asym_set_link_width()
1581 port->cap_phy + LANE_ADP_CS_1, 1); in usb4_port_asym_set_link_width()
1585 * usb4_port_asym_start() - Start symmetry change and wait for completion
1592 * Returns %0 in case of success, %-ETIMEDOUT if case of timeout or
1601 port->cap_usb4 + PORT_CS_19, 1); in usb4_port_asym_start()
1609 port->cap_usb4 + PORT_CS_19, 1); in usb4_port_asym_start()
1617 ret = usb4_port_wait_for_bit(port, port->cap_usb4 + PORT_CS_19, in usb4_port_asym_start()
1624 return usb4_port_wait_for_bit(port, port->cap_usb4 + PORT_CS_18, in usb4_port_asym_start()
1629 * usb4_port_margining_caps() - Read USB4 port marginig capabilities
1653 * usb4_port_hw_margin() - Run hardware lane margining on port
1672 return -EINVAL; in usb4_port_hw_margin()
1674 val = params->lanes; in usb4_port_hw_margin()
1675 if (params->time) in usb4_port_hw_margin()
1677 if (params->right_high || params->upper_eye) in usb4_port_hw_margin()
1679 if (params->ber_level) in usb4_port_hw_margin()
1680 val |= FIELD_PREP(USB4_MARGIN_HW_BER_MASK, params->ber_level); in usb4_port_hw_margin()
1681 if (params->optional_voltage_offset_range) in usb4_port_hw_margin()
1699 * usb4_port_sw_margin() - Run software lane margining on port
1718 return -EINVAL; in usb4_port_sw_margin()
1720 val = params->lanes; in usb4_port_sw_margin()
1721 if (params->time) in usb4_port_sw_margin()
1723 if (params->optional_voltage_offset_range) in usb4_port_sw_margin()
1725 if (params->right_high) in usb4_port_sw_margin()
1727 if (params->upper_eye) in usb4_port_sw_margin()
1729 val |= FIELD_PREP(USB4_MARGIN_SW_COUNTER_MASK, params->error_counter); in usb4_port_sw_margin()
1730 val |= FIELD_PREP(USB4_MARGIN_SW_VT_MASK, params->voltage_time_offset); in usb4_port_sw_margin()
1748 * usb4_port_sw_margin_errors() - Read the software margining error counters
1780 * usb4_port_retimer_set_inbound_sbtx() - Enable sideband channel transactions
1794 if (ret != -ENODEV) in usb4_port_retimer_set_inbound_sbtx()
1807 * usb4_port_retimer_unset_inbound_sbtx() - Disable sideband channel transactions
1821 * usb4_port_retimer_is_last() - Is the retimer last on-board retimer
1826 * Type-C port) this function returns %1. If it is not returns %0. If
1827 * the retimer is not present returns %-ENODEV. Otherwise returns
1846 * usb4_port_retimer_is_cable() - Is the retimer cable retimer
1851 * %1 and %0 if it is on-board retimer. In case a retimer is not present
1852 * at @index returns %-ENODEV. Otherwise returns negative errno.
1870 * usb4_port_retimer_nvm_sector_size() - Read retimer NVM sector size
1877 * in case of error. Specifically returns %-ENODEV if there is no
1896 * usb4_port_retimer_nvm_set_offset() - Set NVM write offset
1935 struct tb_port *port = info->port; in usb4_port_retimer_nvm_write_next_block()
1936 u8 index = info->index; in usb4_port_retimer_nvm_write_next_block()
1949 * usb4_port_retimer_nvm_write() - Write to retimer NVM
1958 * errno in case of failure. Specifically returns %-ENODEV if there is
1976 * usb4_port_retimer_nvm_authenticate() - Start retimer NVM upgrade
2001 * usb4_port_retimer_nvm_authenticate_status() - Read status of NVM upgrade
2030 case -EAGAIN: in usb4_port_retimer_nvm_authenticate_status()
2049 struct tb_port *port = info->port; in usb4_port_retimer_nvm_read_block()
2050 u8 index = info->index; in usb4_port_retimer_nvm_read_block()
2072 * usb4_port_retimer_nvm_read() - Read contents of retimer NVM
2081 * Specifically returns %-ENODEV if there is no retimer at @index.
2096 if (port->max_bw) in usb4_usb3_port_max_bandwidth()
2097 return min(bw, port->max_bw); in usb4_usb3_port_max_bandwidth()
2102 * usb4_usb3_port_max_link_rate() - Maximum support USB3 link rate
2114 return -EINVAL; in usb4_usb3_port_max_link_rate()
2117 port->cap_adap + ADP_USB3_CS_4, 1); in usb4_usb3_port_max_link_rate()
2133 return -EINVAL; in usb4_usb3_port_cm_request()
2134 if (tb_route(port->sw)) in usb4_usb3_port_cm_request()
2135 return -EINVAL; in usb4_usb3_port_cm_request()
2138 port->cap_adap + ADP_USB3_CS_2, 1); in usb4_usb3_port_cm_request()
2148 port->cap_adap + ADP_USB3_CS_2, 1); in usb4_usb3_port_cm_request()
2157 return usb4_port_wait_for_bit(port, port->cap_adap + ADP_USB3_CS_1, in usb4_usb3_port_cm_request()
2184 /* 1 uframe is 1/8 ms (125 us) -> 1 / 8000 s */ in mbps_to_usb3_bw()
2197 port->cap_adap + ADP_USB3_CS_2, 1); in usb4_usb3_port_read_allocated_bandwidth()
2202 port->cap_adap + ADP_USB3_CS_3, 1); in usb4_usb3_port_read_allocated_bandwidth()
2218 * usb4_usb3_port_allocated_bandwidth() - Bandwidth allocated for USB3
2251 port->cap_adap + ADP_USB3_CS_1, 1); in usb4_usb3_port_read_consumed_bandwidth()
2256 port->cap_adap + ADP_USB3_CS_3, 1); in usb4_usb3_port_read_consumed_bandwidth()
2288 return -EINVAL; in usb4_usb3_port_write_allocated_bandwidth()
2291 port->cap_adap + ADP_USB3_CS_3, 1); in usb4_usb3_port_write_allocated_bandwidth()
2301 port->cap_adap + ADP_USB3_CS_2, 1); in usb4_usb3_port_write_allocated_bandwidth()
2310 port->cap_adap + ADP_USB3_CS_2, 1); in usb4_usb3_port_write_allocated_bandwidth()
2314 * usb4_usb3_port_allocate_bandwidth() - Allocate bandwidth for USB3
2362 * usb4_usb3_port_release_bandwidth() - Release allocated USB3 bandwidth
2412 if (!tb_switch_is_usb4(port->sw)) in is_usb4_dpin()
2418 * usb4_dp_port_set_cm_id() - Assign CM ID to the DP IN adapter
2423 * otherwise. Speficially returns %-EOPNOTSUPP if the @port does not
2432 return -EOPNOTSUPP; in usb4_dp_port_set_cm_id()
2435 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_cm_id()
2443 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_cm_id()
2447 * usb4_dp_port_bandwidth_mode_supported() - Is the bandwidth allocation mode
2463 port->cap_adap + DP_LOCAL_CAP, 1); in usb4_dp_port_bandwidth_mode_supported()
2471 * usb4_dp_port_bandwidth_mode_enabled() - Is the bandwidth allocation mode
2487 port->cap_adap + ADP_DP_CS_8, 1); in usb4_dp_port_bandwidth_mode_enabled()
2495 * usb4_dp_port_set_cm_bandwidth_mode_supported() - Set/clear CM support for
2502 * otherwise. Specifically returns %-OPNOTSUPP if the passed in adapter
2512 return -EOPNOTSUPP; in usb4_dp_port_set_cm_bandwidth_mode_supported()
2515 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_cm_bandwidth_mode_supported()
2525 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_cm_bandwidth_mode_supported()
2529 * usb4_dp_port_group_id() - Return Group ID assigned for the adapter
2534 * %-EOPNOTSUPP is returned.
2542 return -EOPNOTSUPP; in usb4_dp_port_group_id()
2545 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_group_id()
2553 * usb4_dp_port_set_group_id() - Set adapter Group ID
2559 * Specifically returns %-EOPNOTSUPP if the adapter does not support
2568 return -EOPNOTSUPP; in usb4_dp_port_set_group_id()
2571 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_group_id()
2579 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_group_id()
2583 * usb4_dp_port_nrd() - Read non-reduced rate and lanes
2585 * @rate: Non-reduced rate in Mb/s is placed here
2586 * @lanes: Non-reduced lanes are placed here
2588 * Reads the non-reduced rate and lanes from the DP IN adapter. Returns
2590 * %-EOPNOTSUPP if the adapter does not support this.
2598 return -EOPNOTSUPP; in usb4_dp_port_nrd()
2601 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_nrd()
2638 * usb4_dp_port_set_nrd() - Set non-reduced rate and lanes
2640 * @rate: Non-reduced rate in Mb/s
2641 * @lanes: Non-reduced lanes
2644 * the non-reduced values for the DP IN adapter. Returns %0 in success
2646 * %-EOPNOTSUPP is returned.
2654 return -EOPNOTSUPP; in usb4_dp_port_set_nrd()
2657 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_nrd()
2679 return -EINVAL; in usb4_dp_port_set_nrd()
2694 return -EINVAL; in usb4_dp_port_set_nrd()
2698 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_nrd()
2702 * usb4_dp_port_granularity() - Return granularity for the bandwidth values
2706 * not support bandwidth allocation mode returns %-EOPNOTSUPP and negative
2715 return -EOPNOTSUPP; in usb4_dp_port_granularity()
2718 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_granularity()
2734 return -EINVAL; in usb4_dp_port_granularity()
2738 * usb4_dp_port_set_granularity() - Set granularity for the bandwidth values
2744 * adapter does not support this %-EOPNOTSUPP is returned.
2752 return -EOPNOTSUPP; in usb4_dp_port_set_granularity()
2755 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_granularity()
2772 return -EINVAL; in usb4_dp_port_set_granularity()
2776 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_granularity()
2780 * usb4_dp_port_set_estimated_bandwidth() - Set estimated bandwidth
2787 * and negative errno otherwise. Specifically returns %-EOPNOTSUPP if
2796 return -EOPNOTSUPP; in usb4_dp_port_set_estimated_bandwidth()
2804 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_estimated_bandwidth()
2812 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_set_estimated_bandwidth()
2816 * usb4_dp_port_allocated_bandwidth() - Return allocated bandwidth
2829 return -EOPNOTSUPP; in usb4_dp_port_allocated_bandwidth()
2837 port->cap_adap + DP_STATUS, 1); in usb4_dp_port_allocated_bandwidth()
2853 port->cap_adap + ADP_DP_CS_2, 1); in __usb4_dp_port_set_cm_ack()
2863 port->cap_adap + ADP_DP_CS_2, 1); in __usb4_dp_port_set_cm_ack()
2885 port->cap_adap + ADP_DP_CS_8, 1); in usb4_dp_port_wait_and_clear_cm_ack()
2897 return -ETIMEDOUT; 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()
2907 port->cap_adap + ADP_DP_CS_2, 1); in usb4_dp_port_wait_and_clear_cm_ack()
2911 * usb4_dp_port_allocate_bandwidth() - Set allocated bandwidth
2925 return -EOPNOTSUPP; in usb4_dp_port_allocate_bandwidth()
2933 port->cap_adap + DP_STATUS, 1); in usb4_dp_port_allocate_bandwidth()
2941 port->cap_adap + DP_STATUS, 1); in usb4_dp_port_allocate_bandwidth()
2953 * usb4_dp_port_requested_bandwidth() - Read requested bandwidth
2958 * error returns negative errno. Specifically returns %-EOPNOTSUPP if
2968 return -EOPNOTSUPP; in usb4_dp_port_requested_bandwidth()
2976 port->cap_adap + ADP_DP_CS_8, 1); in usb4_dp_port_requested_bandwidth()
2981 return -ENODATA; in usb4_dp_port_requested_bandwidth()
2987 * usb4_pci_port_set_ext_encapsulation() - Enable/disable extended encapsulation
3001 return -EINVAL; in usb4_pci_port_set_ext_encapsulation()
3004 port->cap_adap + ADP_PCIE_CS_1, 1); in usb4_pci_port_set_ext_encapsulation()
3014 port->cap_adap + ADP_PCIE_CS_1, 1); in usb4_pci_port_set_ext_encapsulation()