Lines Matching refs:devcmd2

283 	struct devcmd2_controller *dc2c = vdev->devcmd2;  in _vnic_dev_cmd2()
371 if (vdev->devcmd2) in vnic_dev_init_devcmd2()
374 vdev->devcmd2 = kzalloc(sizeof(*vdev->devcmd2), GFP_KERNEL); in vnic_dev_init_devcmd2()
375 if (!vdev->devcmd2) in vnic_dev_init_devcmd2()
378 vdev->devcmd2->color = 1; in vnic_dev_init_devcmd2()
379 vdev->devcmd2->result_size = DEVCMD2_RING_SIZE; in vnic_dev_init_devcmd2()
380 err = enic_wq_devcmd2_alloc(vdev, &vdev->devcmd2->wq, DEVCMD2_RING_SIZE, in vnic_dev_init_devcmd2()
385 fetch_index = ioread32(&vdev->devcmd2->wq.ctrl->fetch_index); in vnic_dev_init_devcmd2()
392 enic_wq_init_start(&vdev->devcmd2->wq, 0, fetch_index, fetch_index, 0, in vnic_dev_init_devcmd2()
394 vdev->devcmd2->posted = fetch_index; in vnic_dev_init_devcmd2()
395 vnic_wq_enable(&vdev->devcmd2->wq); in vnic_dev_init_devcmd2()
397 err = vnic_dev_alloc_desc_ring(vdev, &vdev->devcmd2->results_ring, in vnic_dev_init_devcmd2()
402 vdev->devcmd2->result = vdev->devcmd2->results_ring.descs; in vnic_dev_init_devcmd2()
403 vdev->devcmd2->cmd_ring = vdev->devcmd2->wq.ring.descs; in vnic_dev_init_devcmd2()
404 vdev->devcmd2->wq_ctrl = vdev->devcmd2->wq.ctrl; in vnic_dev_init_devcmd2()
405 vdev->args[0] = (u64)vdev->devcmd2->results_ring.base_addr | in vnic_dev_init_devcmd2()
418 vnic_dev_free_desc_ring(vdev, &vdev->devcmd2->results_ring); in vnic_dev_init_devcmd2()
420 vnic_wq_disable(&vdev->devcmd2->wq); in vnic_dev_init_devcmd2()
422 vnic_wq_free(&vdev->devcmd2->wq); in vnic_dev_init_devcmd2()
424 kfree(vdev->devcmd2); in vnic_dev_init_devcmd2()
425 vdev->devcmd2 = NULL; in vnic_dev_init_devcmd2()
432 vnic_dev_free_desc_ring(vdev, &vdev->devcmd2->results_ring); in vnic_dev_deinit_devcmd2()
433 vnic_wq_disable(&vdev->devcmd2->wq); in vnic_dev_deinit_devcmd2()
434 vnic_wq_free(&vdev->devcmd2->wq); in vnic_dev_deinit_devcmd2()
435 kfree(vdev->devcmd2); in vnic_dev_deinit_devcmd2()
1043 if (vdev->devcmd2) in vnic_dev_unregister()