Lines Matching refs:dsaf_dev

34 	ppe_comm = vf_cb->dsaf_dev->ppe_common[0];  in hns_get_ppe_cb()
41 struct dsaf_device *dsaf_dev, int port) in hns_ae_get_q_num_per_vf() argument
43 return dsaf_dev->rcb_common[0]->max_q_per_vf; in hns_ae_get_q_num_per_vf()
47 struct dsaf_device *dsaf_dev, int port) in hns_ae_get_vf_num_per_port() argument
49 return dsaf_dev->rcb_common[0]->max_vfn; in hns_ae_get_vf_num_per_port()
53 struct dsaf_device *dsaf_dev, int port) in hns_ae_get_base_ring_pair() argument
55 struct rcb_common_cb *rcb_comm = dsaf_dev->rcb_common[0]; in hns_ae_get_base_ring_pair()
73 struct dsaf_device *dsaf_dev; in hns_ae_get_handle() local
78 dsaf_dev = hns_ae_get_dsaf_dev(dev); in hns_ae_get_handle()
80 ring_pair_cb = hns_ae_get_base_ring_pair(dsaf_dev, port_id); in hns_ae_get_handle()
81 vfnum_per_port = hns_ae_get_vf_num_per_port(dsaf_dev, port_id); in hns_ae_get_handle()
82 qnum_per_vf = hns_ae_get_q_num_per_vf(dsaf_dev, port_id); in hns_ae_get_handle()
87 dev_err(dsaf_dev->dev, "malloc vf_cb fail!\n"); in hns_ae_get_handle()
93 ae_handle->owner_dev = dsaf_dev->dev; in hns_ae_get_handle()
106 dev_err(dsaf_dev->dev, "malloc queue fail!\n"); in hns_ae_get_handle()
120 vf_cb->dsaf_dev = dsaf_dev; in hns_ae_get_handle()
122 vf_cb->mac_cb = dsaf_dev->mac_cb[port_id]; in hns_ae_get_handle()
151 struct dsaf_device *dsaf_dev; in hns_ae_wait_flow_down() local
168 dsaf_dev = hns_ae_get_dsaf_dev(handle->dev); in hns_ae_wait_flow_down()
169 if (!dsaf_dev) in hns_ae_wait_flow_down()
171 ret = hns_dsaf_wait_pkt_clean(dsaf_dev, handle->dport_id); in hns_ae_wait_flow_down()
302 if (!AE_IS_VER1(mac_cb->dsaf_dev->dsaf_ver)) { in hns_ae_set_mtu()
308 rx_buf_size = mac_cb->dsaf_dev->buf_size; in hns_ae_set_mtu()
343 if (AE_IS_VER1(mac_cb->dsaf_dev->dsaf_ver)) in hns_ae_start()
385 hns_ppe_reset_common(vf_cb->dsaf_dev, 0); in hns_ae_reset()
444 switch (mac_cb->dsaf_dev->dsaf_ver) { in hns_ae_adjust_link()
476 struct dsaf_device *dsaf_dev = mac_cb->dsaf_dev; in hns_ae_get_pauseparam() local
484 hns_dsaf_get_rx_mac_pause_en(dsaf_dev, mac_cb->mac_id, rx_en); in hns_ae_get_pauseparam()
499 struct dsaf_device *dsaf_dev = mac_cb->dsaf_dev; in hns_ae_set_pauseparam() local
508 ret = hns_dsaf_set_rx_mac_pause_en(dsaf_dev, in hns_ae_set_pauseparam()
534 struct dsaf_device *dsaf_dev = hns_ae_get_dsaf_dev(handle->dev); in hns_ae_get_max_coalesced_frames() local
536 if (AE_IS_VER1(dsaf_dev->dsaf_ver) || in hns_ae_get_max_coalesced_frames()
563 struct dsaf_device *dsaf_dev = hns_ae_get_dsaf_dev(handle->dev); in hns_ae_set_coalesce_frames() local
565 if (AE_IS_VER1(dsaf_dev->dsaf_ver) || in hns_ae_set_coalesce_frames()
593 struct dsaf_device *dsaf_dev; in hns_ae_get_coalesce_range() local
597 dsaf_dev = hns_ae_get_dsaf_dev(handle->dev); in hns_ae_get_coalesce_range()
602 if (AE_IS_VER1(dsaf_dev->dsaf_ver) || in hns_ae_get_coalesce_range()
605 (dsaf_dev->desc_num - 1 > HNS_RCB_TX_FRAMES_HIGH) ? in hns_ae_get_coalesce_range()
606 HNS_RCB_TX_FRAMES_HIGH : dsaf_dev->desc_num - 1; in hns_ae_get_coalesce_range()
610 *rx_frames_high = (dsaf_dev->desc_num - 1 > HNS_RCB_RX_FRAMES_HIGH) ? in hns_ae_get_coalesce_range()
611 HNS_RCB_RX_FRAMES_HIGH : dsaf_dev->desc_num - 1; in hns_ae_get_coalesce_range()
623 struct dsaf_device *dsaf_dev; in hns_ae_update_stats() local
632 dsaf_dev = hns_ae_get_dsaf_dev(handle->dev); in hns_ae_update_stats()
633 if (!dsaf_dev) in hns_ae_update_stats()
659 hns_dsaf_update_stats(dsaf_dev, port); in hns_ae_update_stats()
661 rx_missed_errors += dsaf_dev->hw_stats[port].bp_drop; in hns_ae_update_stats()
662 rx_missed_errors += dsaf_dev->hw_stats[port].pad_drop; in hns_ae_update_stats()
663 rx_missed_errors += dsaf_dev->hw_stats[port].crc_false; in hns_ae_update_stats()
667 hns_dsaf_update_stats(dsaf_dev, port); in hns_ae_update_stats()
668 tx_dropped += dsaf_dev->hw_stats[port].bp_drop; in hns_ae_update_stats()
669 tx_dropped += dsaf_dev->hw_stats[port].pad_drop; in hns_ae_update_stats()
670 tx_dropped += dsaf_dev->hw_stats[port].crc_false; in hns_ae_update_stats()
671 tx_dropped += dsaf_dev->hw_stats[port].rslt_drop; in hns_ae_update_stats()
672 tx_dropped += dsaf_dev->hw_stats[port].vlan_drop; in hns_ae_update_stats()
673 tx_dropped += dsaf_dev->hw_stats[port].stp_drop; in hns_ae_update_stats()
730 hns_dsaf_get_stats(vf_cb->dsaf_dev, p, vf_cb->port_index); in hns_ae_get_stats()
740 struct dsaf_device *dsaf_dev = hns_ae_get_dsaf_dev(handle->dev); in hns_ae_get_strings() local
763 hns_dsaf_get_strings(stringset, p, port, dsaf_dev); in hns_ae_get_strings()
770 struct dsaf_device *dsaf_dev = hns_ae_get_dsaf_dev(handle->dev); in hns_ae_get_sset_count() local
781 sset_count += hns_dsaf_get_sset_count(dsaf_dev, stringset); in hns_ae_get_sset_count()
792 struct dsaf_device *dsaf_dev = mac_cb->dsaf_dev; in hns_ae_config_loopback() local
799 ret = dsaf_dev->misc_op->cfg_serdes_loopback(vf_cb->mac_cb, in hns_ae_config_loopback()
846 hns_rcb_get_common_regs(vf_cb->dsaf_dev->rcb_common[0], p); in hns_ae_get_regs()
858 hns_dsaf_get_regs(vf_cb->dsaf_dev, vf_cb->port_index, p); in hns_ae_get_regs()
975 int hns_dsaf_ae_init(struct dsaf_device *dsaf_dev) in hns_dsaf_ae_init() argument
977 struct hnae_ae_dev *ae_dev = &dsaf_dev->ae_dev; in hns_dsaf_ae_init()
980 switch (dsaf_dev->dsaf_ver) { in hns_dsaf_ae_init()
994 ae_dev->dev = dsaf_dev->dev; in hns_dsaf_ae_init()
999 void hns_dsaf_ae_uninit(struct dsaf_device *dsaf_dev) in hns_dsaf_ae_uninit() argument
1001 hnae_ae_unregister(&dsaf_dev->ae_dev); in hns_dsaf_ae_uninit()