Lines Matching refs:devcmd2

60 	struct devcmd2_controller *devcmd2;  member
314 struct devcmd2_controller *dc2c = vdev->devcmd2; in vnic_dev_cmd2()
422 if (vdev->devcmd2) in vnic_dev_init_devcmd2()
425 vdev->devcmd2 = kzalloc(sizeof(*vdev->devcmd2), GFP_ATOMIC); in vnic_dev_init_devcmd2()
426 if (!vdev->devcmd2) in vnic_dev_init_devcmd2()
429 vdev->devcmd2->color = 1; in vnic_dev_init_devcmd2()
430 vdev->devcmd2->result_size = DEVCMD2_RING_SIZE; in vnic_dev_init_devcmd2()
431 err = vnic_wq_devcmd2_alloc(vdev, &vdev->devcmd2->wq, in vnic_dev_init_devcmd2()
436 fetch_index = ioread32(&vdev->devcmd2->wq.ctrl->fetch_index); in vnic_dev_init_devcmd2()
448 vnic_wq_init_start(&vdev->devcmd2->wq, 0, fetch_index, in vnic_dev_init_devcmd2()
451 vnic_wq_enable(&vdev->devcmd2->wq); in vnic_dev_init_devcmd2()
453 err = vnic_dev_alloc_desc_ring(vdev, &vdev->devcmd2->results_ring, in vnic_dev_init_devcmd2()
458 vdev->devcmd2->result = in vnic_dev_init_devcmd2()
459 (struct devcmd2_result *) vdev->devcmd2->results_ring.descs; in vnic_dev_init_devcmd2()
460 vdev->devcmd2->cmd_ring = in vnic_dev_init_devcmd2()
461 (struct vnic_devcmd2 *) vdev->devcmd2->wq.ring.descs; in vnic_dev_init_devcmd2()
462 vdev->devcmd2->wq_ctrl = vdev->devcmd2->wq.ctrl; in vnic_dev_init_devcmd2()
463 vdev->args[0] = (u64) vdev->devcmd2->results_ring.base_addr | in vnic_dev_init_devcmd2()
476 vnic_dev_free_desc_ring(vdev, &vdev->devcmd2->results_ring); in vnic_dev_init_devcmd2()
478 vnic_wq_disable(&vdev->devcmd2->wq); in vnic_dev_init_devcmd2()
480 vnic_wq_free(&vdev->devcmd2->wq); in vnic_dev_init_devcmd2()
482 kfree(vdev->devcmd2); in vnic_dev_init_devcmd2()
483 vdev->devcmd2 = NULL; in vnic_dev_init_devcmd2()
491 vnic_dev_free_desc_ring(vdev, &vdev->devcmd2->results_ring); in vnic_dev_deinit_devcmd2()
492 vnic_wq_disable(&vdev->devcmd2->wq); in vnic_dev_deinit_devcmd2()
493 vnic_wq_free(&vdev->devcmd2->wq); in vnic_dev_deinit_devcmd2()
494 kfree(vdev->devcmd2); in vnic_dev_deinit_devcmd2()
495 vdev->devcmd2 = NULL; in vnic_dev_deinit_devcmd2()
904 if (vdev->devcmd2) in vnic_dev_unregister()