Home
last modified time | relevance | path

Searched refs:oct (Results 1 – 25 of 44) sorted by relevance

12

/linux/drivers/net/ethernet/cavium/liquidio/
H A Dcn66xx_device.c29 int lio_cn6xxx_soft_reset(struct octeon_device *oct) in lio_cn6xxx_soft_reset() argument
31 octeon_write_csr64(oct, CN6XXX_WIN_WR_MASK_REG, 0xFF); in lio_cn6xxx_soft_reset()
33 dev_dbg(&oct->pci_dev->dev, "BIST enabled for soft reset\n"); in lio_cn6xxx_soft_reset()
35 lio_pci_writeq(oct, 1, CN6XXX_CIU_SOFT_BIST); in lio_cn6xxx_soft_reset()
36 octeon_write_csr64(oct, CN6XXX_SLI_SCRATCH1, 0x1234ULL); in lio_cn6xxx_soft_reset()
38 lio_pci_readq(oct, CN6XXX_CIU_SOFT_RST); in lio_cn6xxx_soft_reset()
39 lio_pci_writeq(oct, 1, CN6XXX_CIU_SOFT_RST); in lio_cn6xxx_soft_reset()
44 if (octeon_read_csr64(oct, CN6XXX_SLI_SCRATCH1)) { in lio_cn6xxx_soft_reset()
45 dev_err(&oct->pci_dev->dev, "Soft reset failed\n"); in lio_cn6xxx_soft_reset()
49 dev_dbg(&oct->pci_dev->dev, "Reset completed\n"); in lio_cn6xxx_soft_reset()
[all …]
H A Dcn23xx_pf_device.c39 static int cn23xx_pf_soft_reset(struct octeon_device *oct) in cn23xx_pf_soft_reset() argument
41 octeon_write_csr64(oct, CN23XX_WIN_WR_MASK_REG, 0xFF); in cn23xx_pf_soft_reset()
43 dev_dbg(&oct->pci_dev->dev, "OCTEON[%d]: BIST enabled for CN23XX soft reset\n", in cn23xx_pf_soft_reset()
44 oct->octeon_id); in cn23xx_pf_soft_reset()
46 octeon_write_csr64(oct, CN23XX_SLI_SCRATCH1, 0x1234ULL); in cn23xx_pf_soft_reset()
49 lio_pci_readq(oct, CN23XX_RST_SOFT_RST); in cn23xx_pf_soft_reset()
50 lio_pci_writeq(oct, 1, CN23XX_RST_SOFT_RST); in cn23xx_pf_soft_reset()
55 if (octeon_read_csr64(oct, CN23XX_SLI_SCRATCH1)) { in cn23xx_pf_soft_reset()
56 dev_err(&oct->pci_dev->dev, "OCTEON[%d]: Soft reset failed\n", in cn23xx_pf_soft_reset()
57 oct->octeon_id); in cn23xx_pf_soft_reset()
[all …]
H A Dcn68xx_device.c31 static void lio_cn68xx_set_dpi_regs(struct octeon_device *oct) in lio_cn68xx_set_dpi_regs() argument
36 lio_pci_writeq(oct, CN6XXX_DPI_DMA_CTL_MASK, CN6XXX_DPI_DMA_CONTROL); in lio_cn68xx_set_dpi_regs()
37 dev_dbg(&oct->pci_dev->dev, "DPI_DMA_CONTROL: 0x%016llx\n", in lio_cn68xx_set_dpi_regs()
38 lio_pci_readq(oct, CN6XXX_DPI_DMA_CONTROL)); in lio_cn68xx_set_dpi_regs()
45 lio_pci_writeq(oct, 0, CN6XXX_DPI_DMA_ENG_ENB(i)); in lio_cn68xx_set_dpi_regs()
46 lio_pci_writeq(oct, fifo_sizes[i], CN6XXX_DPI_DMA_ENG_BUF(i)); in lio_cn68xx_set_dpi_regs()
47 dev_dbg(&oct->pci_dev->dev, "DPI_ENG_BUF%d: 0x%016llx\n", i, in lio_cn68xx_set_dpi_regs()
48 lio_pci_readq(oct, CN6XXX_DPI_DMA_ENG_BUF(i))); in lio_cn68xx_set_dpi_regs()
55 lio_pci_writeq(oct, 1, CN6XXX_DPI_CTL); in lio_cn68xx_set_dpi_regs()
56 dev_dbg(&oct->pci_dev->dev, "DPI_CTL: 0x%016llx\n", in lio_cn68xx_set_dpi_regs()
[all …]
H A Docteon_device.c569 static void *__retrieve_octeon_config_info(struct octeon_device *oct, in __retrieve_octeon_config_info() argument
572 u32 oct_id = oct->octeon_id; in __retrieve_octeon_config_info()
577 if (oct->chip_id == OCTEON_CN66XX) { in __retrieve_octeon_config_info()
579 } else if ((oct->chip_id == OCTEON_CN68XX) && in __retrieve_octeon_config_info()
582 } else if ((oct->chip_id == OCTEON_CN68XX) && in __retrieve_octeon_config_info()
585 } else if (oct->chip_id == OCTEON_CN23XX_PF_VID) { in __retrieve_octeon_config_info()
587 } else if (oct->chip_id == OCTEON_CN23XX_VF_VID) { in __retrieve_octeon_config_info()
597 static int __verify_octeon_config_info(struct octeon_device *oct, void *conf) in __verify_octeon_config_info() argument
599 switch (oct->chip_id) { in __verify_octeon_config_info()
602 return lio_validate_cn6xxx_config_info(oct, conf); in __verify_octeon_config_info()
[all …]
H A Dcn23xx_vf_device.c30 u32 cn23xx_vf_get_oq_ticks(struct octeon_device *oct, u32 time_intr_in_us) in cn23xx_vf_get_oq_ticks() argument
33 u32 oqticks_per_us = (u32)oct->pfvf_hsword.coproc_tics_per_us; in cn23xx_vf_get_oq_ticks()
50 static int cn23xx_vf_reset_io_queues(struct octeon_device *oct, u32 num_queues) in cn23xx_vf_reset_io_queues() argument
59 d64 = octeon_read_csr64(oct, in cn23xx_vf_reset_io_queues()
62 octeon_write_csr64(oct, CN23XX_VF_SLI_IQ_PKT_CONTROL64(q_no), in cn23xx_vf_reset_io_queues()
68 u64 reg_val = octeon_read_csr64(oct, in cn23xx_vf_reset_io_queues()
74 oct, CN23XX_VF_SLI_IQ_PKT_CONTROL64(q_no))); in cn23xx_vf_reset_io_queues()
78 dev_err(&oct->pci_dev->dev, in cn23xx_vf_reset_io_queues()
85 octeon_write_csr64(oct, CN23XX_VF_SLI_IQ_PKT_CONTROL64(q_no), in cn23xx_vf_reset_io_queues()
89 oct, CN23XX_VF_SLI_IQ_PKT_CONTROL64(q_no))); in cn23xx_vf_reset_io_queues()
[all …]
H A Docteon_console.c35 static u64 cvmx_bootmem_phy_named_block_find(struct octeon_device *oct,
38 static int octeon_console_read(struct octeon_device *oct, u32 console_num,
147 static inline u64 __cvmx_bootmem_desc_get(struct octeon_device *oct, in __cvmx_bootmem_desc_get() argument
155 return octeon_read_device_mem32(oct, base); in __cvmx_bootmem_desc_get()
157 return octeon_read_device_mem64(oct, base); in __cvmx_bootmem_desc_get()
173 static void CVMX_BOOTMEM_NAMED_GET_NAME(struct octeon_device *oct, in CVMX_BOOTMEM_NAMED_GET_NAME() argument
179 octeon_pci_read_core_mem(oct, addr, (u8 *)str, len); in CVMX_BOOTMEM_NAMED_GET_NAME()
195 static int __cvmx_bootmem_check_version(struct octeon_device *oct, in __cvmx_bootmem_check_version() argument
201 if (!oct->bootmem_desc_addr) in __cvmx_bootmem_check_version()
202 oct->bootmem_desc_addr = in __cvmx_bootmem_check_version()
[all …]
H A Drequest_manager.c39 static void __check_db_timeout(struct octeon_device *oct, u64 iq_no);
47 int octeon_init_instr_queue(struct octeon_device *oct, in octeon_init_instr_queue() argument
56 int numa_node = dev_to_node(&oct->pci_dev->dev); in octeon_init_instr_queue()
58 if (OCTEON_CN6XXX(oct)) in octeon_init_instr_queue()
59 conf = &(CFG_GET_IQ_CFG(CHIP_CONF(oct, cn6xxx))); in octeon_init_instr_queue()
60 else if (OCTEON_CN23XX_PF(oct)) in octeon_init_instr_queue()
61 conf = &(CFG_GET_IQ_CFG(CHIP_CONF(oct, cn23xx_pf))); in octeon_init_instr_queue()
62 else if (OCTEON_CN23XX_VF(oct)) in octeon_init_instr_queue()
63 conf = &(CFG_GET_IQ_CFG(CHIP_CONF(oct, cn23xx_vf))); in octeon_init_instr_queue()
66 dev_err(&oct->pci_dev->dev, "Unsupported Chip %x\n", in octeon_init_instr_queue()
[all …]
H A Docteon_mem_ops.c31 octeon_toggle_bar1_swapmode(struct octeon_device *oct, u32 idx) in octeon_toggle_bar1_swapmode() argument
35 mask = oct->fn_list.bar1_idx_read(oct, idx); in octeon_toggle_bar1_swapmode()
37 oct->fn_list.bar1_idx_write(oct, idx, mask); in octeon_toggle_bar1_swapmode()
40 #define octeon_toggle_bar1_swapmode(oct, idx) argument
44 octeon_pci_fastwrite(struct octeon_device *oct, u8 __iomem *mapped_addr, in octeon_pci_fastwrite() argument
52 octeon_toggle_bar1_swapmode(oct, MEMOPS_IDX); in octeon_pci_fastwrite()
61 octeon_toggle_bar1_swapmode(oct, MEMOPS_IDX); in octeon_pci_fastwrite()
68 octeon_pci_fastread(struct octeon_device *oct, u8 __iomem *mapped_addr, in octeon_pci_fastread() argument
76 octeon_toggle_bar1_swapmode(oct, MEMOPS_IDX); in octeon_pci_fastread()
85 octeon_toggle_bar1_swapmode(oct, MEMOPS_IDX); in octeon_pci_fastread()
[all …]
H A Dlio_vf_main.c70 static int octeon_device_init(struct octeon_device *oct);
73 static int lio_wait_for_oq_pkts(struct octeon_device *oct) in lio_wait_for_oq_pkts() argument
75 struct octeon_device_priv *oct_priv = oct->priv; in lio_wait_for_oq_pkts()
83 for (i = 0; i < MAX_OCTEON_OUTPUT_QUEUES(oct); i++) { in lio_wait_for_oq_pkts()
84 if (!(oct->io_qmask.oq & BIT_ULL(i))) in lio_wait_for_oq_pkts()
86 pkt_cnt += octeon_droq_check_hw_for_pkts(oct->droq[i]); in lio_wait_for_oq_pkts()
102 * @oct: Pointer to Octeon device
104 static void pcierror_quiesce_device(struct octeon_device *oct) in pcierror_quiesce_device() argument
116 if (wait_for_pending_requests(oct)) in pcierror_quiesce_device()
117 dev_err(&oct in pcierror_quiesce_device()
168 stop_pci_io(struct octeon_device * oct) stop_pci_io() argument
217 struct octeon_device *oct = pci_get_drvdata(pdev); liquidio_pcie_error_detected() local
304 struct octeon_device *oct = lio->oct_dev; setup_link_status_change_wq() local
343 struct octeon_device *oct = lio->oct_dev; update_link_status() local
422 octeon_pci_flr(struct octeon_device * oct) octeon_pci_flr() argument
443 octeon_destroy_resources(struct octeon_device * oct) octeon_destroy_resources() argument
598 struct octeon_device *oct = (struct octeon_device *)lio->oct_dev; send_rx_ctrl_cmd() local
658 liquidio_destroy_nic_device(struct octeon_device * oct,int ifidx) liquidio_destroy_nic_device() argument
713 liquidio_stop_nic_module(struct octeon_device * oct) liquidio_stop_nic_module() argument
772 octeon_pci_os_setup(struct octeon_device * oct) octeon_pci_os_setup() argument
909 struct octeon_device *oct = lio->oct_dev; liquidio_open() local
955 struct octeon_device *oct = lio->oct_dev; liquidio_stop() local
1036 struct octeon_device *oct = lio->oct_dev; liquidio_set_uc_list() local
1077 struct octeon_device *oct = lio->oct_dev; liquidio_set_mcast_list() local
1128 struct octeon_device *oct = lio->oct_dev; liquidio_set_mac() local
1177 struct octeon_device *oct; liquidio_get_stats64() local
1298 handle_timestamp(struct octeon_device * oct,u32 status,void * buf) handle_timestamp() argument
1340 send_nic_timestamp_pkt(struct octeon_device * oct,struct octnic_data_pkt * ndata,struct octnet_buf_free_info * finfo,int xmit_more) send_nic_timestamp_pkt() argument
1403 struct octeon_device *oct; liquidio_xmit() local
1643 struct octeon_device *oct = lio->oct_dev; liquidio_vlan_rx_add_vid() local
1671 struct octeon_device *oct = lio->oct_dev; liquidio_vlan_rx_kill_vid() local
1705 struct octeon_device *oct = lio->oct_dev; liquidio_set_rxcsum_command() local
1740 struct octeon_device *oct = lio->oct_dev; liquidio_vxlan_port_command() local
1881 struct octeon_device *oct = (struct octeon_device *)buf; lio_nic_info() local
2233 liquidio_init_nic_module(struct octeon_device * oct) liquidio_init_nic_module() argument
2271 octeon_device_init(struct octeon_device * oct) octeon_device_init() argument
[all...]
H A Dlio_main.c139 static int octeon_dbg_console_print(struct octeon_device *oct, u32 console_num,
159 struct octeon_device *oct = oct_priv->dev; in octeon_droq_bh() local
161 for (q_no = 0; q_no < MAX_OCTEON_OUTPUT_QUEUES(oct); q_no++) { in octeon_droq_bh()
162 if (!(oct->io_qmask.oq & BIT_ULL(q_no))) in octeon_droq_bh()
164 reschedule |= octeon_droq_process_packets(oct, oct->droq[q_no], in octeon_droq_bh()
166 lio_enable_irq(oct->droq[q_no], NULL); in octeon_droq_bh()
168 if (OCTEON_CN23XX_PF(oct) && oct->msix_on) { in octeon_droq_bh()
172 int adjusted_q_no = q_no + oct in octeon_droq_bh()
186 lio_wait_for_oq_pkts(struct octeon_device * oct) lio_wait_for_oq_pkts() argument
216 force_io_queues_off(struct octeon_device * oct) force_io_queues_off() argument
232 pcierror_quiesce_device(struct octeon_device * oct) pcierror_quiesce_device() argument
297 stop_pci_io(struct octeon_device * oct) stop_pci_io() argument
333 struct octeon_device *oct = pci_get_drvdata(pdev); liquidio_pcie_error_detected() local
526 struct octeon_device *oct = lio->oct_dev; setup_link_status_change_wq() local
566 struct octeon_device *oct = lio->oct_dev; update_link_status() local
610 struct octeon_device *oct = lio->oct_dev; lio_sync_octeon_time() local
660 struct octeon_device *oct = lio->oct_dev; setup_sync_octeon_time_wq() local
698 get_other_octeon_device(struct octeon_device * oct) get_other_octeon_device() argument
724 disable_all_vf_links(struct octeon_device * oct) disable_all_vf_links() argument
750 struct octeon_device *oct = param; liquidio_watchdog() local
917 octeon_pci_flr(struct octeon_device * oct) octeon_pci_flr() argument
944 octeon_destroy_resources(struct octeon_device * oct) octeon_destroy_resources() argument
1147 struct octeon_device *oct = (struct octeon_device *)lio->oct_dev; send_rx_ctrl_cmd() local
1205 liquidio_destroy_nic_device(struct octeon_device * oct,int ifidx) liquidio_destroy_nic_device() argument
1262 liquidio_stop_nic_module(struct octeon_device * oct) liquidio_stop_nic_module() argument
1338 octeon_chip_specific_setup(struct octeon_device * oct) octeon_chip_specific_setup() argument
1382 octeon_pci_os_setup(struct octeon_device * oct) octeon_pci_os_setup() argument
1516 struct octeon_device *oct = (struct octeon_device *)lio->oct_dev; liquidio_ptp_adjfine() local
1574 struct octeon_device *oct = (struct octeon_device *)lio->oct_dev; liquidio_ptp_gettime() local
1597 struct octeon_device *oct = (struct octeon_device *)lio->oct_dev; liquidio_ptp_settime() local
1630 struct octeon_device *oct = (struct octeon_device *)lio->oct_dev; oct_ptp_open() local
1660 liquidio_ptp_init(struct octeon_device * oct) liquidio_ptp_init() argument
1679 load_firmware(struct octeon_device * oct) load_firmware() argument
1736 struct octeon_device *oct = lio->oct_dev; setup_tx_poll_fn() local
1769 struct octeon_device *oct = lio->oct_dev; liquidio_open() local
1849 struct octeon_device *oct = lio->oct_dev; liquidio_stop() local
1949 struct octeon_device *oct = lio->oct_dev; liquidio_set_mcast_list() local
1999 struct octeon_device *oct = lio->oct_dev; liquidio_set_mac() local
2043 struct octeon_device *oct; liquidio_get_stats64() local
2179 handle_timestamp(struct octeon_device * oct,u32 status,void * buf) handle_timestamp() argument
2225 send_nic_timestamp_pkt(struct octeon_device * oct,struct octnic_data_pkt * ndata,struct octnet_buf_free_info * finfo,int xmit_more) send_nic_timestamp_pkt() argument
2293 struct octeon_device *oct; liquidio_xmit() local
2552 struct octeon_device *oct = lio->oct_dev; liquidio_vlan_rx_add_vid() local
2581 struct octeon_device *oct = lio->oct_dev; liquidio_vlan_rx_kill_vid() local
2615 struct octeon_device *oct = lio->oct_dev; liquidio_set_rxcsum_command() local
2652 struct octeon_device *oct = lio->oct_dev; liquidio_vxlan_port_command() local
2800 struct octeon_device *oct = lio->oct_dev; __liquidio_set_vf_mac() local
2840 struct octeon_device *oct = lio->oct_dev; liquidio_set_vf_mac() local
2857 struct octeon_device *oct = lio->oct_dev; liquidio_set_vf_spoofchk() local
2913 struct octeon_device *oct = lio->oct_dev; liquidio_set_vf_vlan() local
2965 struct octeon_device *oct = lio->oct_dev; liquidio_get_vf_config() local
2993 struct octeon_device *oct = lio->oct_dev; liquidio_send_vf_trust_cmd() local
3031 struct octeon_device *oct = lio->oct_dev; liquidio_set_vf_trust() local
3083 struct octeon_device *oct = lio->oct_dev; liquidio_set_vf_link_state() local
3116 struct octeon_device *oct; liquidio_eswitch_mode_get() local
3131 struct octeon_device *oct; liquidio_eswitch_mode_set() local
3171 struct octeon_device *oct = lio->oct_dev; liquidio_get_port_parent_id() local
3186 struct octeon_device *oct = lio->oct_dev; liquidio_get_vf_stats() local
3284 struct octeon_device *oct = (struct octeon_device *)buf; lio_nic_info() local
3781 octeon_enable_sriov(struct octeon_device * oct) octeon_enable_sriov() argument
3821 lio_pci_sriov_disable(struct octeon_device * oct) lio_pci_sriov_disable() argument
3847 struct octeon_device *oct = pci_get_drvdata(dev); liquidio_enable_sriov() local
3887 liquidio_init_nic_module(struct octeon_device * oct) liquidio_init_nic_module() argument
3944 struct octeon_device *oct; nic_starter() local
3984 struct octeon_device *oct = (struct octeon_device *)buf; octeon_recv_vf_drv_notice() local
4324 octeon_dbg_console_print(struct octeon_device * oct,u32 console_num,char * prefix,char * suffix) octeon_dbg_console_print() argument
[all...]
H A Dlio_core.c86 int lio_setup_glists(struct octeon_device *oct, struct lio *lio, int num_iqs) in lio_setup_glists() argument
119 int numa_node = dev_to_node(&oct->pci_dev->dev); in lio_setup_glists()
126 lio_dma_alloc(oct, in lio_setup_glists()
165 struct octeon_device *oct = lio->oct_dev; in liquidio_set_feature() local
180 dev_err(&oct->pci_dev->dev, "Feature change failed in core (ret: 0x%x)\n", in liquidio_set_feature()
261 struct octeon_device *oct = lio->oct_dev; in liquidio_link_ctrl_cmd_completion() local
302 dev_info(&oct->pci_dev->dev, "%s LRO Enabled\n", netdev->name); in liquidio_link_ctrl_cmd_completion()
306 dev_info(&oct->pci_dev->dev, "%s LRO Disabled\n", in liquidio_link_ctrl_cmd_completion()
311 dev_info(&oct->pci_dev->dev, "%s Firmware debug enabled\n", in liquidio_link_ctrl_cmd_completion()
316 dev_info(&oct->pci_dev->dev, "%s Firmware debug disabled\n", in liquidio_link_ctrl_cmd_completion()
[all …]
H A Dlio_ethtool.c219 struct octeon_device *oct = lio->oct_dev; in lio_get_link_ksettings() local
247 dev_dbg(&oct->pci_dev->dev, "ecmd->base.transceiver is XCVR_EXTERNAL\n"); in lio_get_link_ksettings()
250 dev_err(&oct->pci_dev->dev, "Unknown link interface mode: %d\n", in lio_get_link_ksettings()
260 if (oct->subsystem_id == OCTEON_CN2350_25GB_SUBSYS_ID || in lio_get_link_ksettings()
261 oct->subsystem_id == OCTEON_CN2360_25GB_SUBSYS_ID) { in lio_get_link_ksettings()
262 if (OCTEON_CN23XX_PF(oct)) { in lio_get_link_ksettings()
270 if (oct->no_speed_setting == 0) { in lio_get_link_ksettings()
282 if (oct->no_speed_setting == 0) { in lio_get_link_ksettings()
286 oct->speed_setting = 25; in lio_get_link_ksettings()
289 if (oct->speed_setting == 10) { in lio_get_link_ksettings()
[all …]
H A Dcn66xx_device.h68 int lio_cn6xxx_soft_reset(struct octeon_device *oct);
69 void lio_cn6xxx_enable_error_reporting(struct octeon_device *oct);
70 void lio_cn6xxx_setup_pcie_mps(struct octeon_device *oct,
72 void lio_cn6xxx_setup_pcie_mrrs(struct octeon_device *oct,
74 void lio_cn6xxx_setup_global_input_regs(struct octeon_device *oct);
75 void lio_cn6xxx_setup_global_output_regs(struct octeon_device *oct);
76 void lio_cn6xxx_setup_iq_regs(struct octeon_device *oct, u32 iq_no);
77 void lio_cn6xxx_setup_oq_regs(struct octeon_device *oct, u32 oq_no);
78 int lio_cn6xxx_enable_io_queues(struct octeon_device *oct);
79 void lio_cn6xxx_disable_io_queues(struct octeon_device *oct);
[all …]
H A Docteon_droq.c136 octeon_droq_destroy_ring_buffers(struct octeon_device *oct, in octeon_droq_destroy_ring_buffers() argument
148 lio_unmap_ring(oct->pci_dev, in octeon_droq_destroy_ring_buffers()
163 octeon_droq_setup_ring_buffers(struct octeon_device *oct, in octeon_droq_setup_ring_buffers() argument
171 buf = recv_buffer_alloc(oct, &droq->recv_buf_list[i].pg_info); in octeon_droq_setup_ring_buffers()
174 dev_err(&oct->pci_dev->dev, "%s buffer alloc failed\n", in octeon_droq_setup_ring_buffers()
194 int octeon_delete_droq(struct octeon_device *oct, u32 q_no) in octeon_delete_droq() argument
196 struct octeon_droq *droq = oct->droq[q_no]; in octeon_delete_droq()
198 dev_dbg(&oct->pci_dev->dev, "%s[%d]\n", __func__, q_no); in octeon_delete_droq()
200 octeon_droq_destroy_ring_buffers(oct, droq); in octeon_delete_droq()
204 lio_dma_free(oct, (droq->max_count * OCT_DROQ_DESC_SIZE), in octeon_delete_droq()
[all …]
H A Docteon_main.h73 void octeon_pf_changed_vf_macaddr(struct octeon_device *oct, u8 *mac);
75 void octeon_schedule_rxq_oom_work(struct octeon_device *oct,
93 static inline void octeon_unmap_pci_barx(struct octeon_device *oct, int baridx) in octeon_unmap_pci_barx() argument
95 dev_dbg(&oct->pci_dev->dev, "Freeing PCI mapped regions for Bar%d\n", in octeon_unmap_pci_barx()
98 if (oct->mmio[baridx].done) in octeon_unmap_pci_barx()
99 iounmap(oct->mmio[baridx].hw_addr); in octeon_unmap_pci_barx()
101 if (oct->mmio[baridx].start) in octeon_unmap_pci_barx()
102 pci_release_region(oct->pci_dev, baridx * 2); in octeon_unmap_pci_barx()
111 static inline int octeon_map_pci_barx(struct octeon_device *oct, in octeon_map_pci_barx() argument
116 if (pci_request_region(oct->pci_dev, baridx * 2, DRV_NAME)) { in octeon_map_pci_barx()
[all …]
H A Docteon_nic.c30 octeon_alloc_soft_command_resp(struct octeon_device *oct, in octeon_alloc_soft_command_resp() argument
41 octeon_alloc_soft_command(oct, 0, rdatasize, 0); in octeon_alloc_soft_command_resp()
52 if (OCTEON_CN23XX_PF(oct) || OCTEON_CN23XX_VF(oct)) { in octeon_alloc_soft_command_resp()
68 rdp->pcie_port = oct->pcie_port; in octeon_alloc_soft_command_resp()
73 if (OCTEON_CN23XX_PF(oct) || OCTEON_CN23XX_VF(oct)) in octeon_alloc_soft_command_resp()
84 int octnet_send_nic_data_pkt(struct octeon_device *oct, in octnet_send_nic_data_pkt() argument
90 return octeon_send_command(oct, ndata->q_no, ring_doorbell, &ndata->cmd, in octnet_send_nic_data_pkt()
97 *octnic_alloc_ctrl_pkt_sc(struct octeon_device *oct, in octnic_alloc_ctrl_pkt_sc() argument
111 octeon_alloc_soft_command(oct, datasize, rdatasize, 0); in octnic_alloc_ctrl_pkt_sc()
129 octeon_prepare_soft_command(oct, sc, OPCODE_NIC, OPCODE_NIC_CMD, in octnic_alloc_ctrl_pkt_sc()
[all …]
H A Docteon_device.h212 typedef int (*octeon_console_print_fn)(struct octeon_device *oct,
423 struct octeon_device *oct; member
621 #define OCTEON_CN6XXX(oct) ({ \ argument
622 typeof(oct) _oct = (oct); \
625 #define OCTEON_CN23XX_PF(oct) ((oct)->chip_id == OCTEON_CN23XX_PF_VID) argument
626 #define OCTEON_CN23XX_VF(oct) ((oct)->chip_id == OCTEON_CN23XX_VF_VID) argument
627 #define CHIP_CONF(oct, TYPE) \ argument
628 (((struct octeon_ ## TYPE *)((oct)->chip))->conf)
638 void octeon_free_device_mem(struct octeon_device *oct);
655 int octeon_register_device(struct octeon_device *oct,
[all …]
/linux/drivers/net/ethernet/marvell/octeon_ep/
H A Doctep_main.c54 static int octep_alloc_ioq_vectors(struct octep_device *oct) in octep_alloc_ioq_vectors() argument
59 for (i = 0; i < oct->num_oqs; i++) { in octep_alloc_ioq_vectors()
60 oct->ioq_vector[i] = vzalloc(sizeof(*oct->ioq_vector[i])); in octep_alloc_ioq_vectors()
61 if (!oct->ioq_vector[i]) in octep_alloc_ioq_vectors()
64 ioq_vector = oct->ioq_vector[i]; in octep_alloc_ioq_vectors()
65 ioq_vector->iq = oct->iq[i]; in octep_alloc_ioq_vectors()
66 ioq_vector->oq = oct->oq[i]; in octep_alloc_ioq_vectors()
67 ioq_vector->octep_dev = oct; in octep_alloc_ioq_vectors()
70 dev_info(&oct->pdev->dev, "Allocated %d IOQ vectors\n", oct->num_oqs); in octep_alloc_ioq_vectors()
76 vfree(oct->ioq_vector[i]); in octep_alloc_ioq_vectors()
[all …]
H A Doctep_pfvf_mbox.c34 static void octep_pfvf_validate_version(struct octep_device *oct, u32 vf_id, in octep_pfvf_validate_version() argument
40 dev_dbg(&oct->pdev->dev, "VF id:%d VF version:%d PF version:%d\n", in octep_pfvf_validate_version()
47 oct->vf_info[vf_id].mbox_version = rsp->s_version.version; in octep_pfvf_validate_version()
48 dev_dbg(&oct->pdev->dev, "VF id:%d negotiated VF version:%d\n", in octep_pfvf_validate_version()
49 vf_id, oct->vf_info[vf_id].mbox_version); in octep_pfvf_validate_version()
54 static void octep_pfvf_get_link_status(struct octep_device *oct, u32 vf_id, in octep_pfvf_get_link_status() argument
60 status = octep_ctrl_net_get_link_status(oct, vf_id); in octep_pfvf_get_link_status()
63 dev_err(&oct->pdev->dev, "Get VF link status failed via host control Mbox\n"); in octep_pfvf_get_link_status()
70 static void octep_pfvf_set_link_status(struct octep_device *oct, u32 vf_id, in octep_pfvf_set_link_status() argument
76 err = octep_ctrl_net_set_link_status(oct, vf_id, cmd.s_link_status.status, true); in octep_pfvf_set_link_status()
[all …]
H A Doctep_ctrl_net.c59 static int octep_send_mbox_req(struct octep_device *oct, in octep_send_mbox_req() argument
67 if (octep_ctrl_net_h2f_cmd_versions[cmd] > oct->ctrl_mbox.max_fw_version || in octep_send_mbox_req()
68 octep_ctrl_net_h2f_cmd_versions[cmd] < oct->ctrl_mbox.min_fw_version) in octep_send_mbox_req()
71 err = octep_ctrl_mbox_send(&oct->ctrl_mbox, &d->msg); in octep_send_mbox_req()
80 list_add_tail(&d->list, &oct->ctrl_req_wait_list); in octep_send_mbox_req()
81 ret = wait_event_interruptible_timeout(oct->ctrl_req_wait_q, in octep_send_mbox_req()
101 int octep_ctrl_net_init(struct octep_device *oct) in octep_ctrl_net_init() argument
104 struct pci_dev *pdev = oct->pdev; in octep_ctrl_net_init()
107 init_waitqueue_head(&oct->ctrl_req_wait_q); in octep_ctrl_net_init()
108 INIT_LIST_HEAD(&oct->ctrl_req_wait_list); in octep_ctrl_net_init()
[all …]
H A Doctep_rx.c81 static int octep_oq_refill(struct octep_device *oct, struct octep_oq *oq) in octep_oq_refill() argument
125 static int octep_setup_oq(struct octep_device *oct, int q_no) in octep_setup_oq() argument
133 oct->oq[q_no] = oq; in octep_setup_oq()
135 oq->octep_dev = oct; in octep_setup_oq()
136 oq->netdev = oct->netdev; in octep_setup_oq()
137 oq->dev = &oct->pdev->dev; in octep_setup_oq()
139 oq->stats = &oct->stats_oq[q_no]; in octep_setup_oq()
140 oq->max_count = CFG_GET_OQ_NUM_DESC(oct->conf); in octep_setup_oq()
142 oq->buffer_size = CFG_GET_OQ_BUF_SIZE(oct->conf); in octep_setup_oq()
149 if (oct->conf->fw_info.rx_ol_flags) in octep_setup_oq()
[all …]
H A Doctep_ctrl_net.h252 int octep_ctrl_net_init(struct octep_device *oct);
262 int octep_ctrl_net_get_link_status(struct octep_device *oct, int vfid);
274 int octep_ctrl_net_set_link_status(struct octep_device *oct, int vfid, bool up,
287 int octep_ctrl_net_set_rx_state(struct octep_device *oct, int vfid, bool up,
299 int octep_ctrl_net_get_mac_addr(struct octep_device *oct, int vfid, u8 *addr);
311 int octep_ctrl_net_set_mac_addr(struct octep_device *oct, int vfid, u8 *addr,
322 int octep_ctrl_net_get_mtu(struct octep_device *oct, int vfid);
334 int octep_ctrl_net_set_mtu(struct octep_device *oct, int vfid, int mtu,
347 int octep_ctrl_net_get_if_stats(struct octep_device *oct, int vfid,
360 int octep_ctrl_net_get_link_info(struct octep_device *oct, int vfid,
[all …]
/linux/drivers/net/ethernet/marvell/octeon_ep_vf/
H A Doctep_vf_main.c51 static int octep_vf_alloc_ioq_vectors(struct octep_vf_device *oct) in octep_vf_alloc_ioq_vectors() argument
56 for (i = 0; i < oct->num_oqs; i++) { in octep_vf_alloc_ioq_vectors()
57 oct->ioq_vector[i] = vzalloc(sizeof(*oct->ioq_vector[i])); in octep_vf_alloc_ioq_vectors()
58 if (!oct->ioq_vector[i]) in octep_vf_alloc_ioq_vectors()
61 ioq_vector = oct->ioq_vector[i]; in octep_vf_alloc_ioq_vectors()
62 ioq_vector->iq = oct->iq[i]; in octep_vf_alloc_ioq_vectors()
63 ioq_vector->oq = oct->oq[i]; in octep_vf_alloc_ioq_vectors()
64 ioq_vector->octep_vf_dev = oct; in octep_vf_alloc_ioq_vectors()
67 dev_info(&oct->pdev->dev, "Allocated %d IOQ vectors\n", oct->num_oqs); in octep_vf_alloc_ioq_vectors()
73 vfree(oct->ioq_vector[i]); in octep_vf_alloc_ioq_vectors()
[all …]
H A Doctep_vf_rx.c81 static int octep_vf_oq_refill(struct octep_vf_device *oct, struct octep_vf_oq *oq) in octep_vf_oq_refill() argument
125 static int octep_vf_setup_oq(struct octep_vf_device *oct, int q_no) in octep_vf_setup_oq() argument
133 oct->oq[q_no] = oq; in octep_vf_setup_oq()
135 oq->octep_vf_dev = oct; in octep_vf_setup_oq()
136 oq->netdev = oct->netdev; in octep_vf_setup_oq()
137 oq->dev = &oct->pdev->dev; in octep_vf_setup_oq()
139 oq->stats = &oct->stats_oq[q_no]; in octep_vf_setup_oq()
140 oq->max_count = CFG_GET_OQ_NUM_DESC(oct->conf); in octep_vf_setup_oq()
142 oq->buffer_size = CFG_GET_OQ_BUF_SIZE(oct->conf); in octep_vf_setup_oq()
149 if (oct->fw_info.rx_ol_flags) in octep_vf_setup_oq()
[all …]
H A Doctep_vf_mbox.h149 int octep_vf_setup_mbox(struct octep_vf_device *oct);
150 void octep_vf_delete_mbox(struct octep_vf_device *oct);
151 int octep_vf_mbox_send_cmd(struct octep_vf_device *oct, union octep_pfvf_mbox_word cmd,
153 int octep_vf_mbox_bulk_read(struct octep_vf_device *oct, enum octep_pfvf_mbox_opcode opcode,
155 int octep_vf_mbox_set_mtu(struct octep_vf_device *oct, int mtu);
156 int octep_vf_mbox_set_mac_addr(struct octep_vf_device *oct, char *mac_addr);
157 int octep_vf_mbox_get_mac_addr(struct octep_vf_device *oct, char *mac_addr);
158 int octep_vf_mbox_version_check(struct octep_vf_device *oct);
159 int octep_vf_mbox_set_rx_state(struct octep_vf_device *oct, bool state);
160 int octep_vf_mbox_set_link_status(struct octep_vf_device *oct, bool status);
[all …]

12