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()
456 struct lio *lio; in lio_get_vf_drvinfo() local
458 lio = GET_LIO(netdev); in lio_get_vf_drvinfo()
459 oct = lio->oct_dev; in lio_get_vf_drvinfo()
472 struct lio *lio = GET_LIO(netdev); in lio_send_queue_count_update() local
473 struct octeon_device *oct = lio->oct_dev; in lio_send_queue_count_update()
483 nctrl.iq_no = lio->linfo.txpciq[0].s.q_no; in lio_send_queue_count_update()
487 ret = octnet_send_nic_ctrl_pkt(lio->oct_dev, &nctrl); in lio_send_queue_count_update()
501 struct lio *lio = GET_LIO(dev); in lio_ethtool_get_channels() local
502 struct octeon_device *oct = lio->oct_dev; in lio_ethtool_get_channels()
511 rx_count = CFG_GET_NUM_RXQS_NIC_IF(conf6x, lio->ifidx); in lio_ethtool_get_channels()
512 tx_count = CFG_GET_NUM_TXQS_NIC_IF(conf6x, lio->ifidx); in lio_ethtool_get_channels()
515 max_combined = lio->linfo.num_txpciq; in lio_ethtool_get_channels()
607 struct lio *lio = GET_LIO(dev); in lio_ethtool_set_channels() local
608 struct octeon_device *oct = lio->oct_dev; in lio_ethtool_set_channels()
624 max_combined = lio->linfo.num_txpciq; in lio_ethtool_set_channels()
650 ifstate_set(lio, LIO_IFSTATE_RESETTING); in lio_ethtool_set_channels()
663 ifstate_reset(lio, LIO_IFSTATE_RESETTING); in lio_ethtool_set_channels()
671 struct lio *lio = GET_LIO(netdev); in lio_get_eeprom_len() local
672 struct octeon_device *oct_dev = lio->oct_dev; in lio_get_eeprom_len()
688 struct lio *lio = GET_LIO(netdev); in lio_get_eeprom() local
689 struct octeon_device *oct_dev = lio->oct_dev; in lio_get_eeprom()
707 struct lio *lio = GET_LIO(netdev); in octnet_gpio_access() local
708 struct octeon_device *oct = lio->oct_dev; in octnet_gpio_access()
718 nctrl.iq_no = lio->linfo.txpciq[0].s.q_no; in octnet_gpio_access()
722 ret = octnet_send_nic_ctrl_pkt(lio->oct_dev, &nctrl); in octnet_gpio_access()
734 struct lio *lio = GET_LIO(netdev); in octnet_id_active() local
735 struct octeon_device *oct = lio->oct_dev; in octnet_id_active()
744 nctrl.iq_no = lio->linfo.txpciq[0].s.q_no; in octnet_id_active()
748 ret = octnet_send_nic_ctrl_pkt(lio->oct_dev, &nctrl); in octnet_id_active()
762 octnet_mdio45_access(struct lio *lio, int op, int loc, int *value) in octnet_mdio45_access() argument
764 struct octeon_device *oct_dev = lio->oct_dev; in octnet_mdio45_access()
787 sc->iq_no = lio->linfo.txpciq[0].s.q_no; in octnet_mdio45_access()
833 struct lio *lio = GET_LIO(netdev); in lio_set_phys_id() local
834 struct octeon_device *oct = lio->oct_dev; in lio_set_phys_id()
839 linfo = &lio->linfo; in lio_set_phys_id()
853 ret = octnet_mdio45_access(lio, 0, in lio_set_phys_id()
855 &lio->phy_beacon_val); in lio_set_phys_id()
859 ret = octnet_mdio45_access(lio, 0, in lio_set_phys_id()
861 &lio->led_ctrl_val); in lio_set_phys_id()
867 ret = octnet_mdio45_access(lio, 1, in lio_set_phys_id()
874 ret = octnet_mdio45_access(lio, 1, in lio_set_phys_id()
923 ret = octnet_mdio45_access(lio, 1, in lio_set_phys_id()
925 &lio->led_ctrl_val); in lio_set_phys_id()
929 ret = octnet_mdio45_access(lio, 1, in lio_set_phys_id()
931 &lio->phy_beacon_val); in lio_set_phys_id()
956 struct lio *lio = GET_LIO(netdev); in lio_ethtool_get_ringparam() local
957 struct octeon_device *oct = lio->oct_dev; in lio_ethtool_get_ringparam()
961 if (ifstate_check(lio, LIO_IFSTATE_RESETTING)) in lio_ethtool_get_ringparam()
969 rx_pending = CFG_GET_NUM_RX_DESCS_NIC_IF(conf6x, lio->ifidx); in lio_ethtool_get_ringparam()
970 tx_pending = CFG_GET_NUM_TX_DESCS_NIC_IF(conf6x, lio->ifidx); in lio_ethtool_get_ringparam()
988 static int lio_23xx_reconfigure_queue_count(struct lio *lio) in lio_23xx_reconfigure_queue_count() argument
990 struct octeon_device *oct = lio->oct_dev; in lio_23xx_reconfigure_queue_count()
1058 lio->ifidx = ifidx_or_pfnum; in lio_23xx_reconfigure_queue_count()
1059 lio->linfo.num_rxpciq = hweight64(resp->cfg_info.iqmask); in lio_23xx_reconfigure_queue_count()
1060 lio->linfo.num_txpciq = hweight64(resp->cfg_info.iqmask); in lio_23xx_reconfigure_queue_count()
1061 for (j = 0; j < lio->linfo.num_rxpciq; j++) { in lio_23xx_reconfigure_queue_count()
1062 lio->linfo.rxpciq[j].u64 = in lio_23xx_reconfigure_queue_count()
1066 for (j = 0; j < lio->linfo.num_txpciq; j++) { in lio_23xx_reconfigure_queue_count()
1067 lio->linfo.txpciq[j].u64 = in lio_23xx_reconfigure_queue_count()
1071 lio->linfo.hw_addr = resp->cfg_info.linfo.hw_addr; in lio_23xx_reconfigure_queue_count()
1072 lio->linfo.gmxport = resp->cfg_info.linfo.gmxport; in lio_23xx_reconfigure_queue_count()
1073 lio->linfo.link.u64 = resp->cfg_info.linfo.link.u64; in lio_23xx_reconfigure_queue_count()
1074 lio->txq = lio->linfo.txpciq[0].s.q_no; in lio_23xx_reconfigure_queue_count()
1075 lio->rxq = lio->linfo.rxpciq[0].s.q_no; in lio_23xx_reconfigure_queue_count()
1078 lio->linfo.num_rxpciq); in lio_23xx_reconfigure_queue_count()
1087 struct lio *lio = GET_LIO(netdev); in lio_reset_queues() local
1088 struct octeon_device *oct = lio->oct_dev; in lio_reset_queues()
1144 lio_delete_glists(lio); in lio_reset_queues()
1226 if (lio_23xx_reconfigure_queue_count(lio)) in lio_reset_queues()
1238 if (lio_setup_glists(oct, lio, num_qs)) { in lio_reset_queues()
1266 struct lio *lio = GET_LIO(netdev); in lio_ethtool_set_ringparam() local
1267 struct octeon_device *oct = lio->oct_dev; in lio_ethtool_set_ringparam()
1287 ifstate_set(lio, LIO_IFSTATE_RESETTING); in lio_ethtool_set_ringparam()
1296 CFG_SET_NUM_TX_DESCS_NIC_IF(octeon_get_conf(oct), lio->ifidx, in lio_ethtool_set_ringparam()
1299 CFG_SET_NUM_RX_DESCS_NIC_IF(octeon_get_conf(oct), lio->ifidx, in lio_ethtool_set_ringparam()
1308 ifstate_reset(lio, LIO_IFSTATE_RESETTING); in lio_ethtool_set_ringparam()
1314 CFG_SET_NUM_TX_DESCS_NIC_IF(octeon_get_conf(oct), lio->ifidx, in lio_ethtool_set_ringparam()
1317 CFG_SET_NUM_RX_DESCS_NIC_IF(octeon_get_conf(oct), lio->ifidx, in lio_ethtool_set_ringparam()
1324 struct lio *lio = GET_LIO(netdev); in lio_get_msglevel() local
1326 return lio->msg_enable; in lio_get_msglevel()
1331 struct lio *lio = GET_LIO(netdev); in lio_set_msglevel() local
1333 if ((msglvl ^ lio->msg_enable) & NETIF_MSG_HW) { in lio_set_msglevel()
1342 lio->msg_enable = msglvl; in lio_set_msglevel()
1347 struct lio *lio = GET_LIO(netdev); in lio_vf_set_msglevel() local
1349 lio->msg_enable = msglvl; in lio_vf_set_msglevel()
1358 struct lio *lio = GET_LIO(netdev); in lio_get_pauseparam() local
1359 struct octeon_device *oct = lio->oct_dev; in lio_get_pauseparam()
1373 struct lio *lio = GET_LIO(netdev); in lio_set_pauseparam() local
1374 struct octeon_device *oct = lio->oct_dev; in lio_set_pauseparam()
1376 struct oct_link_info *linfo = &lio->linfo; in lio_set_pauseparam()
1397 nctrl.iq_no = lio->linfo.txpciq[0].s.q_no; in lio_set_pauseparam()
1417 ret = octnet_send_nic_ctrl_pkt(lio->oct_dev, &nctrl); in lio_set_pauseparam()
1435 struct lio *lio = GET_LIO(netdev); in lio_get_ethtool_stats() local
1436 struct octeon_device *oct_dev = lio->oct_dev; in lio_get_ethtool_stats()
1440 if (ifstate_check(lio, LIO_IFSTATE_RESETTING)) in lio_get_ethtool_stats()
1637 data[i++] = CVM_CAST64(lio->link_changes); in lio_get_ethtool_stats()
1725 struct lio *lio = GET_LIO(netdev); in lio_vf_get_ethtool_stats() local
1726 struct octeon_device *oct_dev = lio->oct_dev; in lio_vf_get_ethtool_stats()
1729 if (ifstate_check(lio, LIO_IFSTATE_RESETTING)) in lio_vf_get_ethtool_stats()
1759 data[i++] = CVM_CAST64(lio->link_changes); in lio_vf_get_ethtool_stats()
1762 j = lio->linfo.txpciq[vj].s.q_no; in lio_vf_get_ethtool_stats()
1804 j = lio->linfo.rxpciq[vj].s.q_no; in lio_vf_get_ethtool_stats()
1832 static void lio_get_priv_flags_strings(struct lio *lio, u8 *data) in lio_get_priv_flags_strings() argument
1834 struct octeon_device *oct_dev = lio->oct_dev; in lio_get_priv_flags_strings()
1849 netif_info(lio, drv, lio->netdev, "Unknown Chip !!\n"); in lio_get_priv_flags_strings()
1856 struct lio *lio = GET_LIO(netdev); in lio_get_strings() local
1857 struct octeon_device *oct_dev = lio->oct_dev; in lio_get_strings()
1893 lio_get_priv_flags_strings(lio, data); in lio_get_strings()
1896 netif_info(lio, drv, lio->netdev, "Unknown Stringset !!\n"); in lio_get_strings()
1905 struct lio *lio = GET_LIO(netdev); in lio_vf_get_strings() local
1906 struct octeon_device *oct_dev = lio->oct_dev; in lio_vf_get_strings()
1941 lio_get_priv_flags_strings(lio, data); in lio_vf_get_strings()
1944 netif_info(lio, drv, lio->netdev, "Unknown Stringset !!\n"); in lio_vf_get_strings()
1949 static int lio_get_priv_flags_ss_count(struct lio *lio) in lio_get_priv_flags_ss_count() argument
1951 struct octeon_device *oct_dev = lio->oct_dev; in lio_get_priv_flags_ss_count()
1961 netif_info(lio, drv, lio->netdev, "Unknown Chip !!\n"); in lio_get_priv_flags_ss_count()
1968 struct lio *lio = GET_LIO(netdev); in lio_get_sset_count() local
1969 struct octeon_device *oct_dev = lio->oct_dev; in lio_get_sset_count()
1977 return lio_get_priv_flags_ss_count(lio); in lio_get_sset_count()
1985 struct lio *lio = GET_LIO(netdev); in lio_vf_get_sset_count() local
1986 struct octeon_device *oct_dev = lio->oct_dev; in lio_vf_get_sset_count()
1994 return lio_get_priv_flags_ss_count(lio); in lio_vf_get_sset_count()
2001 static int octnet_get_intrmod_cfg(struct lio *lio, in octnet_get_intrmod_cfg() argument
2007 struct octeon_device *oct_dev = lio->oct_dev; in octnet_get_intrmod_cfg()
2021 sc->iq_no = lio->linfo.txpciq[0].s.q_no; in octnet_get_intrmod_cfg()
2058 static int octnet_set_intrmod_cfg(struct lio *lio, in octnet_set_intrmod_cfg() argument
2064 struct octeon_device *oct_dev = lio->oct_dev; in octnet_set_intrmod_cfg()
2080 sc->iq_no = lio->linfo.txpciq[0].s.q_no; in octnet_set_intrmod_cfg()
2122 struct lio *lio = GET_LIO(netdev); in lio_get_intr_coalesce() local
2123 struct octeon_device *oct = lio->oct_dev; in lio_get_intr_coalesce()
2127 if (octnet_get_intrmod_cfg(lio, &intrmod_cfg)) in lio_get_intr_coalesce()
2154 iq = oct->instr_queue[lio->linfo.txpciq[0].s.q_no]; in lio_get_intr_coalesce()
2159 netif_info(lio, drv, lio->netdev, "Unknown Chip !!\n"); in lio_get_intr_coalesce()
2193 static int oct_cfg_adaptive_intr(struct lio *lio, in oct_cfg_adaptive_intr() argument
2221 ret = octnet_set_intrmod_cfg(lio, intrmod_cfg); in oct_cfg_adaptive_intr()
2227 oct_cfg_rx_intrcnt(struct lio *lio, in oct_cfg_rx_intrcnt() argument
2231 struct octeon_device *oct = lio->oct_dev; in oct_cfg_rx_intrcnt()
2300 static int oct_cfg_rx_intrtime(struct lio *lio, in oct_cfg_rx_intrtime() argument
2304 struct octeon_device *oct = lio->oct_dev; in oct_cfg_rx_intrtime()
2379 oct_cfg_tx_intrcnt(struct lio *lio, in oct_cfg_tx_intrcnt() argument
2383 struct octeon_device *oct = lio->oct_dev; in oct_cfg_tx_intrcnt()
2428 struct lio *lio = GET_LIO(netdev); in lio_set_intr_coalesce() local
2430 struct octeon_device *oct = lio->oct_dev; in lio_set_intr_coalesce()
2442 for (j = 0; j < lio->linfo.num_txpciq; j++) { in lio_set_intr_coalesce()
2443 q_no = lio->linfo.txpciq[j].s.q_no; in lio_set_intr_coalesce()
2468 ret = oct_cfg_adaptive_intr(lio, &intrmod, intr_coal); in lio_set_intr_coalesce()
2471 ret = oct_cfg_rx_intrtime(lio, &intrmod, intr_coal); in lio_set_intr_coalesce()
2475 ret = oct_cfg_rx_intrcnt(lio, &intrmod, intr_coal); in lio_set_intr_coalesce()
2486 ret = oct_cfg_tx_intrcnt(lio, &intrmod, intr_coal); in lio_set_intr_coalesce()
2503 struct lio *lio = GET_LIO(netdev); in lio_get_ts_info() local
2511 if (lio->ptp_clock) in lio_get_ts_info()
2512 info->phc_index = ptp_clock_index(lio->ptp_clock); in lio_get_ts_info()
2528 struct lio *lio = GET_LIO(dev); in lio_get_regs_len() local
2529 struct octeon_device *oct = lio->oct_dev; in lio_get_regs_len()
3013 struct lio *lio = GET_LIO(dev); in lio_get_regs() local
3015 struct octeon_device *oct = lio->oct_dev; in lio_get_regs()
3042 struct lio *lio = GET_LIO(netdev); in lio_get_priv_flags() local
3044 return lio->oct_dev->priv_flags; in lio_get_priv_flags()
3049 struct lio *lio = GET_LIO(netdev); in lio_set_priv_flags() local
3052 lio_set_priv_flag(lio->oct_dev, OCT_PRIV_FLAG_TX_BYTES, in lio_set_priv_flags()
3060 struct lio *lio = GET_LIO(netdev); in lio_get_fecparam() local
3061 struct octeon_device *oct = lio->oct_dev; in lio_get_fecparam()
3071 liquidio_get_fec(lio); in lio_get_fecparam()
3073 if (oct->props[lio->ifidx].fec == 1) in lio_get_fecparam()
3085 struct lio *lio = GET_LIO(netdev); in lio_set_fecparam() local
3086 struct octeon_device *oct = lio->oct_dev; in lio_set_fecparam()
3094 liquidio_set_fec(lio, 0); in lio_set_fecparam()
3096 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()