search for: vp_config_chang

Displaying 20 results from an estimated 69 matches for "vp_config_chang".

Did you mean: vp_config_changed
2014 Apr 19
1
RFC: sharing config interrupt between virtio devices for saving MSI
...101db3f..176aabc 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -259,9 +259,9 @@ static irqreturn_t vp_interrupt(int irq, void *opaque) /* Configuration change? Tell driver if it wants to know. */ if (isr & VIRTIO_PCI_ISR_CONFIG) - vp_config_changed(irq, opaque); - - return vp_vring_interrupt(irq, opaque); + return vp_config_changed(irq, opaque); + else + return vp_vring_interrupt(irq, opaque); } static void vp_free_vectors(struct virtio_device *vdev) -- Amos. -------------- next part --------...
2014 Apr 19
1
RFC: sharing config interrupt between virtio devices for saving MSI
...101db3f..176aabc 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -259,9 +259,9 @@ static irqreturn_t vp_interrupt(int irq, void *opaque) /* Configuration change? Tell driver if it wants to know. */ if (isr & VIRTIO_PCI_ISR_CONFIG) - vp_config_changed(irq, opaque); - - return vp_vring_interrupt(irq, opaque); + return vp_config_changed(irq, opaque); + else + return vp_vring_interrupt(irq, opaque); } static void vp_free_vectors(struct virtio_device *vdev) -- Amos. -------------- next part --------...
2009 May 07
1
[PATCH 2/3] virtio_pci: split up vp_interrupt
...vers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -164,6 +164,37 @@ static void vp_notify(struct virtqueue *vq) iowrite16(info->queue_index, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_NOTIFY); } +/* Handle a configuration change: Tell driver if it wants to know. */ +static irqreturn_t vp_config_changed(int irq, void *opaque) +{ + struct virtio_pci_device *vp_dev = opaque; + struct virtio_driver *drv; + drv = container_of(vp_dev->vdev.dev.driver, + struct virtio_driver, driver); + + if (drv && drv->config_changed) + drv->config_changed(&vp_dev->vdev); + return IRQ_H...
2009 May 07
1
[PATCH 2/3] virtio_pci: split up vp_interrupt
...vers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -164,6 +164,37 @@ static void vp_notify(struct virtqueue *vq) iowrite16(info->queue_index, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_NOTIFY); } +/* Handle a configuration change: Tell driver if it wants to know. */ +static irqreturn_t vp_config_changed(int irq, void *opaque) +{ + struct virtio_pci_device *vp_dev = opaque; + struct virtio_driver *drv; + drv = container_of(vp_dev->vdev.dev.driver, + struct virtio_driver, driver); + + if (drv && drv->config_changed) + drv->config_changed(&vp_dev->vdev); + return IRQ_H...
2014 Sep 01
3
[PATCH RFC] virtio-pci: share config interrupt between virtio devices
...->msix_used_vectors; - snprintf(vp_dev->msix_names[v], sizeof *vp_dev->msix_names, + /* Set shared IRQ for configuration */ + snprintf(vp_dev->config_msix_name, sizeof(*vp_dev->msix_names), "%s-config", name); - err = request_irq(vp_dev->msix_entries[v].vector, - vp_config_changed, 0, vp_dev->msix_names[v], + err = request_irq(vp_dev->pci_dev->irq, + vp_config_changed, + IRQF_SHARED, + vp_dev->config_msix_name, vp_dev); - if (err) - goto error; - ++vp_dev->msix_used_vectors; - - iowrite16(v, vp_dev->ioaddr + VIRTIO_MSI_CONFIG_VECTOR); -...
2014 Sep 01
3
[PATCH RFC] virtio-pci: share config interrupt between virtio devices
...->msix_used_vectors; - snprintf(vp_dev->msix_names[v], sizeof *vp_dev->msix_names, + /* Set shared IRQ for configuration */ + snprintf(vp_dev->config_msix_name, sizeof(*vp_dev->msix_names), "%s-config", name); - err = request_irq(vp_dev->msix_entries[v].vector, - vp_config_changed, 0, vp_dev->msix_names[v], + err = request_irq(vp_dev->pci_dev->irq, + vp_config_changed, + IRQF_SHARED, + vp_dev->config_msix_name, vp_dev); - if (err) - goto error; - ++vp_dev->msix_used_vectors; - - iowrite16(v, vp_dev->ioaddr + VIRTIO_MSI_CONFIG_VECTOR); -...
2014 Sep 01
1
[PATCH RFC] virtio-pci: share config interrupt between virtio devices
..._names[v], sizeof *vp_dev->msix_names, > > + /* Set shared IRQ for configuration */ > > + snprintf(vp_dev->config_msix_name, sizeof(*vp_dev->msix_names), > > "%s-config", name); > > - err = request_irq(vp_dev->msix_entries[v].vector, > > - vp_config_changed, 0, vp_dev->msix_names[v], > > + err = request_irq(vp_dev->pci_dev->irq, > > + vp_config_changed, > > + IRQF_SHARED, > > + vp_dev->config_msix_name, > > vp_dev); > > - if (err) > > - goto error; > > - ++vp_dev->msix...
2014 Sep 01
1
[PATCH RFC] virtio-pci: share config interrupt between virtio devices
..._names[v], sizeof *vp_dev->msix_names, > > + /* Set shared IRQ for configuration */ > > + snprintf(vp_dev->config_msix_name, sizeof(*vp_dev->msix_names), > > "%s-config", name); > > - err = request_irq(vp_dev->msix_entries[v].vector, > > - vp_config_changed, 0, vp_dev->msix_names[v], > > + err = request_irq(vp_dev->pci_dev->irq, > > + vp_config_changed, > > + IRQF_SHARED, > > + vp_dev->config_msix_name, > > vp_dev); > > - if (err) > > - goto error; > > - ++vp_dev->msix...
2009 Apr 27
0
[PATCH 7/8] virtio_pci: split up vp_interrupt
...vers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -164,6 +164,37 @@ static void vp_notify(struct virtqueue *vq) iowrite16(info->queue_index, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_NOTIFY); } +/* Handle a configuration change: Tell driver if it wants to know. */ +static irqreturn_t vp_config_changed(int irq, void *opaque) +{ + struct virtio_pci_device *vp_dev = opaque; + struct virtio_driver *drv; + drv = container_of(vp_dev->vdev.dev.driver, + struct virtio_driver, driver); + + if (drv && drv->config_changed) + drv->config_changed(&vp_dev->vdev); + return IRQ_H...
2009 May 13
0
[PATCHv5 2/3] virtio_pci: split up vp_interrupt
...vers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -164,6 +164,37 @@ static void vp_notify(struct virtqueue *vq) iowrite16(info->queue_index, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_NOTIFY); } +/* Handle a configuration change: Tell driver if it wants to know. */ +static irqreturn_t vp_config_changed(int irq, void *opaque) +{ + struct virtio_pci_device *vp_dev = opaque; + struct virtio_driver *drv; + drv = container_of(vp_dev->vdev.dev.driver, + struct virtio_driver, driver); + + if (drv && drv->config_changed) + drv->config_changed(&vp_dev->vdev); + return IRQ_H...
2009 May 14
0
[PATCHv6 3/4] virtio_pci: split up vp_interrupt
...vers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -164,6 +164,37 @@ static void vp_notify(struct virtqueue *vq) iowrite16(info->queue_index, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_NOTIFY); } +/* Handle a configuration change: Tell driver if it wants to know. */ +static irqreturn_t vp_config_changed(int irq, void *opaque) +{ + struct virtio_pci_device *vp_dev = opaque; + struct virtio_driver *drv; + drv = container_of(vp_dev->vdev.dev.driver, + struct virtio_driver, driver); + + if (drv && drv->config_changed) + drv->config_changed(&vp_dev->vdev); + return IRQ_H...
2009 Apr 27
0
[PATCH 7/8] virtio_pci: split up vp_interrupt
...vers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -164,6 +164,37 @@ static void vp_notify(struct virtqueue *vq) iowrite16(info->queue_index, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_NOTIFY); } +/* Handle a configuration change: Tell driver if it wants to know. */ +static irqreturn_t vp_config_changed(int irq, void *opaque) +{ + struct virtio_pci_device *vp_dev = opaque; + struct virtio_driver *drv; + drv = container_of(vp_dev->vdev.dev.driver, + struct virtio_driver, driver); + + if (drv && drv->config_changed) + drv->config_changed(&vp_dev->vdev); + return IRQ_H...
2009 May 13
0
[PATCHv5 2/3] virtio_pci: split up vp_interrupt
...vers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -164,6 +164,37 @@ static void vp_notify(struct virtqueue *vq) iowrite16(info->queue_index, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_NOTIFY); } +/* Handle a configuration change: Tell driver if it wants to know. */ +static irqreturn_t vp_config_changed(int irq, void *opaque) +{ + struct virtio_pci_device *vp_dev = opaque; + struct virtio_driver *drv; + drv = container_of(vp_dev->vdev.dev.driver, + struct virtio_driver, driver); + + if (drv && drv->config_changed) + drv->config_changed(&vp_dev->vdev); + return IRQ_H...
2009 May 14
0
[PATCHv6 3/4] virtio_pci: split up vp_interrupt
...vers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -164,6 +164,37 @@ static void vp_notify(struct virtqueue *vq) iowrite16(info->queue_index, vp_dev->ioaddr + VIRTIO_PCI_QUEUE_NOTIFY); } +/* Handle a configuration change: Tell driver if it wants to know. */ +static irqreturn_t vp_config_changed(int irq, void *opaque) +{ + struct virtio_pci_device *vp_dev = opaque; + struct virtio_driver *drv; + drv = container_of(vp_dev->vdev.dev.driver, + struct virtio_driver, driver); + + if (drv && drv->config_changed) + drv->config_changed(&vp_dev->vdev); + return IRQ_H...
2014 Sep 01
0
[PATCH RFC] virtio-pci: share config interrupt between virtio devices
...snprintf(vp_dev->msix_names[v], sizeof *vp_dev->msix_names, > + /* Set shared IRQ for configuration */ > + snprintf(vp_dev->config_msix_name, sizeof(*vp_dev->msix_names), > "%s-config", name); > - err = request_irq(vp_dev->msix_entries[v].vector, > - vp_config_changed, 0, vp_dev->msix_names[v], > + err = request_irq(vp_dev->pci_dev->irq, > + vp_config_changed, > + IRQF_SHARED, > + vp_dev->config_msix_name, > vp_dev); > - if (err) > - goto error; > - ++vp_dev->msix_used_vectors; > - > - iowrite16(v...
2009 Jul 23
0
[PATCH 2/2] virtio: retry on vector assignment failure
...vectors = err; - vp_dev->msix_enabled = 1; - - /* Set the vector used for configuration */ - v = vp_dev->msix_used_vectors; - snprintf(vp_dev->msix_names[v], sizeof *vp_dev->msix_names, - "%s-config", name); - err = request_irq(vp_dev->msix_entries[v].vector, - vp_config_changed, 0, vp_dev->msix_names[v], - vp_dev); - if (err) - goto error; - ++vp_dev->msix_used_vectors; + err = pci_enable_msix(vp_dev->pci_dev, vp_dev->msix_entries, nvectors); + if (err > 0) + err = -ENOSPC; + if (err) + goto error; + vp_dev->msix_vectors = nvectors; + vp_dev...
2009 Jul 23
0
[PATCH 2/2] virtio: retry on vector assignment failure
...vectors = err; - vp_dev->msix_enabled = 1; - - /* Set the vector used for configuration */ - v = vp_dev->msix_used_vectors; - snprintf(vp_dev->msix_names[v], sizeof *vp_dev->msix_names, - "%s-config", name); - err = request_irq(vp_dev->msix_entries[v].vector, - vp_config_changed, 0, vp_dev->msix_names[v], - vp_dev); - if (err) - goto error; - ++vp_dev->msix_used_vectors; + err = pci_enable_msix(vp_dev->pci_dev, vp_dev->msix_entries, nvectors); + if (err > 0) + err = -ENOSPC; + if (err) + goto error; + vp_dev->msix_vectors = nvectors; + vp_dev...
2009 Jul 23
0
qemu-kvm missing some msix capability check
...nabled = 1; > - > - /* Set the vector used for configuration */ > - v = vp_dev->msix_used_vectors; > - snprintf(vp_dev->msix_names[v], sizeof *vp_dev->msix_names, > - "%s-config", name); > - err = request_irq(vp_dev->msix_entries[v].vector, > - vp_config_changed, 0, vp_dev->msix_names[v], > - vp_dev); > - if (err) > - goto error_irq; > - ++vp_dev->msix_used_vectors; > - > - iowrite16(v, vp_dev->ioaddr + VIRTIO_MSI_CONFIG_VECTOR); > - /* Verify we had enough resources to assign the vector */ > - v = ioread16(vp...
2009 Jul 23
0
qemu-kvm missing some msix capability check
...nabled = 1; > - > - /* Set the vector used for configuration */ > - v = vp_dev->msix_used_vectors; > - snprintf(vp_dev->msix_names[v], sizeof *vp_dev->msix_names, > - "%s-config", name); > - err = request_irq(vp_dev->msix_entries[v].vector, > - vp_config_changed, 0, vp_dev->msix_names[v], > - vp_dev); > - if (err) > - goto error_irq; > - ++vp_dev->msix_used_vectors; > - > - iowrite16(v, vp_dev->ioaddr + VIRTIO_MSI_CONFIG_VECTOR); > - /* Verify we had enough resources to assign the vector */ > - v = ioread16(vp...
2009 Jul 26
0
[PATCHv3 2/2] virtio: refactor find_vqs
...vectors = err; - vp_dev->msix_enabled = 1; - - /* Set the vector used for configuration */ - v = vp_dev->msix_used_vectors; - snprintf(vp_dev->msix_names[v], sizeof *vp_dev->msix_names, - "%s-config", name); - err = request_irq(vp_dev->msix_entries[v].vector, - vp_config_changed, 0, vp_dev->msix_names[v], - vp_dev); - if (err) - goto error; - ++vp_dev->msix_used_vectors; + err = pci_enable_msix(vp_dev->pci_dev, vp_dev->msix_entries, nvectors); + if (err > 0) + err = -ENOSPC; + if (err) + goto error; + vp_dev->msix_vectors = nvectors; + vp_dev...