Lines Matching refs:lio

218 	struct lio *lio = GET_LIO(netdev);  in lio_get_link_ksettings()  local
219 struct octeon_device *oct = lio->oct_dev; in lio_get_link_ksettings()
222 linfo = &lio->linfo; in lio_get_link_ksettings()
283 liquidio_get_speed(lio); in lio_get_link_ksettings()
284 liquidio_get_fec(lio); in lio_get_link_ksettings()
320 if (oct->props[lio->ifidx].fec == 1) { in lio_get_link_ksettings()
398 struct lio *lio = GET_LIO(netdev); in lio_set_link_ksettings() local
402 oct = lio->oct_dev; in lio_set_link_ksettings()
404 linfo = &lio->linfo; in lio_set_link_ksettings()
427 liquidio_set_speed(lio, speed / 1000); in lio_set_link_ksettings()
438 struct lio *lio; in lio_get_drvinfo() local
441 lio = GET_LIO(netdev); in lio_get_drvinfo()
442 oct = lio->oct_dev; in lio_get_drvinfo()
455 struct lio *lio; in lio_get_vf_drvinfo() local
457 lio = GET_LIO(netdev); in lio_get_vf_drvinfo()
458 oct = lio->oct_dev; in lio_get_vf_drvinfo()
470 struct lio *lio = GET_LIO(netdev); in lio_send_queue_count_update() local
471 struct octeon_device *oct = lio->oct_dev; in lio_send_queue_count_update()
481 nctrl.iq_no = lio->linfo.txpciq[0].s.q_no; in lio_send_queue_count_update()
485 ret = octnet_send_nic_ctrl_pkt(lio->oct_dev, &nctrl); in lio_send_queue_count_update()
499 struct lio *lio = GET_LIO(dev); in lio_ethtool_get_channels() local
500 struct octeon_device *oct = lio->oct_dev; in lio_ethtool_get_channels()
509 rx_count = CFG_GET_NUM_RXQS_NIC_IF(conf6x, lio->ifidx); in lio_ethtool_get_channels()
510 tx_count = CFG_GET_NUM_TXQS_NIC_IF(conf6x, lio->ifidx); in lio_ethtool_get_channels()
513 max_combined = lio->linfo.num_txpciq; in lio_ethtool_get_channels()
605 struct lio *lio = GET_LIO(dev); in lio_ethtool_set_channels() local
606 struct octeon_device *oct = lio->oct_dev; in lio_ethtool_set_channels()
622 max_combined = lio->linfo.num_txpciq; in lio_ethtool_set_channels()
648 ifstate_set(lio, LIO_IFSTATE_RESETTING); in lio_ethtool_set_channels()
661 ifstate_reset(lio, LIO_IFSTATE_RESETTING); in lio_ethtool_set_channels()
669 struct lio *lio = GET_LIO(netdev); in lio_get_eeprom_len() local
670 struct octeon_device *oct_dev = lio->oct_dev; in lio_get_eeprom_len()
686 struct lio *lio = GET_LIO(netdev); in lio_get_eeprom() local
687 struct octeon_device *oct_dev = lio->oct_dev; in lio_get_eeprom()
705 struct lio *lio = GET_LIO(netdev); in octnet_gpio_access() local
706 struct octeon_device *oct = lio->oct_dev; in octnet_gpio_access()
716 nctrl.iq_no = lio->linfo.txpciq[0].s.q_no; in octnet_gpio_access()
720 ret = octnet_send_nic_ctrl_pkt(lio->oct_dev, &nctrl); in octnet_gpio_access()
732 struct lio *lio = GET_LIO(netdev); in octnet_id_active() local
733 struct octeon_device *oct = lio->oct_dev; in octnet_id_active()
742 nctrl.iq_no = lio->linfo.txpciq[0].s.q_no; in octnet_id_active()
746 ret = octnet_send_nic_ctrl_pkt(lio->oct_dev, &nctrl); in octnet_id_active()
760 octnet_mdio45_access(struct lio *lio, int op, int loc, int *value) in octnet_mdio45_access() argument
762 struct octeon_device *oct_dev = lio->oct_dev; in octnet_mdio45_access()
785 sc->iq_no = lio->linfo.txpciq[0].s.q_no; in octnet_mdio45_access()
831 struct lio *lio = GET_LIO(netdev); in lio_set_phys_id() local
832 struct octeon_device *oct = lio->oct_dev; in lio_set_phys_id()
837 linfo = &lio->linfo; in lio_set_phys_id()
851 ret = octnet_mdio45_access(lio, 0, in lio_set_phys_id()
853 &lio->phy_beacon_val); in lio_set_phys_id()
857 ret = octnet_mdio45_access(lio, 0, in lio_set_phys_id()
859 &lio->led_ctrl_val); in lio_set_phys_id()
865 ret = octnet_mdio45_access(lio, 1, in lio_set_phys_id()
872 ret = octnet_mdio45_access(lio, 1, in lio_set_phys_id()
921 ret = octnet_mdio45_access(lio, 1, in lio_set_phys_id()
923 &lio->led_ctrl_val); in lio_set_phys_id()
927 ret = octnet_mdio45_access(lio, 1, in lio_set_phys_id()
929 &lio->phy_beacon_val); in lio_set_phys_id()
954 struct lio *lio = GET_LIO(netdev); in lio_ethtool_get_ringparam() local
955 struct octeon_device *oct = lio->oct_dev; in lio_ethtool_get_ringparam()
959 if (ifstate_check(lio, LIO_IFSTATE_RESETTING)) in lio_ethtool_get_ringparam()
967 rx_pending = CFG_GET_NUM_RX_DESCS_NIC_IF(conf6x, lio->ifidx); in lio_ethtool_get_ringparam()
968 tx_pending = CFG_GET_NUM_TX_DESCS_NIC_IF(conf6x, lio->ifidx); in lio_ethtool_get_ringparam()
986 static int lio_23xx_reconfigure_queue_count(struct lio *lio) in lio_23xx_reconfigure_queue_count() argument
988 struct octeon_device *oct = lio->oct_dev; in lio_23xx_reconfigure_queue_count()
1056 lio->ifidx = ifidx_or_pfnum; in lio_23xx_reconfigure_queue_count()
1057 lio->linfo.num_rxpciq = hweight64(resp->cfg_info.iqmask); in lio_23xx_reconfigure_queue_count()
1058 lio->linfo.num_txpciq = hweight64(resp->cfg_info.iqmask); in lio_23xx_reconfigure_queue_count()
1059 for (j = 0; j < lio->linfo.num_rxpciq; j++) { in lio_23xx_reconfigure_queue_count()
1060 lio->linfo.rxpciq[j].u64 = in lio_23xx_reconfigure_queue_count()
1064 for (j = 0; j < lio->linfo.num_txpciq; j++) { in lio_23xx_reconfigure_queue_count()
1065 lio->linfo.txpciq[j].u64 = in lio_23xx_reconfigure_queue_count()
1069 lio->linfo.hw_addr = resp->cfg_info.linfo.hw_addr; in lio_23xx_reconfigure_queue_count()
1070 lio->linfo.gmxport = resp->cfg_info.linfo.gmxport; in lio_23xx_reconfigure_queue_count()
1071 lio->linfo.link.u64 = resp->cfg_info.linfo.link.u64; in lio_23xx_reconfigure_queue_count()
1072 lio->txq = lio->linfo.txpciq[0].s.q_no; in lio_23xx_reconfigure_queue_count()
1073 lio->rxq = lio->linfo.rxpciq[0].s.q_no; in lio_23xx_reconfigure_queue_count()
1076 lio->linfo.num_rxpciq); in lio_23xx_reconfigure_queue_count()
1085 struct lio *lio = GET_LIO(netdev); in lio_reset_queues() local
1086 struct octeon_device *oct = lio->oct_dev; in lio_reset_queues()
1142 lio_delete_glists(lio); in lio_reset_queues()
1224 if (lio_23xx_reconfigure_queue_count(lio)) in lio_reset_queues()
1236 if (lio_setup_glists(oct, lio, num_qs)) { in lio_reset_queues()
1264 struct lio *lio = GET_LIO(netdev); in lio_ethtool_set_ringparam() local
1265 struct octeon_device *oct = lio->oct_dev; in lio_ethtool_set_ringparam()
1285 ifstate_set(lio, LIO_IFSTATE_RESETTING); in lio_ethtool_set_ringparam()
1294 CFG_SET_NUM_TX_DESCS_NIC_IF(octeon_get_conf(oct), lio->ifidx, in lio_ethtool_set_ringparam()
1297 CFG_SET_NUM_RX_DESCS_NIC_IF(octeon_get_conf(oct), lio->ifidx, in lio_ethtool_set_ringparam()
1306 ifstate_reset(lio, LIO_IFSTATE_RESETTING); in lio_ethtool_set_ringparam()
1312 CFG_SET_NUM_TX_DESCS_NIC_IF(octeon_get_conf(oct), lio->ifidx, in lio_ethtool_set_ringparam()
1315 CFG_SET_NUM_RX_DESCS_NIC_IF(octeon_get_conf(oct), lio->ifidx, in lio_ethtool_set_ringparam()
1322 struct lio *lio = GET_LIO(netdev); in lio_get_msglevel() local
1324 return lio->msg_enable; in lio_get_msglevel()
1329 struct lio *lio = GET_LIO(netdev); in lio_set_msglevel() local
1331 if ((msglvl ^ lio->msg_enable) & NETIF_MSG_HW) { in lio_set_msglevel()
1340 lio->msg_enable = msglvl; in lio_set_msglevel()
1345 struct lio *lio = GET_LIO(netdev); in lio_vf_set_msglevel() local
1347 lio->msg_enable = msglvl; in lio_vf_set_msglevel()
1356 struct lio *lio = GET_LIO(netdev); in lio_get_pauseparam() local
1357 struct octeon_device *oct = lio->oct_dev; in lio_get_pauseparam()
1371 struct lio *lio = GET_LIO(netdev); in lio_set_pauseparam() local
1372 struct octeon_device *oct = lio->oct_dev; in lio_set_pauseparam()
1374 struct oct_link_info *linfo = &lio->linfo; in lio_set_pauseparam()
1395 nctrl.iq_no = lio->linfo.txpciq[0].s.q_no; in lio_set_pauseparam()
1415 ret = octnet_send_nic_ctrl_pkt(lio->oct_dev, &nctrl); in lio_set_pauseparam()
1433 struct lio *lio = GET_LIO(netdev); in lio_get_ethtool_stats() local
1434 struct octeon_device *oct_dev = lio->oct_dev; in lio_get_ethtool_stats()
1438 if (ifstate_check(lio, LIO_IFSTATE_RESETTING)) in lio_get_ethtool_stats()
1635 data[i++] = CVM_CAST64(lio->link_changes); in lio_get_ethtool_stats()
1723 struct lio *lio = GET_LIO(netdev); in lio_vf_get_ethtool_stats() local
1724 struct octeon_device *oct_dev = lio->oct_dev; in lio_vf_get_ethtool_stats()
1727 if (ifstate_check(lio, LIO_IFSTATE_RESETTING)) in lio_vf_get_ethtool_stats()
1757 data[i++] = CVM_CAST64(lio->link_changes); in lio_vf_get_ethtool_stats()
1760 j = lio->linfo.txpciq[vj].s.q_no; in lio_vf_get_ethtool_stats()
1802 j = lio->linfo.rxpciq[vj].s.q_no; in lio_vf_get_ethtool_stats()
1830 static void lio_get_priv_flags_strings(struct lio *lio, u8 *data) in lio_get_priv_flags_strings() argument
1832 struct octeon_device *oct_dev = lio->oct_dev; in lio_get_priv_flags_strings()
1847 netif_info(lio, drv, lio->netdev, "Unknown Chip !!\n"); in lio_get_priv_flags_strings()
1854 struct lio *lio = GET_LIO(netdev); in lio_get_strings() local
1855 struct octeon_device *oct_dev = lio->oct_dev; in lio_get_strings()
1891 lio_get_priv_flags_strings(lio, data); in lio_get_strings()
1894 netif_info(lio, drv, lio->netdev, "Unknown Stringset !!\n"); in lio_get_strings()
1903 struct lio *lio = GET_LIO(netdev); in lio_vf_get_strings() local
1904 struct octeon_device *oct_dev = lio->oct_dev; in lio_vf_get_strings()
1939 lio_get_priv_flags_strings(lio, data); in lio_vf_get_strings()
1942 netif_info(lio, drv, lio->netdev, "Unknown Stringset !!\n"); in lio_vf_get_strings()
1947 static int lio_get_priv_flags_ss_count(struct lio *lio) in lio_get_priv_flags_ss_count() argument
1949 struct octeon_device *oct_dev = lio->oct_dev; in lio_get_priv_flags_ss_count()
1959 netif_info(lio, drv, lio->netdev, "Unknown Chip !!\n"); in lio_get_priv_flags_ss_count()
1966 struct lio *lio = GET_LIO(netdev); in lio_get_sset_count() local
1967 struct octeon_device *oct_dev = lio->oct_dev; in lio_get_sset_count()
1975 return lio_get_priv_flags_ss_count(lio); in lio_get_sset_count()
1983 struct lio *lio = GET_LIO(netdev); in lio_vf_get_sset_count() local
1984 struct octeon_device *oct_dev = lio->oct_dev; in lio_vf_get_sset_count()
1992 return lio_get_priv_flags_ss_count(lio); in lio_vf_get_sset_count()
1999 static int octnet_get_intrmod_cfg(struct lio *lio, in octnet_get_intrmod_cfg() argument
2005 struct octeon_device *oct_dev = lio->oct_dev; in octnet_get_intrmod_cfg()
2019 sc->iq_no = lio->linfo.txpciq[0].s.q_no; in octnet_get_intrmod_cfg()
2056 static int octnet_set_intrmod_cfg(struct lio *lio, in octnet_set_intrmod_cfg() argument
2062 struct octeon_device *oct_dev = lio->oct_dev; in octnet_set_intrmod_cfg()
2078 sc->iq_no = lio->linfo.txpciq[0].s.q_no; in octnet_set_intrmod_cfg()
2120 struct lio *lio = GET_LIO(netdev); in lio_get_intr_coalesce() local
2121 struct octeon_device *oct = lio->oct_dev; in lio_get_intr_coalesce()
2125 if (octnet_get_intrmod_cfg(lio, &intrmod_cfg)) in lio_get_intr_coalesce()
2152 iq = oct->instr_queue[lio->linfo.txpciq[0].s.q_no]; in lio_get_intr_coalesce()
2157 netif_info(lio, drv, lio->netdev, "Unknown Chip !!\n"); in lio_get_intr_coalesce()
2191 static int oct_cfg_adaptive_intr(struct lio *lio, in oct_cfg_adaptive_intr() argument
2219 ret = octnet_set_intrmod_cfg(lio, intrmod_cfg); in oct_cfg_adaptive_intr()
2225 oct_cfg_rx_intrcnt(struct lio *lio, in oct_cfg_rx_intrcnt() argument
2229 struct octeon_device *oct = lio->oct_dev; in oct_cfg_rx_intrcnt()
2298 static int oct_cfg_rx_intrtime(struct lio *lio, in oct_cfg_rx_intrtime() argument
2302 struct octeon_device *oct = lio->oct_dev; in oct_cfg_rx_intrtime()
2377 oct_cfg_tx_intrcnt(struct lio *lio, in oct_cfg_tx_intrcnt() argument
2381 struct octeon_device *oct = lio->oct_dev; in oct_cfg_tx_intrcnt()
2426 struct lio *lio = GET_LIO(netdev); in lio_set_intr_coalesce() local
2428 struct octeon_device *oct = lio->oct_dev; in lio_set_intr_coalesce()
2440 for (j = 0; j < lio->linfo.num_txpciq; j++) { in lio_set_intr_coalesce()
2441 q_no = lio->linfo.txpciq[j].s.q_no; in lio_set_intr_coalesce()
2466 ret = oct_cfg_adaptive_intr(lio, &intrmod, intr_coal); in lio_set_intr_coalesce()
2469 ret = oct_cfg_rx_intrtime(lio, &intrmod, intr_coal); in lio_set_intr_coalesce()
2473 ret = oct_cfg_rx_intrcnt(lio, &intrmod, intr_coal); in lio_set_intr_coalesce()
2484 ret = oct_cfg_tx_intrcnt(lio, &intrmod, intr_coal); in lio_set_intr_coalesce()
2500 struct lio *lio = GET_LIO(netdev); in lio_get_ts_info() local
2512 if (lio->ptp_clock) in lio_get_ts_info()
2513 info->phc_index = ptp_clock_index(lio->ptp_clock); in lio_get_ts_info()
2532 struct lio *lio = GET_LIO(dev); in lio_get_regs_len() local
2533 struct octeon_device *oct = lio->oct_dev; in lio_get_regs_len()
3017 struct lio *lio = GET_LIO(dev); in lio_get_regs() local
3019 struct octeon_device *oct = lio->oct_dev; in lio_get_regs()
3046 struct lio *lio = GET_LIO(netdev); in lio_get_priv_flags() local
3048 return lio->oct_dev->priv_flags; in lio_get_priv_flags()
3053 struct lio *lio = GET_LIO(netdev); in lio_set_priv_flags() local
3056 lio_set_priv_flag(lio->oct_dev, OCT_PRIV_FLAG_TX_BYTES, in lio_set_priv_flags()
3064 struct lio *lio = GET_LIO(netdev); in lio_get_fecparam() local
3065 struct octeon_device *oct = lio->oct_dev; in lio_get_fecparam()
3075 liquidio_get_fec(lio); in lio_get_fecparam()
3077 if (oct->props[lio->ifidx].fec == 1) in lio_get_fecparam()
3089 struct lio *lio = GET_LIO(netdev); in lio_set_fecparam() local
3090 struct octeon_device *oct = lio->oct_dev; in lio_set_fecparam()
3098 liquidio_set_fec(lio, 0); in lio_set_fecparam()
3100 liquidio_set_fec(lio, 1); in lio_set_fecparam()
3175 struct lio *lio = GET_LIO(netdev); in liquidio_set_ethtool_ops() local
3176 struct octeon_device *oct = lio->oct_dev; in liquidio_set_ethtool_ops()