• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/sys/dev/liquidio/

Lines Matching refs:oct

81 static int	lio_cn23xx_pf_read_csr_reg(char *s, struct octeon_device *oct);
92 static int lio_irq_reallocate_irqs(struct octeon_device *oct,
112 struct octeon_device *oct = lio->oct_dev;
128 lio_dev_err(oct, "Failed to send Queue reset command (ret: 0x%x)\n",
662 struct octeon_device *oct = lio->oct_dev;
668 if (oct->chip_id != LIO_CN23XX_PF_VID)
671 if (oct->rx_pause)
674 if (oct->tx_pause)
719 lio_dev_err(oct, "Failed to set pause parameter\n");
723 oct->rx_pause = new_pause & LIO_RX_PAUSE;
724 oct->tx_pause = new_pause & LIO_TX_PAUSE;
734 struct octeon_device *oct = lio->oct_dev;
751 switch (oct->chip_id) {
753 len += lio_cn23xx_pf_read_csr_reg(regbuf, oct);
757 __func__, oct->chip_id);
767 lio_cn23xx_pf_read_csr_reg(char *s, struct octeon_device *oct)
771 uint8_t pf_num = oct->pf_num;
778 reg = LIO_CN23XX_SLI_PKT_MAC_RINFO64(oct->pcie_port, oct->pf_num);
780 reg, oct->pcie_port, oct->pf_num,
781 LIO_CAST64(lio_read_csr64(oct, reg)));
784 reg = LIO_CN23XX_SLI_MAC_PF_INT_ENB64(oct->pcie_port, oct->pf_num);
786 reg, oct->pcie_port, oct->pf_num,
787 LIO_CAST64(lio_read_csr64(oct, reg)));
790 reg = LIO_CN23XX_SLI_MAC_PF_INT_SUM64(oct->pcie_port, oct->pf_num);
792 reg, oct->pcie_port, oct->pf_num,
793 LIO_CAST64(lio_read_csr64(oct, reg)));
798 LIO_CAST64(lio_read_csr64(oct, reg)));
801 reg = 0x27300 + oct->pcie_port * LIO_CN23XX_MAC_INT_OFFSET +
802 (oct->pf_num) * LIO_CN23XX_PF_INT_OFFSET;
804 reg, oct->pcie_port, oct->pf_num,
805 LIO_CAST64(lio_read_csr64(oct, reg)));
808 reg = 0x27200 + oct->pcie_port * LIO_CN23XX_MAC_INT_OFFSET +
809 (oct->pf_num) * LIO_CN23XX_PF_INT_OFFSET;
811 reg, oct->pcie_port, oct->pf_num,
812 LIO_CAST64(lio_read_csr64(oct, reg)));
817 LIO_CAST64(lio_read_csr64(oct, reg)));
822 LIO_CAST64(lio_read_csr64(oct, reg)));
827 LIO_CAST64(lio_read_csr64(oct, reg)));
832 reg, LIO_CAST64(lio_read_csr64(oct, reg)));
837 LIO_CAST64(lio_read_csr64(oct, reg)));
842 LIO_CAST64(lio_read_csr64(oct, reg)));
847 reg, LIO_CAST64(lio_read_csr64(oct, reg)));
854 reg, LIO_CAST64(lio_read_csr64(oct, reg)));
859 reg, LIO_CAST64(lio_read_csr64(oct, reg)));
865 reg, i, LIO_CAST64(lio_read_csr64(oct, reg)));
872 reg, i, LIO_CAST64(lio_read_csr64(oct, reg)));
879 reg, i, LIO_CAST64(lio_read_csr64(oct, reg)));
886 reg, i, LIO_CAST64(lio_read_csr64(oct, reg)));
893 reg, i, LIO_CAST64(lio_read_csr64(oct, reg)));
900 reg, i, LIO_CAST64(lio_read_csr64(oct, reg)));
907 reg, i, LIO_CAST64(lio_read_csr64(oct, reg)));
914 reg, i, LIO_CAST64(lio_read_csr64(oct, reg)));
921 reg, i, LIO_CAST64(lio_read_csr64(oct, reg)));
928 reg, i, LIO_CAST64(lio_read_csr64(oct, reg)));
935 reg, i, LIO_CAST64(lio_read_csr64(oct, reg)));
942 reg, i, LIO_CAST64(lio_read_csr64(oct, reg)));
949 reg, i, LIO_CAST64(lio_read_csr64(oct, reg)));
956 reg, i, LIO_CAST64(lio_read_csr64(oct, reg)));
965 struct octeon_device *oct = lio->oct_dev;
969 if (LIO_CN23XX_PF(oct)) {
990 struct octeon_device *oct = lio->oct_dev;
993 if (lio_wait_for_pending_requests(oct))
994 lio_dev_err(oct, "There were pending requests\n");
996 if (lio_wait_for_instr_fetch(oct))
997 lio_dev_err(oct, "IQ had pending instructions\n");
1004 oct->fn_list.disable_io_queues(oct);
1006 if (num_qs != oct->num_iqs)
1009 for (i = 0; i < LIO_MAX_OUTPUT_QUEUES(oct); i++) {
1010 if (!(oct->io_qmask.oq & BIT_ULL(i)))
1013 lio_delete_droq(oct, i);
1016 for (i = 0; i < LIO_MAX_INSTR_QUEUES(oct); i++) {
1017 if (!(oct->io_qmask.iq & BIT_ULL(i)))
1020 lio_delete_instr_queue(oct, i);
1023 if (oct->fn_list.setup_device_regs(oct)) {
1024 lio_dev_err(oct, "Failed to configure device registers\n");
1028 if (lio_setup_io_queues(oct, 0, num_qs, num_qs)) {
1029 lio_dev_err(oct, "IO queues initialization failed\n");
1043 struct octeon_device *oct = lio->oct_dev;
1047 if (!LIO_CN23XX_PF(oct))
1052 rx_count = rx_count_old = oct->droq[0]->max_count;
1072 LIO_SET_NUM_RX_DESCS_NIC_IF(lio_get_conf(oct),
1076 tx_count = tx_count_old = oct->instr_queue[0]->max_count;
1096 LIO_SET_NUM_TX_DESCS_NIC_IF(lio_get_conf(oct),
1104 lio_irq_reallocate_irqs(oct, lio->linfo.num_txpciq);
1114 LIO_SET_NUM_RX_DESCS_NIC_IF(lio_get_conf(oct), lio->ifidx,
1118 LIO_SET_NUM_TX_DESCS_NIC_IF(lio_get_conf(oct), lio->ifidx,
1128 struct octeon_device *oct = lio->oct_dev;
1131 if (LIO_CN23XX_PF(oct))
1137 lio_irq_reallocate_irqs(struct octeon_device *oct, uint32_t num_ioqs)
1141 if (!oct->msix_on)
1148 oct->fn_list.disable_interrupt(oct, OCTEON_ALL_INTR);
1150 if (oct->msix_on) {
1151 if (LIO_CN23XX_PF(oct))
1152 num_msix_irqs = oct->num_msix_irqs - 1;
1155 if (oct->ioq_vector[i].tag != NULL) {
1156 bus_teardown_intr(oct->device,
1157 oct->ioq_vector[i].msix_res,
1158 oct->ioq_vector[i].tag);
1159 oct->ioq_vector[i].tag = NULL;
1162 if (oct->ioq_vector[i].msix_res != NULL) {
1163 bus_release_resource(oct->device, SYS_RES_IRQ,
1164 oct->ioq_vector[i].vector,
1165 oct->ioq_vector[i].msix_res);
1166 oct->ioq_vector[i].msix_res = NULL;
1171 if (oct->tag != NULL) {
1172 bus_teardown_intr(oct->device, oct->msix_res, oct->tag);
1173 oct->tag = NULL;
1176 if (oct->msix_res != NULL) {
1177 bus_release_resource(oct->device, SYS_RES_IRQ,
1178 oct->aux_vector,
1179 oct->msix_res);
1180 oct->msix_res = NULL;
1183 pci_release_msi(oct->device);
1187 if (lio_setup_interrupt(oct, num_ioqs)) {
1188 lio_dev_info(oct, "Setup interuupt failed\n");
1193 oct->fn_list.enable_interrupt(oct, OCTEON_ALL_INTR);
1202 struct octeon_device *oct = lio->oct_dev;
1206 if (strcmp(oct->fw_info.lio_firmware_version, "1.6.1") < 0) {
1207 lio_dev_err(oct,
1212 combined_count = oct->num_iqs;
1221 if (LIO_CN23XX_PF(oct)) {
1230 if (combined_count == oct->num_iqs)
1243 lio_irq_reallocate_irqs(oct, combined_count);
1588 struct octeon_device *oct = lio->oct_dev;
1592 switch (oct->chip_id) {
1601 for (q_no = 0; q_no < oct->num_oqs; q_no++) {
1602 q_no += oct->sriov_info.pf_srn;
1603 lio_write_csr64(oct,
1605 (lio_read_csr64(oct,
1613 oct->rx_max_coalesced_frames = rx_max_coalesced_frames;
1626 struct octeon_device *oct = lio->oct_dev;
1630 switch (oct->chip_id) {
1641 lio_cn23xx_pf_get_oq_ticks(oct, rx_coalesce_usecs);
1642 for (q_no = 0; q_no < oct->num_oqs; q_no++) {
1643 q_no += oct->sriov_info.pf_srn;
1644 lio_write_csr64(oct,
1652 oct->rx_coalesce_usecs = rx_coalesce_usecs;
1666 struct octeon_device *oct = lio->oct_dev;
1672 switch (oct->chip_id) {
1682 for (q_no = 0; q_no < oct->num_iqs; q_no++) {
1684 (oct->instr_queue[q_no])->inst_cnt_reg;
1685 val = lio_read_csr64(oct, inst_cnt_reg);
1693 lio_write_csr64(oct, inst_cnt_reg, val);
1698 oct->tx_max_coalesced_frames = iq_intr_pkt;
1711 struct octeon_device *oct = lio->oct_dev;
1749 new_val = old_val = oct->rx_coalesce_usecs;
1763 new_val = old_val = oct->rx_max_coalesced_frames;
1777 new_val = old_val = oct->tx_max_coalesced_frames;
1928 lio->intrmod_cfg.rx_usecs = LIO_GET_OQ_INTR_TIME_CFG(lio_get_conf(oct));
1929 lio->intrmod_cfg.rx_frames = LIO_GET_OQ_INTR_PKT_CFG(lio_get_conf(oct));
1930 lio->intrmod_cfg.tx_frames = LIO_GET_IQ_INTR_PKT_CFG(lio_get_conf(oct));
1934 lio_dev_err(oct, "Interrupt coalescing updation to Firmware failed!\n");
1938 rx_coalesce_usecs = oct->rx_coalesce_usecs;
1941 rx_max_coalesced_frames = oct->rx_max_coalesced_frames;
1953 oct->rx_coalesce_usecs =
1954 LIO_GET_OQ_INTR_TIME_CFG(lio_get_conf(oct));
1955 oct->rx_max_coalesced_frames =
1956 LIO_GET_OQ_INTR_PKT_CFG(lio_get_conf(oct));
1961 tx_coalesce_usecs = oct->tx_max_coalesced_frames;
1968 oct->tx_max_coalesced_frames =
1969 LIO_GET_IQ_INTR_PKT_CFG(lio_get_conf(oct));