Searched refs:octeon_dev (Results 1 - 9 of 9) sorted by relevance

/linux-4.4.14/drivers/net/ethernet/cavium/liquidio/
H A Dlio_main.c1932 * @param octeon_dev octeon device
1939 static inline int setup_io_queues(struct octeon_device *octeon_dev, setup_io_queues() argument
1969 retval = octeon_setup_droq(octeon_dev, q_no, setup_io_queues()
1971 (octeon_get_conf(octeon_dev), setup_io_queues()
1974 (octeon_get_conf(octeon_dev), setup_io_queues()
1977 dev_err(&octeon_dev->pci_dev->dev, setup_io_queues()
1983 droq = octeon_dev->droq[q_no]; setup_io_queues()
1993 octeon_register_droq_ops(octeon_dev, q_no, &droq_ops); setup_io_queues()
1999 (octeon_dev), setup_io_queues()
2001 retval = octeon_setup_iq(octeon_dev, lio->linfo.txpciq[q], setup_io_queues()
2005 dev_err(&octeon_dev->pci_dev->dev, setup_io_queues()
3115 * @param octeon_dev octeon device
3121 static int setup_nic_devices(struct octeon_device *octeon_dev) setup_nic_devices() argument
3139 octeon_register_dispatch_fn(octeon_dev, OPCODE_NIC, setup_nic_devices()
3141 lio_nic_info, octeon_dev); setup_nic_devices()
3146 octeon_register_reqtype_free_fn(octeon_dev, REQTYPE_NORESP_NET, setup_nic_devices()
3149 octeon_register_reqtype_free_fn(octeon_dev, REQTYPE_NORESP_NET_SG, setup_nic_devices()
3152 octeon_register_reqtype_free_fn(octeon_dev, REQTYPE_RESP_NET_SG, setup_nic_devices()
3155 for (i = 0; i < octeon_dev->ifcount; i++) { setup_nic_devices()
3159 octeon_alloc_soft_command(octeon_dev, 0, setup_nic_devices()
3165 CFG_GET_NUM_TXQS_NIC_IF(octeon_get_conf(octeon_dev), i); setup_nic_devices()
3167 CFG_GET_NUM_RXQS_NIC_IF(octeon_get_conf(octeon_dev), i); setup_nic_devices()
3169 CFG_GET_BASE_QUE_NIC_IF(octeon_get_conf(octeon_dev), i); setup_nic_devices()
3171 CFG_GET_GMXID_NIC_IF(octeon_get_conf(octeon_dev), i); setup_nic_devices()
3176 dev_dbg(&octeon_dev->pci_dev->dev, setup_nic_devices()
3180 ctx->octeon_id = lio_get_device_id(octeon_dev); setup_nic_devices()
3188 octeon_prepare_soft_command(octeon_dev, sc, OPCODE_NIC, setup_nic_devices()
3196 retval = octeon_send_soft_command(octeon_dev, sc); setup_nic_devices()
3198 dev_err(&octeon_dev->pci_dev->dev, setup_nic_devices()
3211 dev_err(&octeon_dev->pci_dev->dev, "iq/oq config failed\n"); setup_nic_devices()
3222 dev_err(&octeon_dev->pci_dev->dev, setup_nic_devices()
3228 dev_dbg(&octeon_dev->pci_dev->dev, setup_nic_devices()
3235 dev_err(&octeon_dev->pci_dev->dev, "Device allocation failed\n"); setup_nic_devices()
3239 props = &octeon_dev->props[i]; setup_nic_devices()
3293 lio->oct_dev = octeon_dev; setup_nic_devices()
3298 dev_dbg(&octeon_dev->pci_dev->dev, setup_nic_devices()
3311 if (setup_io_queues(octeon_dev, netdev)) { setup_nic_devices()
3312 dev_err(&octeon_dev->pci_dev->dev, "I/O queues creation failed\n"); setup_nic_devices()
3324 lio->tx_qsize = octeon_get_tx_qsize(octeon_dev, lio->txq); setup_nic_devices()
3325 lio->rx_qsize = octeon_get_rx_qsize(octeon_dev, lio->rxq); setup_nic_devices()
3328 dev_err(&octeon_dev->pci_dev->dev, setup_nic_devices()
3343 dev_err(&octeon_dev->pci_dev->dev, "Device registration failed\n"); setup_nic_devices()
3347 dev_dbg(&octeon_dev->pci_dev->dev, setup_nic_devices()
3361 dev_dbg(&octeon_dev->pci_dev->dev, setup_nic_devices()
3364 octeon_free_soft_command(octeon_dev, sc); setup_nic_devices()
3371 octeon_free_soft_command(octeon_dev, sc); setup_nic_devices()
3374 dev_err(&octeon_dev->pci_dev->dev, setup_nic_devices()
3376 liquidio_destroy_nic_device(octeon_dev, i); setup_nic_devices()
3481 * @param octeon_dev octeon device
3483 static int octeon_device_init(struct octeon_device *octeon_dev) octeon_device_init() argument
3487 (struct octeon_device_priv *)octeon_dev->priv; octeon_device_init()
3488 atomic_set(&octeon_dev->status, OCT_DEV_BEGIN_STATE); octeon_device_init()
3493 if (octeon_pci_os_setup(octeon_dev)) octeon_device_init()
3497 if (octeon_chip_specific_setup(octeon_dev)) { octeon_device_init()
3498 dev_err(&octeon_dev->pci_dev->dev, "Chip specific setup failed\n"); octeon_device_init()
3502 atomic_set(&octeon_dev->status, OCT_DEV_PCI_MAP_DONE); octeon_device_init()
3504 octeon_dev->app_mode = CVM_DRV_INVALID_APP; octeon_device_init()
3507 if (octeon_dev->fn_list.soft_reset(octeon_dev)) octeon_device_init()
3513 if (octeon_init_dispatch_list(octeon_dev)) octeon_device_init()
3516 octeon_register_dispatch_fn(octeon_dev, OPCODE_NIC, octeon_device_init()
3519 octeon_dev); octeon_device_init()
3521 INIT_DELAYED_WORK(&octeon_dev->nic_poll_work.work, nic_starter); octeon_device_init()
3522 octeon_dev->nic_poll_work.ctxptr = (void *)octeon_dev; octeon_device_init()
3523 schedule_delayed_work(&octeon_dev->nic_poll_work.work, octeon_device_init()
3526 atomic_set(&octeon_dev->status, OCT_DEV_DISPATCH_INIT_DONE); octeon_device_init()
3528 octeon_set_io_queues_off(octeon_dev); octeon_device_init()
3531 if (octeon_setup_instr_queues(octeon_dev)) { octeon_device_init()
3532 dev_err(&octeon_dev->pci_dev->dev, octeon_device_init()
3535 for (j = 0; j < octeon_dev->num_iqs; j++) octeon_device_init()
3536 octeon_delete_instr_queue(octeon_dev, j); octeon_device_init()
3539 atomic_set(&octeon_dev->status, OCT_DEV_INSTR_QUEUE_INIT_DONE); octeon_device_init()
3543 if (octeon_setup_sc_buffer_pool(octeon_dev)) { octeon_device_init()
3544 dev_err(&octeon_dev->pci_dev->dev, "sc buffer pool allocation failed\n"); octeon_device_init()
3547 atomic_set(&octeon_dev->status, OCT_DEV_SC_BUFF_POOL_INIT_DONE); octeon_device_init()
3552 if (octeon_setup_response_list(octeon_dev)) { octeon_device_init()
3553 dev_err(&octeon_dev->pci_dev->dev, "Response list allocation failed\n"); octeon_device_init()
3556 atomic_set(&octeon_dev->status, OCT_DEV_RESP_LIST_INIT_DONE); octeon_device_init()
3558 if (octeon_setup_output_queues(octeon_dev)) { octeon_device_init()
3559 dev_err(&octeon_dev->pci_dev->dev, "Output queue initialization failed\n"); octeon_device_init()
3561 for (j = 0; j < octeon_dev->num_oqs; j++) octeon_device_init()
3562 octeon_delete_droq(octeon_dev, j); octeon_device_init()
3565 atomic_set(&octeon_dev->status, OCT_DEV_DROQ_INIT_DONE); octeon_device_init()
3571 ret = octeon_dev->fn_list.setup_device_regs(octeon_dev); octeon_device_init()
3573 dev_err(&octeon_dev->pci_dev->dev, octeon_device_init()
3579 dev_dbg(&octeon_dev->pci_dev->dev, "Initializing droq tasklet\n"); octeon_device_init()
3581 (unsigned long)octeon_dev); octeon_device_init()
3585 octeon_setup_interrupt(octeon_dev); octeon_device_init()
3588 octeon_dev->fn_list.enable_interrupt(octeon_dev->chip); octeon_device_init()
3591 octeon_dev->fn_list.enable_io_queues(octeon_dev); octeon_device_init()
3593 atomic_set(&octeon_dev->status, OCT_DEV_IO_QUEUES_DONE); octeon_device_init()
3595 dev_dbg(&octeon_dev->pci_dev->dev, "Waiting for DDR initialization...\n"); octeon_device_init()
3598 dev_info(&octeon_dev->pci_dev->dev, octeon_device_init()
3605 ret = octeon_wait_for_ddr_init(octeon_dev, &ddr_timeout); octeon_device_init()
3607 dev_err(&octeon_dev->pci_dev->dev, octeon_device_init()
3613 if (octeon_wait_for_bootloader(octeon_dev, 1000) != 0) { octeon_device_init()
3614 dev_err(&octeon_dev->pci_dev->dev, "Board not responding\n"); octeon_device_init()
3618 dev_dbg(&octeon_dev->pci_dev->dev, "Initializing consoles\n"); octeon_device_init()
3619 ret = octeon_init_consoles(octeon_dev); octeon_device_init()
3621 dev_err(&octeon_dev->pci_dev->dev, "Could not access board consoles\n"); octeon_device_init()
3624 ret = octeon_add_console(octeon_dev, 0); octeon_device_init()
3626 dev_err(&octeon_dev->pci_dev->dev, "Could not access board console\n"); octeon_device_init()
3630 atomic_set(&octeon_dev->status, OCT_DEV_CONSOLE_INIT_DONE); octeon_device_init()
3632 dev_dbg(&octeon_dev->pci_dev->dev, "Loading firmware\n"); octeon_device_init()
3633 ret = load_firmware(octeon_dev); octeon_device_init()
3635 dev_err(&octeon_dev->pci_dev->dev, "Could not load firmware to board\n"); octeon_device_init()
3639 handshake[octeon_dev->octeon_id].init_ok = 1; octeon_device_init()
3640 complete(&handshake[octeon_dev->octeon_id].init); octeon_device_init()
3642 atomic_set(&octeon_dev->status, OCT_DEV_HOST_OK); octeon_device_init()
3647 for (j = 0; j < octeon_dev->num_oqs; j++) octeon_device_init()
3648 writel(octeon_dev->droq[j]->max_count, octeon_device_init()
3649 octeon_dev->droq[j]->pkts_credit_reg); octeon_device_init()
H A Dresponse_manager.c79 int lio_process_ordered_list(struct octeon_device *octeon_dev, lio_process_ordered_list() argument
90 ordered_sc_list = &octeon_dev->response_list[OCTEON_ORDERED_SC_LIST]; lio_process_ordered_list()
113 dma_sync_single_for_cpu(&octeon_dev->pci_dev->dev, lio_process_ordered_list()
135 atomic_dec(&octeon_dev->response_list lio_process_ordered_list()
142 sc->callback(octeon_dev, status, lio_process_ordered_list()
H A Dresponse_manager.h125 * @param octeon_dev - the octeon device structure.
127 int octeon_setup_response_list(struct octeon_device *octeon_dev);
129 void octeon_delete_response_list(struct octeon_device *octeon_dev);
133 * @param octeon_dev - the octeon device structure.
137 int lio_process_ordered_list(struct octeon_device *octeon_dev,
H A Docteon_droq.c63 * @param octeon_dev - the octeon device pointer.
72 static inline void *octeon_get_dispatch_arg(struct octeon_device *octeon_dev, octeon_get_dispatch_arg() argument
82 spin_lock_bh(&octeon_dev->dispatch.lock); octeon_get_dispatch_arg()
84 if (octeon_dev->dispatch.count == 0) { octeon_get_dispatch_arg()
85 spin_unlock_bh(&octeon_dev->dispatch.lock); octeon_get_dispatch_arg()
89 if (octeon_dev->dispatch.dlist[idx].opcode == combined_opcode) { octeon_get_dispatch_arg()
90 fn_arg = octeon_dev->dispatch.dlist[idx].arg; octeon_get_dispatch_arg()
93 &octeon_dev->dispatch.dlist[idx].list) { octeon_get_dispatch_arg()
103 spin_unlock_bh(&octeon_dev->dispatch.lock); octeon_get_dispatch_arg()
334 * octeon_dev - pointer to the octeon device structure
352 struct octeon_device *octeon_dev, octeon_create_recv_info()
372 recv_pkt->octeon_id = (u16)octeon_dev->octeon_id; octeon_create_recv_info()
378 lio_unmap_ring(octeon_dev->pci_dev, octeon_create_recv_info()
446 octeon_droq_refill(struct octeon_device *octeon_dev, struct octeon_droq *droq) octeon_droq_refill() argument
461 buf = recv_buffer_alloc(octeon_dev, droq->q_no, octeon_droq_refill()
479 lio_map_ring(octeon_dev->pci_dev, octeon_droq_refill()
351 octeon_create_recv_info( struct octeon_device *octeon_dev, struct octeon_droq *droq, u32 buf_cnt, u32 idx) octeon_create_recv_info() argument
H A Docteon_iq.h270 * @param octeon_dev - pointer to the octeon device structure.
278 int octeon_init_instr_queue(struct octeon_device *octeon_dev, u32 iq_no,
283 * @param octeon_dev - pointer to the octeon device structure.
291 int octeon_delete_instr_queue(struct octeon_device *octeon_dev, u32 iq_no);
H A Docteon_device.c890 octeon_get_dispatch(struct octeon_device *octeon_dev, u16 opcode, octeon_get_dispatch() argument
900 spin_lock_bh(&octeon_dev->dispatch.lock); octeon_get_dispatch()
902 if (octeon_dev->dispatch.count == 0) { octeon_get_dispatch()
903 spin_unlock_bh(&octeon_dev->dispatch.lock); octeon_get_dispatch()
907 if (!(octeon_dev->dispatch.dlist[idx].opcode)) { octeon_get_dispatch()
908 spin_unlock_bh(&octeon_dev->dispatch.lock); octeon_get_dispatch()
912 if (octeon_dev->dispatch.dlist[idx].opcode == combined_opcode) { octeon_get_dispatch()
913 fn = octeon_dev->dispatch.dlist[idx].dispatch_fn; octeon_get_dispatch()
916 &octeon_dev->dispatch.dlist[idx].list) { octeon_get_dispatch()
926 spin_unlock_bh(&octeon_dev->dispatch.lock); octeon_get_dispatch()
1297 struct octeon_device *octeon_dev = (struct octeon_device *)dev; lio_get_device_id() local
1301 if (octeon_device[i] == octeon_dev) lio_get_device_id()
1302 return octeon_dev->octeon_id; lio_get_device_id()
H A Docteon_device.h421 * @param octeon_dev - pointer to the octeon device structure.
424 int octeon_init_dispatch_list(struct octeon_device *octeon_dev);
428 * @param octeon_dev - pointer to the octeon device structure.
430 void octeon_delete_dispatch_list(struct octeon_device *octeon_dev);
440 * @param octeon_dev - the octeon device pointer.
453 octeon_get_dispatch(struct octeon_device *octeon_dev, u16 opcode,
H A Drequest_manager.c275 __post_command(struct octeon_device *octeon_dev __attribute__((unused)), __post_command()
305 __post_command2(struct octeon_device *octeon_dev __attribute__((unused)), __post_command2()
/linux-4.4.14/drivers/edac/
H A Docteon_edac-lmc.c223 ATTRIBUTE_GROUPS(octeon_dev); variable

Completed in 454 milliseconds