search for: error_request

Displaying 20 results from an estimated 41 matches for "error_request".

2014 Dec 08
0
[PATCH v2 03/10] virtio_pci: free up vq->priv
...c; int i, err, nvectors, allocated_vectors; + vp_dev->vqs = kmalloc(nvqs * sizeof *vp_dev->vqs, GFP_KERNEL); + if (!vp_dev->vqs) + return -ENOMEM; + if (!use_msix) { /* Old style: one normal interrupt for change and all vqs. */ err = vp_request_intx(vdev); if (err) - goto error_request; + goto error_find; } else { if (per_vq_vectors) { /* Best option: one for change interrupt, one per vq. */ @@ -545,7 +553,7 @@ static int vp_try_to_find_vqs(struct virtio_device *vdev, unsigned nvqs, err = vp_request_msix_vectors(vdev, nvectors, per_vq_vectors); if (err) - got...
2014 Dec 08
0
[PATCH v2 03/10] virtio_pci: free up vq->priv
...c; int i, err, nvectors, allocated_vectors; + vp_dev->vqs = kmalloc(nvqs * sizeof *vp_dev->vqs, GFP_KERNEL); + if (!vp_dev->vqs) + return -ENOMEM; + if (!use_msix) { /* Old style: one normal interrupt for change and all vqs. */ err = vp_request_intx(vdev); if (err) - goto error_request; + goto error_find; } else { if (per_vq_vectors) { /* Best option: one for change interrupt, one per vq. */ @@ -545,7 +553,7 @@ static int vp_try_to_find_vqs(struct virtio_device *vdev, unsigned nvqs, err = vp_request_msix_vectors(vdev, nvectors, per_vq_vectors); if (err) - got...
2014 Nov 06
2
[RFC PATCH] virtio-mmio: support for multiple irqs
...tform_get_irq(vm_dev->pdev, 0); >> - int i, err; >> + int i, err, nirqs, irq; >> + >> + if (!use_multiple_irq) { >> + /* Old style: one normal interrupt for change and all vqs. */ >> + err = vm_request_single_irq(vdev); >> + if (err) >> + goto error_request; >> + } else { >> + if (per_vq_irq) { >> + /* Best option: one for change interrupt, one per vq. */ >> + nirqs = 1; >> + for (i = 0; i < nvqs; ++i) >> + if (callbacks[i]) >> + ++nirqs; >> + } else { >> + /* Second best: one f...
2014 Nov 06
2
[RFC PATCH] virtio-mmio: support for multiple irqs
...tform_get_irq(vm_dev->pdev, 0); >> - int i, err; >> + int i, err, nirqs, irq; >> + >> + if (!use_multiple_irq) { >> + /* Old style: one normal interrupt for change and all vqs. */ >> + err = vm_request_single_irq(vdev); >> + if (err) >> + goto error_request; >> + } else { >> + if (per_vq_irq) { >> + /* Best option: one for change interrupt, one per vq. */ >> + nirqs = 1; >> + for (i = 0; i < nvqs; ++i) >> + if (callbacks[i]) >> + ++nirqs; >> + } else { >> + /* Second best: one f...
2009 Sep 21
0
[PATCH 1/6] virtio_pci: minor MSI-X cleanups
...bool use_msix, bool per_vq_vectors) { struct virtio_pci_device *vp_dev = to_vp_device(vdev); - u16 vector; - int i, err, allocated_vectors; + u16 msix_vec; + int i, err, nvectors, allocated_vectors; - err = vp_request_vectors(vdev, nvectors, per_vq_vectors); - if (err) - goto error_request; + if (!use_msix) { + /* Old style: one normal interrupt for change and all vqs. */ + err = vp_request_intx(vdev); + if (err) + goto error_request; + } else { + if (per_vq_vectors) { + /* Best option: one for change interrupt, one per vq. */ + nvectors = 1; + for (i = 0; i < nvqs; ++...
2009 Sep 21
0
[PATCH 1/6] virtio_pci: minor MSI-X cleanups
...bool use_msix, bool per_vq_vectors) { struct virtio_pci_device *vp_dev = to_vp_device(vdev); - u16 vector; - int i, err, allocated_vectors; + u16 msix_vec; + int i, err, nvectors, allocated_vectors; - err = vp_request_vectors(vdev, nvectors, per_vq_vectors); - if (err) - goto error_request; + if (!use_msix) { + /* Old style: one normal interrupt for change and all vqs. */ + err = vp_request_intx(vdev); + if (err) + goto error_request; + } else { + if (per_vq_vectors) { + /* Best option: one for change interrupt, one per vq. */ + nvectors = 1; + for (i = 0; i < nvqs; ++...
2014 Nov 06
0
[RFC PATCH] virtio-mmio: support for multiple irqs
...); > - unsigned int irq = platform_get_irq(vm_dev->pdev, 0); > - int i, err; > + int i, err, nirqs, irq; > + > + if (!use_multiple_irq) { > + /* Old style: one normal interrupt for change and all vqs. */ > + err = vm_request_single_irq(vdev); > + if (err) > + goto error_request; > + } else { > + if (per_vq_irq) { > + /* Best option: one for change interrupt, one per vq. */ > + nirqs = 1; > + for (i = 0; i < nvqs; ++i) > + if (callbacks[i]) > + ++nirqs; > + } else { > + /* Second best: one for change, shared for all vqs. */ &g...
2009 Jun 01
2
find_vqs operation starting at arbitrary index
...truct virtio_device *vdev, unsigned nvqs, - struct virtqueue *vqs[], + unsigned start_index, struct virtqueue *vqs[], vq_callback_t *callbacks[], const char *names[]) { @@ -516,7 +516,8 @@ static int vp_find_vqs(struct virtio_device *vdev, unsigned nvqs, goto error_request; for (i = 0; i < nvqs; ++i) { - vqs[i] = vp_find_vq(vdev, i, callbacks[i], names[i]); + vqs[i] = vp_find_vq(vdev, start_index + i, callbacks[i], + names[i]); if (IS_ERR(vqs[i])) goto error_find; } Amit
2009 Jun 01
2
find_vqs operation starting at arbitrary index
...truct virtio_device *vdev, unsigned nvqs, - struct virtqueue *vqs[], + unsigned start_index, struct virtqueue *vqs[], vq_callback_t *callbacks[], const char *names[]) { @@ -516,7 +516,8 @@ static int vp_find_vqs(struct virtio_device *vdev, unsigned nvqs, goto error_request; for (i = 0; i < nvqs; ++i) { - vqs[i] = vp_find_vq(vdev, i, callbacks[i], names[i]); + vqs[i] = vp_find_vq(vdev, start_index + i, callbacks[i], + names[i]); if (IS_ERR(vqs[i])) goto error_find; } Amit
2014 Nov 06
0
[RFC PATCH] virtio-mmio: support for multiple irqs
...>> - int i, err; > >> + int i, err, nirqs, irq; > >> + > >> + if (!use_multiple_irq) { > >> + /* Old style: one normal interrupt for change and all vqs. */ > >> + err = vm_request_single_irq(vdev); > >> + if (err) > >> + goto error_request; > >> + } else { > >> + if (per_vq_irq) { > >> + /* Best option: one for change interrupt, one per vq. */ > >> + nirqs = 1; > >> + for (i = 0; i < nvqs; ++i) > >> + if (callbacks[i]) > >> + ++nirqs; > >> + } e...
2014 Nov 04
6
[RFC PATCH] virtio-mmio: support for multiple irqs
...o_device *vm_dev = to_virtio_mmio_device(vdev); - unsigned int irq = platform_get_irq(vm_dev->pdev, 0); - int i, err; + int i, err, nirqs, irq; + + if (!use_multiple_irq) { + /* Old style: one normal interrupt for change and all vqs. */ + err = vm_request_single_irq(vdev); + if (err) + goto error_request; + } else { + if (per_vq_irq) { + /* Best option: one for change interrupt, one per vq. */ + nirqs = 1; + for (i = 0; i < nvqs; ++i) + if (callbacks[i]) + ++nirqs; + } else { + /* Second best: one for change, shared for all vqs. */ + nirqs = 2; + } - err = request_irq(irq,...
2014 Nov 04
6
[RFC PATCH] virtio-mmio: support for multiple irqs
...o_device *vm_dev = to_virtio_mmio_device(vdev); - unsigned int irq = platform_get_irq(vm_dev->pdev, 0); - int i, err; + int i, err, nirqs, irq; + + if (!use_multiple_irq) { + /* Old style: one normal interrupt for change and all vqs. */ + err = vm_request_single_irq(vdev); + if (err) + goto error_request; + } else { + if (per_vq_irq) { + /* Best option: one for change interrupt, one per vq. */ + nirqs = 1; + for (i = 0; i < nvqs; ++i) + if (callbacks[i]) + ++nirqs; + } else { + /* Second best: one for change, shared for all vqs. */ + nirqs = 2; + } - err = request_irq(irq,...
2014 Sep 01
3
[PATCH RFC] virtio-pci: share config interrupt between virtio devices
...IG_VECTOR); - if (v == VIRTIO_MSI_NO_VECTOR) { - err = -EBUSY; + if (!err) + vp_dev->intx_enabled = 1; + else goto error; - } if (!per_vq_vectors) { /* Shared vector for all VQs */ @@ -535,14 +524,16 @@ static int vp_try_to_find_vqs(struct virtio_device *vdev, unsigned nvqs, goto error_request; } else { if (per_vq_vectors) { - /* Best option: one for change interrupt, one per vq. */ - nvectors = 1; + /* Best option: one normal interrupt for change, + one msix per vq. */ + nvectors = 0; for (i = 0; i < nvqs; ++i) if (callbacks[i]) ++nvectors; } else...
2014 Sep 01
3
[PATCH RFC] virtio-pci: share config interrupt between virtio devices
...IG_VECTOR); - if (v == VIRTIO_MSI_NO_VECTOR) { - err = -EBUSY; + if (!err) + vp_dev->intx_enabled = 1; + else goto error; - } if (!per_vq_vectors) { /* Shared vector for all VQs */ @@ -535,14 +524,16 @@ static int vp_try_to_find_vqs(struct virtio_device *vdev, unsigned nvqs, goto error_request; } else { if (per_vq_vectors) { - /* Best option: one for change interrupt, one per vq. */ - nvectors = 1; + /* Best option: one normal interrupt for change, + one msix per vq. */ + nvectors = 0; for (i = 0; i < nvqs; ++i) if (callbacks[i]) ++nvectors; } else...
2009 Jul 23
0
[PATCH 2/2] virtio: retry on vector assignment failure
...ctor, per_vq_vector; - int vectors = 0; int i, err, allocated_vectors; - /* How many vectors would we like? */ - for (i = 0; i < nvqs; ++i) - if (callbacks[i]) - ++vectors; - - err = vp_request_vectors(vdev, vectors); + err = vp_request_vectors(vdev, max_vqs, nvectors); if (err) goto error_request; @@ -543,6 +527,34 @@ error_request: return PTR_ERR(vqs[i]); } +/* the config->find_vqs() implementation */ +static int vp_find_vqs(struct virtio_device *vdev, unsigned nvqs, + struct virtqueue *vqs[], + vq_callback_t *callbacks[], + const char *names[]) +{ + /* We...
2009 Jul 23
0
[PATCH 2/2] virtio: retry on vector assignment failure
...ctor, per_vq_vector; - int vectors = 0; int i, err, allocated_vectors; - /* How many vectors would we like? */ - for (i = 0; i < nvqs; ++i) - if (callbacks[i]) - ++vectors; - - err = vp_request_vectors(vdev, vectors); + err = vp_request_vectors(vdev, max_vqs, nvectors); if (err) goto error_request; @@ -543,6 +527,34 @@ error_request: return PTR_ERR(vqs[i]); } +/* the config->find_vqs() implementation */ +static int vp_find_vqs(struct virtio_device *vdev, unsigned nvqs, + struct virtqueue *vqs[], + vq_callback_t *callbacks[], + const char *names[]) +{ + /* We...
2009 May 07
1
[PATCH 3/3] virtio_pci: optional MSI-X support
...)) + struct virtqueue *vqs[], + virtqueue_callback *callbacks[]) { - int i; + int vectors = 0; + int i, err; + + /* How many vectors would we like? */ + for (i = 0; i < nvqs; ++i) + if (callbacks[i]) + ++vectors; + + err = vp_request_vectors(vdev, vectors); + if (err) + goto error_request; for (i = 0; i < nvqs; ++i) { vqs[i] = vp_find_vq(vdev, i, callbacks[i]); if (IS_ERR(vqs[i])) - goto error; + goto error_find; } return 0; -error: +error_find: vp_del_vqs(vdev); + +error_request: return PTR_ERR(vqs[i]); } @@ -423,21 +588,13 @@ static int __devinit virt...
2009 May 07
1
[PATCH 3/3] virtio_pci: optional MSI-X support
...)) + struct virtqueue *vqs[], + virtqueue_callback *callbacks[]) { - int i; + int vectors = 0; + int i, err; + + /* How many vectors would we like? */ + for (i = 0; i < nvqs; ++i) + if (callbacks[i]) + ++vectors; + + err = vp_request_vectors(vdev, vectors); + if (err) + goto error_request; for (i = 0; i < nvqs; ++i) { vqs[i] = vp_find_vq(vdev, i, callbacks[i]); if (IS_ERR(vqs[i])) - goto error; + goto error_find; } return 0; -error: +error_find: vp_del_vqs(vdev); + +error_request: return PTR_ERR(vqs[i]); } @@ -423,21 +588,13 @@ static int __devinit virt...
2009 Jul 23
0
qemu-kvm missing some msix capability check
...> - for (i = 0; i < nvqs; ++i) > - if (callbacks[i]) > - ++vectors; > - > - err = vp_request_vectors(vdev, vectors); > + if (nvectors) > + err = vp_request_vectors(vdev, max_vectors, nvectors); > + else > + err = vp_request_irq(vdev); > if (err) > goto error_request; > > @@ -534,6 +538,34 @@ error_request: > return PTR_ERR(vqs[i]); > } > > +/* the config->find_vqs() implementation */ > +static int vp_find_vqs(struct virtio_device *vdev, unsigned nvqs, > + struct virtqueue *vqs[], > + vq_callback_t *callbacks...
2009 Jul 23
0
qemu-kvm missing some msix capability check
...> - for (i = 0; i < nvqs; ++i) > - if (callbacks[i]) > - ++vectors; > - > - err = vp_request_vectors(vdev, vectors); > + if (nvectors) > + err = vp_request_vectors(vdev, max_vectors, nvectors); > + else > + err = vp_request_irq(vdev); > if (err) > goto error_request; > > @@ -534,6 +538,34 @@ error_request: > return PTR_ERR(vqs[i]); > } > > +/* the config->find_vqs() implementation */ > +static int vp_find_vqs(struct virtio_device *vdev, unsigned nvqs, > + struct virtqueue *vqs[], > + vq_callback_t *callbacks...