/openbmc/linux/drivers/gpu/drm/i915/display/ |
H A D | intel_dp_link_training.c | 365 const u8 link_status[DP_LINK_STATUS_SIZE], in intel_dp_get_lane_adjust_tx_ffe_preset() 372 tx_ffe = drm_dp_get_adjust_tx_ffe_preset(link_status, lane); in intel_dp_get_lane_adjust_tx_ffe_preset() 375 tx_ffe = max(tx_ffe, drm_dp_get_adjust_tx_ffe_preset(link_status, lane)); in intel_dp_get_lane_adjust_tx_ffe_preset() 385 const u8 link_status[DP_LINK_STATUS_SIZE], in intel_dp_get_lane_adjust_vswing_preemph() 396 v = drm_dp_get_adjust_request_voltage(link_status, lane); in intel_dp_get_lane_adjust_vswing_preemph() 397 p = drm_dp_get_adjust_request_pre_emphasis(link_status, lane); in intel_dp_get_lane_adjust_vswing_preemph() 400 v = max(v, drm_dp_get_adjust_request_voltage(link_status, lane)); in intel_dp_get_lane_adjust_vswing_preemph() 401 p = max(p, drm_dp_get_adjust_request_pre_emphasis(link_status, lane)); in intel_dp_get_lane_adjust_vswing_preemph() 421 const u8 link_status[DP_LINK_STATUS_SIZE], in intel_dp_get_lane_adjust_train() 426 dp_phy, link_status, lane); in intel_dp_get_lane_adjust_train() [all …]
|
H A D | intel_dp_link_training.h | 19 const u8 link_status[DP_LINK_STATUS_SIZE]); 34 const u8 link_status[DP_LINK_STATUS_SIZE]);
|
/openbmc/u-boot/drivers/video/rockchip/ |
H A D | rk_edp.c | 341 static u8 edp_link_status(const u8 *link_status, int r) in edp_link_status() argument 343 return link_status[r - DPCD_LANE0_1_STATUS]; in edp_link_status() 347 u8 *link_status) in rk_edp_dpcd_read_link_status() argument 349 return rk_edp_dpcd_read(edp->regs, DPCD_LANE0_1_STATUS, link_status, in rk_edp_dpcd_read_link_status() 353 static u8 edp_get_lane_status(const u8 *link_status, int lane) in edp_get_lane_status() argument 357 u8 l = edp_link_status(link_status, i); in edp_get_lane_status() 362 static int rk_edp_clock_recovery(const u8 *link_status, int lane_count) in rk_edp_clock_recovery() argument 368 lane_status = edp_get_lane_status(link_status, lane); in rk_edp_clock_recovery() 376 static int rk_edp_channel_eq(const u8 *link_status, int lane_count) in rk_edp_channel_eq() argument 382 lane_align = edp_link_status(link_status, in rk_edp_channel_eq() [all …]
|
/openbmc/linux/include/drm/display/ |
H A D | drm_dp_helper.h | 36 bool drm_dp_channel_eq_ok(const u8 link_status[DP_LINK_STATUS_SIZE], 38 bool drm_dp_clock_recovery_ok(const u8 link_status[DP_LINK_STATUS_SIZE], 40 u8 drm_dp_get_adjust_request_voltage(const u8 link_status[DP_LINK_STATUS_SIZE], 42 u8 drm_dp_get_adjust_request_pre_emphasis(const u8 link_status[DP_LINK_STATUS_SIZE], 44 u8 drm_dp_get_adjust_tx_ffe_preset(const u8 link_status[DP_LINK_STATUS_SIZE], 61 bool drm_dp_128b132b_lane_channel_eq_done(const u8 link_status[DP_LINK_STATUS_SIZE], 63 bool drm_dp_128b132b_lane_symbol_locked(const u8 link_status[DP_LINK_STATUS_SIZE], 65 bool drm_dp_128b132b_eq_interlane_align_done(const u8 link_status[DP_LINK_STATUS_SIZE]); 66 bool drm_dp_128b132b_cds_interlane_align_done(const u8 link_status[DP_LINK_STATUS_SIZE]); 67 bool drm_dp_128b132b_link_training_failed(const u8 link_status[DP_LINK_STATUS_SIZE]); [all …]
|
/openbmc/linux/drivers/gpu/drm/msm/dp/ |
H A D | dp_link.c | 46 u8 link_status[DP_LINK_STATUS_SIZE]; member 761 link->link_status); in dp_link_parse_sink_status_field() 866 drm_dp_get_adjust_request_voltage(link->link_status, 0), in dp_link_parse_vx_px() 867 drm_dp_get_adjust_request_voltage(link->link_status, 1), in dp_link_parse_vx_px() 868 drm_dp_get_adjust_request_voltage(link->link_status, 2), in dp_link_parse_vx_px() 869 drm_dp_get_adjust_request_voltage(link->link_status, 3)); in dp_link_parse_vx_px() 872 drm_dp_get_adjust_request_pre_emphasis(link->link_status, 0), in dp_link_parse_vx_px() 873 drm_dp_get_adjust_request_pre_emphasis(link->link_status, 1), in dp_link_parse_vx_px() 874 drm_dp_get_adjust_request_pre_emphasis(link->link_status, 2), in dp_link_parse_vx_px() 875 drm_dp_get_adjust_request_pre_emphasis(link->link_status, 3)); in dp_link_parse_vx_px() [all …]
|
H A D | dp_ctrl.c | 1071 u8 *link_status) in dp_ctrl_read_link_status() argument 1075 len = drm_dp_dpcd_read_link_status(ctrl->aux, link_status); in dp_ctrl_read_link_status() 1088 u8 link_status[DP_LINK_STATUS_SIZE]; in dp_ctrl_link_train_1() local 1110 ret = dp_ctrl_read_link_status(ctrl, link_status); in dp_ctrl_link_train_1() 1114 if (drm_dp_clock_recovery_ok(link_status, in dp_ctrl_link_train_1() 1130 dp_link_adjust_levels(ctrl->link, link_status); in dp_ctrl_link_train_1() 1196 u8 link_status[DP_LINK_STATUS_SIZE]; in dp_ctrl_link_train_2() local 1222 ret = dp_ctrl_read_link_status(ctrl, link_status); in dp_ctrl_link_train_2() 1226 if (drm_dp_channel_eq_ok(link_status, in dp_ctrl_link_train_2() 1231 dp_link_adjust_levels(ctrl->link, link_status); in dp_ctrl_link_train_2() [all …]
|
/openbmc/linux/drivers/gpu/drm/amd/amdgpu/ |
H A D | atombios_dp.c | 203 static void amdgpu_atombios_dp_get_adjust_train(const u8 link_status[DP_LINK_STATUS_SIZE], in amdgpu_atombios_dp_get_adjust_train() 212 u8 this_v = drm_dp_get_adjust_request_voltage(link_status, lane); in amdgpu_atombios_dp_get_adjust_train() 213 u8 this_p = drm_dp_get_adjust_request_pre_emphasis(link_status, lane); in amdgpu_atombios_dp_get_adjust_train() 458 u8 link_status[DP_LINK_STATUS_SIZE]; in amdgpu_atombios_dp_needs_link_train() local 461 if (drm_dp_dpcd_read_link_status(&amdgpu_connector->ddc_bus->aux, link_status) in amdgpu_atombios_dp_needs_link_train() 464 if (drm_dp_channel_eq_ok(link_status, dig->dp_lane_count)) in amdgpu_atombios_dp_needs_link_train() 497 u8 link_status[DP_LINK_STATUS_SIZE]; member 619 dp_info->link_status) <= 0) { in amdgpu_atombios_dp_link_train_cr() 624 if (drm_dp_clock_recovery_ok(dp_info->link_status, dp_info->dp_lane_count)) { in amdgpu_atombios_dp_link_train_cr() 650 amdgpu_atombios_dp_get_adjust_train(dp_info->link_status, dp_info->dp_lane_count, in amdgpu_atombios_dp_link_train_cr() [all …]
|
/openbmc/linux/drivers/gpu/drm/gma500/ |
H A D | cdv_intel_dp.c | 268 uint8_t link_status[DP_LINK_STATUS_SIZE]; member 1234 intel_dp->link_status, in cdv_intel_dp_get_link_status() 1239 cdv_intel_dp_link_status(uint8_t link_status[DP_LINK_STATUS_SIZE], in cdv_intel_dp_link_status() 1242 return link_status[r - DP_LANE0_1_STATUS]; in cdv_intel_dp_link_status() 1246 cdv_intel_get_adjust_request_voltage(uint8_t link_status[DP_LINK_STATUS_SIZE], in cdv_intel_get_adjust_request_voltage() 1253 uint8_t l = cdv_intel_dp_link_status(link_status, i); in cdv_intel_get_adjust_request_voltage() 1259 cdv_intel_get_adjust_request_pre_emphasis(uint8_t link_status[DP_LINK_STATUS_SIZE], in cdv_intel_get_adjust_request_pre_emphasis() 1266 uint8_t l = cdv_intel_dp_link_status(link_status, i); in cdv_intel_get_adjust_request_pre_emphasis() 1282 uint8_t this_v = cdv_intel_get_adjust_request_voltage(intel_dp->link_status, lane); in cdv_intel_get_adjust_train() 1283 uint8_t this_p = cdv_intel_get_adjust_request_pre_emphasis(intel_dp->link_status, lane); in cdv_intel_get_adjust_train() [all …]
|
/openbmc/linux/drivers/gpu/drm/radeon/ |
H A D | atombios_dp.c | 257 static void dp_get_adjust_train(const u8 link_status[DP_LINK_STATUS_SIZE], in dp_get_adjust_train() 266 u8 this_v = drm_dp_get_adjust_request_voltage(link_status, lane); in dp_get_adjust_train() 267 u8 this_p = drm_dp_get_adjust_request_pre_emphasis(link_status, lane); in dp_get_adjust_train() 506 u8 link_status[DP_LINK_STATUS_SIZE]; in radeon_dp_needs_link_train() local 509 if (drm_dp_dpcd_read_link_status(&radeon_connector->ddc_bus->aux, link_status) in radeon_dp_needs_link_train() 512 if (drm_dp_channel_eq_ok(link_status, dig->dp_lane_count)) in radeon_dp_needs_link_train() 547 u8 link_status[DP_LINK_STATUS_SIZE]; member 686 dp_info->link_status) <= 0) { in radeon_dp_link_train_cr() 691 if (drm_dp_clock_recovery_ok(dp_info->link_status, dp_info->dp_lane_count)) { in radeon_dp_link_train_cr() 717 dp_get_adjust_train(dp_info->link_status, dp_info->dp_lane_count, dp_info->train_set); in radeon_dp_link_train_cr() [all …]
|
/openbmc/google-misc/subprojects/ncsid/src/platforms/nemora/portable/ |
H A D | ncsi_server.c | 167 const ncsi_link_status_t* link_status) { in ncsi_build_link_status_ack() argument 173 memcpy(&link_status_response->link_status, link_status, in ncsi_build_link_status_ack() 174 sizeof(link_status_response->link_status)); in ncsi_build_link_status_ack()
|
/openbmc/linux/drivers/gpu/drm/display/ |
H A D | drm_dp_helper.c | 73 static u8 dp_link_status(const u8 link_status[DP_LINK_STATUS_SIZE], int r) in dp_link_status() 75 return link_status[r - DP_LANE0_1_STATUS]; in dp_link_status() 78 static u8 dp_get_lane_status(const u8 link_status[DP_LINK_STATUS_SIZE], in dp_get_lane_status() 83 u8 l = dp_link_status(link_status, i); in dp_get_lane_status() 88 bool drm_dp_channel_eq_ok(const u8 link_status[DP_LINK_STATUS_SIZE], in drm_dp_channel_eq_ok() 95 lane_align = dp_link_status(link_status, in drm_dp_channel_eq_ok() 100 lane_status = dp_get_lane_status(link_status, lane); in drm_dp_channel_eq_ok() 108 bool drm_dp_clock_recovery_ok(const u8 link_status[DP_LINK_STATUS_SIZE], in drm_dp_clock_recovery_ok() 115 lane_status = dp_get_lane_status(link_status, lane); in drm_dp_clock_recovery_ok() 123 u8 drm_dp_get_adjust_request_voltage(const u8 link_status[DP_LINK_STATUS_SIZE], in drm_dp_get_adjust_request_voltage() [all …]
|
/openbmc/linux/drivers/net/ethernet/aquantia/atlantic/hw_atl2/ |
H A D | hw_atl2_utils_fw.c | 287 struct link_status_s link_status; in aq_a2_fw_update_link_status() local 289 hw_atl2_shared_buffer_read(self, link_status, link_status); in aq_a2_fw_update_link_status() 291 switch (link_status.link_rate) { in aq_a2_fw_update_link_status() 313 self->aq_link_status.full_duplex = link_status.duplex; in aq_a2_fw_update_link_status() 528 struct link_status_s link_status; in aq_a2_fw_get_flow_control() local 530 hw_atl2_shared_buffer_read(self, link_status, link_status); in aq_a2_fw_get_flow_control() 532 *fcmode = ((link_status.pause_rx) ? AQ_NIC_FC_RX : 0) | in aq_a2_fw_get_flow_control() 533 ((link_status.pause_tx) ? AQ_NIC_FC_TX : 0); in aq_a2_fw_get_flow_control()
|
/openbmc/linux/drivers/gpu/drm/bridge/cadence/ |
H A D | cdns-mhdp8546-core.c | 496 u8 link_status[DP_LINK_STATUS_SIZE]) in cdns_mhdp_adjust_lt() 536 ret = cdns_mhdp_mailbox_recv_data(mhdp, link_status, in cdns_mhdp_adjust_lt() 929 u8 link_status[DP_LINK_STATUS_SIZE], in cdns_mhdp_get_adjust_train() 943 adjust = drm_dp_get_adjust_request_voltage(link_status, i); in cdns_mhdp_get_adjust_train() 946 adjust = drm_dp_get_adjust_request_pre_emphasis(link_status, i); in cdns_mhdp_get_adjust_train() 973 void cdns_mhdp_set_adjust_request_voltage(u8 link_status[DP_LINK_STATUS_SIZE], in cdns_mhdp_set_adjust_request_voltage() 981 link_status[idx] &= ~(DP_ADJUST_VOLTAGE_SWING_LANE0_MASK << s); in cdns_mhdp_set_adjust_request_voltage() 982 link_status[idx] |= volt << s; in cdns_mhdp_set_adjust_request_voltage() 986 void cdns_mhdp_set_adjust_request_pre_emphasis(u8 link_status[DP_LINK_STATUS_SIZE], in cdns_mhdp_set_adjust_request_pre_emphasis() 994 link_status[idx] &= ~(DP_ADJUST_PRE_EMPHASIS_LANE0_MASK << s); in cdns_mhdp_set_adjust_request_pre_emphasis() [all …]
|
/openbmc/linux/drivers/net/ethernet/aquantia/atlantic/hw_atl/ |
H A D | hw_atl_utils_fw2x.c | 249 struct aq_hw_link_status_s *link_status = &self->aq_link_status; in aq_fw2x_update_link_status() local 260 link_status->mbps = 10000; in aq_fw2x_update_link_status() 262 link_status->mbps = 5000; in aq_fw2x_update_link_status() 264 link_status->mbps = 2500; in aq_fw2x_update_link_status() 266 link_status->mbps = 1000; in aq_fw2x_update_link_status() 268 link_status->mbps = 100; in aq_fw2x_update_link_status() 270 link_status->mbps = 10000; in aq_fw2x_update_link_status() 272 link_status->mbps = 0; in aq_fw2x_update_link_status() 274 link_status->full_duplex = true; in aq_fw2x_update_link_status()
|
H A D | hw_atl_utils.c | 701 struct aq_hw_link_status_s *link_status = &self->aq_link_status; in hw_atl_utils_mpi_get_link_status() local 709 link_status->mbps = 0U; in hw_atl_utils_mpi_get_link_status() 713 link_status->mbps = 10000U; in hw_atl_utils_mpi_get_link_status() 718 link_status->mbps = 5000U; in hw_atl_utils_mpi_get_link_status() 722 link_status->mbps = 2500U; in hw_atl_utils_mpi_get_link_status() 726 link_status->mbps = 1000U; in hw_atl_utils_mpi_get_link_status() 730 link_status->mbps = 100U; in hw_atl_utils_mpi_get_link_status() 737 link_status->full_duplex = true; in hw_atl_utils_mpi_get_link_status()
|
/openbmc/linux/drivers/net/ethernet/hisilicon/hns/ |
H A D | hns_dsaf_mac.c | 74 u32 link_status = 0; in hns_mac_link_anti_shake() local 78 return link_status; in hns_mac_link_anti_shake() 82 mac_ctrl_drv->get_link_status(mac_ctrl_drv, &link_status); in hns_mac_link_anti_shake() 83 if (!link_status) in hns_mac_link_anti_shake() 87 return link_status; in hns_mac_link_anti_shake() 90 void hns_mac_get_link_status(struct hns_mac_cb *mac_cb, u32 *link_status) in hns_mac_get_link_status() argument 98 mac_ctrl_drv->get_link_status(mac_ctrl_drv, link_status); in hns_mac_get_link_status() 100 *link_status = 0; in hns_mac_get_link_status() 106 *link_status = *link_status && sfp_prsnt; in hns_mac_get_link_status() 113 if (*link_status && !mac_cb->link) in hns_mac_get_link_status() [all …]
|
/openbmc/linux/drivers/net/ethernet/broadcom/bnx2x/ |
H A D | bnx2x_link.c | 248 u32 link_status, cfg_idx, lfa_mask, cfg_size; in bnx2x_check_lfa() local 269 link_status = REG_RD(bp, params->shmem_base + in bnx2x_check_lfa() 271 port_mb[params->port].link_status)); in bnx2x_check_lfa() 272 if (!(link_status & LINK_STATUS_LINK_UP)) in bnx2x_check_lfa() 2099 static void bnx2x_update_mng(struct link_params *params, u32 link_status) in bnx2x_update_mng() argument 2105 port_mb[params->port].link_status), link_status); in bnx2x_update_mng() 2227 vars->link_status |= LINK_STATUS_PFC_ENABLED; in bnx2x_update_pfc() 2229 vars->link_status &= ~LINK_STATUS_PFC_ENABLED; in bnx2x_update_pfc() 2231 bnx2x_update_mng(params, vars->link_status); in bnx2x_update_pfc() 3450 vars->link_status |= LINK_STATUS_AUTO_NEGOTIATE_ENABLED; in set_phy_vars() [all …]
|
/openbmc/linux/drivers/gpu/drm/bridge/analogix/ |
H A D | analogix_dp_core.c | 328 static unsigned char analogix_dp_get_lane_status(u8 link_status[2], int lane) in analogix_dp_get_lane_status() 331 u8 link_value = link_status[lane >> 1]; in analogix_dp_get_lane_status() 336 static int analogix_dp_clock_recovery_ok(u8 link_status[2], int lane_count) in analogix_dp_clock_recovery_ok() 342 lane_status = analogix_dp_get_lane_status(link_status, lane); in analogix_dp_clock_recovery_ok() 349 static int analogix_dp_channel_eq_ok(u8 link_status[2], u8 link_align, in analogix_dp_channel_eq_ok() 359 lane_status = analogix_dp_get_lane_status(link_status, lane); in analogix_dp_channel_eq_ok() 471 u8 link_status[2], adjust_request[2]; in analogix_dp_process_clock_recovery() local 477 retval = drm_dp_dpcd_read(&dp->aux, DP_LANE0_1_STATUS, link_status, 2); in analogix_dp_process_clock_recovery() 486 if (analogix_dp_clock_recovery_ok(link_status, lane_count) == 0) { in analogix_dp_process_clock_recovery() 543 u8 link_align, link_status[2], adjust_request[2]; in analogix_dp_process_equalizer_training() local [all …]
|
/openbmc/linux/drivers/scsi/snic/ |
H A D | snic_attrs.c | 46 snic->link_status = svnic_dev_link_status(snic->vdev); in snic_show_link_state() 49 (snic->link_status) ? "Link Up" : "Link Down"); in snic_show_link_state()
|
/openbmc/linux/drivers/net/ethernet/huawei/hinic/ |
H A D | hinic_sriov.c | 53 u8 link_status) in hinic_notify_vf_link_status() argument 61 link.link = link_status; in hinic_notify_vf_link_status() 77 u8 link_status) in hinic_notify_all_vfs_link_changed() argument 82 nic_io->link_status = link_status; in hinic_notify_all_vfs_link_changed() 85 hinic_notify_vf_link_status(hwdev, i, link_status); in hinic_notify_all_vfs_link_changed() 425 get_link->state = nic_io->link_status; in hinic_get_vf_link_status_msg_handler() 984 u8 link_status = 0; in hinic_set_vf_link_state() local 989 vf_infos[HW_VF_ID_TO_OS(vf_id)].link_up = nic_io->link_status ? in hinic_set_vf_link_state() 991 link_status = nic_io->link_status; in hinic_set_vf_link_state() 996 link_status = HINIC_LINK_UP; in hinic_set_vf_link_state() [all …]
|
/openbmc/linux/drivers/net/ethernet/intel/fm10k/ |
H A D | fm10k_common.c | 15 u16 link_cap, link_status, device_cap, device_control; in fm10k_get_bus_info_generic() local 72 link_status = fm10k_read_pci_cfg_word(hw, FM10K_PCIE_LINK_STATUS); in fm10k_get_bus_info_generic() 74 switch (link_status & FM10K_PCIE_LINK_WIDTH) { in fm10k_get_bus_info_generic() 92 switch (link_status & FM10K_PCIE_LINK_SPEED) { in fm10k_get_bus_info_generic()
|
/openbmc/linux/drivers/net/ethernet/hisilicon/hns3/hns3vf/ |
H A D | hclgevf_mbx.c | 305 u16 link_status, state; in hclgevf_mbx_async_handler() local 330 link_status = le16_to_cpu(link_info->link_status); in hclgevf_mbx_async_handler() 337 hclgevf_update_link_status(hdev, link_status); in hclgevf_mbx_async_handler()
|
/openbmc/linux/drivers/soc/hisilicon/ |
H A D | kunpeng_hccs.c | 599 struct hccs_link_status *link_status) in hccs_query_port_link_status() argument 619 *link_status = *((struct hccs_link_status *)desc.rsp.data); in hccs_query_port_link_status() 784 struct hccs_link_status link_status = {0}; in cur_lane_num_show() local 788 ret = hccs_query_port_link_status(hdev, port, &link_status); in cur_lane_num_show() 793 return sysfs_emit(buf, "%u\n", link_status.lane_num); in cur_lane_num_show() 802 struct hccs_link_status link_status = {0}; in link_fsm_show() local 817 ret = hccs_query_port_link_status(hdev, port, &link_status); in link_fsm_show() 823 if (link_fsm_map[i].link_fsm == link_status.link_fsm) { in link_fsm_show() 838 struct hccs_link_status link_status = {0}; in lane_mask_show() local 842 ret = hccs_query_port_link_status(hdev, port, &link_status); in lane_mask_show() [all …]
|
/openbmc/linux/drivers/scsi/csiostor/ |
H A D | csio_mb.c | 840 uint8_t cos, bool link_status, uint32_t fcfi, in csio_write_fcoe_link_cond_init_mb() argument 856 cmdp->lstatus = link_status; in csio_write_fcoe_link_cond_init_mb() 1410 uint32_t link_status; in csio_mb_fwevt_handler() local 1429 link_status = ntohl(pcmd->u.info.lstatus_to_modtype); in csio_mb_fwevt_handler() 1430 mod_type = FW_PORT_CMD_MODTYPE_G(link_status); in csio_mb_fwevt_handler() 1431 linkattr = lstatus_to_fwcap(link_status); in csio_mb_fwevt_handler() 1433 hw->pport[port_id].link_status = in csio_mb_fwevt_handler() 1434 FW_PORT_CMD_LSTATUS_G(link_status); in csio_mb_fwevt_handler() 1436 link_status = in csio_mb_fwevt_handler() 1438 mod_type = FW_PORT_CMD_MODTYPE32_G(link_status); in csio_mb_fwevt_handler() [all …]
|
/openbmc/linux/drivers/net/wwan/iosm/ |
H A D | iosm_ipc_pcie.c | 164 u16 link_status = 0; in ipc_pcie_check_data_link_active() local 173 pcie_capability_read_word(parent, PCI_EXP_LNKSTA, &link_status); in ipc_pcie_check_data_link_active() 174 dev_dbg(ipc_pcie->dev, "Link status: 0x%04X", link_status); in ipc_pcie_check_data_link_active() 176 return link_status & PCI_EXP_LNKSTA_DLLLA; in ipc_pcie_check_data_link_active()
|