Lines Matching refs:devcmd2
287 struct devcmd2_controller *dc2c = vdev->devcmd2; in _vnic_dev_cmd2()
375 if (vdev->devcmd2) in vnic_dev_init_devcmd2()
378 vdev->devcmd2 = kzalloc(sizeof(*vdev->devcmd2), GFP_KERNEL); in vnic_dev_init_devcmd2()
379 if (!vdev->devcmd2) in vnic_dev_init_devcmd2()
382 vdev->devcmd2->color = 1; in vnic_dev_init_devcmd2()
383 vdev->devcmd2->result_size = DEVCMD2_RING_SIZE; in vnic_dev_init_devcmd2()
384 err = enic_wq_devcmd2_alloc(vdev, &vdev->devcmd2->wq, DEVCMD2_RING_SIZE, in vnic_dev_init_devcmd2()
389 fetch_index = ioread32(&vdev->devcmd2->wq.ctrl->fetch_index); in vnic_dev_init_devcmd2()
396 enic_wq_init_start(&vdev->devcmd2->wq, 0, fetch_index, fetch_index, 0, in vnic_dev_init_devcmd2()
398 vdev->devcmd2->posted = fetch_index; in vnic_dev_init_devcmd2()
399 vnic_wq_enable(&vdev->devcmd2->wq); in vnic_dev_init_devcmd2()
401 err = vnic_dev_alloc_desc_ring(vdev, &vdev->devcmd2->results_ring, in vnic_dev_init_devcmd2()
406 vdev->devcmd2->result = vdev->devcmd2->results_ring.descs; in vnic_dev_init_devcmd2()
407 vdev->devcmd2->cmd_ring = vdev->devcmd2->wq.ring.descs; in vnic_dev_init_devcmd2()
408 vdev->devcmd2->wq_ctrl = vdev->devcmd2->wq.ctrl; in vnic_dev_init_devcmd2()
409 vdev->args[0] = (u64)vdev->devcmd2->results_ring.base_addr | in vnic_dev_init_devcmd2()
422 vnic_dev_free_desc_ring(vdev, &vdev->devcmd2->results_ring); in vnic_dev_init_devcmd2()
424 vnic_wq_disable(&vdev->devcmd2->wq); in vnic_dev_init_devcmd2()
426 vnic_wq_free(&vdev->devcmd2->wq); in vnic_dev_init_devcmd2()
428 kfree(vdev->devcmd2); in vnic_dev_init_devcmd2()
429 vdev->devcmd2 = NULL; in vnic_dev_init_devcmd2()
436 vnic_dev_free_desc_ring(vdev, &vdev->devcmd2->results_ring); in vnic_dev_deinit_devcmd2()
437 vnic_wq_disable(&vdev->devcmd2->wq); in vnic_dev_deinit_devcmd2()
438 vnic_wq_free(&vdev->devcmd2->wq); in vnic_dev_deinit_devcmd2()
439 kfree(vdev->devcmd2); in vnic_dev_deinit_devcmd2()
1047 if (vdev->devcmd2) in vnic_dev_unregister()