Lines Matching refs:devcmd2

72 	struct devcmd2_controller *devcmd2;  member
322 struct devcmd2_controller *dc2c = vdev->devcmd2; in vnic_dev_cmd2()
430 if (vdev->devcmd2) in vnic_dev_init_devcmd2()
433 vdev->devcmd2 = kzalloc(sizeof(*vdev->devcmd2), GFP_ATOMIC); in vnic_dev_init_devcmd2()
434 if (!vdev->devcmd2) in vnic_dev_init_devcmd2()
437 vdev->devcmd2->color = 1; in vnic_dev_init_devcmd2()
438 vdev->devcmd2->result_size = DEVCMD2_RING_SIZE; in vnic_dev_init_devcmd2()
439 err = vnic_wq_devcmd2_alloc(vdev, &vdev->devcmd2->wq, in vnic_dev_init_devcmd2()
444 fetch_index = ioread32(&vdev->devcmd2->wq.ctrl->fetch_index); in vnic_dev_init_devcmd2()
455 vnic_wq_init_start(&vdev->devcmd2->wq, 0, fetch_index, in vnic_dev_init_devcmd2()
458 vnic_wq_enable(&vdev->devcmd2->wq); in vnic_dev_init_devcmd2()
460 err = vnic_dev_alloc_desc_ring(vdev, &vdev->devcmd2->results_ring, in vnic_dev_init_devcmd2()
465 vdev->devcmd2->result = in vnic_dev_init_devcmd2()
466 (struct devcmd2_result *) vdev->devcmd2->results_ring.descs; in vnic_dev_init_devcmd2()
467 vdev->devcmd2->cmd_ring = in vnic_dev_init_devcmd2()
468 (struct vnic_devcmd2 *) vdev->devcmd2->wq.ring.descs; in vnic_dev_init_devcmd2()
469 vdev->devcmd2->wq_ctrl = vdev->devcmd2->wq.ctrl; in vnic_dev_init_devcmd2()
470 vdev->args[0] = (u64) vdev->devcmd2->results_ring.base_addr | in vnic_dev_init_devcmd2()
483 vnic_dev_free_desc_ring(vdev, &vdev->devcmd2->results_ring); in vnic_dev_init_devcmd2()
485 vnic_wq_disable(&vdev->devcmd2->wq); in vnic_dev_init_devcmd2()
486 vnic_wq_free(&vdev->devcmd2->wq); in vnic_dev_init_devcmd2()
488 kfree(vdev->devcmd2); in vnic_dev_init_devcmd2()
489 vdev->devcmd2 = NULL; in vnic_dev_init_devcmd2()
497 vnic_dev_free_desc_ring(vdev, &vdev->devcmd2->results_ring); in vnic_dev_deinit_devcmd2()
498 vnic_wq_disable(&vdev->devcmd2->wq); in vnic_dev_deinit_devcmd2()
499 vnic_wq_free(&vdev->devcmd2->wq); in vnic_dev_deinit_devcmd2()
500 kfree(vdev->devcmd2); in vnic_dev_deinit_devcmd2()
501 vdev->devcmd2 = NULL; in vnic_dev_deinit_devcmd2()
910 if (vdev->devcmd2) in vnic_dev_unregister()