Lines Matching refs:handle
954 void hns3_request_update_promisc_mode(struct hnae3_handle *handle) in hns3_request_update_promisc_mode() argument
956 const struct hnae3_ae_ops *ops = handle->ae_algo->ops; in hns3_request_update_promisc_mode()
959 ops->request_update_promisc_mode(handle); in hns3_request_update_promisc_mode()
1034 u32 alloc_size = ring->tqp->handle->kinfo.tx_spare_buf_size; in hns3_init_tx_spare_buffer()
1083 ring->tqp->handle->kinfo.tx_spare_buf_size = 0; in hns3_init_tx_spare_buffer()
1487 struct hnae3_handle *handle = tx_ring->tqp->handle; in hns3_handle_vtags() local
1500 ae_dev = pci_get_drvdata(handle->pdev); in hns3_handle_vtags()
1503 handle->port_base_vlan_state == in hns3_handle_vtags()
1508 !(handle->kinfo.netdev->features & NETIF_F_HW_VLAN_CTAG_TX)) { in hns3_handle_vtags()
1522 handle->port_base_vlan_state == in hns3_handle_vtags()
2542 struct hnae3_handle *handle = priv->ae_handle; in hns3_nic_get_stats64() local
2550 handle->ae_algo->ops->update_stats(handle); in hns3_nic_get_stats64()
2724 struct hnae3_handle *handle = hns3_get_handle(netdev); in hns3_set_vf_spoofchk() local
2729 if (!handle->ae_algo->ops->set_vf_spoofchk) in hns3_set_vf_spoofchk()
2732 return handle->ae_algo->ops->set_vf_spoofchk(handle, vf, enable); in hns3_set_vf_spoofchk()
2737 struct hnae3_handle *handle = hns3_get_handle(netdev); in hns3_set_vf_trust() local
2739 if (!handle->ae_algo->ops->set_vf_trust) in hns3_set_vf_trust()
2742 return handle->ae_algo->ops->set_vf_trust(handle, vf, enable); in hns3_set_vf_trust()
3975 struct hnae3_handle *handle = ring->tqp->handle; in hns3_parse_vlan_tag() local
3976 struct pci_dev *pdev = ring->tqp->handle->pdev; in hns3_parse_vlan_tag()
3998 if (handle->port_base_vlan_state != in hns3_parse_vlan_tag()
4005 if (handle->port_base_vlan_state != in hns3_parse_vlan_tag()
4012 if (handle->port_base_vlan_state == in hns3_parse_vlan_tag()
4529 struct pci_dev *pdev = tqp_vector->handle->pdev; in hns3_create_ring_chain()
4566 struct pci_dev *pdev = tqp_vector->handle->pdev; in hns3_get_vector_ring_chain()
4591 struct pci_dev *pdev = tqp_vector->handle->pdev; in hns3_free_vector_ring_chain()
4717 tqp_vector->handle = h; in hns3_nic_init_vector_data()
5191 static int hns3_client_start(struct hnae3_handle *handle) in hns3_client_start() argument
5193 if (!handle->ae_algo->ops->client_start) in hns3_client_start()
5196 return handle->ae_algo->ops->client_start(handle); in hns3_client_start()
5199 static void hns3_client_stop(struct hnae3_handle *handle) in hns3_client_stop() argument
5201 if (!handle->ae_algo->ops->client_stop) in hns3_client_stop()
5204 handle->ae_algo->ops->client_stop(handle); in hns3_client_stop()
5229 struct hnae3_handle *handle = priv->ae_handle; in hns3_set_cq_period_mode() local
5252 writel(new_mode, handle->kinfo.io_base + reg); in hns3_set_cq_period_mode()
5264 static void hns3_state_init(struct hnae3_handle *handle) in hns3_state_init() argument
5266 struct hnae3_ae_dev *ae_dev = pci_get_drvdata(handle->pdev); in hns3_state_init()
5267 struct net_device *netdev = handle->kinfo.netdev; in hns3_state_init()
5276 set_bit(HNAE3_PFLAG_LIMIT_PROMISC, &handle->supported_pflags); in hns3_state_init()
5285 static void hns3_state_uninit(struct hnae3_handle *handle) in hns3_state_uninit() argument
5287 struct hns3_nic_priv *priv = handle->priv; in hns3_state_uninit()
5292 static int hns3_client_init(struct hnae3_handle *handle) in hns3_client_init() argument
5294 struct pci_dev *pdev = handle->pdev; in hns3_client_init()
5301 handle->ae_algo->ops->get_tqps_and_rss_info(handle, &alloc_tqps, in hns3_client_init()
5310 priv->ae_handle = handle; in hns3_client_init()
5315 handle->msg_enable = netif_msg_init(debug, DEFAULT_MSG_LEVEL); in hns3_client_init()
5317 handle->kinfo.netdev = netdev; in hns3_client_init()
5318 handle->priv = (void *)priv; in hns3_client_init()
5378 ret = hns3_client_start(handle); in hns3_client_init()
5384 hns3_dcbnl_setup(handle); in hns3_client_init()
5386 ret = hns3_dbg_init(handle); in hns3_client_init()
5395 hns3_state_init(handle); in hns3_client_init()
5403 if (netif_msg_drv(handle)) in hns3_client_init()
5409 hns3_state_uninit(handle); in hns3_client_init()
5410 hns3_dbg_uninit(handle); in hns3_client_init()
5411 hns3_client_stop(handle); in hns3_client_init()
5431 static void hns3_client_uninit(struct hnae3_handle *handle, bool reset) in hns3_client_uninit() argument
5433 struct net_device *netdev = handle->kinfo.netdev; in hns3_client_uninit()
5439 hns3_client_stop(handle); in hns3_client_uninit()
5452 hns3_clear_all_ring(handle, true); in hns3_client_uninit()
5463 hns3_dbg_uninit(handle); in hns3_client_uninit()
5467 static void hns3_link_status_change(struct hnae3_handle *handle, bool linkup) in hns3_link_status_change() argument
5469 struct net_device *netdev = handle->kinfo.netdev; in hns3_link_status_change()
5477 if (netif_msg_link(handle)) in hns3_link_status_change()
5482 if (netif_msg_link(handle)) in hns3_link_status_change()
5619 static int hns3_reset_notify_down_enet(struct hnae3_handle *handle) in hns3_reset_notify_down_enet() argument
5621 struct hnae3_knic_private_info *kinfo = &handle->kinfo; in hns3_reset_notify_down_enet()
5634 static int hns3_reset_notify_up_enet(struct hnae3_handle *handle) in hns3_reset_notify_up_enet() argument
5636 struct hnae3_knic_private_info *kinfo = &handle->kinfo; in hns3_reset_notify_up_enet()
5660 static int hns3_reset_notify_init_enet(struct hnae3_handle *handle) in hns3_reset_notify_init_enet() argument
5662 struct net_device *netdev = handle->kinfo.netdev; in hns3_reset_notify_init_enet()
5699 if (!hns3_is_phys_func(handle->pdev)) in hns3_reset_notify_init_enet()
5702 ret = hns3_client_start(handle); in hns3_reset_notify_init_enet()
5727 static int hns3_reset_notify_uninit_enet(struct hnae3_handle *handle) in hns3_reset_notify_uninit_enet() argument
5729 struct net_device *netdev = handle->kinfo.netdev; in hns3_reset_notify_uninit_enet()
5742 hns3_clear_all_ring(handle, true); in hns3_reset_notify_uninit_enet()
5756 int hns3_reset_notify(struct hnae3_handle *handle, in hns3_reset_notify() argument
5763 ret = hns3_reset_notify_up_enet(handle); in hns3_reset_notify()
5766 ret = hns3_reset_notify_down_enet(handle); in hns3_reset_notify()
5769 ret = hns3_reset_notify_init_enet(handle); in hns3_reset_notify()
5772 ret = hns3_reset_notify_uninit_enet(handle); in hns3_reset_notify()
5781 static int hns3_change_channels(struct hnae3_handle *handle, u32 new_tqp_num, in hns3_change_channels() argument
5786 ret = handle->ae_algo->ops->set_channels(handle, new_tqp_num, in hns3_change_channels()
5789 dev_err(&handle->pdev->dev, in hns3_change_channels()
5794 ret = hns3_reset_notify(handle, HNAE3_INIT_CLIENT); in hns3_change_channels()
5798 ret = hns3_reset_notify(handle, HNAE3_UP_CLIENT); in hns3_change_channels()
5800 hns3_reset_notify(handle, HNAE3_UNINIT_CLIENT); in hns3_change_channels()
5944 static void hns3_process_hw_error(struct hnae3_handle *handle, in hns3_process_hw_error() argument
5951 dev_err(&handle->pdev->dev, "Detected %s!\n", in hns3_process_hw_error()