search for: vp_free_vq

Displaying 4 results from an estimated 4 matches for "vp_free_vq".

Did you mean: vp_free_vqs
2009 Apr 27
0
[PATCH 8/8] virtio_pci: optional MSI-X support
...return vp_vring_interrupt(irq, opaque); } - spin_lock_irqsave(&vp_dev->lock, flags); - list_for_each_entry(info, &vp_dev->virtqueues, node) { - if (vring_interrupt(irq, info->vq) == IRQ_HANDLED) - ret = IRQ_HANDLED; +/* the config->free_vqs() implementation */ +static void vp_free_vqs(struct virtio_device *vdev) { + struct virtio_pci_device *vp_dev = to_vp_device(vdev); + int i; + + for (i = 0; i < vp_dev->msix_preset_vectors; ++i) + free_irq(vp_dev->msix_entries[i].vector, vp_dev); + + if (!vp_dev->msix_preset_vectors) + free_irq(vp_dev->pci_dev->irq, vp_de...
2009 Apr 27
0
[PATCH 8/8] virtio_pci: optional MSI-X support
...return vp_vring_interrupt(irq, opaque); } - spin_lock_irqsave(&vp_dev->lock, flags); - list_for_each_entry(info, &vp_dev->virtqueues, node) { - if (vring_interrupt(irq, info->vq) == IRQ_HANDLED) - ret = IRQ_HANDLED; +/* the config->free_vqs() implementation */ +static void vp_free_vqs(struct virtio_device *vdev) { + struct virtio_pci_device *vp_dev = to_vp_device(vdev); + int i; + + for (i = 0; i < vp_dev->msix_preset_vectors; ++i) + free_irq(vp_dev->msix_entries[i].vector, vp_dev); + + if (!vp_dev->msix_preset_vectors) + free_irq(vp_dev->pci_dev->irq, vp_de...
2009 May 07
1
[PATCH 3/3] virtio_pci: optional MSI-X support
...i) { + err = request_irq(vp_dev->msix_entries[i].vector, + i == VP_MSIX_CONFIG_VECTOR ? + vp_config_changed : vp_vring_interrupt, + 0, vp_dev->msix_names[i], vp_dev); + if (err) { + /* Set msix_preset_vectors so that only vectors we + * already allocated will be freed by vp_free_vqs. */ + vp_dev->msix_preset_vectors = i; + goto error_irq; + } + } + + /* Set the vector used for configuration */ + iowrite16(VP_MSIX_CONFIG_VECTOR, + vp_dev->ioaddr + VIRTIO_MSI_CONFIG_VECTOR); + return 0; +error_irq: + vp_free_vectors(vdev); + kfree(vp_dev->msix_names); +error_na...
2009 May 07
1
[PATCH 3/3] virtio_pci: optional MSI-X support
...i) { + err = request_irq(vp_dev->msix_entries[i].vector, + i == VP_MSIX_CONFIG_VECTOR ? + vp_config_changed : vp_vring_interrupt, + 0, vp_dev->msix_names[i], vp_dev); + if (err) { + /* Set msix_preset_vectors so that only vectors we + * already allocated will be freed by vp_free_vqs. */ + vp_dev->msix_preset_vectors = i; + goto error_irq; + } + } + + /* Set the vector used for configuration */ + iowrite16(VP_MSIX_CONFIG_VECTOR, + vp_dev->ioaddr + VIRTIO_MSI_CONFIG_VECTOR); + return 0; +error_irq: + vp_free_vectors(vdev); + kfree(vp_dev->msix_names); +error_na...