• Home
  • Raw
  • Download

Lines Matching refs:netdev

129 			netdev_err(nic->netdev,  in nicvf_send_msg_to_pf()
139 netdev_err(nic->netdev, in nicvf_send_msg_to_pf()
157 netdev_err(nic->netdev, in nicvf_check_pf_ready()
189 netdev_dbg(nic->netdev, "Mbox message: msg: 0x%x\n", mbx.msg.msg); in nicvf_handle_mbx_intr()
197 ether_addr_copy(nic->netdev->dev_addr, in nicvf_handle_mbx_intr()
225 netdev_info(nic->netdev, "%s: Link is Up %d Mbps %s\n", in nicvf_handle_mbx_intr()
226 nic->netdev->name, nic->speed, in nicvf_handle_mbx_intr()
229 netif_carrier_on(nic->netdev); in nicvf_handle_mbx_intr()
230 netif_tx_start_all_queues(nic->netdev); in nicvf_handle_mbx_intr()
232 netdev_info(nic->netdev, "%s: Link is Down\n", in nicvf_handle_mbx_intr()
233 nic->netdev->name); in nicvf_handle_mbx_intr()
234 netif_carrier_off(nic->netdev); in nicvf_handle_mbx_intr()
235 netif_tx_stop_all_queues(nic->netdev); in nicvf_handle_mbx_intr()
259 netdev_err(nic->netdev, in nicvf_handle_mbx_intr()
266 static int nicvf_hw_set_mac_addr(struct nicvf *nic, struct net_device *netdev) in nicvf_hw_set_mac_addr() argument
272 ether_addr_copy(mbx.mac.mac_addr, netdev->dev_addr); in nicvf_hw_set_mac_addr()
423 nicvf_open(nic->snicvf[sqs]->netdev); in nicvf_request_sqs()
428 nicvf_set_real_num_queues(nic->netdev, in nicvf_request_sqs()
454 int nicvf_set_real_num_queues(struct net_device *netdev, in nicvf_set_real_num_queues() argument
459 err = netif_set_real_num_tx_queues(netdev, tx_queues); in nicvf_set_real_num_queues()
461 netdev_err(netdev, in nicvf_set_real_num_queues()
466 err = netif_set_real_num_rx_queues(netdev, rx_queues); in nicvf_set_real_num_queues()
468 netdev_err(netdev, in nicvf_set_real_num_queues()
483 netdev_err(nic->netdev, in nicvf_init_resources()
491 static void nicvf_snd_pkt_handler(struct net_device *netdev, in nicvf_snd_pkt_handler() argument
497 struct nicvf *nic = netdev_priv(netdev); in nicvf_snd_pkt_handler()
508 netdev_dbg(nic->netdev, in nicvf_snd_pkt_handler()
538 static inline void nicvf_set_rxhash(struct net_device *netdev, in nicvf_set_rxhash() argument
545 if (!(netdev->features & NETIF_F_RXHASH)) in nicvf_set_rxhash()
566 static void nicvf_rcv_pkt_handler(struct net_device *netdev, in nicvf_rcv_pkt_handler() argument
571 struct nicvf *nic = netdev_priv(netdev); in nicvf_rcv_pkt_handler()
580 netdev = nic->netdev; in nicvf_rcv_pkt_handler()
590 netdev_dbg(nic->netdev, "Packet not received\n"); in nicvf_rcv_pkt_handler()
595 netdev_info(nic->netdev, "%s: skb 0x%p, len=%d\n", netdev->name, in nicvf_rcv_pkt_handler()
607 nicvf_set_rxhash(netdev, cqe_rx, skb); in nicvf_rcv_pkt_handler()
610 if (netdev->hw_features & NETIF_F_RXCSUM) { in nicvf_rcv_pkt_handler()
617 skb->protocol = eth_type_trans(skb, netdev); in nicvf_rcv_pkt_handler()
624 if (napi && (netdev->features & NETIF_F_GRO)) in nicvf_rcv_pkt_handler()
630 static int nicvf_cq_intr_handler(struct net_device *netdev, u8 cq_idx, in nicvf_cq_intr_handler() argument
635 struct nicvf *nic = netdev_priv(netdev); in nicvf_cq_intr_handler()
655 netdev_dbg(nic->netdev, "%s CQ%d cqe_count %d cqe_head %d\n", in nicvf_cq_intr_handler()
670 netdev_dbg(nic->netdev, "CQ%d cq_desc->cqe_type %d\n", in nicvf_cq_intr_handler()
674 nicvf_rcv_pkt_handler(netdev, napi, cq_desc); in nicvf_cq_intr_handler()
678 nicvf_snd_pkt_handler(netdev, in nicvf_cq_intr_handler()
692 netdev_dbg(nic->netdev, in nicvf_cq_intr_handler()
706 netdev = nic->pnicvf->netdev; in nicvf_cq_intr_handler()
707 txq = netdev_get_tx_queue(netdev, in nicvf_cq_intr_handler()
713 if (netif_tx_queue_stopped(txq) && netif_carrier_ok(netdev)) { in nicvf_cq_intr_handler()
717 netdev_warn(netdev, in nicvf_cq_intr_handler()
719 netdev->name, cq_idx); in nicvf_cq_intr_handler()
731 struct net_device *netdev = napi->dev; in nicvf_poll() local
732 struct nicvf *nic = netdev_priv(netdev); in nicvf_poll()
736 work_done = nicvf_cq_intr_handler(netdev, cq->cq_idx, napi, budget); in nicvf_poll()
763 netif_tx_disable(nic->netdev); in nicvf_handle_qs_err()
774 nicvf_cq_intr_handler(nic->netdev, qidx, NULL, 0); in nicvf_handle_qs_err()
776 nicvf_sq_free_used_descs(nic->netdev, &qs->sq[qidx], qidx); in nicvf_handle_qs_err()
782 netif_tx_start_all_queues(nic->netdev); in nicvf_handle_qs_err()
790 netdev_info(nic->netdev, "%s: interrupt status 0x%llx\n", in nicvf_dump_intr_status()
791 nic->netdev->name, nicvf_reg_read(nic, NIC_VF_INT)); in nicvf_dump_intr_status()
877 netdev_err(nic->netdev, in nicvf_enable_msix()
926 nic->pnicvf->netdev->name, in nicvf_register_interrupts()
931 nic->pnicvf->netdev->name, in nicvf_register_interrupts()
936 nic->pnicvf->netdev->name, in nicvf_register_interrupts()
962 nic->pnicvf->netdev->name, in nicvf_register_interrupts()
978 netdev_err(nic->netdev, "request_irq failed, vector %d\n", irq); in nicvf_register_interrupts()
1045 static netdev_tx_t nicvf_xmit(struct sk_buff *skb, struct net_device *netdev) in nicvf_xmit() argument
1047 struct nicvf *nic = netdev_priv(netdev); in nicvf_xmit()
1049 struct netdev_queue *txq = netdev_get_tx_queue(netdev, qid); in nicvf_xmit()
1061 netdev_warn(netdev, in nicvf_xmit()
1063 netdev->name, qid); in nicvf_xmit()
1084 int nicvf_stop(struct net_device *netdev) in nicvf_stop() argument
1087 struct nicvf *nic = netdev_priv(netdev); in nicvf_stop()
1095 netif_carrier_off(netdev); in nicvf_stop()
1096 netif_tx_stop_all_queues(nic->netdev); in nicvf_stop()
1104 nicvf_stop(nic->snicvf[qidx]->netdev); in nicvf_stop()
1140 netif_tx_disable(netdev); in nicvf_stop()
1142 for (qidx = 0; qidx < netdev->num_tx_queues; qidx++) in nicvf_stop()
1143 netdev_tx_reset_queue(netdev_get_tx_queue(netdev, qidx)); in nicvf_stop()
1175 int nicvf_open(struct net_device *netdev) in nicvf_open() argument
1178 struct nicvf *nic = netdev_priv(netdev); in nicvf_open()
1183 netif_carrier_off(netdev); in nicvf_open()
1198 netif_napi_add(netdev, &cq_poll->napi, nicvf_poll, in nicvf_open()
1205 if (!nic->sqs_mode && is_zero_ether_addr(netdev->dev_addr)) { in nicvf_open()
1206 eth_hw_addr_random(netdev); in nicvf_open()
1207 nicvf_hw_set_mac_addr(nic, netdev); in nicvf_open()
1212 nicvf_hw_set_mac_addr(nic, netdev); in nicvf_open()
1236 if (nicvf_update_hw_max_frs(nic, netdev->mtu)) in nicvf_open()
1291 static int nicvf_change_mtu(struct net_device *netdev, int new_mtu) in nicvf_change_mtu() argument
1293 struct nicvf *nic = netdev_priv(netdev); in nicvf_change_mtu()
1301 netdev->mtu = new_mtu; in nicvf_change_mtu()
1303 if (!netif_running(netdev)) in nicvf_change_mtu()
1312 static int nicvf_set_mac_address(struct net_device *netdev, void *p) in nicvf_set_mac_address() argument
1315 struct nicvf *nic = netdev_priv(netdev); in nicvf_set_mac_address()
1320 memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len); in nicvf_set_mac_address()
1323 if (nicvf_hw_set_mac_addr(nic, netdev)) in nicvf_set_mac_address()
1337 if (!netif_running(nic->netdev)) in nicvf_update_lmac_stats()
1426 static struct rtnl_link_stats64 *nicvf_get_stats64(struct net_device *netdev, in nicvf_get_stats64() argument
1429 struct nicvf *nic = netdev_priv(netdev); in nicvf_get_stats64()
1464 if (!netif_running(nic->netdev)) in nicvf_reset_task()
1467 nicvf_stop(nic->netdev); in nicvf_reset_task()
1468 nicvf_open(nic->netdev); in nicvf_reset_task()
1469 netif_trans_update(nic->netdev); in nicvf_reset_task()
1484 static netdev_features_t nicvf_fix_features(struct net_device *netdev, in nicvf_fix_features() argument
1487 struct nicvf *nic = netdev_priv(netdev); in nicvf_fix_features()
1490 netif_running(netdev) && !nic->loopback_supported) in nicvf_fix_features()
1496 static int nicvf_set_features(struct net_device *netdev, in nicvf_set_features() argument
1499 struct nicvf *nic = netdev_priv(netdev); in nicvf_set_features()
1500 netdev_features_t changed = features ^ netdev->features; in nicvf_set_features()
1505 if ((changed & NETIF_F_LOOPBACK) && netif_running(netdev)) in nicvf_set_features()
1526 struct net_device *netdev; in nicvf_probe() local
1564 netdev = alloc_etherdev_mqs(sizeof(struct nicvf), qcount, qcount); in nicvf_probe()
1565 if (!netdev) { in nicvf_probe()
1570 pci_set_drvdata(pdev, netdev); in nicvf_probe()
1572 SET_NETDEV_DEV(netdev, &pdev->dev); in nicvf_probe()
1574 nic = netdev_priv(netdev); in nicvf_probe()
1575 nic->netdev = netdev; in nicvf_probe()
1621 err = nicvf_set_real_num_queues(netdev, nic->tx_queues, nic->rx_queues); in nicvf_probe()
1625 netdev->hw_features = (NETIF_F_RXCSUM | NETIF_F_IP_CSUM | NETIF_F_SG | in nicvf_probe()
1629 netdev->hw_features |= NETIF_F_RXHASH; in nicvf_probe()
1631 netdev->features |= netdev->hw_features; in nicvf_probe()
1632 netdev->hw_features |= NETIF_F_LOOPBACK; in nicvf_probe()
1634 netdev->vlan_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO; in nicvf_probe()
1636 netdev->netdev_ops = &nicvf_netdev_ops; in nicvf_probe()
1637 netdev->watchdog_timeo = NICVF_TX_TIMEOUT; in nicvf_probe()
1641 err = register_netdev(netdev); in nicvf_probe()
1649 nicvf_set_ethtool_ops(netdev); in nicvf_probe()
1659 free_netdev(netdev); in nicvf_probe()
1669 struct net_device *netdev = pci_get_drvdata(pdev); in nicvf_remove() local
1673 if (!netdev) in nicvf_remove()
1676 nic = netdev_priv(netdev); in nicvf_remove()
1677 pnetdev = nic->pnicvf->netdev; in nicvf_remove()
1688 free_netdev(netdev); in nicvf_remove()