search for: ifcvf_request_irq

Displaying 20 results from an estimated 21 matches for "ifcvf_request_irq".

2020 Jul 15
2
[PATCH 6/7] ifcvf: replace irq_request/free with helpers in vDPA core.
...q(&pdev->dev, vf->vring[i].irq, &vf->vring[i]); >>> +??????? vdpa_free_vq_irq(&pdev->dev, vdpa, vf->vring[i].irq, i, >>> &vf->vring[i]); >>> ? ????? ifcvf_free_irq_vectors(pdev); >>> ? } >>> @@ -60,6 +61,7 @@ static int ifcvf_request_irq(struct ifcvf_adapter >>> *adapter) >>> ? { >>> ????? struct pci_dev *pdev = adapter->pdev; >>> ????? struct ifcvf_hw *vf = &adapter->vf; >>> +??? struct vdpa_device *vdpa = &adapter->vdpa; >>> ????? int vector, i, ret, irq; &gt...
2020 Jul 15
2
[PATCH 6/7] ifcvf: replace irq_request/free with helpers in vDPA core.
...q(&pdev->dev, vf->vring[i].irq, &vf->vring[i]); >>> +??????? vdpa_free_vq_irq(&pdev->dev, vdpa, vf->vring[i].irq, i, >>> &vf->vring[i]); >>> ? ????? ifcvf_free_irq_vectors(pdev); >>> ? } >>> @@ -60,6 +61,7 @@ static int ifcvf_request_irq(struct ifcvf_adapter >>> *adapter) >>> ? { >>> ????? struct pci_dev *pdev = adapter->pdev; >>> ????? struct ifcvf_hw *vf = &adapter->vf; >>> +??? struct vdpa_device *vdpa = &adapter->vdpa; >>> ????? int vector, i, ret, irq; &gt...
2020 May 13
0
[PATCH V2] ifcvf: move IRQ request/free to status change handlers
...v = adapter->pdev; > + struct ifcvf_hw *vf = &adapter->vf; > + int i; > + > + > + for (i = 0; i < queues; i++) > + devm_free_irq(&pdev->dev, vf->vring[i].irq, &vf->vring[i]); > + > + ifcvf_free_irq_vectors(pdev); > +} > + > +static int ifcvf_request_irq(struct ifcvf_adapter *adapter) > +{ > + struct pci_dev *pdev = adapter->pdev; > + struct ifcvf_hw *vf = &adapter->vf; > + int vector, i, ret, irq; > + > + ret = pci_alloc_irq_vectors(pdev, IFCVF_MAX_INTR, > + IFCVF_MAX_INTR, PCI_IRQ_MSIX); > + if (ret < 0...
2020 May 11
0
[PATCH] ifcvf: move IRQ request/free to status change handlers
...v = adapter->pdev; > + struct ifcvf_hw *vf = &adapter->vf; > + int i; > + > + > + for (i = 0; i < queues; i++) > + devm_free_irq(&pdev->dev, vf->vring[i].irq, &vf->vring[i]); > + > + ifcvf_free_irq_vectors(pdev); > +} > + > +static int ifcvf_request_irq(struct ifcvf_adapter *adapter) > +{ > + struct pci_dev *pdev = adapter->pdev; > + struct ifcvf_hw *vf = &adapter->vf; > + int vector, i, ret, irq; > + > + ret = pci_alloc_irq_vectors(pdev, IFCVF_MAX_INTR, > + IFCVF_MAX_INTR, PCI_IRQ_MSIX); > + if (ret < 0...
2020 Jul 23
4
[PATCH 1/2] vdpa: ifcvf: return err when fail to request config irq
...drivers/vdpa/ifcvf/ifcvf_main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c index f5a60c14b979..ae7110955a44 100644 --- a/drivers/vdpa/ifcvf/ifcvf_main.c +++ b/drivers/vdpa/ifcvf/ifcvf_main.c @@ -76,6 +76,10 @@ static int ifcvf_request_irq(struct ifcvf_adapter *adapter) ret = devm_request_irq(&pdev->dev, irq, ifcvf_config_changed, 0, vf->config_msix_name, vf); + if (ret) { + IFCVF_ERR(pdev, "Failed to request config irq\n"); + return ret; + } for (i = 0; i < IFCVF_MAX_QUEUE_PAIRS *...
2020 Jul 23
4
[PATCH 1/2] vdpa: ifcvf: return err when fail to request config irq
...drivers/vdpa/ifcvf/ifcvf_main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c index f5a60c14b979..ae7110955a44 100644 --- a/drivers/vdpa/ifcvf/ifcvf_main.c +++ b/drivers/vdpa/ifcvf/ifcvf_main.c @@ -76,6 +76,10 @@ static int ifcvf_request_irq(struct ifcvf_adapter *adapter) ret = devm_request_irq(&pdev->dev, irq, ifcvf_config_changed, 0, vf->config_msix_name, vf); + if (ret) { + IFCVF_ERR(pdev, "Failed to request config irq\n"); + return ret; + } for (i = 0; i < IFCVF_MAX_QUEUE_PAIRS *...
2020 May 12
1
[PATCH] ifcvf: move IRQ request/free to status change handlers
...; >>> + >>> + >>> +??? for (i = 0; i < queues; i++) >>> +??????? devm_free_irq(&pdev->dev, vf->vring[i].irq, &vf->vring[i]); >>> + >>> +??? ifcvf_free_irq_vectors(pdev); >>> +} >>> + >>> +static int ifcvf_request_irq(struct ifcvf_adapter *adapter) >>> +{ >>> +??? struct pci_dev *pdev = adapter->pdev; >>> +??? struct ifcvf_hw *vf = &adapter->vf; >>> +??? int vector, i, ret, irq; >>> + >>> +??? ret = pci_alloc_irq_vectors(pdev, IFCVF_MAX_INTR, >&g...
2020 Jul 13
0
[PATCH 6/7] ifcvf: replace irq_request/free with helpers in vDPA core.
...(i = 0; i < queues; i++) > - devm_free_irq(&pdev->dev, vf->vring[i].irq, &vf->vring[i]); > + vdpa_free_vq_irq(&pdev->dev, vdpa, vf->vring[i].irq, i, &vf->vring[i]); > > ifcvf_free_irq_vectors(pdev); > } > @@ -60,6 +61,7 @@ static int ifcvf_request_irq(struct ifcvf_adapter *adapter) > { > struct pci_dev *pdev = adapter->pdev; > struct ifcvf_hw *vf = &adapter->vf; > + struct vdpa_device *vdpa = &adapter->vdpa; > int vector, i, ret, irq; > > ret = pci_alloc_irq_vectors(pdev, IFCVF_MAX_INTR, &gt...
2020 Jul 17
0
[PATCH V2 5/6] ifcvf: replace irq_request/free with vDPA helpers
...(i = 0; i < queues; i++) > - devm_free_irq(&pdev->dev, vf->vring[i].irq, &vf->vring[i]); > + vdpa_free_vq_irq(&pdev->dev, vdpa, vf->vring[i].irq, i, &vf->vring[i]); > > ifcvf_free_irq_vectors(pdev); > } > @@ -60,6 +61,7 @@ static int ifcvf_request_irq(struct ifcvf_adapter *adapter) > { > struct pci_dev *pdev = adapter->pdev; > struct ifcvf_hw *vf = &adapter->vf; > + struct vdpa_device *vdpa = &adapter->vdpa; > int vector, i, ret, irq; > > ret = pci_alloc_irq_vectors(pdev, IFCVF_MAX_INTR, &gt...
2020 Jul 15
0
[PATCH 6/7] ifcvf: replace irq_request/free with helpers in vDPA core.
...i].irq, &vf->vring[i]); > > > > +??????? vdpa_free_vq_irq(&pdev->dev, vdpa, vf->vring[i].irq, i, > > > > &vf->vring[i]); > > > > ? ????? ifcvf_free_irq_vectors(pdev); > > > > ? } > > > > @@ -60,6 +61,7 @@ static int ifcvf_request_irq(struct > > > > ifcvf_adapter *adapter) > > > > ? { > > > > ????? struct pci_dev *pdev = adapter->pdev; > > > > ????? struct ifcvf_hw *vf = &adapter->vf; > > > > +??? struct vdpa_device *vdpa = &adapter->vdpa; > > &gt...
2020 Apr 26
1
[PATCH 2/2] vdpa: implement config interrupt in IFCVF
...a_callback *cb) > { > - /* We don't support config interrupt */ > + struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev); > + > + vf->config_cb.callback = cb->callback; > + vf->config_cb.private = cb->private; > } > > /* > @@ -292,6 +305,13 @@ static int ifcvf_request_irq(struct ifcvf_adapter *adapter) > struct ifcvf_hw *vf = &adapter->vf; > int vector, i, ret, irq; > > + snprintf(vf->config_msix_name, 256, "ifcvf[%s]-config\n", > + pci_name(pdev)); > + vector = 0; > + irq = pci_irq_vector(pdev, vector); > + ret...
2023 May 08
1
[PATCH V2 4/5] vDPA/ifcvf: synchronize irqs in the reset routine
...ifcvf_main.c @@ -125,6 +125,7 @@ static void ifcvf_free_irq(struct ifcvf_hw *vf) ifcvf_free_vq_irq(vf); ifcvf_free_config_irq(vf); ifcvf_free_irq_vectors(pdev); + vf->num_msix_vectors = 0; } /* ifcvf MSIX vectors allocator, this helper tries to allocate @@ -343,36 +344,11 @@ static int ifcvf_request_irq(struct ifcvf_hw *vf) if (ret) return ret; - return 0; -} - -static int ifcvf_stop_datapath(struct ifcvf_adapter *adapter) -{ - struct ifcvf_hw *vf = adapter->vf; - int i; - - for (i = 0; i < vf->nr_vring; i++) - vf->vring[i].cb.callback = NULL; - - ifcvf_stop_hw(vf); + vf->nu...
2023 May 24
2
[PATCH V2 4/5] vDPA/ifcvf: synchronize irqs in the reset routine
...ruct ifcvf_hw *vf) > ifcvf_free_vq_irq(vf); > ifcvf_free_config_irq(vf); > ifcvf_free_irq_vectors(pdev); > + vf->num_msix_vectors = 0; > } > > /* ifcvf MSIX vectors allocator, this helper tries to allocate > @@ -343,36 +344,11 @@ static int ifcvf_request_irq(struct ifcvf_hw *vf) > if (ret) > return ret; > > - return 0; > -} > - > -static int ifcvf_stop_datapath(struct ifcvf_adapter *adapter) > -{ > - struct ifcvf_hw *vf = adapter->vf; > - int i; > - > - for (i = 0; i...
2023 Mar 31
7
[PATCH 0/5] vDPA/ifcvf: implement immediate initialization mechanism
Formerly, ifcvf driver has implemented a lazy-initialization mechanism for the virtqueues and other config space contents, it would store all configurations that passed down from the userspace, then load them to the device config space upon DRIVER_OK. This can not serve live migration, so this series implement an immediate initialization mechanism, which means rather than the former store-load
2023 May 08
6
[PATCH V2 0/5] vDPA/ifcvf: implement immediate initialization mechanism
Formerly, ifcvf driver has implemented a lazy-initialization mechanism for the virtqueues and other config space contents, it would store all configurations that passed down from the userspace, then load them to the device config space upon DRIVER_OK. This can not serve live migration, so this series implement an immediate initialization mechanism, which means rather than the former store-load
2020 May 12
0
[PATCH] ifcvf: move IRQ request/free to status change handlers
...; >>> + >>> + >>> +??? for (i = 0; i < queues; i++) >>> +??????? devm_free_irq(&pdev->dev, vf->vring[i].irq, &vf->vring[i]); >>> + >>> +??? ifcvf_free_irq_vectors(pdev); >>> +} >>> + >>> +static int ifcvf_request_irq(struct ifcvf_adapter *adapter) >>> +{ >>> +??? struct pci_dev *pdev = adapter->pdev; >>> +??? struct ifcvf_hw *vf = &adapter->vf; >>> +??? int vector, i, ret, irq; >>> + >>> +??? ret = pci_alloc_irq_vectors(pdev, IFCVF_MAX_INTR, >&g...
2020 Aug 07
0
[PATCH 1/2] vdpa: ifcvf: return err when fail to request config irq
...++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c > index f5a60c14b979..ae7110955a44 100644 > --- a/drivers/vdpa/ifcvf/ifcvf_main.c > +++ b/drivers/vdpa/ifcvf/ifcvf_main.c > @@ -76,6 +76,10 @@ static int ifcvf_request_irq(struct ifcvf_adapter *adapter) > ret = devm_request_irq(&pdev->dev, irq, > ifcvf_config_changed, 0, > vf->config_msix_name, vf); > + if (ret) { > + IFCVF_ERR(pdev, "Failed to request config irq\n"); > + return ret; > + } >...
2020 Apr 26
0
[PATCH V3 2/2] vdpa: implement config interrupt in IFCVF
...a_callback *cb) > { > - /* We don't support config interrupt */ > + struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev); > + > + vf->config_cb.callback = cb->callback; > + vf->config_cb.private = cb->private; > } > > /* > @@ -292,6 +305,13 @@ static int ifcvf_request_irq(struct ifcvf_adapter *adapter) > struct ifcvf_hw *vf = &adapter->vf; > int vector, i, ret, irq; > > + snprintf(vf->config_msix_name, 256, "ifcvf[%s]-config\n", > + pci_name(pdev)); > + vector = 0; > + irq = pci_irq_vector(pdev, vector); Nitpick,...
2023 Mar 31
1
[PATCH 3/5] retire ifcvf_start_datapath and ifcvf_add_status
..., u16 qid); void ifcvf_read_dev_config(struct ifcvf_hw *hw, u64 offset, diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c index 4588484bd53d..968687159e44 100644 --- a/drivers/vdpa/ifcvf/ifcvf_main.c +++ b/drivers/vdpa/ifcvf/ifcvf_main.c @@ -346,22 +346,6 @@ static int ifcvf_request_irq(struct ifcvf_hw *vf) return 0; } -static int ifcvf_start_datapath(struct ifcvf_adapter *adapter) -{ - struct ifcvf_hw *vf = adapter->vf; - u8 status; - int ret; - - ret = ifcvf_start_hw(vf); - if (ret < 0) { - status = ifcvf_get_status(vf); - status |= VIRTIO_CONFIG_S_FAILED; - ifcvf_...
2023 Feb 21
2
[GIT PULL] virtio,vhost,vdpa: features, fixes
...pter vDPA/ifcvf: decouple vq IRQ releasers from the adapter vDPA/ifcvf: decouple config IRQ releaser from the adapter vDPA/ifcvf: decouple vq irq requester from the adapter vDPA/ifcvf: decouple config/dev IRQ requester and vectors allocator from the adapter vDPA/ifcvf: ifcvf_request_irq works on ifcvf_hw vDPA/ifcvf: manage ifcvf_hw in the mgmt_dev vDPA/ifcvf: allocate the adapter in dev_add() vDPA/ifcvf: retire ifcvf_private_to_vf vDPA/ifcvf: implement features provisioning Documentation/driver-api/index.rst | 1 + Documentation/driver-...