/drivers/net/ethernet/huawei/hinic/ |
D | hinic_main.c | 79 static int set_features(struct hinic_dev *nic_dev, 110 static void gather_nic_stats(struct hinic_dev *nic_dev, in gather_nic_stats() argument 114 int i, num_qps = hinic_hwdev_num_qps(nic_dev->hwdev); in gather_nic_stats() 117 gather_rx_stats(nic_rx_stats, &nic_dev->rxqs[i]); in gather_nic_stats() 120 gather_tx_stats(nic_tx_stats, &nic_dev->txqs[i]); in gather_nic_stats() 129 static int create_txqs(struct hinic_dev *nic_dev) in create_txqs() argument 131 int err, i, j, num_txqs = hinic_hwdev_num_qps(nic_dev->hwdev); in create_txqs() 132 struct net_device *netdev = nic_dev->netdev; in create_txqs() 134 if (nic_dev->txqs) in create_txqs() 137 nic_dev->txqs = devm_kcalloc(&netdev->dev, num_txqs, in create_txqs() [all …]
|
D | hinic_ethtool.c | 260 struct hinic_dev *nic_dev = netdev_priv(netdev); in hinic_get_link_ksettings() local 275 err = hinic_port_get_cap(nic_dev, &port_cap); in hinic_get_link_ksettings() 282 err = hinic_port_link_state(nic_dev, &link_state); in hinic_get_link_ksettings() 300 err = hinic_get_link_mode(nic_dev->hwdev, &link_mode); in hinic_get_link_ksettings() 310 if (!HINIC_IS_VF(nic_dev->hwdev->hwif)) { in hinic_get_link_ksettings() 311 err = hinic_get_hw_pause_info(nic_dev->hwdev, &pause_info); in hinic_get_link_ksettings() 368 static bool hinic_is_speed_legal(struct hinic_dev *nic_dev, u32 speed) in hinic_is_speed_legal() argument 371 struct net_device *netdev = nic_dev->netdev; in hinic_is_speed_legal() 375 err = hinic_get_link_mode(nic_dev->hwdev, &link_mode); in hinic_is_speed_legal() 386 netif_err(nic_dev, drv, netdev, in hinic_is_speed_legal() [all …]
|
D | hinic_debugfs.c | 23 static u64 hinic_dbg_get_sq_info(struct hinic_dev *nic_dev, struct hinic_sq *sq, int idx) in hinic_dbg_get_sq_info() argument 29 return nic_dev->hwdev->func_to_io.global_qpn + sq->qid; in hinic_dbg_get_sq_info() 53 static u64 hinic_dbg_get_rq_info(struct hinic_dev *nic_dev, struct hinic_rq *rq, int idx) in hinic_dbg_get_rq_info() argument 59 return nic_dev->hwdev->func_to_io.global_qpn + rq->qid; in hinic_dbg_get_rq_info() 83 static int hinic_dbg_get_func_table(struct hinic_dev *nic_dev, int idx) in hinic_dbg_get_func_table() argument 98 read_data->lt_index = HINIC_HWIF_FUNC_IDX(nic_dev->hwdev->hwif); in hinic_dbg_get_func_table() 101 err = hinic_port_msg_cmd(nic_dev->hwdev, HINIC_PORT_CMD_RD_LINE_TBL, read_data, in hinic_dbg_get_func_table() 104 netif_err(nic_dev, drv, nic_dev->netdev, in hinic_dbg_get_func_table() 271 void hinic_sq_dbgfs_init(struct hinic_dev *nic_dev) in hinic_sq_dbgfs_init() argument 273 nic_dev->sq_dbgfs = debugfs_create_dir("SQs", nic_dev->dbgfs_root); in hinic_sq_dbgfs_init() [all …]
|
D | hinic_rx.c | 129 struct hinic_dev *nic_dev = netdev_priv(rxq->netdev); in rx_alloc_skb() local 130 struct hinic_hwdev *hwdev = nic_dev->hwdev; in rx_alloc_skb() 166 struct hinic_dev *nic_dev = netdev_priv(rxq->netdev); in rx_unmap_skb() local 167 struct hinic_hwdev *hwdev = nic_dev->hwdev; in rx_unmap_skb() 196 struct hinic_dev *nic_dev = netdev_priv(rxq->netdev); in rx_alloc_pkts() local 208 if (free_wqebbs > nic_dev->rx_weight) in rx_alloc_pkts() 209 free_wqebbs = nic_dev->rx_weight; in rx_alloc_pkts() 317 static void hinic_copy_lp_data(struct hinic_dev *nic_dev, in hinic_copy_lp_data() argument 320 struct net_device *netdev = nic_dev->netdev; in hinic_copy_lp_data() 321 u8 *lb_buf = nic_dev->lb_test_rx_buf; in hinic_copy_lp_data() [all …]
|
D | hinic_port.c | 37 static int change_mac(struct hinic_dev *nic_dev, const u8 *addr, in change_mac() argument 40 struct hinic_hwdev *hwdev = nic_dev->hwdev; in change_mac() 90 int hinic_port_add_mac(struct hinic_dev *nic_dev, in hinic_port_add_mac() argument 93 return change_mac(nic_dev, addr, vlan_id, MAC_SET); in hinic_port_add_mac() 104 int hinic_port_del_mac(struct hinic_dev *nic_dev, const u8 *addr, in hinic_port_del_mac() argument 107 return change_mac(nic_dev, addr, vlan_id, MAC_DEL); in hinic_port_del_mac() 117 int hinic_port_get_mac(struct hinic_dev *nic_dev, u8 *addr) in hinic_port_get_mac() argument 119 struct hinic_hwdev *hwdev = nic_dev->hwdev; in hinic_port_get_mac() 148 int hinic_port_set_mtu(struct hinic_dev *nic_dev, int new_mtu) in hinic_port_set_mtu() argument 150 struct net_device *netdev = nic_dev->netdev; in hinic_port_set_mtu() [all …]
|
D | hinic_sriov.c | 498 struct hinic_dev *nic_dev = netdev_priv(netdev); in hinic_get_sriov_info_by_pcidev() local 500 return &nic_dev->sriov_info; in hinic_get_sriov_info_by_pcidev() 580 struct hinic_dev *nic_dev = netdev_priv(netdev); in hinic_ndo_get_vf_config() local 583 sriov_info = &nic_dev->sriov_info; in hinic_ndo_get_vf_config() 624 struct hinic_dev *nic_dev = netdev_priv(netdev); in hinic_ndo_set_vf_mac() local 628 sriov_info = &nic_dev->sriov_info; in hinic_ndo_set_vf_mac() 636 netif_info(nic_dev, drv, netdev, "Setting MAC %pM on VF %d\n", mac, vf); in hinic_ndo_set_vf_mac() 637 netif_info(nic_dev, drv, netdev, "Reload the VF driver to make this change effective."); in hinic_ndo_set_vf_mac() 682 static int hinic_update_mac_vlan(struct hinic_dev *nic_dev, u16 old_vlan, in hinic_update_mac_vlan() argument 689 if (!nic_dev || old_vlan >= VLAN_N_VID || new_vlan >= VLAN_N_VID) in hinic_update_mac_vlan() [all …]
|
D | hinic_tx.c | 131 static int tx_map_skb(struct hinic_dev *nic_dev, struct sk_buff *skb, in tx_map_skb() argument 134 struct hinic_hwdev *hwdev = nic_dev->hwdev; in tx_map_skb() 182 static void tx_unmap_skb(struct hinic_dev *nic_dev, struct sk_buff *skb, in tx_unmap_skb() argument 185 struct hinic_hwdev *hwdev = nic_dev->hwdev; in tx_unmap_skb() 491 struct hinic_dev *nic_dev = netdev_priv(netdev); in hinic_lb_xmit_frame() local 500 txq = &nic_dev->txqs[q_id]; in hinic_lb_xmit_frame() 504 err = tx_map_skb(nic_dev, skb, txq->sges); in hinic_lb_xmit_frame() 516 netif_wake_subqueue(nic_dev->netdev, qp->q_id); in hinic_lb_xmit_frame() 520 tx_unmap_skb(nic_dev, skb, txq->sges); in hinic_lb_xmit_frame() 552 struct hinic_dev *nic_dev = netdev_priv(netdev); in hinic_xmit_frame() local [all …]
|
D | hinic_port.h | 756 int hinic_port_add_mac(struct hinic_dev *nic_dev, const u8 *addr, 759 int hinic_port_del_mac(struct hinic_dev *nic_dev, const u8 *addr, 762 int hinic_port_get_mac(struct hinic_dev *nic_dev, u8 *addr); 764 int hinic_port_set_mtu(struct hinic_dev *nic_dev, int new_mtu); 766 int hinic_port_add_vlan(struct hinic_dev *nic_dev, u16 vlan_id); 768 int hinic_port_del_vlan(struct hinic_dev *nic_dev, u16 vlan_id); 770 int hinic_port_set_rx_mode(struct hinic_dev *nic_dev, u32 rx_mode); 772 int hinic_port_link_state(struct hinic_dev *nic_dev, 775 int hinic_port_set_state(struct hinic_dev *nic_dev, 778 int hinic_port_set_func_state(struct hinic_dev *nic_dev, [all …]
|
D | hinic_debugfs.h | 94 void hinic_sq_dbgfs_init(struct hinic_dev *nic_dev); 96 void hinic_sq_dbgfs_uninit(struct hinic_dev *nic_dev); 98 void hinic_rq_dbgfs_init(struct hinic_dev *nic_dev); 100 void hinic_rq_dbgfs_uninit(struct hinic_dev *nic_dev); 102 void hinic_func_tbl_dbgfs_init(struct hinic_dev *nic_dev); 104 void hinic_func_tbl_dbgfs_uninit(struct hinic_dev *nic_dev); 106 void hinic_dbg_init(struct hinic_dev *nic_dev); 108 void hinic_dbg_uninit(struct hinic_dev *nic_dev);
|