/drivers/net/ethernet/hisilicon/hns3/ |
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 pci_disable_sriov(ae_dev->pdev); in hnae3_unregister_ae_algo_prepare() 50 struct hnae3_ae_dev *ae_dev, in hnae3_set_client_init_flag() argument 53 if (!client || !ae_dev) in hnae3_set_client_init_flag() 58 hnae3_set_bit(ae_dev->flag, HNAE3_KNIC_CLIENT_INITED_B, inited); in hnae3_set_client_init_flag() 61 hnae3_set_bit(ae_dev->flag, HNAE3_ROCE_CLIENT_INITED_B, inited); in hnae3_set_client_init_flag() 70 struct hnae3_ae_dev *ae_dev) in hnae3_get_client_init_flag() argument [all …]
|
D | hnae3.h | 74 hnae3_get_bit((hdev)->ae_dev->flag, HNAE3_DEV_SUPPORT_ROCE_B) 77 hnae3_get_bit((hdev)->ae_dev->flag, HNAE3_DEV_SUPPORT_DCB_B) 108 #define hnae3_ae_dev_fd_supported(ae_dev) \ argument 109 test_bit(HNAE3_DEV_SUPPORT_FD_B, (ae_dev)->caps) 111 #define hnae3_ae_dev_gro_supported(ae_dev) \ argument 112 test_bit(HNAE3_DEV_SUPPORT_GRO_B, (ae_dev)->caps) 115 test_bit(HNAE3_DEV_SUPPORT_FEC_B, (hdev)->ae_dev->caps) 118 test_bit(HNAE3_DEV_SUPPORT_UDP_GSO_B, (hdev)->ae_dev->caps) 121 test_bit(HNAE3_DEV_SUPPORT_QB_B, (hdev)->ae_dev->caps) 124 test_bit(HNAE3_DEV_SUPPORT_FD_FORWARD_TC_B, (hdev)->ae_dev->caps) [all …]
|
D | hns3_ethtool.c | 88 struct hnae3_ae_dev *ae_dev = pci_get_drvdata(h->pdev); in hns3_lp_setup() local 108 if (ret || ae_dev->dev_version >= HNAE3_DEVICE_VERSION_V2) in hns3_lp_setup() 156 struct hnae3_ae_dev *ae_dev; in hns3_lp_setup_skb() local 173 ae_dev = pci_get_drvdata(handle->pdev); in hns3_lp_setup_skb() 174 if (ae_dev->dev_version < HNAE3_DEVICE_VERSION_V2) in hns3_lp_setup_skb() 714 struct hnae3_ae_dev *ae_dev = pci_get_drvdata(h->pdev); in hns3_get_pauseparam() local 716 if (!test_bit(HNAE3_DEV_SUPPORT_PAUSE_B, ae_dev->caps)) in hns3_get_pauseparam() 728 struct hnae3_ae_dev *ae_dev = pci_get_drvdata(h->pdev); in hns3_set_pauseparam() local 730 if (!test_bit(HNAE3_DEV_SUPPORT_PAUSE_B, ae_dev->caps)) in hns3_set_pauseparam() 773 struct hnae3_ae_dev *ae_dev = pci_get_drvdata(h->pdev); in hns3_get_link_ksettings() local [all …]
|
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 …]
|
D | hns3_debugfs.c | 634 struct hnae3_ae_dev *ae_dev, char **result, in hns3_dump_rx_queue_info() argument 664 if (hnae3_ae_dev_tqp_txrx_indep_supported(ae_dev)) in hns3_dump_rx_queue_info() 681 struct hnae3_ae_dev *ae_dev = pci_get_drvdata(h->pdev); in hns3_dbg_rx_queue_info() local 710 hns3_dump_rx_queue_info(ring, ae_dev, result, i); in hns3_dbg_rx_queue_info() 736 struct hnae3_ae_dev *ae_dev, char **result, in hns3_dump_tx_queue_info() argument 767 if (hnae3_ae_dev_tqp_txrx_indep_supported(ae_dev)) in hns3_dump_tx_queue_info() 784 struct hnae3_ae_dev *ae_dev = pci_get_drvdata(h->pdev); in hns3_dbg_tx_queue_info() local 814 hns3_dump_tx_queue_info(ring, ae_dev, result, i); in hns3_dbg_tx_queue_info() 1029 struct hnae3_ae_dev *ae_dev = pci_get_drvdata(h->pdev); in hns3_dbg_dev_caps() local 1031 unsigned long *caps = ae_dev->caps; in hns3_dbg_dev_caps() [all …]
|
/drivers/net/ethernet/hisilicon/hns3/hns3_common/ |
D | hclge_comm_cmd.c | 52 static void hclge_comm_set_default_capability(struct hnae3_ae_dev *ae_dev, in hclge_comm_set_default_capability() argument 55 set_bit(HNAE3_DEV_SUPPORT_GRO_B, ae_dev->caps); in hclge_comm_set_default_capability() 57 set_bit(HNAE3_DEV_SUPPORT_FD_B, ae_dev->caps); in hclge_comm_set_default_capability() 58 set_bit(HNAE3_DEV_SUPPORT_FEC_B, ae_dev->caps); in hclge_comm_set_default_capability() 59 set_bit(HNAE3_DEV_SUPPORT_PAUSE_B, ae_dev->caps); in hclge_comm_set_default_capability() 76 int hclge_comm_firmware_compat_config(struct hnae3_ae_dev *ae_dev, in hclge_comm_firmware_compat_config() argument 90 if (hclge_comm_dev_phy_imp_supported(ae_dev)) in hclge_comm_firmware_compat_config() 190 hclge_comm_parse_capability(struct hnae3_ae_dev *ae_dev, bool is_pf, in hclge_comm_parse_capability() argument 203 set_bit(caps_map[i].local_bit, ae_dev->caps); in hclge_comm_parse_capability() 224 int hclge_comm_cmd_query_version_and_capability(struct hnae3_ae_dev *ae_dev, in hclge_comm_cmd_query_version_and_capability() argument [all …]
|
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() 147 int hclge_comm_set_rss_tuple(struct hnae3_ae_dev *ae_dev, in hclge_comm_set_rss_tuple() argument 164 ret = hclge_comm_init_rss_tuple_cmd(rss_cfg, nfc, ae_dev, req); in hclge_comm_set_rss_tuple() [all …]
|
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,
|
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) 456 int hclge_comm_cmd_query_version_and_capability(struct hnae3_ae_dev *ae_dev, 463 int hclge_comm_firmware_compat_config(struct hnae3_ae_dev *ae_dev, 469 void hclge_comm_cmd_uninit(struct hnae3_ae_dev *ae_dev, 472 int hclge_comm_cmd_init(struct hnae3_ae_dev *ae_dev, struct hclge_comm_hw *hw,
|
/drivers/net/ethernet/hisilicon/hns3/hns3vf/ |
D | hclgevf_main.c | 121 struct hnae3_ae_dev *ae_dev = hdev->ae_dev; in hclgevf_get_basic_info() local 143 set_bit(HNAE3_DEV_SUPPORT_VLAN_FLTR_MDF_B, ae_dev->caps); in hclgevf_get_basic_info() 266 struct hnae3_ae_dev *ae_dev = pci_get_drvdata(hdev->pdev); in hclgevf_alloc_tqps() local 304 if (test_bit(HNAE3_DEV_SUPPORT_TX_PUSH_B, ae_dev->caps)) in hclgevf_alloc_tqps() 530 if (hdev->ae_dev->dev_version >= HNAE3_DEVICE_VERSION_V2) { in hclgevf_get_rss() 545 hdev->ae_dev->dev_specs.rss_ind_tbl_size); in hclgevf_get_rss() 557 if (hdev->ae_dev->dev_version >= HNAE3_DEVICE_VERSION_V2) { in hclgevf_set_rss() 565 for (i = 0; i < hdev->ae_dev->dev_specs.rss_ind_tbl_size; i++) in hclgevf_set_rss() 569 return hclge_comm_set_rss_indir_table(hdev->ae_dev, &hdev->hw.hw, in hclgevf_set_rss() 579 if (hdev->ae_dev->dev_version < HNAE3_DEVICE_VERSION_V2) in hclgevf_set_rss_tuple() [all …]
|
D | hclgevf_main.h | 211 struct hnae3_ae_dev *ae_dev; member
|
/drivers/net/ethernet/hisilicon/hns3/hns3pf/ |
D | hclge_err.c | 1439 if (hdev->ae_dev->dev_version < HNAE3_DEVICE_VERSION_V2) in hclge_config_ncsi_hw_err_int() 1519 if (hdev->ae_dev->dev_version >= HNAE3_DEVICE_VERSION_V2) in hclge_config_ppp_error_interrupt() 1749 if (hdev->ae_dev->dev_version >= HNAE3_DEVICE_VERSION_V2) in hclge_config_ssu_hw_err_int() 1830 struct hnae3_ae_dev *ae_dev = hdev->ae_dev; in hclge_handle_mpf_ras_error() local 1850 &ae_dev->hw_err_reset_req); in hclge_handle_mpf_ras_error() 1856 &ae_dev->hw_err_reset_req); in hclge_handle_mpf_ras_error() 1865 &ae_dev->hw_err_reset_req); in hclge_handle_mpf_ras_error() 1871 &ae_dev->hw_err_reset_req); in hclge_handle_mpf_ras_error() 1879 &ae_dev->hw_err_reset_req); in hclge_handle_mpf_ras_error() 1885 set_bit(HNAE3_GLOBAL_RESET, &ae_dev->hw_err_reset_req); in hclge_handle_mpf_ras_error() [all …]
|
D | hclge_main.c | 49 static int hclge_reset_ae_dev(struct hnae3_ae_dev *ae_dev); 53 static enum hnae3_reset_type hclge_get_reset_level(struct hnae3_ae_dev *ae_dev, 434 u32 reg_num = hdev->ae_dev->dev_specs.mac_stats_num; in hclge_mac_update_stats_complete() 487 if (hdev->ae_dev->dev_version == HNAE3_DEVICE_VERSION_V2) { in hclge_mac_query_reg_num() 514 if (hdev->ae_dev->dev_specs.mac_stats_num) in hclge_mac_update_stats() 528 if (strs[i].stats_num <= hdev->ae_dev->dev_specs.mac_stats_num) in hclge_comm_get_count() 542 if (strs[i].stats_num > hdev->ae_dev->dev_specs.mac_stats_num) in hclge_comm_get_stats() 563 if (strs[i].stats_num > hdev->ae_dev->dev_specs.mac_stats_num) in hclge_comm_get_strings() 640 if (hdev->ae_dev->dev_version >= HNAE3_DEVICE_VERSION_V2 || in hclge_get_sset_count() 1320 struct hnae3_ae_dev *ae_dev = pci_get_drvdata(hdev->pdev); in hclge_set_default_dev_specs() local [all …]
|
D | hclge_err.h | 223 void hclge_handle_all_hns_hw_errors(struct hnae3_ae_dev *ae_dev); 226 pci_ers_result_t hclge_handle_hw_ras_error(struct hnae3_ae_dev *ae_dev); 229 int hclge_handle_error_info_log(struct hnae3_ae_dev *ae_dev);
|
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()
|
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()
|
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 …]
|
D | hclge_ptp.c | 473 struct hnae3_ae_dev *ae_dev = pci_get_drvdata(hdev->pdev); in hclge_ptp_init() local 477 if (!test_bit(HNAE3_DEV_SUPPORT_PTP_B, ae_dev->caps)) in hclge_ptp_init()
|
D | hclge_debugfs.c | 1595 if (!hnae3_ae_dev_fd_supported(hdev->ae_dev)) { in hclge_dbg_dump_fd_tcam() 1663 if (!hnae3_ae_dev_fd_supported(hdev->ae_dev)) in hclge_dbg_dump_fd_counter() 2190 if (!test_bit(HNAE3_DEV_SUPPORT_PORT_VLAN_BYPASS_B, hdev->ae_dev->caps)) in hclge_get_port_vlan_filter_bypass_state() 2277 hdev->ae_dev->caps) ? state_str[bypass] : "NA"; in hclge_dbg_dump_vlan_filter_config()
|
D | hclge_dcb.c | 217 hclge_comm_rss_indir_init_cfg(hdev->ae_dev, &hdev->rss_cfg); in hclge_map_update()
|
D | hclge_main.h | 853 struct hnae3_ae_dev *ae_dev; member
|
/drivers/net/ethernet/hisilicon/hns/ |
D | hns_dsaf_main.c | 84 "%s prs mode str fail!\n", dsaf_dev->ae_dev.name); in hns_dsaf_get_cfg() 380 dsaf_dev->ae_dev.name, i); in hns_dsaf_sbm_cfg_mib_en() 1347 dsaf_dev->ae_dev.name, ret); in hns_dsaf_sbm_init() 1365 dsaf_dev->ae_dev.name, flag, cnt); in hns_dsaf_sbm_init() 1404 "hns_dsaf_init_hw begin %s !\n", dsaf_dev->ae_dev.name); in hns_dsaf_init_hw() 1629 dsaf_dev->ae_dev.name, mac_entry->addr); in hns_dsaf_set_mac_uc_entry() 1646 dsaf_dev->ae_dev.name, in hns_dsaf_set_mac_uc_entry() 1654 dsaf_dev->ae_dev.name, mac_key.high.val, in hns_dsaf_set_mac_uc_entry() 1689 dsaf_dev->ae_dev.name, mac_entry->addr); in hns_dsaf_rm_mac_addr() 1702 dsaf_dev->ae_dev.name, in hns_dsaf_rm_mac_addr() [all …]
|
D | hns_ae_adapt.c | 25 return container_of(dev, struct dsaf_device, ae_dev); in hns_ae_get_dsaf_dev() 977 struct hnae_ae_dev *ae_dev = &dsaf_dev->ae_dev; in hns_dsaf_ae_init() local 991 snprintf(ae_dev->name, AE_NAME_SIZE, "%s%d", DSAF_DEVICE_NAME, in hns_dsaf_ae_init() 993 ae_dev->ops = &hns_dsaf_ops; in hns_dsaf_ae_init() 994 ae_dev->dev = dsaf_dev->dev; in hns_dsaf_ae_init() 996 return hnae_ae_register(ae_dev, THIS_MODULE); in hns_dsaf_ae_init() 1001 hnae_ae_unregister(&dsaf_dev->ae_dev); in hns_dsaf_ae_uninit()
|
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()
|
D | hns_dsaf_main.h | 323 struct hnae_ae_dev ae_dev; member
|