Lines Matching refs:vmci_dev
211 struct vmci_guest_device *vmci_dev = (struct vmci_guest_device *)data; in vmci_dispatch_dgs() local
212 u8 *dg_in_buffer = vmci_dev->data_buffer; in vmci_dispatch_dgs()
220 ioread8_rep(vmci_dev->iobase + VMCI_DATA_IN_ADDR, in vmci_dispatch_dgs()
221 vmci_dev->data_buffer, current_dg_in_buffer_size); in vmci_dispatch_dgs()
281 ioread8_rep(vmci_dev->iobase + in vmci_dispatch_dgs()
283 vmci_dev->data_buffer + in vmci_dispatch_dgs()
300 dev_dbg(vmci_dev->dev, in vmci_dispatch_dgs()
314 dev_dbg(vmci_dev->dev, in vmci_dispatch_dgs()
323 ioread8_rep(vmci_dev->iobase + in vmci_dispatch_dgs()
325 vmci_dev->data_buffer, in vmci_dispatch_dgs()
343 ioread8_rep(vmci_dev->iobase + VMCI_DATA_IN_ADDR, in vmci_dispatch_dgs()
344 vmci_dev->data_buffer, in vmci_dispatch_dgs()
432 struct vmci_guest_device *vmci_dev; in vmci_guest_probe_device() local
459 vmci_dev = devm_kzalloc(&pdev->dev, sizeof(*vmci_dev), GFP_KERNEL); in vmci_guest_probe_device()
460 if (!vmci_dev) { in vmci_guest_probe_device()
466 vmci_dev->dev = &pdev->dev; in vmci_guest_probe_device()
467 vmci_dev->exclusive_vectors = false; in vmci_guest_probe_device()
468 vmci_dev->iobase = iobase; in vmci_guest_probe_device()
470 tasklet_init(&vmci_dev->datagram_tasklet, in vmci_guest_probe_device()
471 vmci_dispatch_dgs, (unsigned long)vmci_dev); in vmci_guest_probe_device()
472 tasklet_init(&vmci_dev->bm_tasklet, in vmci_guest_probe_device()
473 vmci_process_bitmap, (unsigned long)vmci_dev); in vmci_guest_probe_device()
475 vmci_dev->data_buffer = vmalloc(VMCI_MAX_DG_SIZE); in vmci_guest_probe_device()
476 if (!vmci_dev->data_buffer) { in vmci_guest_probe_device()
493 capabilities = ioread32(vmci_dev->iobase + VMCI_CAPS_ADDR); in vmci_guest_probe_device()
505 vmci_dev->notification_bitmap = dma_alloc_coherent( in vmci_guest_probe_device()
506 &pdev->dev, PAGE_SIZE, &vmci_dev->notification_base, in vmci_guest_probe_device()
508 if (!vmci_dev->notification_bitmap) { in vmci_guest_probe_device()
512 memset(vmci_dev->notification_bitmap, 0, PAGE_SIZE); in vmci_guest_probe_device()
520 iowrite32(capabilities, vmci_dev->iobase + VMCI_CAPS_ADDR); in vmci_guest_probe_device()
524 vmci_dev_g = vmci_dev; in vmci_guest_probe_device()
534 vmci_dev->notification_base >> PAGE_SHIFT; in vmci_guest_probe_device()
575 vmci_dev->exclusive_vectors = true; in vmci_guest_probe_device()
583 IRQF_SHARED, KBUILD_MODNAME, vmci_dev); in vmci_guest_probe_device()
596 if (vmci_dev->exclusive_vectors) { in vmci_guest_probe_device()
599 vmci_dev); in vmci_guest_probe_device()
616 iowrite32(cmd, vmci_dev->iobase + VMCI_IMR_ADDR); in vmci_guest_probe_device()
620 vmci_dev->iobase + VMCI_CONTROL_ADDR); in vmci_guest_probe_device()
622 pci_set_drvdata(pdev, vmci_dev); in vmci_guest_probe_device()
626 free_irq(pci_irq_vector(pdev, 0), vmci_dev); in vmci_guest_probe_device()
627 tasklet_kill(&vmci_dev->datagram_tasklet); in vmci_guest_probe_device()
628 tasklet_kill(&vmci_dev->bm_tasklet); in vmci_guest_probe_device()
640 if (vmci_dev->notification_bitmap) { in vmci_guest_probe_device()
642 vmci_dev->iobase + VMCI_CONTROL_ADDR); in vmci_guest_probe_device()
644 vmci_dev->notification_bitmap, in vmci_guest_probe_device()
645 vmci_dev->notification_base); in vmci_guest_probe_device()
655 vfree(vmci_dev->data_buffer); in vmci_guest_probe_device()
663 struct vmci_guest_device *vmci_dev = pci_get_drvdata(pdev); in vmci_guest_remove_device() local
684 iowrite32(VMCI_CONTROL_RESET, vmci_dev->iobase + VMCI_CONTROL_ADDR); in vmci_guest_remove_device()
691 if (vmci_dev->exclusive_vectors) in vmci_guest_remove_device()
692 free_irq(pci_irq_vector(pdev, 1), vmci_dev); in vmci_guest_remove_device()
693 free_irq(pci_irq_vector(pdev, 0), vmci_dev); in vmci_guest_remove_device()
696 tasklet_kill(&vmci_dev->datagram_tasklet); in vmci_guest_remove_device()
697 tasklet_kill(&vmci_dev->bm_tasklet); in vmci_guest_remove_device()
699 if (vmci_dev->notification_bitmap) { in vmci_guest_remove_device()
706 vmci_dev->notification_bitmap, in vmci_guest_remove_device()
707 vmci_dev->notification_base); in vmci_guest_remove_device()
710 vfree(vmci_dev->data_buffer); in vmci_guest_remove_device()