/linux/drivers/net/ethernet/hisilicon/hns3/ |
H A D | hnae3.c | 16 struct hnae3_ae_dev *ae_dev; in hnae3_unregister_ae_algo_prepare() local 21 list_for_each_entry(ae_dev, &hnae3_ae_dev_list, node) { in hnae3_unregister_ae_algo_prepare() 22 if (!hnae3_get_bit(ae_dev->flag, HNAE3_DEV_INITED_B)) in hnae3_unregister_ae_algo_prepare() 25 pci_id = pci_match_id(ae_algo->pdev_id_table, ae_dev->pdev); in hnae3_unregister_ae_algo_prepare() 29 device_lock(&ae_dev->pdev->dev); in hnae3_unregister_ae_algo_prepare() 30 pci_disable_sriov(ae_dev->pdev); in hnae3_unregister_ae_algo_prepare() 31 device_unlock(&ae_dev->pdev->dev); in hnae3_unregister_ae_algo_prepare() 53 struct hnae3_ae_dev *ae_dev, in hnae3_set_client_init_flag() argument 56 if (!client || !ae_dev) in hnae3_set_client_init_flag() 61 hnae3_set_bit(ae_dev->flag, HNAE3_KNIC_CLIENT_INITED_B, inited); in hnae3_set_client_init_flag() [all …]
|
H A D | hns3_enet.c | 556 struct hnae3_ae_dev *ae_dev = pci_get_drvdata(priv->ae_handle->pdev); in hns3_vector_coalesce_init() local 574 if (ae_dev->dev_version >= HNAE3_DEVICE_VERSION_V3) { in hns3_vector_coalesce_init() 579 if (ae_dev->dev_specs.int_ql_max) { in hns3_vector_coalesce_init() 582 tx_coal->int_ql_max = ae_dev->dev_specs.int_ql_max; in hns3_vector_coalesce_init() 583 rx_coal->int_ql_max = ae_dev->dev_specs.int_ql_max; in hns3_vector_coalesce_init() 1300 struct hnae3_ae_dev *ae_dev = pci_get_drvdata(priv->ae_handle->pdev); in hns3_tunnel_csum_bug() local 1306 if (ae_dev->dev_version >= HNAE3_DEVICE_VERSION_V3) in hns3_tunnel_csum_bug() 1488 struct hnae3_ae_dev *ae_dev; in hns3_handle_vtags() local 1500 ae_dev = pci_get_drvdata(handle->pdev); in hns3_handle_vtags() 1502 ae_dev->dev_version <= HNAE3_DEVICE_VERSION_V2 && in hns3_handle_vtags() [all …]
|
H A D | hns3_debugfs.c | 637 struct hnae3_ae_dev *ae_dev, char **result, in hns3_dump_rx_queue_info() argument 667 if (hnae3_ae_dev_tqp_txrx_indep_supported(ae_dev)) in hns3_dump_rx_queue_info() 684 struct hnae3_ae_dev *ae_dev = pci_get_drvdata(h->pdev); in hns3_dbg_rx_queue_info() local 713 hns3_dump_rx_queue_info(ring, ae_dev, result, i); in hns3_dbg_rx_queue_info() 739 struct hnae3_ae_dev *ae_dev, char **result, in hns3_dump_tx_queue_info() argument 770 if (hnae3_ae_dev_tqp_txrx_indep_supported(ae_dev)) in hns3_dump_tx_queue_info() 787 struct hnae3_ae_dev *ae_dev = pci_get_drvdata(h->pdev); in hns3_dbg_tx_queue_info() local 817 hns3_dump_tx_queue_info(ring, ae_dev, result, i); in hns3_dbg_tx_queue_info() 1032 struct hnae3_ae_dev *ae_dev = pci_get_drvdata(h->pdev); in hns3_dbg_dev_caps() local 1034 unsigned long *caps = ae_dev->caps; in hns3_dbg_dev_caps() [all …]
|
/linux/drivers/net/ethernet/hisilicon/hns3/hns3_common/ |
H A D | hclge_comm_cmd.c | 53 static void hclge_comm_set_default_capability(struct hnae3_ae_dev *ae_dev, in hclge_comm_set_default_capability() argument 56 set_bit(HNAE3_DEV_SUPPORT_GRO_B, ae_dev->caps); in hclge_comm_set_default_capability() 58 set_bit(HNAE3_DEV_SUPPORT_FD_B, ae_dev->caps); in hclge_comm_set_default_capability() 59 set_bit(HNAE3_DEV_SUPPORT_FEC_B, ae_dev->caps); in hclge_comm_set_default_capability() 60 set_bit(HNAE3_DEV_SUPPORT_PAUSE_B, ae_dev->caps); in hclge_comm_set_default_capability() 78 int hclge_comm_firmware_compat_config(struct hnae3_ae_dev *ae_dev, in hclge_comm_firmware_compat_config() argument 92 if (hclge_comm_dev_phy_imp_supported(ae_dev)) in hclge_comm_firmware_compat_config() 194 hclge_comm_parse_capability(struct hnae3_ae_dev *ae_dev, bool is_pf, in hclge_comm_parse_capability() argument 207 set_bit(caps_map[i].local_bit, ae_dev->caps); in hclge_comm_parse_capability() 228 int hclge_comm_cmd_query_version_and_capability(struct hnae3_ae_dev *ae_dev, in hclge_comm_cmd_query_version_and_capability() argument [all …]
|
H A D | hclge_comm_rss.c | 18 hclge_comm_init_rss_tuple(struct hnae3_ae_dev *ae_dev, in hclge_comm_init_rss_tuple() argument 28 ae_dev->dev_version <= HNAE3_DEVICE_VERSION_V2 ? in hclge_comm_init_rss_tuple() 35 struct hnae3_ae_dev *ae_dev, in hclge_comm_rss_init_cfg() argument 38 u16 rss_ind_tbl_size = ae_dev->dev_specs.rss_ind_tbl_size; in hclge_comm_rss_init_cfg() 45 if (ae_dev->dev_version >= HNAE3_DEVICE_VERSION_V2) in hclge_comm_rss_init_cfg() 48 hclge_comm_init_rss_tuple(ae_dev, &rss_cfg->rss_tuple_sets); in hclge_comm_rss_init_cfg() 52 rss_ind_tbl = devm_kcalloc(&ae_dev->pdev->dev, rss_ind_tbl_size, in hclge_comm_rss_init_cfg() 61 hclge_comm_rss_indir_init_cfg(ae_dev, rss_cfg); in hclge_comm_rss_init_cfg() 151 int hclge_comm_set_rss_tuple(struct hnae3_ae_dev *ae_dev, in hclge_comm_set_rss_tuple() argument 168 ret = hclge_comm_init_rss_tuple_cmd(rss_cfg, nfc, ae_dev, req); in hclge_comm_set_rss_tuple() [all …]
|
H A D | hclge_comm_rss.h | 98 void hclge_comm_rss_indir_init_cfg(struct hnae3_ae_dev *ae_dev, 112 struct hnae3_ae_dev *ae_dev, 117 int hclge_comm_set_rss_indir_table(struct hnae3_ae_dev *ae_dev, 120 struct hnae3_ae_dev *ae_dev, 129 int hclge_comm_set_rss_tuple(struct hnae3_ae_dev *ae_dev,
|
H A D | hclge_comm_cmd.h | 25 #define hclge_comm_dev_phy_imp_supported(ae_dev) \ argument 26 test_bit(HNAE3_DEV_SUPPORT_PHY_IMP_B, (ae_dev)->caps) 479 int hclge_comm_cmd_query_version_and_capability(struct hnae3_ae_dev *ae_dev, 486 int hclge_comm_firmware_compat_config(struct hnae3_ae_dev *ae_dev, 492 void hclge_comm_cmd_uninit(struct hnae3_ae_dev *ae_dev, 495 int hclge_comm_cmd_init(struct hnae3_ae_dev *ae_dev, struct hclge_comm_hw *hw,
|
/linux/drivers/net/ethernet/hisilicon/hns3/hns3vf/ |
H A D | hclgevf_main.c | 156 struct hnae3_ae_dev *ae_dev = hdev->ae_dev; in hclgevf_get_basic_info() local 178 set_bit(HNAE3_DEV_SUPPORT_VLAN_FLTR_MDF_B, ae_dev->caps); in hclgevf_get_basic_info() 301 struct hnae3_ae_dev *ae_dev = pci_get_drvdata(hdev->pdev); in hclgevf_alloc_tqps() local 339 if (test_bit(HNAE3_DEV_SUPPORT_TX_PUSH_B, ae_dev->caps)) in hclgevf_alloc_tqps() 565 if (hdev->ae_dev->dev_version >= HNAE3_DEVICE_VERSION_V2) { in hclgevf_get_rss() 580 hdev->ae_dev->dev_specs.rss_ind_tbl_size); in hclgevf_get_rss() 592 if (hdev->ae_dev->dev_version >= HNAE3_DEVICE_VERSION_V2) { in hclgevf_set_rss() 600 for (i = 0; i < hdev->ae_dev->dev_specs.rss_ind_tbl_size; i++) in hclgevf_set_rss() 604 return hclge_comm_set_rss_indir_table(hdev->ae_dev, &hdev->hw.hw, in hclgevf_set_rss() 614 if (hdev->ae_dev->dev_version < HNAE3_DEVICE_VERSION_V2) in hclgevf_set_rss_tuple() [all …]
|
H A D | hclgevf_main.h | 211 struct hnae3_ae_dev *ae_dev; member
|
/linux/drivers/net/ethernet/hisilicon/hns3/hns3pf/ |
H A D | hclge_err.c | 1611 loop_time = min(hdev->ae_dev->dev_specs.tnl_num, in hclge_query_reg_info_of_ssu() 1862 if (hdev->ae_dev->dev_version < HNAE3_DEVICE_VERSION_V2) in hclge_config_ncsi_hw_err_int() 1942 if (hdev->ae_dev->dev_version >= HNAE3_DEVICE_VERSION_V2) in hclge_config_ppp_error_interrupt() 2172 if (hdev->ae_dev->dev_version >= HNAE3_DEVICE_VERSION_V2) in hclge_config_ssu_hw_err_int() 2253 struct hnae3_ae_dev *ae_dev = hdev->ae_dev; in hclge_handle_mpf_ras_error() local 2273 &ae_dev->hw_err_reset_req); in hclge_handle_mpf_ras_error() 2279 &ae_dev->hw_err_reset_req); in hclge_handle_mpf_ras_error() 2288 &ae_dev->hw_err_reset_req); in hclge_handle_mpf_ras_error() 2294 &ae_dev->hw_err_reset_req); in hclge_handle_mpf_ras_error() 2302 &ae_dev->hw_err_reset_req); in hclge_handle_mpf_ras_error() [all …]
|
H A D | hclge_main.c | 52 static int hclge_reset_ae_dev(struct hnae3_ae_dev *ae_dev); 56 static enum hnae3_reset_type hclge_get_reset_level(struct hnae3_ae_dev *ae_dev, 479 u32 reg_num = hdev->ae_dev->dev_specs.mac_stats_num; in hclge_mac_update_stats_complete() 532 if (hdev->ae_dev->dev_version == HNAE3_DEVICE_VERSION_V2) { in hclge_mac_query_reg_num() 559 if (hdev->ae_dev->dev_specs.mac_stats_num) in hclge_mac_update_stats() 573 if (strs[i].stats_num <= hdev->ae_dev->dev_specs.mac_stats_num) in hclge_comm_get_count() 587 if (strs[i].stats_num > hdev->ae_dev->dev_specs.mac_stats_num) in hclge_comm_get_stats() 607 if (strs[i].stats_num > hdev->ae_dev->dev_specs.mac_stats_num) in hclge_comm_get_strings() 681 if (hdev->ae_dev->dev_version >= HNAE3_DEVICE_VERSION_V2 || in hclge_get_sset_count() 689 if (hdev->ae_dev->dev_specs.hilink_version != in hclge_get_sset_count() [all …]
|
H A D | hclge_err.h | 260 void hclge_handle_all_hns_hw_errors(struct hnae3_ae_dev *ae_dev); 263 pci_ers_result_t hclge_handle_hw_ras_error(struct hnae3_ae_dev *ae_dev); 266 int hclge_handle_error_info_log(struct hnae3_ae_dev *ae_dev);
|
H A D | hclge_mbx.c | 464 hdev->ae_dev->dev_version >= HNAE3_DEVICE_VERSION_V3 ? in hclge_set_vf_vlan_cfg() 494 struct hnae3_ae_dev *ae_dev = vport->back->ae_dev; in hclge_get_basic_info() local 504 if (test_bit(HNAE3_DEV_SUPPORT_VLAN_FLTR_MDF_B, ae_dev->caps)) in hclge_get_basic_info() 663 struct hnae3_ae_dev *ae_dev = pci_get_drvdata(hdev->pdev); in hclge_notify_vf_config() local 680 if (ae_dev->dev_version < HNAE3_DEVICE_VERSION_V3 && in hclge_notify_vf_config() 810 struct hnae3_ae_dev *ae_dev = hdev->ae_dev; in hclge_handle_ncsi_error() local 812 ae_dev->ops->set_default_reset_request(ae_dev, HNAE3_GLOBAL_RESET); in hclge_handle_ncsi_error() 814 ae_dev->ops->reset_event(hdev->pdev, NULL); in hclge_handle_ncsi_error()
|
H A D | hclge_tm.c | 474 hdev->ae_dev->dev_specs.max_tm_rate); in hclge_tm_port_shaper_cfg() 598 max_tx_rate = hdev->ae_dev->dev_specs.max_tm_rate; in hclge_tm_qs_shaper_cfg() 602 hdev->ae_dev->dev_specs.max_tm_rate); in hclge_tm_qs_shaper_cfg() 801 hdev->ae_dev->dev_specs.max_tm_rate; in hclge_tm_pg_info_init() 847 if (hdev->ae_dev->dev_version >= HNAE3_DEVICE_VERSION_V3) in hclge_tm_pfc_info_update() 885 u32 max_tm_rate = hdev->ae_dev->dev_specs.max_tm_rate; in hclge_tm_pg_shaper_cfg() 1047 u32 max_tm_rate = hdev->ae_dev->dev_specs.max_tm_rate; in hclge_tm_pri_tc_base_shaper_cfg() 1098 hdev->ae_dev->dev_specs.max_tm_rate); in hclge_tm_pri_vnet_base_shaper_pri_cfg() 1128 u32 max_tm_rate = hdev->ae_dev->dev_specs.max_tm_rate; in hclge_tm_pri_vnet_base_shaper_qs_cfg() 1729 if (hdev->ae_dev->dev_version <= HNAE3_DEVICE_VERSION_V2) { in hclge_tm_get_qset_num() [all …]
|
H A D | hclge_regs.c | 391 struct hnae3_ae_dev *ae_dev = pci_get_drvdata(hdev->pdev); in hclge_get_dfx_reg_len() local 419 HCLGE_REG_TLV_SIZE) * ae_dev->dev_specs.tnl_num; in hclge_get_dfx_reg_len() 430 struct hnae3_ae_dev *ae_dev = pci_get_drvdata(hdev->pdev); in hclge_get_dfx_rpu_tnl_reg() local 434 for (i = HCLGE_REG_RPU_TNL_ID_0; i <= ae_dev->dev_specs.tnl_num; i++) { in hclge_get_dfx_rpu_tnl_reg()
|
H A D | hclge_ptp.c | 469 struct hnae3_ae_dev *ae_dev = pci_get_drvdata(hdev->pdev); in hclge_ptp_init() local 473 if (!test_bit(HNAE3_DEV_SUPPORT_PTP_B, ae_dev->caps)) in hclge_ptp_init()
|
H A D | hclge_debugfs.c | 2240 if (!hnae3_ae_dev_fd_supported(hdev->ae_dev)) { in hclge_dbg_dump_fd_tcam() 2308 if (!hnae3_ae_dev_fd_supported(hdev->ae_dev)) in hclge_dbg_dump_fd_counter() 2835 if (!test_bit(HNAE3_DEV_SUPPORT_PORT_VLAN_BYPASS_B, hdev->ae_dev->caps)) in hclge_get_port_vlan_filter_bypass_state() 2922 hdev->ae_dev->caps) ? state_str[bypass] : "NA"; in hclge_dbg_dump_vlan_filter_config()
|
H A D | hclge_dcb.c | 217 hclge_comm_rss_indir_init_cfg(hdev->ae_dev, &hdev->rss_cfg); in hclge_map_update()
|
H A D | hclge_main.h | 871 struct hnae3_ae_dev *ae_dev; member
|
/linux/drivers/net/ethernet/hisilicon/hns/ |
H A D | hns_dsaf_mac.c | 178 mac_cb->dsaf_dev->ae_dev.name, in hns_mac_adjust_link() 202 mac_cb->dsaf_dev->ae_dev.name, in hns_mac_get_inner_port_num() 210 mac_cb->dsaf_dev->ae_dev.name, in hns_mac_get_inner_port_num() 216 mac_cb->dsaf_dev->ae_dev.name, mac_cb->mac_id); in hns_mac_get_inner_port_num() 222 mac_cb->dsaf_dev->ae_dev.name, mac_cb->mac_id, vmid); in hns_mac_get_inner_port_num() 255 mac_cb->dsaf_dev->ae_dev.name, mac_cb->mac_id); in hns_mac_get_inner_port_num() 374 mac_cb->dsaf_dev->ae_dev.name, in hns_mac_set_multi()
|