diff options
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 148 |
1 files changed, 78 insertions, 70 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c index acfa86e5296f..87d3db4666df 100644 --- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c +++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c @@ -207,7 +207,7 @@ static int hns_dsaf_get_cfg(struct dsaf_device *dsaf_dev) /** * hns_dsaf_sbm_link_sram_init_en - config dsaf_sbm_init_en - * @dsaf_id: dsa fabric id + * @dsaf_dev: dsa fabric id */ static void hns_dsaf_sbm_link_sram_init_en(struct dsaf_device *dsaf_dev) { @@ -216,8 +216,8 @@ static void hns_dsaf_sbm_link_sram_init_en(struct dsaf_device *dsaf_dev) /** * hns_dsaf_reg_cnt_clr_ce - config hns_dsaf_reg_cnt_clr_ce - * @dsaf_id: dsa fabric id - * @hns_dsaf_reg_cnt_clr_ce: config value + * @dsaf_dev: dsa fabric id + * @reg_cnt_clr_ce: config value */ static void hns_dsaf_reg_cnt_clr_ce(struct dsaf_device *dsaf_dev, u32 reg_cnt_clr_ce) @@ -228,8 +228,8 @@ hns_dsaf_reg_cnt_clr_ce(struct dsaf_device *dsaf_dev, u32 reg_cnt_clr_ce) /** * hns_ppe_qid_cfg - config ppe qid - * @dsaf_id: dsa fabric id - * @pppe_qid_cfg: value array + * @dsaf_dev: dsa fabric id + * @qid_cfg: value array */ static void hns_dsaf_ppe_qid_cfg(struct dsaf_device *dsaf_dev, u32 qid_cfg) @@ -285,8 +285,8 @@ static void hns_dsaf_inner_qid_cfg(struct dsaf_device *dsaf_dev) /** * hns_dsaf_sw_port_type_cfg - cfg sw type - * @dsaf_id: dsa fabric id - * @psw_port_type: array + * @dsaf_dev: dsa fabric id + * @port_type: array */ static void hns_dsaf_sw_port_type_cfg(struct dsaf_device *dsaf_dev, enum dsaf_sw_port_type port_type) @@ -303,8 +303,8 @@ static void hns_dsaf_sw_port_type_cfg(struct dsaf_device *dsaf_dev, /** * hns_dsaf_stp_port_type_cfg - cfg stp type - * @dsaf_id: dsa fabric id - * @pstp_port_type: array + * @dsaf_dev: dsa fabric id + * @port_type: array */ static void hns_dsaf_stp_port_type_cfg(struct dsaf_device *dsaf_dev, enum dsaf_stp_port_type port_type) @@ -323,7 +323,7 @@ static void hns_dsaf_stp_port_type_cfg(struct dsaf_device *dsaf_dev, (AE_IS_VER1((dev)->dsaf_ver) ? DSAF_SBM_NUM : DSAFV2_SBM_NUM) /** * hns_dsaf_sbm_cfg - config sbm - * @dsaf_id: dsa fabric id + * @dsaf_dev: dsa fabric id */ static void hns_dsaf_sbm_cfg(struct dsaf_device *dsaf_dev) { @@ -342,7 +342,7 @@ static void hns_dsaf_sbm_cfg(struct dsaf_device *dsaf_dev) /** * hns_dsaf_sbm_cfg_mib_en - config sbm - * @dsaf_id: dsa fabric id + * @dsaf_dev: dsa fabric id */ static int hns_dsaf_sbm_cfg_mib_en(struct dsaf_device *dsaf_dev) { @@ -387,7 +387,7 @@ static int hns_dsaf_sbm_cfg_mib_en(struct dsaf_device *dsaf_dev) /** * hns_dsaf_sbm_bp_wl_cfg - config sbm - * @dsaf_id: dsa fabric id + * @dsaf_dev: dsa fabric id */ static void hns_dsaf_sbm_bp_wl_cfg(struct dsaf_device *dsaf_dev) { @@ -556,7 +556,7 @@ static void hns_dsafv2_sbm_bp_wl_cfg(struct dsaf_device *dsaf_dev) /** * hns_dsaf_voq_bp_all_thrd_cfg - voq - * @dsaf_id: dsa fabric id + * @dsaf_dev: dsa fabric id */ static void hns_dsaf_voq_bp_all_thrd_cfg(struct dsaf_device *dsaf_dev) { @@ -599,7 +599,7 @@ static void hns_dsaf_tbl_tcam_match_cfg( /** * hns_dsaf_tbl_tcam_data_cfg - tbl - * @dsaf_id: dsa fabric id + * @dsaf_dev: dsa fabric id * @ptbl_tcam_data: addr */ static void hns_dsaf_tbl_tcam_data_cfg( @@ -614,8 +614,8 @@ static void hns_dsaf_tbl_tcam_data_cfg( /** * dsaf_tbl_tcam_mcast_cfg - tbl - * @dsaf_id: dsa fabric id - * @ptbl_tcam_mcast: addr + * @dsaf_dev: dsa fabric id + * @mcast: addr */ static void hns_dsaf_tbl_tcam_mcast_cfg( struct dsaf_device *dsaf_dev, @@ -648,8 +648,8 @@ static void hns_dsaf_tbl_tcam_mcast_cfg( /** * hns_dsaf_tbl_tcam_ucast_cfg - tbl - * @dsaf_id: dsa fabric id - * @ptbl_tcam_ucast: addr + * @dsaf_dev: dsa fabric id + * @tbl_tcam_ucast: addr */ static void hns_dsaf_tbl_tcam_ucast_cfg( struct dsaf_device *dsaf_dev, @@ -674,8 +674,8 @@ static void hns_dsaf_tbl_tcam_ucast_cfg( /** * hns_dsaf_tbl_line_cfg - tbl - * @dsaf_id: dsa fabric id - * @ptbl_lin: addr + * @dsaf_dev: dsa fabric id + * @tbl_lin: addr */ static void hns_dsaf_tbl_line_cfg(struct dsaf_device *dsaf_dev, struct dsaf_tbl_line_cfg *tbl_lin) @@ -695,7 +695,7 @@ static void hns_dsaf_tbl_line_cfg(struct dsaf_device *dsaf_dev, /** * hns_dsaf_tbl_tcam_mcast_pul - tbl - * @dsaf_id: dsa fabric id + * @dsaf_dev: dsa fabric id */ static void hns_dsaf_tbl_tcam_mcast_pul(struct dsaf_device *dsaf_dev) { @@ -710,7 +710,7 @@ static void hns_dsaf_tbl_tcam_mcast_pul(struct dsaf_device *dsaf_dev) /** * hns_dsaf_tbl_line_pul - tbl - * @dsaf_id: dsa fabric id + * @dsaf_dev: dsa fabric id */ static void hns_dsaf_tbl_line_pul(struct dsaf_device *dsaf_dev) { @@ -725,7 +725,7 @@ static void hns_dsaf_tbl_line_pul(struct dsaf_device *dsaf_dev) /** * hns_dsaf_tbl_tcam_data_mcast_pul - tbl - * @dsaf_id: dsa fabric id + * @dsaf_dev: dsa fabric id */ static void hns_dsaf_tbl_tcam_data_mcast_pul( struct dsaf_device *dsaf_dev) @@ -743,7 +743,7 @@ static void hns_dsaf_tbl_tcam_data_mcast_pul( /** * hns_dsaf_tbl_tcam_data_ucast_pul - tbl - * @dsaf_id: dsa fabric id + * @dsaf_dev: dsa fabric id */ static void hns_dsaf_tbl_tcam_data_ucast_pul( struct dsaf_device *dsaf_dev) @@ -768,8 +768,7 @@ void hns_dsaf_set_promisc_mode(struct dsaf_device *dsaf_dev, u32 en) /** * hns_dsaf_tbl_stat_en - tbl - * @dsaf_id: dsa fabric id - * @ptbl_stat_en: addr + * @dsaf_dev: dsa fabric id */ static void hns_dsaf_tbl_stat_en(struct dsaf_device *dsaf_dev) { @@ -785,7 +784,7 @@ static void hns_dsaf_tbl_stat_en(struct dsaf_device *dsaf_dev) /** * hns_dsaf_rocee_bp_en - rocee back press enable - * @dsaf_id: dsa fabric id + * @dsaf_dev: dsa fabric id */ static void hns_dsaf_rocee_bp_en(struct dsaf_device *dsaf_dev) { @@ -852,9 +851,9 @@ static void hns_dsaf_int_tbl_src_clr(struct dsaf_device *dsaf_dev, /** * hns_dsaf_single_line_tbl_cfg - INT - * @dsaf_id: dsa fabric id - * @address: - * @ptbl_line: + * @dsaf_dev: dsa fabric id + * @address: the address + * @ptbl_line: the line */ static void hns_dsaf_single_line_tbl_cfg( struct dsaf_device *dsaf_dev, @@ -876,9 +875,10 @@ static void hns_dsaf_single_line_tbl_cfg( /** * hns_dsaf_tcam_uc_cfg - INT - * @dsaf_id: dsa fabric id - * @address, - * @ptbl_tcam_data, + * @dsaf_dev: dsa fabric id + * @address: the address + * @ptbl_tcam_data: the data + * @ptbl_tcam_ucast: unicast */ static void hns_dsaf_tcam_uc_cfg( struct dsaf_device *dsaf_dev, u32 address, @@ -904,7 +904,8 @@ static void hns_dsaf_tcam_uc_cfg( * @dsaf_dev: dsa fabric device struct pointer * @address: tcam index * @ptbl_tcam_data: tcam data struct pointer - * @ptbl_tcam_mcast: tcam mask struct pointer, it must be null for HNSv1 + * @ptbl_tcam_mask: tcam mask struct pointer, it must be null for HNSv1 + * @ptbl_tcam_mcast: tcam data struct pointer */ static void hns_dsaf_tcam_mc_cfg( struct dsaf_device *dsaf_dev, u32 address, @@ -933,8 +934,10 @@ static void hns_dsaf_tcam_mc_cfg( /** * hns_dsaf_tcam_uc_cfg_vague - INT * @dsaf_dev: dsa fabric device struct pointer - * @address, - * @ptbl_tcam_data, + * @address: the address + * @tcam_data: the data + * @tcam_mask: the mask + * @tcam_uc: the unicast data */ static void hns_dsaf_tcam_uc_cfg_vague(struct dsaf_device *dsaf_dev, u32 address, @@ -960,10 +963,10 @@ static void hns_dsaf_tcam_uc_cfg_vague(struct dsaf_device *dsaf_dev, /** * hns_dsaf_tcam_mc_cfg_vague - INT * @dsaf_dev: dsa fabric device struct pointer - * @address, - * @ptbl_tcam_data, - * @ptbl_tcam_mask - * @ptbl_tcam_mcast + * @address: the address + * @tcam_data: the data + * @tcam_mask: the mask + * @tcam_mc: the multicast data */ static void hns_dsaf_tcam_mc_cfg_vague(struct dsaf_device *dsaf_dev, u32 address, @@ -988,8 +991,8 @@ static void hns_dsaf_tcam_mc_cfg_vague(struct dsaf_device *dsaf_dev, /** * hns_dsaf_tcam_mc_invld - INT - * @dsaf_id: dsa fabric id - * @address + * @dsaf_dev: dsa fabric id + * @address: the address */ static void hns_dsaf_tcam_mc_invld(struct dsaf_device *dsaf_dev, u32 address) { @@ -1024,10 +1027,10 @@ hns_dsaf_tcam_addr_get(struct dsaf_drv_tbl_tcam_key *mac_key, u8 *addr) /** * hns_dsaf_tcam_uc_get - INT - * @dsaf_id: dsa fabric id - * @address - * @ptbl_tcam_data - * @ptbl_tcam_ucast + * @dsaf_dev: dsa fabric id + * @address: the address + * @ptbl_tcam_data: the data + * @ptbl_tcam_ucast: unicast */ static void hns_dsaf_tcam_uc_get( struct dsaf_device *dsaf_dev, u32 address, @@ -1077,10 +1080,10 @@ static void hns_dsaf_tcam_uc_get( /** * hns_dsaf_tcam_mc_get - INT - * @dsaf_id: dsa fabric id - * @address - * @ptbl_tcam_data - * @ptbl_tcam_ucast + * @dsaf_dev: dsa fabric id + * @address: the address + * @ptbl_tcam_data: the data + * @ptbl_tcam_mcast: tcam multicast data */ static void hns_dsaf_tcam_mc_get( struct dsaf_device *dsaf_dev, u32 address, @@ -1127,7 +1130,7 @@ static void hns_dsaf_tcam_mc_get( /** * hns_dsaf_tbl_line_init - INT - * @dsaf_id: dsa fabric id + * @dsaf_dev: dsa fabric id */ static void hns_dsaf_tbl_line_init(struct dsaf_device *dsaf_dev) { @@ -1141,7 +1144,7 @@ static void hns_dsaf_tbl_line_init(struct dsaf_device *dsaf_dev) /** * hns_dsaf_tbl_tcam_init - INT - * @dsaf_id: dsa fabric id + * @dsaf_dev: dsa fabric id */ static void hns_dsaf_tbl_tcam_init(struct dsaf_device *dsaf_dev) { @@ -1156,7 +1159,9 @@ static void hns_dsaf_tbl_tcam_init(struct dsaf_device *dsaf_dev) /** * hns_dsaf_pfc_en_cfg - dsaf pfc pause cfg - * @mac_cb: mac contrl block + * @dsaf_dev: dsa fabric id + * @mac_id: mac contrl block + * @tc_en: traffic class */ static void hns_dsaf_pfc_en_cfg(struct dsaf_device *dsaf_dev, int mac_id, int tc_en) @@ -1209,8 +1214,7 @@ void hns_dsaf_get_rx_mac_pause_en(struct dsaf_device *dsaf_dev, int mac_id, /** * hns_dsaf_tbl_tcam_init - INT - * @dsaf_id: dsa fabric id - * @dsaf_mode + * @dsaf_dev: dsa fabric id */ static void hns_dsaf_comm_init(struct dsaf_device *dsaf_dev) { @@ -1263,7 +1267,7 @@ static void hns_dsaf_comm_init(struct dsaf_device *dsaf_dev) /** * hns_dsaf_inode_init - INT - * @dsaf_id: dsa fabric id + * @dsaf_dev: dsa fabric id */ static void hns_dsaf_inode_init(struct dsaf_device *dsaf_dev) { @@ -1315,7 +1319,7 @@ static void hns_dsaf_inode_init(struct dsaf_device *dsaf_dev) /** * hns_dsaf_sbm_init - INT - * @dsaf_id: dsa fabric id + * @dsaf_dev: dsa fabric id */ static int hns_dsaf_sbm_init(struct dsaf_device *dsaf_dev) { @@ -1369,7 +1373,7 @@ static int hns_dsaf_sbm_init(struct dsaf_device *dsaf_dev) /** * hns_dsaf_tbl_init - INT - * @dsaf_id: dsa fabric id + * @dsaf_dev: dsa fabric id */ static void hns_dsaf_tbl_init(struct dsaf_device *dsaf_dev) { @@ -1381,7 +1385,7 @@ static void hns_dsaf_tbl_init(struct dsaf_device *dsaf_dev) /** * hns_dsaf_voq_init - INT - * @dsaf_id: dsa fabric id + * @dsaf_dev: dsa fabric id */ static void hns_dsaf_voq_init(struct dsaf_device *dsaf_dev) { @@ -1435,7 +1439,7 @@ static void hns_dsaf_remove_hw(struct dsaf_device *dsaf_dev) /** * hns_dsaf_init - init dsa fabric * @dsaf_dev: dsa fabric device struct pointer - * retuen 0 - success , negative --fail + * return 0 - success , negative --fail */ static int hns_dsaf_init(struct dsaf_device *dsaf_dev) { @@ -2099,7 +2103,7 @@ static struct dsaf_device *hns_dsaf_alloc_dev(struct device *dev, /** * hns_dsaf_free_dev - free dev mem - * @dev: struct device pointer + * @dsaf_dev: struct device pointer */ static void hns_dsaf_free_dev(struct dsaf_device *dsaf_dev) { @@ -2108,9 +2112,9 @@ static void hns_dsaf_free_dev(struct dsaf_device *dsaf_dev) /** * dsaf_pfc_unit_cnt - set pfc unit count - * @dsaf_id: dsa fabric id - * @pport_rate: value array - * @pdsaf_pfc_unit_cnt: value array + * @dsaf_dev: dsa fabric id + * @mac_id: id in use + * @rate: value array */ static void hns_dsaf_pfc_unit_cnt(struct dsaf_device *dsaf_dev, int mac_id, enum dsaf_port_rate_mode rate) @@ -2139,8 +2143,9 @@ static void hns_dsaf_pfc_unit_cnt(struct dsaf_device *dsaf_dev, int mac_id, /** * dsaf_port_work_rate_cfg - fifo - * @dsaf_id: dsa fabric id - * @xge_ge_work_mode + * @dsaf_dev: dsa fabric id + * @mac_id: mac contrl block + * @rate_mode: value array */ static void hns_dsaf_port_work_rate_cfg(struct dsaf_device *dsaf_dev, int mac_id, @@ -2253,7 +2258,8 @@ void hns_dsaf_update_stats(struct dsaf_device *dsaf_dev, u32 node_num) /** *hns_dsaf_get_regs - dump dsaf regs - *@dsaf_dev: dsaf device + *@ddev: dsaf device + *@port: port *@data:data for value of regs */ void hns_dsaf_get_regs(struct dsaf_device *ddev, u32 port, void *data) @@ -2690,6 +2696,7 @@ void hns_dsaf_get_stats(struct dsaf_device *ddev, u64 *data, int port) /** *hns_dsaf_get_sset_count - get dsaf string set count + *@dsaf_dev: dsaf device *@stringset: type of values in data *return dsaf string name count */ @@ -2711,6 +2718,7 @@ int hns_dsaf_get_sset_count(struct dsaf_device *dsaf_dev, int stringset) *@stringset:srting set index *@data:strings name value *@port:port index + *@dsaf_dev: dsaf device */ void hns_dsaf_get_strings(int stringset, u8 *data, int port, struct dsaf_device *dsaf_dev) @@ -2943,7 +2951,7 @@ int hns_dsaf_wait_pkt_clean(struct dsaf_device *dsaf_dev, int port) /** * dsaf_probe - probo dsaf dev * @pdev: dasf platform device - * retuen 0 - success , negative --fail + * return 0 - success , negative --fail */ static int hns_dsaf_probe(struct platform_device *pdev) { @@ -3038,8 +3046,8 @@ module_platform_driver(g_dsaf_driver); /** * hns_dsaf_roce_reset - reset dsaf and roce * @dsaf_fwnode: Pointer to framework node for the dasf - * @enable: false - request reset , true - drop reset - * retuen 0 - success , negative -fail + * @dereset: false - request reset , true - drop reset + * return 0 - success , negative -fail */ int hns_dsaf_roce_reset(struct fwnode_handle *dsaf_fwnode, bool dereset) { |