Lines Matching refs:lio
456 static inline int check_txq_status(struct lio *lio) in check_txq_status() argument
458 int numqs = lio->netdev->real_num_tx_queues; in check_txq_status()
464 iq = lio->linfo.txpciq[q % in check_txq_status()
465 lio->oct_dev->num_iqs].s.q_no; in check_txq_status()
466 if (octnet_iq_is_full(lio->oct_dev, iq)) in check_txq_status()
468 if (__netif_subqueue_stopped(lio->netdev, q)) { in check_txq_status()
469 netif_wake_subqueue(lio->netdev, q); in check_txq_status()
470 INCR_INSTRQUEUE_PKT_COUNT(lio->oct_dev, iq, in check_txq_status()
485 struct lio *lio = GET_LIO(netdev); in print_link_info() local
487 if (!ifstate_check(lio, LIO_IFSTATE_RESETTING) && in print_link_info()
488 ifstate_check(lio, LIO_IFSTATE_REGISTERED)) { in print_link_info()
489 struct oct_link_info *linfo = &lio->linfo; in print_link_info()
492 netif_info(lio, link, lio->netdev, "%d Mbps %s Duplex UP\n", in print_link_info()
496 netif_info(lio, link, lio->netdev, "Link Down\n"); in print_link_info()
508 struct lio *lio = (struct lio *)wk->ctxptr; in octnet_link_status_change() local
515 dev_set_mtu(lio->netdev, lio->linfo.link.s.mtu); in octnet_link_status_change()
525 struct lio *lio = GET_LIO(netdev); in setup_link_status_change_wq() local
526 struct octeon_device *oct = lio->oct_dev; in setup_link_status_change_wq()
528 lio->link_status_wq.wq = alloc_workqueue("link-status", in setup_link_status_change_wq()
530 if (!lio->link_status_wq.wq) { in setup_link_status_change_wq()
534 INIT_DELAYED_WORK(&lio->link_status_wq.wk.work, in setup_link_status_change_wq()
536 lio->link_status_wq.wk.ctxptr = lio; in setup_link_status_change_wq()
543 struct lio *lio = GET_LIO(netdev); in cleanup_link_status_change_wq() local
545 if (lio->link_status_wq.wq) { in cleanup_link_status_change_wq()
546 cancel_delayed_work_sync(&lio->link_status_wq.wk.work); in cleanup_link_status_change_wq()
547 destroy_workqueue(lio->link_status_wq.wq); in cleanup_link_status_change_wq()
562 struct lio *lio = GET_LIO(netdev); in update_link_status() local
563 int changed = (lio->linfo.link.u64 != ls->u64); in update_link_status()
564 int current_max_mtu = lio->linfo.link.s.mtu; in update_link_status()
565 struct octeon_device *oct = lio->oct_dev; in update_link_status()
568 __func__, lio->linfo.link.u64, ls->u64); in update_link_status()
569 lio->linfo.link.u64 = ls->u64; in update_link_status()
571 if ((lio->intf_open) && (changed)) { in update_link_status()
573 lio->link_changes++; in update_link_status()
575 if (lio->linfo.link.s.link_up) { in update_link_status()
584 if (lio->linfo.link.s.mtu != current_max_mtu) { in update_link_status()
585 netif_info(lio, probe, lio->netdev, "Max MTU changed from %d to %d\n", in update_link_status()
586 current_max_mtu, lio->linfo.link.s.mtu); in update_link_status()
587 netdev->max_mtu = lio->linfo.link.s.mtu; in update_link_status()
589 if (lio->linfo.link.s.mtu < netdev->mtu) { in update_link_status()
592 netdev->mtu, lio->linfo.link.s.mtu); in update_link_status()
593 queue_delayed_work(lio->link_status_wq.wq, in update_link_status()
594 &lio->link_status_wq.wk.work, 0); in update_link_status()
608 struct lio *lio = (struct lio *)wk->ctxptr; in lio_sync_octeon_time() local
609 struct octeon_device *oct = lio->oct_dev; in lio_sync_octeon_time()
630 sc->iq_no = lio->linfo.txpciq[0].s.q_no; in lio_sync_octeon_time()
646 queue_delayed_work(lio->sync_octeon_time_wq.wq, in lio_sync_octeon_time()
647 &lio->sync_octeon_time_wq.wk.work, in lio_sync_octeon_time()
658 struct lio *lio = GET_LIO(netdev); in setup_sync_octeon_time_wq() local
659 struct octeon_device *oct = lio->oct_dev; in setup_sync_octeon_time_wq()
661 lio->sync_octeon_time_wq.wq = in setup_sync_octeon_time_wq()
663 if (!lio->sync_octeon_time_wq.wq) { in setup_sync_octeon_time_wq()
667 INIT_DELAYED_WORK(&lio->sync_octeon_time_wq.wk.work, in setup_sync_octeon_time_wq()
669 lio->sync_octeon_time_wq.wk.ctxptr = lio; in setup_sync_octeon_time_wq()
670 queue_delayed_work(lio->sync_octeon_time_wq.wq, in setup_sync_octeon_time_wq()
671 &lio->sync_octeon_time_wq.wk.work, in setup_sync_octeon_time_wq()
687 struct lio *lio = GET_LIO(netdev); in cleanup_sync_octeon_time_wq() local
688 struct cavium_wq *time_wq = &lio->sync_octeon_time_wq; in cleanup_sync_octeon_time_wq()
1141 static int send_rx_ctrl_cmd(struct lio *lio, int start_stop) in send_rx_ctrl_cmd() argument
1145 struct octeon_device *oct = (struct octeon_device *)lio->oct_dev; in send_rx_ctrl_cmd()
1148 if (oct->props[lio->ifidx].rx_on == start_stop) in send_rx_ctrl_cmd()
1155 netif_info(lio, rx_err, lio->netdev, in send_rx_ctrl_cmd()
1168 sc->iq_no = lio->linfo.txpciq[0].s.q_no; in send_rx_ctrl_cmd()
1178 netif_info(lio, rx_err, lio->netdev, "Failed to send RX Control message\n"); in send_rx_ctrl_cmd()
1188 oct->props[lio->ifidx].rx_on = start_stop; in send_rx_ctrl_cmd()
1208 struct lio *lio; in liquidio_destroy_nic_device() local
1216 lio = GET_LIO(netdev); in liquidio_destroy_nic_device()
1220 if (atomic_read(&lio->ifstate) & LIO_IFSTATE_RUNNING) in liquidio_destroy_nic_device()
1223 if (oct->props[lio->ifidx].napi_enabled == 1) { in liquidio_destroy_nic_device()
1227 oct->props[lio->ifidx].napi_enabled = 0; in liquidio_destroy_nic_device()
1239 if (atomic_read(&lio->ifstate) & LIO_IFSTATE_REGISTERED) in liquidio_destroy_nic_device()
1247 lio_delete_glists(lio); in liquidio_destroy_nic_device()
1263 struct lio *lio; in liquidio_stop_nic_module() local
1286 lio = GET_LIO(oct->props[i].netdev); in liquidio_stop_nic_module()
1289 lio->linfo.rxpciq[j].s.q_no); in liquidio_stop_nic_module()
1408 struct lio *lio; in free_netbuf() local
1412 lio = finfo->lio; in free_netbuf()
1414 dma_unmap_single(&lio->oct_dev->pci_dev->dev, finfo->dptr, skb->len, in free_netbuf()
1428 struct lio *lio; in free_netsgbuf() local
1434 lio = finfo->lio; in free_netsgbuf()
1438 dma_unmap_single(&lio->oct_dev->pci_dev->dev, in free_netsgbuf()
1446 dma_unmap_page(&lio->oct_dev->pci_dev->dev, in free_netsgbuf()
1452 iq = skb_iq(lio->oct_dev, skb); in free_netsgbuf()
1453 spin_lock(&lio->glist_lock[iq]); in free_netsgbuf()
1454 list_add_tail(&g->list, &lio->glist[iq]); in free_netsgbuf()
1455 spin_unlock(&lio->glist_lock[iq]); in free_netsgbuf()
1469 struct lio *lio; in free_netsgbuf_with_resp() local
1477 lio = finfo->lio; in free_netsgbuf_with_resp()
1481 dma_unmap_single(&lio->oct_dev->pci_dev->dev, in free_netsgbuf_with_resp()
1489 dma_unmap_page(&lio->oct_dev->pci_dev->dev, in free_netsgbuf_with_resp()
1495 iq = skb_iq(lio->oct_dev, skb); in free_netsgbuf_with_resp()
1497 spin_lock(&lio->glist_lock[iq]); in free_netsgbuf_with_resp()
1498 list_add_tail(&g->list, &lio->glist[iq]); in free_netsgbuf_with_resp()
1499 spin_unlock(&lio->glist_lock[iq]); in free_netsgbuf_with_resp()
1513 struct lio *lio = container_of(ptp, struct lio, ptp_info); in liquidio_ptp_adjfine() local
1514 struct octeon_device *oct = (struct octeon_device *)lio->oct_dev; in liquidio_ptp_adjfine()
1532 spin_lock_irqsave(&lio->ptp_lock, flags); in liquidio_ptp_adjfine()
1539 spin_unlock_irqrestore(&lio->ptp_lock, flags); in liquidio_ptp_adjfine()
1552 struct lio *lio = container_of(ptp, struct lio, ptp_info); in liquidio_ptp_adjtime() local
1554 spin_lock_irqsave(&lio->ptp_lock, flags); in liquidio_ptp_adjtime()
1555 lio->ptp_adjust += delta; in liquidio_ptp_adjtime()
1556 spin_unlock_irqrestore(&lio->ptp_lock, flags); in liquidio_ptp_adjtime()
1571 struct lio *lio = container_of(ptp, struct lio, ptp_info); in liquidio_ptp_gettime() local
1572 struct octeon_device *oct = (struct octeon_device *)lio->oct_dev; in liquidio_ptp_gettime()
1574 spin_lock_irqsave(&lio->ptp_lock, flags); in liquidio_ptp_gettime()
1576 ns += lio->ptp_adjust; in liquidio_ptp_gettime()
1577 spin_unlock_irqrestore(&lio->ptp_lock, flags); in liquidio_ptp_gettime()
1594 struct lio *lio = container_of(ptp, struct lio, ptp_info); in liquidio_ptp_settime() local
1595 struct octeon_device *oct = (struct octeon_device *)lio->oct_dev; in liquidio_ptp_settime()
1599 spin_lock_irqsave(&lio->ptp_lock, flags); in liquidio_ptp_settime()
1601 lio->ptp_adjust = 0; in liquidio_ptp_settime()
1602 spin_unlock_irqrestore(&lio->ptp_lock, flags); in liquidio_ptp_settime()
1627 struct lio *lio = GET_LIO(netdev); in oct_ptp_open() local
1628 struct octeon_device *oct = (struct octeon_device *)lio->oct_dev; in oct_ptp_open()
1630 spin_lock_init(&lio->ptp_lock); in oct_ptp_open()
1632 snprintf(lio->ptp_info.name, 16, "%s", netdev->name); in oct_ptp_open()
1633 lio->ptp_info.owner = THIS_MODULE; in oct_ptp_open()
1634 lio->ptp_info.max_adj = 250000000; in oct_ptp_open()
1635 lio->ptp_info.n_alarm = 0; in oct_ptp_open()
1636 lio->ptp_info.n_ext_ts = 0; in oct_ptp_open()
1637 lio->ptp_info.n_per_out = 0; in oct_ptp_open()
1638 lio->ptp_info.pps = 0; in oct_ptp_open()
1639 lio->ptp_info.adjfine = liquidio_ptp_adjfine; in oct_ptp_open()
1640 lio->ptp_info.adjtime = liquidio_ptp_adjtime; in oct_ptp_open()
1641 lio->ptp_info.gettime64 = liquidio_ptp_gettime; in oct_ptp_open()
1642 lio->ptp_info.settime64 = liquidio_ptp_settime; in oct_ptp_open()
1643 lio->ptp_info.enable = liquidio_ptp_enable; in oct_ptp_open()
1645 lio->ptp_adjust = 0; in oct_ptp_open()
1647 lio->ptp_clock = ptp_clock_register(&lio->ptp_info, in oct_ptp_open()
1650 if (IS_ERR(lio->ptp_clock)) in oct_ptp_open()
1651 lio->ptp_clock = NULL; in oct_ptp_open()
1717 struct lio *lio = (struct lio *)wk->ctxptr; in octnet_poll_check_txq_status() local
1719 if (!ifstate_check(lio, LIO_IFSTATE_RUNNING)) in octnet_poll_check_txq_status()
1722 check_txq_status(lio); in octnet_poll_check_txq_status()
1723 queue_delayed_work(lio->txq_status_wq.wq, in octnet_poll_check_txq_status()
1724 &lio->txq_status_wq.wk.work, msecs_to_jiffies(1)); in octnet_poll_check_txq_status()
1733 struct lio *lio = GET_LIO(netdev); in setup_tx_poll_fn() local
1734 struct octeon_device *oct = lio->oct_dev; in setup_tx_poll_fn()
1736 lio->txq_status_wq.wq = alloc_workqueue("txq-status", in setup_tx_poll_fn()
1738 if (!lio->txq_status_wq.wq) { in setup_tx_poll_fn()
1742 INIT_DELAYED_WORK(&lio->txq_status_wq.wk.work, in setup_tx_poll_fn()
1744 lio->txq_status_wq.wk.ctxptr = lio; in setup_tx_poll_fn()
1745 queue_delayed_work(lio->txq_status_wq.wq, in setup_tx_poll_fn()
1746 &lio->txq_status_wq.wk.work, msecs_to_jiffies(1)); in setup_tx_poll_fn()
1752 struct lio *lio = GET_LIO(netdev); in cleanup_tx_poll_fn() local
1754 if (lio->txq_status_wq.wq) { in cleanup_tx_poll_fn()
1755 cancel_delayed_work_sync(&lio->txq_status_wq.wk.work); in cleanup_tx_poll_fn()
1756 destroy_workqueue(lio->txq_status_wq.wq); in cleanup_tx_poll_fn()
1766 struct lio *lio = GET_LIO(netdev); in liquidio_open() local
1767 struct octeon_device *oct = lio->oct_dev; in liquidio_open()
1772 if (oct->props[lio->ifidx].napi_enabled == 0) { in liquidio_open()
1778 oct->props[lio->ifidx].napi_enabled = 1; in liquidio_open()
1787 ifstate_set(lio, LIO_IFSTATE_RUNNING); in liquidio_open()
1798 lio->intf_open = 1; in liquidio_open()
1800 netif_info(lio, ifup, lio->netdev, "Interface Open, ready for traffic\n"); in liquidio_open()
1803 ret = send_rx_ctrl_cmd(lio, 1); in liquidio_open()
1808 INIT_DELAYED_WORK(&lio->stats_wk.work, lio_fetch_stats); in liquidio_open()
1809 lio->stats_wk.ctxptr = lio; in liquidio_open()
1810 schedule_delayed_work(&lio->stats_wk.work, msecs_to_jiffies in liquidio_open()
1822 if (lio->ptp_clock) { in liquidio_open()
1823 ptp_clock_unregister(lio->ptp_clock); in liquidio_open()
1824 lio->ptp_clock = NULL; in liquidio_open()
1827 if (oct->props[lio->ifidx].napi_enabled == 1) { in liquidio_open()
1831 oct->props[lio->ifidx].napi_enabled = 0; in liquidio_open()
1846 struct lio *lio = GET_LIO(netdev); in liquidio_stop() local
1847 struct octeon_device *oct = lio->oct_dev; in liquidio_stop()
1852 ifstate_reset(lio, LIO_IFSTATE_RUNNING); in liquidio_stop()
1855 lio->intf_open = 0; in liquidio_stop()
1863 lio->linfo.link.s.link_up = 0; in liquidio_stop()
1864 lio->link_changes++; in liquidio_stop()
1867 ret = send_rx_ctrl_cmd(lio, 0); in liquidio_stop()
1878 cancel_delayed_work_sync(&lio->stats_wk.work); in liquidio_stop()
1880 if (lio->ptp_clock) { in liquidio_stop()
1881 ptp_clock_unregister(lio->ptp_clock); in liquidio_stop()
1882 lio->ptp_clock = NULL; in liquidio_stop()
1887 netif_info(lio, rx_err, lio->netdev, in liquidio_stop()
1890 if (oct->props[lio->ifidx].napi_enabled == 1) { in liquidio_stop()
1894 oct->props[lio->ifidx].napi_enabled = 0; in liquidio_stop()
1946 struct lio *lio = GET_LIO(netdev); in liquidio_set_mcast_list() local
1947 struct octeon_device *oct = lio->oct_dev; in liquidio_set_mcast_list()
1962 nctrl.iq_no = lio->linfo.txpciq[0].s.q_no; in liquidio_set_mcast_list()
1981 ret = octnet_send_nic_ctrl_pkt(lio->oct_dev, &nctrl); in liquidio_set_mcast_list()
1996 struct lio *lio = GET_LIO(netdev); in liquidio_set_mac() local
1997 struct octeon_device *oct = lio->oct_dev; in liquidio_set_mac()
2010 nctrl.iq_no = lio->linfo.txpciq[0].s.q_no; in liquidio_set_mac()
2017 ret = octnet_send_nic_ctrl_pkt(lio->oct_dev, &nctrl); in liquidio_set_mac()
2031 memcpy(((u8 *)&lio->linfo.hw_addr) + 2, addr->sa_data, ETH_ALEN); in liquidio_set_mac()
2040 struct lio *lio = GET_LIO(netdev); in liquidio_get_stats64() local
2047 oct = lio->oct_dev; in liquidio_get_stats64()
2049 if (ifstate_check(lio, LIO_IFSTATE_RESETTING)) in liquidio_get_stats64()
2053 iq_no = lio->linfo.txpciq[i].s.q_no; in liquidio_get_stats64()
2069 oq_no = lio->linfo.rxpciq[i].s.q_no; in liquidio_get_stats64()
2116 struct lio *lio = GET_LIO(netdev); in hwtstamp_ioctl() local
2154 ifstate_set(lio, LIO_IFSTATE_RX_TIMESTAMP_ENABLED); in hwtstamp_ioctl()
2157 ifstate_reset(lio, LIO_IFSTATE_RX_TIMESTAMP_ENABLED); in hwtstamp_ioctl()
2170 struct lio *lio = GET_LIO(netdev); in liquidio_ioctl() local
2174 if (lio->oct_dev->ptp_enable) in liquidio_ioctl()
2195 struct lio *lio; in handle_timestamp() local
2199 lio = finfo->lio; in handle_timestamp()
2201 oct = lio->oct_dev; in handle_timestamp()
2216 netif_info(lio, tx_done, lio->netdev, in handle_timestamp()
2219 ts.hwtstamp = ns_to_ktime(ns + lio->ptp_adjust); in handle_timestamp()
2241 struct lio *lio; in send_nic_timestamp_pkt() local
2245 lio = finfo->lio; in send_nic_timestamp_pkt()
2282 netif_info(lio, tx_queued, lio->netdev, "Queued timestamp packet\n"); in send_nic_timestamp_pkt()
2298 struct lio *lio; in liquidio_xmit() local
2312 lio = GET_LIO(netdev); in liquidio_xmit()
2313 oct = lio->oct_dev; in liquidio_xmit()
2317 iq_no = lio->linfo.txpciq[q_idx].s.q_no; in liquidio_xmit()
2324 if (!(atomic_read(&lio->ifstate) & LIO_IFSTATE_RUNNING) || in liquidio_xmit()
2325 (!lio->linfo.link.s.link_up) || in liquidio_xmit()
2327 netif_info(lio, tx_err, lio->netdev, in liquidio_xmit()
2329 lio->linfo.link.s.link_up); in liquidio_xmit()
2337 finfo->lio = lio; in liquidio_xmit()
2350 netif_info(lio, tx_err, lio->netdev, "Transmit failed iq:%d full\n", in liquidio_xmit()
2406 spin_lock(&lio->glist_lock[q_idx]); in liquidio_xmit()
2408 lio_list_delete_head(&lio->glist[q_idx]); in liquidio_xmit()
2409 spin_unlock(&lio->glist_lock[q_idx]); in liquidio_xmit()
2412 netif_info(lio, tx_err, lio->netdev, in liquidio_xmit()
2509 netif_info(lio, tx_queued, lio->netdev, "Transmit queued successfully\n"); in liquidio_xmit()
2526 netif_info(lio, tx_err, lio->netdev, "IQ%d Transmit dropped:%llu\n", in liquidio_xmit()
2545 struct lio *lio; in liquidio_tx_timeout() local
2547 lio = GET_LIO(netdev); in liquidio_tx_timeout()
2549 netif_info(lio, tx_err, lio->netdev, in liquidio_tx_timeout()
2560 struct lio *lio = GET_LIO(netdev); in liquidio_vlan_rx_add_vid() local
2561 struct octeon_device *oct = lio->oct_dev; in liquidio_vlan_rx_add_vid()
2570 nctrl.iq_no = lio->linfo.txpciq[0].s.q_no; in liquidio_vlan_rx_add_vid()
2574 ret = octnet_send_nic_ctrl_pkt(lio->oct_dev, &nctrl); in liquidio_vlan_rx_add_vid()
2589 struct lio *lio = GET_LIO(netdev); in liquidio_vlan_rx_kill_vid() local
2590 struct octeon_device *oct = lio->oct_dev; in liquidio_vlan_rx_kill_vid()
2599 nctrl.iq_no = lio->linfo.txpciq[0].s.q_no; in liquidio_vlan_rx_kill_vid()
2603 ret = octnet_send_nic_ctrl_pkt(lio->oct_dev, &nctrl); in liquidio_vlan_rx_kill_vid()
2623 struct lio *lio = GET_LIO(netdev); in liquidio_set_rxcsum_command() local
2624 struct octeon_device *oct = lio->oct_dev; in liquidio_set_rxcsum_command()
2633 nctrl.iq_no = lio->linfo.txpciq[0].s.q_no; in liquidio_set_rxcsum_command()
2637 ret = octnet_send_nic_ctrl_pkt(lio->oct_dev, &nctrl); in liquidio_set_rxcsum_command()
2660 struct lio *lio = GET_LIO(netdev); in liquidio_vxlan_port_command() local
2661 struct octeon_device *oct = lio->oct_dev; in liquidio_vxlan_port_command()
2671 nctrl.iq_no = lio->linfo.txpciq[0].s.q_no; in liquidio_vxlan_port_command()
2675 ret = octnet_send_nic_ctrl_pkt(lio->oct_dev, &nctrl); in liquidio_vxlan_port_command()
2724 struct lio *lio = netdev_priv(netdev); in liquidio_fix_features() local
2727 !(lio->dev_capability & NETIF_F_RXCSUM)) in liquidio_fix_features()
2731 !(lio->dev_capability & NETIF_F_HW_CSUM)) in liquidio_fix_features()
2734 if ((request & NETIF_F_TSO) && !(lio->dev_capability & NETIF_F_TSO)) in liquidio_fix_features()
2737 if ((request & NETIF_F_TSO6) && !(lio->dev_capability & NETIF_F_TSO6)) in liquidio_fix_features()
2740 if ((request & NETIF_F_LRO) && !(lio->dev_capability & NETIF_F_LRO)) in liquidio_fix_features()
2745 (lio->dev_capability & NETIF_F_LRO)) in liquidio_fix_features()
2749 !(lio->dev_capability & NETIF_F_HW_VLAN_CTAG_FILTER)) in liquidio_fix_features()
2763 struct lio *lio = netdev_priv(netdev); in liquidio_set_features() local
2766 (lio->dev_capability & NETIF_F_LRO) && in liquidio_set_features()
2771 (lio->dev_capability & NETIF_F_LRO) && in liquidio_set_features()
2780 (lio->enc_dev_capability & NETIF_F_RXCSUM) && in liquidio_set_features()
2786 (lio->enc_dev_capability & NETIF_F_RXCSUM) && in liquidio_set_features()
2792 (lio->dev_capability & NETIF_F_HW_VLAN_CTAG_FILTER) && in liquidio_set_features()
2797 (lio->dev_capability & NETIF_F_HW_VLAN_CTAG_FILTER) && in liquidio_set_features()
2808 struct lio *lio = GET_LIO(netdev); in __liquidio_set_vf_mac() local
2809 struct octeon_device *oct = lio->oct_dev; in __liquidio_set_vf_mac()
2826 nctrl.iq_no = lio->linfo.txpciq[0].s.q_no; in __liquidio_set_vf_mac()
2848 struct lio *lio = GET_LIO(netdev); in liquidio_set_vf_mac() local
2849 struct octeon_device *oct = lio->oct_dev; in liquidio_set_vf_mac()
2865 struct lio *lio = GET_LIO(netdev); in liquidio_set_vf_spoofchk() local
2866 struct octeon_device *oct = lio->oct_dev; in liquidio_set_vf_spoofchk()
2871 netif_info(lio, drv, lio->netdev, in liquidio_set_vf_spoofchk()
2877 netif_info(lio, drv, lio->netdev, "Invalid vfidx %d\n", vfidx); in liquidio_set_vf_spoofchk()
2899 nctrl.iq_no = lio->linfo.txpciq[0].s.q_no; in liquidio_set_vf_spoofchk()
2905 netif_info(lio, drv, lio->netdev, in liquidio_set_vf_spoofchk()
2912 netif_info(lio, drv, lio->netdev, "VF %u spoofchk is %s\n", vfidx, in liquidio_set_vf_spoofchk()
2921 struct lio *lio = GET_LIO(netdev); in liquidio_set_vf_vlan() local
2922 struct octeon_device *oct = lio->oct_dev; in liquidio_set_vf_vlan()
2955 nctrl.iq_no = lio->linfo.txpciq[0].s.q_no; in liquidio_set_vf_vlan()
2973 struct lio *lio = GET_LIO(netdev); in liquidio_get_vf_config() local
2974 struct octeon_device *oct = lio->oct_dev; in liquidio_get_vf_config()
2994 ivi->max_tx_rate = lio->linfo.link.s.speed; in liquidio_get_vf_config()
3000 static int liquidio_send_vf_trust_cmd(struct lio *lio, int vfidx, bool trusted) in liquidio_send_vf_trust_cmd() argument
3002 struct octeon_device *oct = lio->oct_dev; in liquidio_send_vf_trust_cmd()
3010 sc->iq_no = lio->linfo.txpciq[0].s.q_no; in liquidio_send_vf_trust_cmd()
3039 struct lio *lio = GET_LIO(netdev); in liquidio_set_vf_trust() local
3040 struct octeon_device *oct = lio->oct_dev; in liquidio_set_vf_trust()
3048 netif_info(lio, drv, lio->netdev, "Invalid vfidx %d\n", vfidx); in liquidio_set_vf_trust()
3060 netif_info(lio, drv, lio->netdev, "More than one trusted VF is not allowed\n"); in liquidio_set_vf_trust()
3070 if (!liquidio_send_vf_trust_cmd(lio, vfidx, setting)) { in liquidio_set_vf_trust()
3078 netif_info(lio, drv, lio->netdev, "VF %u is %strusted\n", vfidx, in liquidio_set_vf_trust()
3081 netif_info(lio, drv, lio->netdev, "Failed to set VF trusted\n"); in liquidio_set_vf_trust()
3091 struct lio *lio = GET_LIO(netdev); in liquidio_set_vf_link_state() local
3092 struct octeon_device *oct = lio->oct_dev; in liquidio_set_vf_link_state()
3108 nctrl.iq_no = lio->linfo.txpciq[0].s.q_no; in liquidio_set_vf_link_state()
3179 struct lio *lio = GET_LIO(dev); in liquidio_get_port_parent_id() local
3180 struct octeon_device *oct = lio->oct_dev; in liquidio_get_port_parent_id()
3186 ether_addr_copy(ppid->id, (void *)&lio->linfo.hw_addr + 2); in liquidio_get_port_parent_id()
3194 struct lio *lio = GET_LIO(netdev); in liquidio_get_vf_stats() local
3195 struct octeon_device *oct = lio->oct_dev; in liquidio_get_vf_stats()
3334 struct lio *lio = NULL; in setup_nic_devices() local
3532 lio = GET_LIO(netdev); in setup_nic_devices()
3534 memset(lio, 0, sizeof(struct lio)); in setup_nic_devices()
3536 lio->ifidx = ifidx_or_pfnum; in setup_nic_devices()
3542 lio->linfo.num_rxpciq = num_oqueues; in setup_nic_devices()
3543 lio->linfo.num_txpciq = num_iqueues; in setup_nic_devices()
3545 lio->linfo.rxpciq[j].u64 = in setup_nic_devices()
3549 lio->linfo.txpciq[j].u64 = in setup_nic_devices()
3552 lio->linfo.hw_addr = resp->cfg_info.linfo.hw_addr; in setup_nic_devices()
3553 lio->linfo.gmxport = resp->cfg_info.linfo.gmxport; in setup_nic_devices()
3554 lio->linfo.link.u64 = resp->cfg_info.linfo.link.u64; in setup_nic_devices()
3558 lio->msg_enable = netif_msg_init(debug, DEFAULT_MSG_ENABLE); in setup_nic_devices()
3562 lio->dev_capability = NETIF_F_HIGHDMA in setup_nic_devices()
3575 lio->enc_dev_capability = NETIF_F_IP_CSUM in setup_nic_devices()
3583 netdev->hw_enc_features = (lio->enc_dev_capability & in setup_nic_devices()
3588 lio->dev_capability |= NETIF_F_GSO_UDP_TUNNEL; in setup_nic_devices()
3590 netdev->vlan_features = lio->dev_capability; in setup_nic_devices()
3592 lio->dev_capability |= NETIF_F_HW_VLAN_CTAG_FILTER | in setup_nic_devices()
3596 netdev->features = (lio->dev_capability & ~NETIF_F_LRO); in setup_nic_devices()
3598 netdev->hw_features = lio->dev_capability; in setup_nic_devices()
3610 lio->oct_dev = octeon_dev; in setup_nic_devices()
3611 lio->octprops = props; in setup_nic_devices()
3612 lio->netdev = netdev; in setup_nic_devices()
3616 lio->linfo.gmxport, CVM_CAST64(lio->linfo.hw_addr)); in setup_nic_devices()
3631 octeon_swap_8B_data(&lio->linfo.hw_addr, 1); in setup_nic_devices()
3633 mac[j] = *((u8 *)(((u8 *)&lio->linfo.hw_addr) + 2 + j)); in setup_nic_devices()
3642 lio->txq = lio->linfo.txpciq[0].s.q_no; in setup_nic_devices()
3643 lio->rxq = lio->linfo.rxpciq[0].s.q_no; in setup_nic_devices()
3645 lio->linfo.num_txpciq, in setup_nic_devices()
3646 lio->linfo.num_rxpciq)) { in setup_nic_devices()
3651 ifstate_set(lio, LIO_IFSTATE_DROQ_OPS); in setup_nic_devices()
3653 lio->tx_qsize = octeon_get_tx_qsize(octeon_dev, lio->txq); in setup_nic_devices()
3654 lio->rx_qsize = octeon_get_rx_qsize(octeon_dev, lio->rxq); in setup_nic_devices()
3656 if (lio_setup_glists(octeon_dev, lio, num_iqueues)) { in setup_nic_devices()
3664 if (lio->oct_dev->chip_id == OCTEON_CN23XX_PF_VID) in setup_nic_devices()
3701 lio->link_changes++; in setup_nic_devices()
3703 ifstate_set(lio, LIO_IFSTATE_REGISTERED); in setup_nic_devices()
3732 liquidio_get_speed(lio); in setup_nic_devices()
3748 liquidio_get_fec(lio); in setup_nic_devices()
3749 octeon_dev->props[lio->ifidx].fec_boot = in setup_nic_devices()
3750 octeon_dev->props[lio->ifidx].fec; in setup_nic_devices()