Lines Matching refs:lio
463 static inline int check_txq_status(struct lio *lio) in check_txq_status() argument
465 int numqs = lio->netdev->real_num_tx_queues; in check_txq_status()
471 iq = lio->linfo.txpciq[q % in check_txq_status()
472 lio->oct_dev->num_iqs].s.q_no; in check_txq_status()
473 if (octnet_iq_is_full(lio->oct_dev, iq)) in check_txq_status()
475 if (__netif_subqueue_stopped(lio->netdev, q)) { in check_txq_status()
476 netif_wake_subqueue(lio->netdev, q); in check_txq_status()
477 INCR_INSTRQUEUE_PKT_COUNT(lio->oct_dev, iq, in check_txq_status()
492 struct lio *lio = GET_LIO(netdev); in print_link_info() local
494 if (!ifstate_check(lio, LIO_IFSTATE_RESETTING) && in print_link_info()
495 ifstate_check(lio, LIO_IFSTATE_REGISTERED)) { in print_link_info()
496 struct oct_link_info *linfo = &lio->linfo; in print_link_info()
499 netif_info(lio, link, lio->netdev, "%d Mbps %s Duplex UP\n", in print_link_info()
503 netif_info(lio, link, lio->netdev, "Link Down\n"); in print_link_info()
515 struct lio *lio = (struct lio *)wk->ctxptr; in octnet_link_status_change() local
522 dev_set_mtu(lio->netdev, lio->linfo.link.s.mtu); in octnet_link_status_change()
532 struct lio *lio = GET_LIO(netdev); in setup_link_status_change_wq() local
533 struct octeon_device *oct = lio->oct_dev; in setup_link_status_change_wq()
535 lio->link_status_wq.wq = alloc_workqueue("link-status", in setup_link_status_change_wq()
537 if (!lio->link_status_wq.wq) { in setup_link_status_change_wq()
541 INIT_DELAYED_WORK(&lio->link_status_wq.wk.work, in setup_link_status_change_wq()
543 lio->link_status_wq.wk.ctxptr = lio; in setup_link_status_change_wq()
550 struct lio *lio = GET_LIO(netdev); in cleanup_link_status_change_wq() local
552 if (lio->link_status_wq.wq) { in cleanup_link_status_change_wq()
553 cancel_delayed_work_sync(&lio->link_status_wq.wk.work); in cleanup_link_status_change_wq()
554 destroy_workqueue(lio->link_status_wq.wq); in cleanup_link_status_change_wq()
569 struct lio *lio = GET_LIO(netdev); in update_link_status() local
570 int changed = (lio->linfo.link.u64 != ls->u64); in update_link_status()
571 int current_max_mtu = lio->linfo.link.s.mtu; in update_link_status()
572 struct octeon_device *oct = lio->oct_dev; in update_link_status()
575 __func__, lio->linfo.link.u64, ls->u64); in update_link_status()
576 lio->linfo.link.u64 = ls->u64; in update_link_status()
578 if ((lio->intf_open) && (changed)) { in update_link_status()
580 lio->link_changes++; in update_link_status()
582 if (lio->linfo.link.s.link_up) { in update_link_status()
591 if (lio->linfo.link.s.mtu != current_max_mtu) { in update_link_status()
592 netif_info(lio, probe, lio->netdev, "Max MTU changed from %d to %d\n", in update_link_status()
593 current_max_mtu, lio->linfo.link.s.mtu); in update_link_status()
594 netdev->max_mtu = lio->linfo.link.s.mtu; in update_link_status()
596 if (lio->linfo.link.s.mtu < netdev->mtu) { in update_link_status()
599 netdev->mtu, lio->linfo.link.s.mtu); in update_link_status()
600 queue_delayed_work(lio->link_status_wq.wq, in update_link_status()
601 &lio->link_status_wq.wk.work, 0); in update_link_status()
615 struct lio *lio = (struct lio *)wk->ctxptr; in lio_sync_octeon_time() local
616 struct octeon_device *oct = lio->oct_dev; in lio_sync_octeon_time()
637 sc->iq_no = lio->linfo.txpciq[0].s.q_no; in lio_sync_octeon_time()
653 queue_delayed_work(lio->sync_octeon_time_wq.wq, in lio_sync_octeon_time()
654 &lio->sync_octeon_time_wq.wk.work, in lio_sync_octeon_time()
665 struct lio *lio = GET_LIO(netdev); in setup_sync_octeon_time_wq() local
666 struct octeon_device *oct = lio->oct_dev; in setup_sync_octeon_time_wq()
668 lio->sync_octeon_time_wq.wq = in setup_sync_octeon_time_wq()
670 if (!lio->sync_octeon_time_wq.wq) { in setup_sync_octeon_time_wq()
674 INIT_DELAYED_WORK(&lio->sync_octeon_time_wq.wk.work, in setup_sync_octeon_time_wq()
676 lio->sync_octeon_time_wq.wk.ctxptr = lio; in setup_sync_octeon_time_wq()
677 queue_delayed_work(lio->sync_octeon_time_wq.wq, in setup_sync_octeon_time_wq()
678 &lio->sync_octeon_time_wq.wk.work, in setup_sync_octeon_time_wq()
694 struct lio *lio = GET_LIO(netdev); in cleanup_sync_octeon_time_wq() local
695 struct cavium_wq *time_wq = &lio->sync_octeon_time_wq; in cleanup_sync_octeon_time_wq()
1150 static int send_rx_ctrl_cmd(struct lio *lio, int start_stop) in send_rx_ctrl_cmd() argument
1154 struct octeon_device *oct = (struct octeon_device *)lio->oct_dev; in send_rx_ctrl_cmd()
1157 if (oct->props[lio->ifidx].rx_on == start_stop) in send_rx_ctrl_cmd()
1164 netif_info(lio, rx_err, lio->netdev, in send_rx_ctrl_cmd()
1177 sc->iq_no = lio->linfo.txpciq[0].s.q_no; in send_rx_ctrl_cmd()
1187 netif_info(lio, rx_err, lio->netdev, "Failed to send RX Control message\n"); in send_rx_ctrl_cmd()
1197 oct->props[lio->ifidx].rx_on = start_stop; in send_rx_ctrl_cmd()
1218 struct lio *lio; in liquidio_destroy_nic_device() local
1226 lio = GET_LIO(netdev); in liquidio_destroy_nic_device()
1230 if (atomic_read(&lio->ifstate) & LIO_IFSTATE_RUNNING) in liquidio_destroy_nic_device()
1233 if (oct->props[lio->ifidx].napi_enabled == 1) { in liquidio_destroy_nic_device()
1237 oct->props[lio->ifidx].napi_enabled = 0; in liquidio_destroy_nic_device()
1249 if (atomic_read(&lio->ifstate) & LIO_IFSTATE_REGISTERED) in liquidio_destroy_nic_device()
1257 lio_delete_glists(lio); in liquidio_destroy_nic_device()
1273 struct lio *lio; in liquidio_stop_nic_module() local
1296 lio = GET_LIO(oct->props[i].netdev); in liquidio_stop_nic_module()
1299 lio->linfo.rxpciq[j].s.q_no); in liquidio_stop_nic_module()
1418 struct lio *lio; in free_netbuf() local
1422 lio = finfo->lio; in free_netbuf()
1424 dma_unmap_single(&lio->oct_dev->pci_dev->dev, finfo->dptr, skb->len, in free_netbuf()
1438 struct lio *lio; in free_netsgbuf() local
1444 lio = finfo->lio; in free_netsgbuf()
1448 dma_unmap_single(&lio->oct_dev->pci_dev->dev, in free_netsgbuf()
1456 dma_unmap_page(&lio->oct_dev->pci_dev->dev, in free_netsgbuf()
1462 iq = skb_iq(lio->oct_dev, skb); in free_netsgbuf()
1463 spin_lock(&lio->glist_lock[iq]); in free_netsgbuf()
1464 list_add_tail(&g->list, &lio->glist[iq]); in free_netsgbuf()
1465 spin_unlock(&lio->glist_lock[iq]); in free_netsgbuf()
1479 struct lio *lio; in free_netsgbuf_with_resp() local
1487 lio = finfo->lio; in free_netsgbuf_with_resp()
1491 dma_unmap_single(&lio->oct_dev->pci_dev->dev, in free_netsgbuf_with_resp()
1499 dma_unmap_page(&lio->oct_dev->pci_dev->dev, in free_netsgbuf_with_resp()
1505 iq = skb_iq(lio->oct_dev, skb); in free_netsgbuf_with_resp()
1507 spin_lock(&lio->glist_lock[iq]); in free_netsgbuf_with_resp()
1508 list_add_tail(&g->list, &lio->glist[iq]); in free_netsgbuf_with_resp()
1509 spin_unlock(&lio->glist_lock[iq]); in free_netsgbuf_with_resp()
1523 struct lio *lio = container_of(ptp, struct lio, ptp_info); in liquidio_ptp_adjfine() local
1524 struct octeon_device *oct = (struct octeon_device *)lio->oct_dev; in liquidio_ptp_adjfine()
1542 spin_lock_irqsave(&lio->ptp_lock, flags); in liquidio_ptp_adjfine()
1549 spin_unlock_irqrestore(&lio->ptp_lock, flags); in liquidio_ptp_adjfine()
1562 struct lio *lio = container_of(ptp, struct lio, ptp_info); in liquidio_ptp_adjtime() local
1564 spin_lock_irqsave(&lio->ptp_lock, flags); in liquidio_ptp_adjtime()
1565 lio->ptp_adjust += delta; in liquidio_ptp_adjtime()
1566 spin_unlock_irqrestore(&lio->ptp_lock, flags); in liquidio_ptp_adjtime()
1581 struct lio *lio = container_of(ptp, struct lio, ptp_info); in liquidio_ptp_gettime() local
1582 struct octeon_device *oct = (struct octeon_device *)lio->oct_dev; in liquidio_ptp_gettime()
1584 spin_lock_irqsave(&lio->ptp_lock, flags); in liquidio_ptp_gettime()
1586 ns += lio->ptp_adjust; in liquidio_ptp_gettime()
1587 spin_unlock_irqrestore(&lio->ptp_lock, flags); in liquidio_ptp_gettime()
1604 struct lio *lio = container_of(ptp, struct lio, ptp_info); in liquidio_ptp_settime() local
1605 struct octeon_device *oct = (struct octeon_device *)lio->oct_dev; in liquidio_ptp_settime()
1609 spin_lock_irqsave(&lio->ptp_lock, flags); in liquidio_ptp_settime()
1611 lio->ptp_adjust = 0; in liquidio_ptp_settime()
1612 spin_unlock_irqrestore(&lio->ptp_lock, flags); in liquidio_ptp_settime()
1637 struct lio *lio = GET_LIO(netdev); in oct_ptp_open() local
1638 struct octeon_device *oct = (struct octeon_device *)lio->oct_dev; in oct_ptp_open()
1640 spin_lock_init(&lio->ptp_lock); in oct_ptp_open()
1642 snprintf(lio->ptp_info.name, 16, "%s", netdev->name); in oct_ptp_open()
1643 lio->ptp_info.owner = THIS_MODULE; in oct_ptp_open()
1644 lio->ptp_info.max_adj = 250000000; in oct_ptp_open()
1645 lio->ptp_info.n_alarm = 0; in oct_ptp_open()
1646 lio->ptp_info.n_ext_ts = 0; in oct_ptp_open()
1647 lio->ptp_info.n_per_out = 0; in oct_ptp_open()
1648 lio->ptp_info.pps = 0; in oct_ptp_open()
1649 lio->ptp_info.adjfine = liquidio_ptp_adjfine; in oct_ptp_open()
1650 lio->ptp_info.adjtime = liquidio_ptp_adjtime; in oct_ptp_open()
1651 lio->ptp_info.gettime64 = liquidio_ptp_gettime; in oct_ptp_open()
1652 lio->ptp_info.settime64 = liquidio_ptp_settime; in oct_ptp_open()
1653 lio->ptp_info.enable = liquidio_ptp_enable; in oct_ptp_open()
1655 lio->ptp_adjust = 0; in oct_ptp_open()
1657 lio->ptp_clock = ptp_clock_register(&lio->ptp_info, in oct_ptp_open()
1660 if (IS_ERR(lio->ptp_clock)) in oct_ptp_open()
1661 lio->ptp_clock = NULL; in oct_ptp_open()
1727 struct lio *lio = (struct lio *)wk->ctxptr; in octnet_poll_check_txq_status() local
1729 if (!ifstate_check(lio, LIO_IFSTATE_RUNNING)) in octnet_poll_check_txq_status()
1732 check_txq_status(lio); in octnet_poll_check_txq_status()
1733 queue_delayed_work(lio->txq_status_wq.wq, in octnet_poll_check_txq_status()
1734 &lio->txq_status_wq.wk.work, msecs_to_jiffies(1)); in octnet_poll_check_txq_status()
1743 struct lio *lio = GET_LIO(netdev); in setup_tx_poll_fn() local
1744 struct octeon_device *oct = lio->oct_dev; in setup_tx_poll_fn()
1746 lio->txq_status_wq.wq = alloc_workqueue("txq-status", in setup_tx_poll_fn()
1748 if (!lio->txq_status_wq.wq) { in setup_tx_poll_fn()
1752 INIT_DELAYED_WORK(&lio->txq_status_wq.wk.work, in setup_tx_poll_fn()
1754 lio->txq_status_wq.wk.ctxptr = lio; in setup_tx_poll_fn()
1755 queue_delayed_work(lio->txq_status_wq.wq, in setup_tx_poll_fn()
1756 &lio->txq_status_wq.wk.work, msecs_to_jiffies(1)); in setup_tx_poll_fn()
1762 struct lio *lio = GET_LIO(netdev); in cleanup_tx_poll_fn() local
1764 if (lio->txq_status_wq.wq) { in cleanup_tx_poll_fn()
1765 cancel_delayed_work_sync(&lio->txq_status_wq.wk.work); in cleanup_tx_poll_fn()
1766 destroy_workqueue(lio->txq_status_wq.wq); in cleanup_tx_poll_fn()
1776 struct lio *lio = GET_LIO(netdev); in liquidio_open() local
1777 struct octeon_device *oct = lio->oct_dev; in liquidio_open()
1783 if (oct->props[lio->ifidx].napi_enabled == 0) { in liquidio_open()
1789 oct->props[lio->ifidx].napi_enabled = 1; in liquidio_open()
1798 ifstate_set(lio, LIO_IFSTATE_RUNNING); in liquidio_open()
1809 lio->intf_open = 1; in liquidio_open()
1811 netif_info(lio, ifup, lio->netdev, "Interface Open, ready for traffic\n"); in liquidio_open()
1814 ret = send_rx_ctrl_cmd(lio, 1); in liquidio_open()
1819 INIT_DELAYED_WORK(&lio->stats_wk.work, lio_fetch_stats); in liquidio_open()
1820 lio->stats_wk.ctxptr = lio; in liquidio_open()
1821 schedule_delayed_work(&lio->stats_wk.work, msecs_to_jiffies in liquidio_open()
1833 if (lio->ptp_clock) { in liquidio_open()
1834 ptp_clock_unregister(lio->ptp_clock); in liquidio_open()
1835 lio->ptp_clock = NULL; in liquidio_open()
1838 if (oct->props[lio->ifidx].napi_enabled == 1) { in liquidio_open()
1842 oct->props[lio->ifidx].napi_enabled = 0; in liquidio_open()
1857 struct lio *lio = GET_LIO(netdev); in liquidio_stop() local
1858 struct octeon_device *oct = lio->oct_dev; in liquidio_stop()
1864 ifstate_reset(lio, LIO_IFSTATE_RUNNING); in liquidio_stop()
1867 lio->intf_open = 0; in liquidio_stop()
1875 lio->linfo.link.s.link_up = 0; in liquidio_stop()
1876 lio->link_changes++; in liquidio_stop()
1879 ret = send_rx_ctrl_cmd(lio, 0); in liquidio_stop()
1890 cancel_delayed_work_sync(&lio->stats_wk.work); in liquidio_stop()
1892 if (lio->ptp_clock) { in liquidio_stop()
1893 ptp_clock_unregister(lio->ptp_clock); in liquidio_stop()
1894 lio->ptp_clock = NULL; in liquidio_stop()
1899 netif_info(lio, rx_err, lio->netdev, in liquidio_stop()
1902 if (oct->props[lio->ifidx].napi_enabled == 1) { in liquidio_stop()
1906 oct->props[lio->ifidx].napi_enabled = 0; in liquidio_stop()
1958 struct lio *lio = GET_LIO(netdev); in liquidio_set_mcast_list() local
1959 struct octeon_device *oct = lio->oct_dev; in liquidio_set_mcast_list()
1974 nctrl.iq_no = lio->linfo.txpciq[0].s.q_no; in liquidio_set_mcast_list()
1993 ret = octnet_send_nic_ctrl_pkt(lio->oct_dev, &nctrl); in liquidio_set_mcast_list()
2008 struct lio *lio = GET_LIO(netdev); in liquidio_set_mac() local
2009 struct octeon_device *oct = lio->oct_dev; in liquidio_set_mac()
2022 nctrl.iq_no = lio->linfo.txpciq[0].s.q_no; in liquidio_set_mac()
2029 ret = octnet_send_nic_ctrl_pkt(lio->oct_dev, &nctrl); in liquidio_set_mac()
2043 memcpy(((u8 *)&lio->linfo.hw_addr) + 2, addr->sa_data, ETH_ALEN); in liquidio_set_mac()
2052 struct lio *lio = GET_LIO(netdev); in liquidio_get_stats64() local
2059 oct = lio->oct_dev; in liquidio_get_stats64()
2061 if (ifstate_check(lio, LIO_IFSTATE_RESETTING)) in liquidio_get_stats64()
2065 iq_no = lio->linfo.txpciq[i].s.q_no; in liquidio_get_stats64()
2081 oq_no = lio->linfo.rxpciq[i].s.q_no; in liquidio_get_stats64()
2128 struct lio *lio = GET_LIO(netdev); in hwtstamp_ioctl() local
2166 ifstate_set(lio, LIO_IFSTATE_RX_TIMESTAMP_ENABLED); in hwtstamp_ioctl()
2169 ifstate_reset(lio, LIO_IFSTATE_RX_TIMESTAMP_ENABLED); in hwtstamp_ioctl()
2182 struct lio *lio = GET_LIO(netdev); in liquidio_ioctl() local
2186 if (lio->oct_dev->ptp_enable) in liquidio_ioctl()
2207 struct lio *lio; in handle_timestamp() local
2211 lio = finfo->lio; in handle_timestamp()
2213 oct = lio->oct_dev; in handle_timestamp()
2228 netif_info(lio, tx_done, lio->netdev, in handle_timestamp()
2231 ts.hwtstamp = ns_to_ktime(ns + lio->ptp_adjust); in handle_timestamp()
2253 struct lio *lio; in send_nic_timestamp_pkt() local
2257 lio = finfo->lio; in send_nic_timestamp_pkt()
2294 netif_info(lio, tx_queued, lio->netdev, "Queued timestamp packet\n"); in send_nic_timestamp_pkt()
2310 struct lio *lio; in liquidio_xmit() local
2324 lio = GET_LIO(netdev); in liquidio_xmit()
2325 oct = lio->oct_dev; in liquidio_xmit()
2329 iq_no = lio->linfo.txpciq[q_idx].s.q_no; in liquidio_xmit()
2336 if (!(atomic_read(&lio->ifstate) & LIO_IFSTATE_RUNNING) || in liquidio_xmit()
2337 (!lio->linfo.link.s.link_up) || in liquidio_xmit()
2339 netif_info(lio, tx_err, lio->netdev, in liquidio_xmit()
2341 lio->linfo.link.s.link_up); in liquidio_xmit()
2349 finfo->lio = lio; in liquidio_xmit()
2362 netif_info(lio, tx_err, lio->netdev, "Transmit failed iq:%d full\n", in liquidio_xmit()
2418 spin_lock(&lio->glist_lock[q_idx]); in liquidio_xmit()
2420 lio_list_delete_head(&lio->glist[q_idx]); in liquidio_xmit()
2421 spin_unlock(&lio->glist_lock[q_idx]); in liquidio_xmit()
2424 netif_info(lio, tx_err, lio->netdev, in liquidio_xmit()
2521 netif_info(lio, tx_queued, lio->netdev, "Transmit queued successfully\n"); in liquidio_xmit()
2538 netif_info(lio, tx_err, lio->netdev, "IQ%d Transmit dropped:%llu\n", in liquidio_xmit()
2557 struct lio *lio; in liquidio_tx_timeout() local
2559 lio = GET_LIO(netdev); in liquidio_tx_timeout()
2561 netif_info(lio, tx_err, lio->netdev, in liquidio_tx_timeout()
2572 struct lio *lio = GET_LIO(netdev); in liquidio_vlan_rx_add_vid() local
2573 struct octeon_device *oct = lio->oct_dev; in liquidio_vlan_rx_add_vid()
2582 nctrl.iq_no = lio->linfo.txpciq[0].s.q_no; in liquidio_vlan_rx_add_vid()
2586 ret = octnet_send_nic_ctrl_pkt(lio->oct_dev, &nctrl); in liquidio_vlan_rx_add_vid()
2601 struct lio *lio = GET_LIO(netdev); in liquidio_vlan_rx_kill_vid() local
2602 struct octeon_device *oct = lio->oct_dev; in liquidio_vlan_rx_kill_vid()
2611 nctrl.iq_no = lio->linfo.txpciq[0].s.q_no; in liquidio_vlan_rx_kill_vid()
2615 ret = octnet_send_nic_ctrl_pkt(lio->oct_dev, &nctrl); in liquidio_vlan_rx_kill_vid()
2635 struct lio *lio = GET_LIO(netdev); in liquidio_set_rxcsum_command() local
2636 struct octeon_device *oct = lio->oct_dev; in liquidio_set_rxcsum_command()
2645 nctrl.iq_no = lio->linfo.txpciq[0].s.q_no; in liquidio_set_rxcsum_command()
2649 ret = octnet_send_nic_ctrl_pkt(lio->oct_dev, &nctrl); in liquidio_set_rxcsum_command()
2672 struct lio *lio = GET_LIO(netdev); in liquidio_vxlan_port_command() local
2673 struct octeon_device *oct = lio->oct_dev; in liquidio_vxlan_port_command()
2683 nctrl.iq_no = lio->linfo.txpciq[0].s.q_no; in liquidio_vxlan_port_command()
2687 ret = octnet_send_nic_ctrl_pkt(lio->oct_dev, &nctrl); in liquidio_vxlan_port_command()
2736 struct lio *lio = netdev_priv(netdev); in liquidio_fix_features() local
2739 !(lio->dev_capability & NETIF_F_RXCSUM)) in liquidio_fix_features()
2743 !(lio->dev_capability & NETIF_F_HW_CSUM)) in liquidio_fix_features()
2746 if ((request & NETIF_F_TSO) && !(lio->dev_capability & NETIF_F_TSO)) in liquidio_fix_features()
2749 if ((request & NETIF_F_TSO6) && !(lio->dev_capability & NETIF_F_TSO6)) in liquidio_fix_features()
2752 if ((request & NETIF_F_LRO) && !(lio->dev_capability & NETIF_F_LRO)) in liquidio_fix_features()
2757 (lio->dev_capability & NETIF_F_LRO)) in liquidio_fix_features()
2761 !(lio->dev_capability & NETIF_F_HW_VLAN_CTAG_FILTER)) in liquidio_fix_features()
2775 struct lio *lio = netdev_priv(netdev); in liquidio_set_features() local
2778 (lio->dev_capability & NETIF_F_LRO) && in liquidio_set_features()
2783 (lio->dev_capability & NETIF_F_LRO) && in liquidio_set_features()
2792 (lio->enc_dev_capability & NETIF_F_RXCSUM) && in liquidio_set_features()
2798 (lio->enc_dev_capability & NETIF_F_RXCSUM) && in liquidio_set_features()
2804 (lio->dev_capability & NETIF_F_HW_VLAN_CTAG_FILTER) && in liquidio_set_features()
2809 (lio->dev_capability & NETIF_F_HW_VLAN_CTAG_FILTER) && in liquidio_set_features()
2820 struct lio *lio = GET_LIO(netdev); in __liquidio_set_vf_mac() local
2821 struct octeon_device *oct = lio->oct_dev; in __liquidio_set_vf_mac()
2838 nctrl.iq_no = lio->linfo.txpciq[0].s.q_no; in __liquidio_set_vf_mac()
2860 struct lio *lio = GET_LIO(netdev); in liquidio_set_vf_mac() local
2861 struct octeon_device *oct = lio->oct_dev; in liquidio_set_vf_mac()
2877 struct lio *lio = GET_LIO(netdev); in liquidio_set_vf_spoofchk() local
2878 struct octeon_device *oct = lio->oct_dev; in liquidio_set_vf_spoofchk()
2883 netif_info(lio, drv, lio->netdev, in liquidio_set_vf_spoofchk()
2889 netif_info(lio, drv, lio->netdev, "Invalid vfidx %d\n", vfidx); in liquidio_set_vf_spoofchk()
2911 nctrl.iq_no = lio->linfo.txpciq[0].s.q_no; in liquidio_set_vf_spoofchk()
2917 netif_info(lio, drv, lio->netdev, in liquidio_set_vf_spoofchk()
2924 netif_info(lio, drv, lio->netdev, "VF %u spoofchk is %s\n", vfidx, in liquidio_set_vf_spoofchk()
2933 struct lio *lio = GET_LIO(netdev); in liquidio_set_vf_vlan() local
2934 struct octeon_device *oct = lio->oct_dev; in liquidio_set_vf_vlan()
2967 nctrl.iq_no = lio->linfo.txpciq[0].s.q_no; in liquidio_set_vf_vlan()
2985 struct lio *lio = GET_LIO(netdev); in liquidio_get_vf_config() local
2986 struct octeon_device *oct = lio->oct_dev; in liquidio_get_vf_config()
3006 ivi->max_tx_rate = lio->linfo.link.s.speed; in liquidio_get_vf_config()
3012 static int liquidio_send_vf_trust_cmd(struct lio *lio, int vfidx, bool trusted) in liquidio_send_vf_trust_cmd() argument
3014 struct octeon_device *oct = lio->oct_dev; in liquidio_send_vf_trust_cmd()
3022 sc->iq_no = lio->linfo.txpciq[0].s.q_no; in liquidio_send_vf_trust_cmd()
3051 struct lio *lio = GET_LIO(netdev); in liquidio_set_vf_trust() local
3052 struct octeon_device *oct = lio->oct_dev; in liquidio_set_vf_trust()
3060 netif_info(lio, drv, lio->netdev, "Invalid vfidx %d\n", vfidx); in liquidio_set_vf_trust()
3072 netif_info(lio, drv, lio->netdev, "More than one trusted VF is not allowed\n"); in liquidio_set_vf_trust()
3082 if (!liquidio_send_vf_trust_cmd(lio, vfidx, setting)) { in liquidio_set_vf_trust()
3090 netif_info(lio, drv, lio->netdev, "VF %u is %strusted\n", vfidx, in liquidio_set_vf_trust()
3093 netif_info(lio, drv, lio->netdev, "Failed to set VF trusted\n"); in liquidio_set_vf_trust()
3103 struct lio *lio = GET_LIO(netdev); in liquidio_set_vf_link_state() local
3104 struct octeon_device *oct = lio->oct_dev; in liquidio_set_vf_link_state()
3120 nctrl.iq_no = lio->linfo.txpciq[0].s.q_no; in liquidio_set_vf_link_state()
3191 struct lio *lio = GET_LIO(dev); in liquidio_get_port_parent_id() local
3192 struct octeon_device *oct = lio->oct_dev; in liquidio_get_port_parent_id()
3198 ether_addr_copy(ppid->id, (void *)&lio->linfo.hw_addr + 2); in liquidio_get_port_parent_id()
3206 struct lio *lio = GET_LIO(netdev); in liquidio_get_vf_stats() local
3207 struct octeon_device *oct = lio->oct_dev; in liquidio_get_vf_stats()
3346 struct lio *lio = NULL; in setup_nic_devices() local
3544 lio = GET_LIO(netdev); in setup_nic_devices()
3546 memset(lio, 0, sizeof(struct lio)); in setup_nic_devices()
3548 lio->ifidx = ifidx_or_pfnum; in setup_nic_devices()
3554 lio->linfo.num_rxpciq = num_oqueues; in setup_nic_devices()
3555 lio->linfo.num_txpciq = num_iqueues; in setup_nic_devices()
3557 lio->linfo.rxpciq[j].u64 = in setup_nic_devices()
3561 lio->linfo.txpciq[j].u64 = in setup_nic_devices()
3564 lio->linfo.hw_addr = resp->cfg_info.linfo.hw_addr; in setup_nic_devices()
3565 lio->linfo.gmxport = resp->cfg_info.linfo.gmxport; in setup_nic_devices()
3566 lio->linfo.link.u64 = resp->cfg_info.linfo.link.u64; in setup_nic_devices()
3570 lio->msg_enable = netif_msg_init(debug, DEFAULT_MSG_ENABLE); in setup_nic_devices()
3574 lio->dev_capability = NETIF_F_HIGHDMA in setup_nic_devices()
3587 lio->enc_dev_capability = NETIF_F_IP_CSUM in setup_nic_devices()
3595 netdev->hw_enc_features = (lio->enc_dev_capability & in setup_nic_devices()
3600 lio->dev_capability |= NETIF_F_GSO_UDP_TUNNEL; in setup_nic_devices()
3602 netdev->vlan_features = lio->dev_capability; in setup_nic_devices()
3604 lio->dev_capability |= NETIF_F_HW_VLAN_CTAG_FILTER | in setup_nic_devices()
3608 netdev->features = (lio->dev_capability & ~NETIF_F_LRO); in setup_nic_devices()
3610 netdev->hw_features = lio->dev_capability; in setup_nic_devices()
3622 lio->oct_dev = octeon_dev; in setup_nic_devices()
3623 lio->octprops = props; in setup_nic_devices()
3624 lio->netdev = netdev; in setup_nic_devices()
3628 lio->linfo.gmxport, CVM_CAST64(lio->linfo.hw_addr)); in setup_nic_devices()
3643 octeon_swap_8B_data(&lio->linfo.hw_addr, 1); in setup_nic_devices()
3645 mac[j] = *((u8 *)(((u8 *)&lio->linfo.hw_addr) + 2 + j)); in setup_nic_devices()
3654 lio->txq = lio->linfo.txpciq[0].s.q_no; in setup_nic_devices()
3655 lio->rxq = lio->linfo.rxpciq[0].s.q_no; in setup_nic_devices()
3657 lio->linfo.num_txpciq, in setup_nic_devices()
3658 lio->linfo.num_rxpciq)) { in setup_nic_devices()
3663 ifstate_set(lio, LIO_IFSTATE_DROQ_OPS); in setup_nic_devices()
3665 lio->tx_qsize = octeon_get_tx_qsize(octeon_dev, lio->txq); in setup_nic_devices()
3666 lio->rx_qsize = octeon_get_rx_qsize(octeon_dev, lio->rxq); in setup_nic_devices()
3668 if (lio_setup_glists(octeon_dev, lio, num_iqueues)) { in setup_nic_devices()
3676 if (lio->oct_dev->chip_id == OCTEON_CN23XX_PF_VID) in setup_nic_devices()
3713 lio->link_changes++; in setup_nic_devices()
3715 ifstate_set(lio, LIO_IFSTATE_REGISTERED); in setup_nic_devices()
3744 liquidio_get_speed(lio); in setup_nic_devices()
3760 liquidio_get_fec(lio); in setup_nic_devices()
3761 octeon_dev->props[lio->ifidx].fec_boot = in setup_nic_devices()
3762 octeon_dev->props[lio->ifidx].fec; in setup_nic_devices()