Lines Matching refs:dsaf_dev
36 ppe_comm = vf_cb->dsaf_dev->ppe_common[0]; in hns_get_ppe_cb()
43 struct dsaf_device *dsaf_dev, int port) in hns_ae_get_q_num_per_vf() argument
45 return dsaf_dev->rcb_common[0]->max_q_per_vf; in hns_ae_get_q_num_per_vf()
49 struct dsaf_device *dsaf_dev, int port) in hns_ae_get_vf_num_per_port() argument
51 return dsaf_dev->rcb_common[0]->max_vfn; in hns_ae_get_vf_num_per_port()
55 struct dsaf_device *dsaf_dev, int port) in hns_ae_get_base_ring_pair() argument
57 struct rcb_common_cb *rcb_comm = dsaf_dev->rcb_common[0]; in hns_ae_get_base_ring_pair()
75 struct dsaf_device *dsaf_dev; in hns_ae_get_handle() local
80 dsaf_dev = hns_ae_get_dsaf_dev(dev); in hns_ae_get_handle()
82 ring_pair_cb = hns_ae_get_base_ring_pair(dsaf_dev, port_id); in hns_ae_get_handle()
83 vfnum_per_port = hns_ae_get_vf_num_per_port(dsaf_dev, port_id); in hns_ae_get_handle()
84 qnum_per_vf = hns_ae_get_q_num_per_vf(dsaf_dev, port_id); in hns_ae_get_handle()
89 dev_err(dsaf_dev->dev, "malloc vf_cb fail!\n"); in hns_ae_get_handle()
95 ae_handle->owner_dev = dsaf_dev->dev; in hns_ae_get_handle()
108 dev_err(dsaf_dev->dev, "malloc queue fail!\n"); in hns_ae_get_handle()
123 vf_cb->dsaf_dev = dsaf_dev; in hns_ae_get_handle()
125 vf_cb->mac_cb = dsaf_dev->mac_cb[port_id]; in hns_ae_get_handle()
154 struct dsaf_device *dsaf_dev; in hns_ae_wait_flow_down() local
171 dsaf_dev = hns_ae_get_dsaf_dev(handle->dev); in hns_ae_wait_flow_down()
172 if (!dsaf_dev) in hns_ae_wait_flow_down()
174 ret = hns_dsaf_wait_pkt_clean(dsaf_dev, handle->dport_id); in hns_ae_wait_flow_down()
305 if (!AE_IS_VER1(mac_cb->dsaf_dev->dsaf_ver)) { in hns_ae_set_mtu()
311 rx_buf_size = mac_cb->dsaf_dev->buf_size; in hns_ae_set_mtu()
346 if (AE_IS_VER1(mac_cb->dsaf_dev->dsaf_ver)) in hns_ae_start()
388 hns_ppe_reset_common(vf_cb->dsaf_dev, 0); in hns_ae_reset()
447 switch (mac_cb->dsaf_dev->dsaf_ver) { in hns_ae_adjust_link()
481 struct dsaf_device *dsaf_dev = mac_cb->dsaf_dev; in hns_ae_get_pauseparam() local
489 hns_dsaf_get_rx_mac_pause_en(dsaf_dev, mac_cb->mac_id, rx_en); in hns_ae_get_pauseparam()
522 struct dsaf_device *dsaf_dev = mac_cb->dsaf_dev; in hns_ae_set_pauseparam() local
531 ret = hns_dsaf_set_rx_mac_pause_en(dsaf_dev, in hns_ae_set_pauseparam()
557 struct dsaf_device *dsaf_dev = hns_ae_get_dsaf_dev(handle->dev); in hns_ae_get_max_coalesced_frames() local
559 if (AE_IS_VER1(dsaf_dev->dsaf_ver) || in hns_ae_get_max_coalesced_frames()
586 struct dsaf_device *dsaf_dev = hns_ae_get_dsaf_dev(handle->dev); in hns_ae_set_coalesce_frames() local
588 if (AE_IS_VER1(dsaf_dev->dsaf_ver) || in hns_ae_set_coalesce_frames()
616 struct dsaf_device *dsaf_dev; in hns_ae_get_coalesce_range() local
620 dsaf_dev = hns_ae_get_dsaf_dev(handle->dev); in hns_ae_get_coalesce_range()
625 if (AE_IS_VER1(dsaf_dev->dsaf_ver) || in hns_ae_get_coalesce_range()
628 (dsaf_dev->desc_num - 1 > HNS_RCB_TX_FRAMES_HIGH) ? in hns_ae_get_coalesce_range()
629 HNS_RCB_TX_FRAMES_HIGH : dsaf_dev->desc_num - 1; in hns_ae_get_coalesce_range()
633 *rx_frames_high = (dsaf_dev->desc_num - 1 > HNS_RCB_RX_FRAMES_HIGH) ? in hns_ae_get_coalesce_range()
634 HNS_RCB_RX_FRAMES_HIGH : dsaf_dev->desc_num - 1; in hns_ae_get_coalesce_range()
646 struct dsaf_device *dsaf_dev; in hns_ae_update_stats() local
655 dsaf_dev = hns_ae_get_dsaf_dev(handle->dev); in hns_ae_update_stats()
656 if (!dsaf_dev) in hns_ae_update_stats()
682 hns_dsaf_update_stats(dsaf_dev, port); in hns_ae_update_stats()
684 rx_missed_errors += dsaf_dev->hw_stats[port].bp_drop; in hns_ae_update_stats()
685 rx_missed_errors += dsaf_dev->hw_stats[port].pad_drop; in hns_ae_update_stats()
686 rx_missed_errors += dsaf_dev->hw_stats[port].crc_false; in hns_ae_update_stats()
690 hns_dsaf_update_stats(dsaf_dev, port); in hns_ae_update_stats()
691 tx_dropped += dsaf_dev->hw_stats[port].bp_drop; in hns_ae_update_stats()
692 tx_dropped += dsaf_dev->hw_stats[port].pad_drop; in hns_ae_update_stats()
693 tx_dropped += dsaf_dev->hw_stats[port].crc_false; in hns_ae_update_stats()
694 tx_dropped += dsaf_dev->hw_stats[port].rslt_drop; in hns_ae_update_stats()
695 tx_dropped += dsaf_dev->hw_stats[port].vlan_drop; in hns_ae_update_stats()
696 tx_dropped += dsaf_dev->hw_stats[port].stp_drop; in hns_ae_update_stats()
753 hns_dsaf_get_stats(vf_cb->dsaf_dev, p, vf_cb->port_index); in hns_ae_get_stats()
763 struct dsaf_device *dsaf_dev = hns_ae_get_dsaf_dev(handle->dev); in hns_ae_get_strings() local
786 hns_dsaf_get_strings(stringset, p, port, dsaf_dev); in hns_ae_get_strings()
793 struct dsaf_device *dsaf_dev = hns_ae_get_dsaf_dev(handle->dev); in hns_ae_get_sset_count() local
804 sset_count += hns_dsaf_get_sset_count(dsaf_dev, stringset); in hns_ae_get_sset_count()
815 struct dsaf_device *dsaf_dev = mac_cb->dsaf_dev; in hns_ae_config_loopback() local
822 ret = dsaf_dev->misc_op->cfg_serdes_loopback(vf_cb->mac_cb, in hns_ae_config_loopback()
869 hns_rcb_get_common_regs(vf_cb->dsaf_dev->rcb_common[0], p); in hns_ae_get_regs()
881 hns_dsaf_get_regs(vf_cb->dsaf_dev, vf_cb->port_index, p); in hns_ae_get_regs()
1000 int hns_dsaf_ae_init(struct dsaf_device *dsaf_dev) in hns_dsaf_ae_init() argument
1002 struct hnae_ae_dev *ae_dev = &dsaf_dev->ae_dev; in hns_dsaf_ae_init()
1005 switch (dsaf_dev->dsaf_ver) { in hns_dsaf_ae_init()
1019 ae_dev->dev = dsaf_dev->dev; in hns_dsaf_ae_init()
1024 void hns_dsaf_ae_uninit(struct dsaf_device *dsaf_dev) in hns_dsaf_ae_uninit() argument
1026 hnae_ae_unregister(&dsaf_dev->ae_dev); in hns_dsaf_ae_uninit()