Lines Matching refs:oct_dev
203 struct octeon_device *oct = lio->oct_dev; in lio_get_settings()
243 oct = lio->oct_dev; in lio_get_drvinfo()
258 struct octeon_device *oct = lio->oct_dev; in lio_ethtool_get_channels()
287 struct octeon_device *oct_dev = lio->oct_dev; in lio_get_eeprom_len() local
291 board_info = (struct octeon_board_info *)(&oct_dev->boardinfo); in lio_get_eeprom_len()
304 struct octeon_device *oct_dev = lio->oct_dev; in lio_get_eeprom() local
310 eeprom->magic = oct_dev->pci_dev->vendor; in lio_get_eeprom()
311 board_info = (struct octeon_board_info *)(&oct_dev->boardinfo); in lio_get_eeprom()
323 struct octeon_device *oct = lio->oct_dev; in octnet_gpio_access()
338 ret = octnet_send_nic_ctrl_pkt(lio->oct_dev, &nctrl); in octnet_gpio_access()
350 struct octeon_device *oct = lio->oct_dev; in octnet_id_active()
364 ret = octnet_send_nic_ctrl_pkt(lio->oct_dev, &nctrl); in octnet_id_active()
401 struct octeon_device *oct_dev = lio->oct_dev; in octnet_mdio45_access() local
409 octeon_alloc_soft_command(oct_dev, in octnet_mdio45_access()
422 mdio_cmd_ctx->octeon_id = lio_get_device_id(oct_dev); in octnet_mdio45_access()
431 octeon_prepare_soft_command(oct_dev, sc, OPCODE_NIC, OPCODE_NIC_MDIO45, in octnet_mdio45_access()
440 retval = octeon_send_soft_command(oct_dev, sc); in octnet_mdio45_access()
443 dev_err(&oct_dev->pci_dev->dev, in octnet_mdio45_access()
454 dev_err(&oct_dev->pci_dev->dev, "octnet mdio45 access failed\n"); in octnet_mdio45_access()
469 octeon_free_soft_command(oct_dev, sc); in octnet_mdio45_access()
478 struct octeon_device *oct = lio->oct_dev; in lio_set_phys_id()
587 struct octeon_device *oct = lio->oct_dev; in lio_ethtool_get_ringparam()
657 struct octeon_device *oct = lio->oct_dev; in lio_get_pauseparam()
672 struct octeon_device *oct = lio->oct_dev; in lio_set_pauseparam()
716 ret = octnet_send_nic_ctrl_pkt(lio->oct_dev, &nctrl); in lio_set_pauseparam()
734 struct octeon_device *oct_dev = lio->oct_dev; in lio_get_ethtool_stats() local
767 data[i++] = CVM_CAST64(oct_dev->link_stats.fromhost.fw_total_sent); in lio_get_ethtool_stats()
769 data[i++] = CVM_CAST64(oct_dev->link_stats.fromhost.fw_total_fwd); in lio_get_ethtool_stats()
771 data[i++] = CVM_CAST64(oct_dev->link_stats.fromhost.fw_err_pko); in lio_get_ethtool_stats()
773 data[i++] = CVM_CAST64(oct_dev->link_stats.fromhost.fw_err_link); in lio_get_ethtool_stats()
777 data[i++] = CVM_CAST64(oct_dev->link_stats.fromhost.fw_err_drop); in lio_get_ethtool_stats()
780 data[i++] = CVM_CAST64(oct_dev->link_stats.fromhost.fw_tso); in lio_get_ethtool_stats()
784 data[i++] = CVM_CAST64(oct_dev->link_stats.fromhost.fw_tso_fwd); in lio_get_ethtool_stats()
788 data[i++] = CVM_CAST64(oct_dev->link_stats.fromhost.fw_err_tso); in lio_get_ethtool_stats()
792 data[i++] = CVM_CAST64(oct_dev->link_stats.fromhost.fw_tx_vxlan); in lio_get_ethtool_stats()
796 data[i++] = CVM_CAST64(oct_dev->link_stats.fromhost.total_pkts_sent); in lio_get_ethtool_stats()
798 data[i++] = CVM_CAST64(oct_dev->link_stats.fromhost.total_bytes_sent); in lio_get_ethtool_stats()
800 data[i++] = CVM_CAST64(oct_dev->link_stats.fromhost.mcast_pkts_sent); in lio_get_ethtool_stats()
802 data[i++] = CVM_CAST64(oct_dev->link_stats.fromhost.bcast_pkts_sent); in lio_get_ethtool_stats()
804 data[i++] = CVM_CAST64(oct_dev->link_stats.fromhost.ctl_sent); in lio_get_ethtool_stats()
806 data[i++] = CVM_CAST64(oct_dev->link_stats.fromhost.total_collisions); in lio_get_ethtool_stats()
808 data[i++] = CVM_CAST64(oct_dev->link_stats.fromhost.one_collision_sent); in lio_get_ethtool_stats()
811 CVM_CAST64(oct_dev->link_stats.fromhost.multi_collision_sent); in lio_get_ethtool_stats()
813 data[i++] = CVM_CAST64(oct_dev->link_stats.fromhost.max_collision_fail); in lio_get_ethtool_stats()
815 data[i++] = CVM_CAST64(oct_dev->link_stats.fromhost.max_deferral_fail); in lio_get_ethtool_stats()
817 data[i++] = CVM_CAST64(oct_dev->link_stats.fromhost.fifo_err); in lio_get_ethtool_stats()
819 data[i++] = CVM_CAST64(oct_dev->link_stats.fromhost.runts); in lio_get_ethtool_stats()
825 data[i++] = CVM_CAST64(oct_dev->link_stats.fromwire.fw_total_rcvd); in lio_get_ethtool_stats()
829 data[i++] = CVM_CAST64(oct_dev->link_stats.fromwire.fw_total_fwd); in lio_get_ethtool_stats()
831 data[i++] = CVM_CAST64(oct_dev->link_stats.fromwire.jabber_err); in lio_get_ethtool_stats()
833 data[i++] = CVM_CAST64(oct_dev->link_stats.fromwire.l2_err); in lio_get_ethtool_stats()
835 data[i++] = CVM_CAST64(oct_dev->link_stats.fromwire.frame_err); in lio_get_ethtool_stats()
839 data[i++] = CVM_CAST64(oct_dev->link_stats.fromwire.fw_err_pko); in lio_get_ethtool_stats()
841 data[i++] = CVM_CAST64(oct_dev->link_stats.fromwire.fw_err_link); in lio_get_ethtool_stats()
845 data[i++] = CVM_CAST64(oct_dev->link_stats.fromwire.fw_err_drop); in lio_get_ethtool_stats()
850 data[i++] = CVM_CAST64(oct_dev->link_stats.fromwire.fw_rx_vxlan); in lio_get_ethtool_stats()
854 data[i++] = CVM_CAST64(oct_dev->link_stats.fromwire.fw_rx_vxlan_err); in lio_get_ethtool_stats()
860 data[i++] = CVM_CAST64(oct_dev->link_stats.fromwire.fw_lro_pkts); in lio_get_ethtool_stats()
864 data[i++] = CVM_CAST64(oct_dev->link_stats.fromwire.fw_lro_octs); in lio_get_ethtool_stats()
866 data[i++] = CVM_CAST64(oct_dev->link_stats.fromwire.fw_total_lro); in lio_get_ethtool_stats()
868 data[i++] = CVM_CAST64(oct_dev->link_stats.fromwire.fw_lro_aborts); in lio_get_ethtool_stats()
872 data[i++] = CVM_CAST64(oct_dev->link_stats.fromwire.fw_lro_aborts_port); in lio_get_ethtool_stats()
876 data[i++] = CVM_CAST64(oct_dev->link_stats.fromwire.fw_lro_aborts_seq); in lio_get_ethtool_stats()
881 CVM_CAST64(oct_dev->link_stats.fromwire.fw_lro_aborts_tsval); in lio_get_ethtool_stats()
887 CVM_CAST64(oct_dev->link_stats.fromwire.fw_lro_aborts_timer); in lio_get_ethtool_stats()
889 data[i++] = CVM_CAST64(oct_dev->link_stats.fromwire.fwd_rate); in lio_get_ethtool_stats()
893 data[i++] = CVM_CAST64(oct_dev->link_stats.fromwire.total_rcvd); in lio_get_ethtool_stats()
895 data[i++] = CVM_CAST64(oct_dev->link_stats.fromwire.bytes_rcvd); in lio_get_ethtool_stats()
897 data[i++] = CVM_CAST64(oct_dev->link_stats.fromwire.total_bcst); in lio_get_ethtool_stats()
899 data[i++] = CVM_CAST64(oct_dev->link_stats.fromwire.total_mcst); in lio_get_ethtool_stats()
901 data[i++] = CVM_CAST64(oct_dev->link_stats.fromwire.runts); in lio_get_ethtool_stats()
903 data[i++] = CVM_CAST64(oct_dev->link_stats.fromwire.ctl_rcvd); in lio_get_ethtool_stats()
905 data[i++] = CVM_CAST64(oct_dev->link_stats.fromwire.fifo_err); in lio_get_ethtool_stats()
907 data[i++] = CVM_CAST64(oct_dev->link_stats.fromwire.dmac_drop); in lio_get_ethtool_stats()
909 data[i++] = CVM_CAST64(oct_dev->link_stats.fromwire.fcs_err); in lio_get_ethtool_stats()
914 for (j = 0; j < MAX_OCTEON_INSTR_QUEUES(oct_dev); j++) { in lio_get_ethtool_stats()
915 if (!(oct_dev->io_qmask.iq & (1ULL << j))) in lio_get_ethtool_stats()
919 data[i++] = CVM_CAST64(oct_dev->instr_queue[j]->stats.tx_done); in lio_get_ethtool_stats()
922 CVM_CAST64(oct_dev->instr_queue[j]->stats.tx_tot_bytes); in lio_get_ethtool_stats()
925 CVM_CAST64(oct_dev->instr_queue[j]->stats.tx_dropped); in lio_get_ethtool_stats()
928 CVM_CAST64(oct_dev->instr_queue[j]->stats.tx_iq_busy); in lio_get_ethtool_stats()
931 CVM_CAST64(oct_dev->instr_queue[j]->stats.sgentry_sent); in lio_get_ethtool_stats()
936 CVM_CAST64(oct_dev->instr_queue[j]->stats.instr_posted); in lio_get_ethtool_stats()
938 data[i++] = CVM_CAST64(oct_dev->instr_queue[j]-> in lio_get_ethtool_stats()
941 data[i++] = CVM_CAST64(oct_dev->instr_queue[j]-> in lio_get_ethtool_stats()
945 CVM_CAST64(oct_dev->instr_queue[j]->stats.bytes_sent); in lio_get_ethtool_stats()
948 data[i++] = CVM_CAST64(oct_dev->instr_queue[j]->stats.tx_gso); in lio_get_ethtool_stats()
950 data[i++] = CVM_CAST64(oct_dev->instr_queue[j]->stats.tx_vxlan); in lio_get_ethtool_stats()
953 CVM_CAST64(oct_dev->instr_queue[j]->stats.tx_restart); in lio_get_ethtool_stats()
958 for (j = 0; j < MAX_OCTEON_OUTPUT_QUEUES(oct_dev); j++) { in lio_get_ethtool_stats()
959 if (!(oct_dev->io_qmask.oq & (1ULL << j))) in lio_get_ethtool_stats()
965 CVM_CAST64(oct_dev->droq[j]->stats.rx_pkts_received); in lio_get_ethtool_stats()
968 CVM_CAST64(oct_dev->droq[j]->stats.rx_bytes_received); in lio_get_ethtool_stats()
970 data[i++] = CVM_CAST64(oct_dev->droq[j]->stats.dropped_nomem + in lio_get_ethtool_stats()
971 oct_dev->droq[j]->stats.dropped_toomany + in lio_get_ethtool_stats()
972 oct_dev->droq[j]->stats.rx_dropped); in lio_get_ethtool_stats()
974 CVM_CAST64(oct_dev->droq[j]->stats.dropped_nomem); in lio_get_ethtool_stats()
976 CVM_CAST64(oct_dev->droq[j]->stats.dropped_toomany); in lio_get_ethtool_stats()
978 CVM_CAST64(oct_dev->droq[j]->stats.rx_dropped); in lio_get_ethtool_stats()
982 CVM_CAST64(oct_dev->droq[j]->stats.pkts_received); in lio_get_ethtool_stats()
984 CVM_CAST64(oct_dev->droq[j]->stats.bytes_received); in lio_get_ethtool_stats()
986 CVM_CAST64(oct_dev->droq[j]->stats.dropped_nodispatch); in lio_get_ethtool_stats()
989 CVM_CAST64(oct_dev->droq[j]->stats.rx_vxlan); in lio_get_ethtool_stats()
991 CVM_CAST64(oct_dev->droq[j]->stats.rx_alloc_failure); in lio_get_ethtool_stats()
997 struct octeon_device *oct_dev = lio->oct_dev; in lio_get_priv_flags_strings() local
1000 switch (oct_dev->chip_id) { in lio_get_priv_flags_strings()
1019 struct octeon_device *oct_dev = lio->oct_dev; in lio_get_strings() local
1032 for (i = 0; i < MAX_OCTEON_INSTR_QUEUES(oct_dev); i++) { in lio_get_strings()
1033 if (!(oct_dev->io_qmask.iq & (1ULL << i))) in lio_get_strings()
1044 for (i = 0; i < MAX_OCTEON_OUTPUT_QUEUES(oct_dev); i++) { in lio_get_strings()
1045 if (!(oct_dev->io_qmask.oq & (1ULL << i))) in lio_get_strings()
1066 struct octeon_device *oct_dev = lio->oct_dev; in lio_get_priv_flags_ss_count() local
1068 switch (oct_dev->chip_id) { in lio_get_priv_flags_ss_count()
1083 struct octeon_device *oct_dev = lio->oct_dev; in lio_get_sset_count() local
1088 ARRAY_SIZE(oct_iq_stats_strings) * oct_dev->num_iqs + in lio_get_sset_count()
1089 ARRAY_SIZE(oct_droq_stats_strings) * oct_dev->num_oqs); in lio_get_sset_count()
1101 struct octeon_device *oct = lio->oct_dev; in lio_get_intr_coalesce()
1167 static void octnet_intrmod_callback(struct octeon_device *oct_dev, in octnet_intrmod_callback() argument
1174 oct_dev = cmd->oct_dev; in octnet_intrmod_callback()
1177 dev_err(&oct_dev->pci_dev->dev, "intrmod config failed. Status: %llx\n", in octnet_intrmod_callback()
1180 dev_info(&oct_dev->pci_dev->dev, in octnet_intrmod_callback()
1182 oct_dev->intrmod.rx_enable); in octnet_intrmod_callback()
1184 octeon_free_soft_command(oct_dev, sc); in octnet_intrmod_callback()
1195 struct octeon_device *oct_dev = lio->oct_dev; in octnet_set_intrmod_cfg() local
1199 octeon_alloc_soft_command(oct_dev, in octnet_set_intrmod_cfg()
1214 cmd->oct_dev = oct_dev; in octnet_set_intrmod_cfg()
1218 octeon_prepare_soft_command(oct_dev, sc, OPCODE_NIC, in octnet_set_intrmod_cfg()
1225 retval = octeon_send_soft_command(oct_dev, sc); in octnet_set_intrmod_cfg()
1227 octeon_free_soft_command(oct_dev, sc); in octnet_set_intrmod_cfg()
1235 octnet_nic_stats_callback(struct octeon_device *oct_dev, in octnet_nic_stats_callback() argument
1246 struct nic_rx_stats *rstats = &oct_dev->link_stats.fromwire; in octnet_nic_stats_callback()
1247 struct nic_tx_stats *tstats = &oct_dev->link_stats.fromhost; in octnet_nic_stats_callback()
1334 struct octeon_device *oct_dev = lio->oct_dev; in octnet_get_link_stats() local
1344 octeon_alloc_soft_command(oct_dev, in octnet_get_link_stats()
1362 octeon_prepare_soft_command(oct_dev, sc, OPCODE_NIC, in octnet_get_link_stats()
1369 retval = octeon_send_soft_command(oct_dev, sc); in octnet_get_link_stats()
1371 octeon_free_soft_command(oct_dev, sc); in octnet_get_link_stats()
1378 octeon_free_soft_command(oct_dev, sc); in octnet_get_link_stats()
1383 octeon_free_soft_command(oct_dev, sc); in octnet_get_link_stats()
1393 struct octeon_device *oct = lio->oct_dev; in oct_cfg_adaptive_intr()
1472 struct octeon_device *oct = lio->oct_dev; in oct_cfg_rx_intrcnt()
1522 struct octeon_device *oct = lio->oct_dev; in oct_cfg_rx_intrtime()
1577 struct octeon_device *oct = lio->oct_dev; in oct_cfg_tx_intrcnt()
1620 struct octeon_device *oct = lio->oct_dev; in lio_set_intr_coalesce()
1710 struct octeon_device *oct = lio->oct_dev; in lio_set_settings()
1764 ret = octnet_send_nic_ctrl_pkt(lio->oct_dev, &nctrl); in lio_set_settings()
1791 struct octeon_device *oct = lio->oct_dev; in lio_get_regs_len()
2158 struct octeon_device *oct = lio->oct_dev; in lio_get_regs()
2183 return lio->oct_dev->priv_flags; in lio_get_priv_flags()
2191 lio_set_priv_flag(lio->oct_dev, OCT_PRIV_FLAG_TX_BYTES, in lio_set_priv_flags()