Lines Matching refs:devcmd2
300 struct devcmd2_controller *dc2c = vdev->devcmd2; in _vnic_dev_cmd2()
388 if (vdev->devcmd2) in vnic_dev_init_devcmd2()
391 vdev->devcmd2 = kzalloc(sizeof(*vdev->devcmd2), GFP_KERNEL); in vnic_dev_init_devcmd2()
392 if (!vdev->devcmd2) in vnic_dev_init_devcmd2()
395 vdev->devcmd2->color = 1; in vnic_dev_init_devcmd2()
396 vdev->devcmd2->result_size = DEVCMD2_RING_SIZE; in vnic_dev_init_devcmd2()
397 err = enic_wq_devcmd2_alloc(vdev, &vdev->devcmd2->wq, DEVCMD2_RING_SIZE, in vnic_dev_init_devcmd2()
402 fetch_index = ioread32(&vdev->devcmd2->wq.ctrl->fetch_index); in vnic_dev_init_devcmd2()
409 enic_wq_init_start(&vdev->devcmd2->wq, 0, fetch_index, fetch_index, 0, in vnic_dev_init_devcmd2()
411 vdev->devcmd2->posted = fetch_index; in vnic_dev_init_devcmd2()
412 vnic_wq_enable(&vdev->devcmd2->wq); in vnic_dev_init_devcmd2()
414 err = vnic_dev_alloc_desc_ring(vdev, &vdev->devcmd2->results_ring, in vnic_dev_init_devcmd2()
419 vdev->devcmd2->result = vdev->devcmd2->results_ring.descs; in vnic_dev_init_devcmd2()
420 vdev->devcmd2->cmd_ring = vdev->devcmd2->wq.ring.descs; in vnic_dev_init_devcmd2()
421 vdev->devcmd2->wq_ctrl = vdev->devcmd2->wq.ctrl; in vnic_dev_init_devcmd2()
422 vdev->args[0] = (u64)vdev->devcmd2->results_ring.base_addr | in vnic_dev_init_devcmd2()
435 vnic_dev_free_desc_ring(vdev, &vdev->devcmd2->results_ring); in vnic_dev_init_devcmd2()
437 vnic_wq_disable(&vdev->devcmd2->wq); in vnic_dev_init_devcmd2()
439 vnic_wq_free(&vdev->devcmd2->wq); in vnic_dev_init_devcmd2()
441 kfree(vdev->devcmd2); in vnic_dev_init_devcmd2()
442 vdev->devcmd2 = NULL; in vnic_dev_init_devcmd2()
449 vnic_dev_free_desc_ring(vdev, &vdev->devcmd2->results_ring); in vnic_dev_deinit_devcmd2()
450 vnic_wq_disable(&vdev->devcmd2->wq); in vnic_dev_deinit_devcmd2()
451 vnic_wq_free(&vdev->devcmd2->wq); in vnic_dev_deinit_devcmd2()
452 kfree(vdev->devcmd2); in vnic_dev_deinit_devcmd2()
1060 if (vdev->devcmd2) in vnic_dev_unregister()