search for: devm_request_irq

Displaying 20 results from an estimated 39 matches for "devm_request_irq".

2008 Jan 18
2
[PATCH 2/3] Make IRQ handlers typesafe.
...ler_t, \ + int (*)(int, typeof(dev_id))), \ + (flags), (name), (dev_id)) + +extern int __must_check __request_irq(unsigned int, irq_handler_t handler, unsigned long, const char *, void *); extern void free_irq(unsigned int, void *); struct device; -extern int __must_check devm_request_irq(struct device *dev, unsigned int irq, +#define devm_request_irq(dev, irq, handler, flags, name, dev_id) \ + __devm_request_irq((dev), (irq), \ + check_either_type((handler), irq_handler_t, \ + int (*)(int, typeof(dev_id))), \ + (flags), (name), (dev_id)) +extern int __must_chec...
2008 Jan 18
2
[PATCH 2/3] Make IRQ handlers typesafe.
...ler_t, \ + int (*)(int, typeof(dev_id))), \ + (flags), (name), (dev_id)) + +extern int __must_check __request_irq(unsigned int, irq_handler_t handler, unsigned long, const char *, void *); extern void free_irq(unsigned int, void *); struct device; -extern int __must_check devm_request_irq(struct device *dev, unsigned int irq, +#define devm_request_irq(dev, irq, handler, flags, name, dev_id) \ + __devm_request_irq((dev), (irq), \ + check_either_type((handler), irq_handler_t, \ + int (*)(int, typeof(dev_id))), \ + (flags), (name), (dev_id)) +extern int __must_chec...
2020 Jul 23
4
[PATCH 1/2] vdpa: ifcvf: return err when fail to request config irq
...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 * 2; i++) { snprintf(vf->vring[i].msix_name, 256, &...
2020 Jul 23
4
[PATCH 1/2] vdpa: ifcvf: return err when fail to request config irq
...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 * 2; i++) { snprintf(vf->vring[i].msix_name, 256, &...
2020 Jul 13
0
[PATCH 6/7] ifcvf: replace irq_request/free with helpers in vDPA core.
...et = pci_alloc_irq_vectors(pdev, IFCVF_MAX_INTR, > @@ -73,6 +75,7 @@ static int ifcvf_request_irq(struct ifcvf_adapter *adapter) > pci_name(pdev)); > vector = 0; > irq = pci_irq_vector(pdev, vector); > + /* config interrupt */ Unnecessary changes. Thanks > ret = devm_request_irq(&pdev->dev, irq, > ifcvf_config_changed, 0, > vf->config_msix_name, vf); > @@ -82,13 +85,11 @@ static int ifcvf_request_irq(struct ifcvf_adapter *adapter) > pci_name(pdev), i); > vector = i + IFCVF_MSI_QUEUE_OFF; > irq = pci_irq_vect...
2020 Jul 17
0
[PATCH V2 5/6] ifcvf: replace irq_request/free with vDPA helpers
..._name(pdev)); > vector = 0; > irq = pci_irq_vector(pdev, vector); > + /* This isconfig interrupt, config accesses all go Missing a blank between is and config. Thanks > + * through userspace, so no need to setup > + * config interrupt offloading. > + */ > ret = devm_request_irq(&pdev->dev, irq, > ifcvf_config_changed, 0, > vf->config_msix_name, vf); > @@ -82,13 +88,11 @@ static int ifcvf_request_irq(struct ifcvf_adapter *adapter) > pci_name(pdev), i); > vector = i + IFCVF_MSI_QUEUE_OFF; > irq = pci_irq_vect...
2020 Jul 23
0
[PATCH V3 3/6] vDPA: implement vq IRQ allocate/free helpers in vDPA core
...22 ??6:08, Zhu Lingshan wrote: > +/* > + * Request irq for a vq, setup irq offloading if its a vhost_vdpa vq. > + * This function should be only called through setting virtio DRIVER_OK. > + * If you want to request irq during probe, you should use raw APIs > + * like request_irq() or devm_request_irq(). This makes the API less flexibile. The reason is we store the irq in vhost-vdpa not vDPA. I wonder whether the following looks better: 1) store irq in vdpa device 2) register producer when DRIVER_OK and unregister producer when !DRIVER_OK in vhost-vDPA 3) deal with the synchronization with...
2016 Aug 30
1
[PATCH v8 05/18] dmaengine: st_fdma: Add STMicroelectronics FDMA engine driver support
...v; > + fdev->drvdata = drvdata; > + platform_set_drvdata(pdev, fdev); > + > + fdev->irq = platform_get_irq(pdev, 0); > + if (fdev->irq < 0) { > + dev_err(&pdev->dev, "Failed to get irq resource\n"); > + return -EINVAL; > + } > + > + ret = devm_request_irq(&pdev->dev, fdev->irq, st_fdma_irq_handler, 0, > + dev_name(&pdev->dev), fdev); > + if (ret) { > + dev_err(&pdev->dev, "Failed to request irq (%d)\n", ret); > + goto err; > + } > + > + fdev->slim_rproc = st_slim_rproc_alloc(pdev,...
2016 Aug 30
1
[PATCH v8 05/18] dmaengine: st_fdma: Add STMicroelectronics FDMA engine driver support
...v; > + fdev->drvdata = drvdata; > + platform_set_drvdata(pdev, fdev); > + > + fdev->irq = platform_get_irq(pdev, 0); > + if (fdev->irq < 0) { > + dev_err(&pdev->dev, "Failed to get irq resource\n"); > + return -EINVAL; > + } > + > + ret = devm_request_irq(&pdev->dev, fdev->irq, st_fdma_irq_handler, 0, > + dev_name(&pdev->dev), fdev); > + if (ret) { > + dev_err(&pdev->dev, "Failed to request irq (%d)\n", ret); > + goto err; > + } > + > + fdev->slim_rproc = st_slim_rproc_alloc(pdev,...
2020 Jul 12
0
[vhost:config-endian 38/39] drivers/platform/mellanox/mlxbf-tmfifo.c:1237:2: error: invalid preprocessing directive #defined; did you mean
...ifo); 1210 1211 timer_setup(&fifo->timer, mlxbf_tmfifo_timer, 0); 1212 1213 for (i = 0; i < MLXBF_TM_MAX_IRQ; i++) { 1214 fifo->irq_info[i].index = i; 1215 fifo->irq_info[i].fifo = fifo; 1216 fifo->irq_info[i].irq = platform_get_irq(pdev, i); 1217 rc = devm_request_irq(dev, fifo->irq_info[i].irq, 1218 mlxbf_tmfifo_irq_handler, 0, 1219 "tmfifo", &fifo->irq_info[i]); 1220 if (rc) { 1221 dev_err(dev, "devm_request_irq failed\n"); 1222 fifo->irq_info[i].irq = 0; 1223 return rc; 1224 } 1...
2020 May 13
0
[PATCH V2] ifcvf: move IRQ request/free to status change handlers
...; + return ret; > + } > + > + for (i = 0; i < IFCVF_MAX_QUEUE_PAIRS * 2; i++) { > + snprintf(vf->vring[i].msix_name, 256, "ifcvf[%s]-%d\n", > + pci_name(pdev), i); > + vector = i + IFCVF_MSI_QUEUE_OFF; > + irq = pci_irq_vector(pdev, vector); > + ret = devm_request_irq(&pdev->dev, irq, > + ifcvf_intr_handler, 0, > + vf->vring[i].msix_name, > + &vf->vring[i]); > + if (ret) { > + IFCVF_ERR(pdev, > + "Failed to request irq for vq %d\n", i); > + ifcvf_free_irq(adapter, i); > +...
2020 May 11
0
[PATCH] ifcvf: move IRQ request/free to status change handlers
...; + return ret; > + } > + > + for (i = 0; i < IFCVF_MAX_QUEUE_PAIRS * 2; i++) { > + snprintf(vf->vring[i].msix_name, 256, "ifcvf[%s]-%d\n", > + pci_name(pdev), i); > + vector = i + IFCVF_MSI_QUEUE_OFF; > + irq = pci_irq_vector(pdev, vector); > + ret = devm_request_irq(&pdev->dev, irq, > + ifcvf_intr_handler, 0, > + vf->vring[i].msix_name, > + &vf->vring[i]); > + if (ret) { > + IFCVF_ERR(pdev, > + "Failed to request irq for vq %d\n", i); > + ifcvf_free_irq(adapter, i); I'...
2020 Jul 13
0
[vhost:config-endian 38/39] drivers/platform/mellanox/mlxbf-tmfifo.c:1241:22: error: expected ')' before ';' token
...ifo); 1210 1211 timer_setup(&fifo->timer, mlxbf_tmfifo_timer, 0); 1212 1213 for (i = 0; i < MLXBF_TM_MAX_IRQ; i++) { 1214 fifo->irq_info[i].index = i; 1215 fifo->irq_info[i].fifo = fifo; 1216 fifo->irq_info[i].irq = platform_get_irq(pdev, i); 1217 rc = devm_request_irq(dev, fifo->irq_info[i].irq, 1218 mlxbf_tmfifo_irq_handler, 0, 1219 "tmfifo", &fifo->irq_info[i]); 1220 if (rc) { 1221 dev_err(dev, "devm_request_irq failed\n"); 1222 fifo->irq_info[i].irq = 0; 1223 return rc; 1224 } 1...
2020 Apr 26
1
[PATCH 2/2] vdpa: implement config interrupt in IFCVF
...truct 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 = devm_request_irq(&pdev->dev, irq, > + ifcvf_config_changed, 0, > + vf->config_msix_name, vf); > > for (i = 0; i < IFCVF_MAX_QUEUE_PAIRS * 2; i++) { > snprintf(vf->vring[i].msix_name, 256, "ifcvf[%s]-%d\n",
2020 May 12
1
[PATCH] ifcvf: move IRQ request/free to status change handlers
...E_PAIRS * 2; i++) { >>> +??????? snprintf(vf->vring[i].msix_name, 256, "ifcvf[%s]-%d\n", >>> +???????????? pci_name(pdev), i); >>> +??????? vector = i + IFCVF_MSI_QUEUE_OFF; >>> +??????? irq = pci_irq_vector(pdev, vector); >>> +??????? ret = devm_request_irq(&pdev->dev, irq, >>> +?????????????????????? ifcvf_intr_handler, 0, >>> +?????????????????????? vf->vring[i].msix_name, >>> +?????????????????????? &vf->vring[i]); >>> +??????? if (ret) { >>> +??????????? IFCVF_ERR(pdev, >>> +??...
2023 Oct 10
1
[PATCH 2/2] virtio-mmio: Support multiple interrupts per device
...r (i = 0; i < nirqs; i++) { > + irq = platform_get_irq(vm_dev->pdev, i); > + if (irq < 0) > + goto fail_irq; > + if (irq < irq_base) > + irq_base = irq; > + > + err = devm_request_irq(&vdev->dev, irq, vm_interrupt, > + IRQF_SHARED, NULL, vm_dev); > + if (err) > + goto fail_irq; > + > + if (of_property_read_bool(vm_dev->pdev->dev.of_node, "wakeup-source"))...
2023 Oct 10
1
[PATCH 2/2] virtio-mmio: Support multiple interrupts per device
...r (i = 0; i < nirqs; i++) { > + irq = platform_get_irq(vm_dev->pdev, i); > + if (irq < 0) > + goto fail_irq; > + if (irq < irq_base) > + irq_base = irq; > + > + err = devm_request_irq(&vdev->dev, irq, vm_interrupt, > + IRQF_SHARED, NULL, vm_dev); > + if (err) > + goto fail_irq; > + > + if (of_property_read_bool(vm_dev->pdev->dev.of_node, "wakeup-source"))...
2020 May 12
0
[PATCH] ifcvf: move IRQ request/free to status change handlers
...E_PAIRS * 2; i++) { >>> +??????? snprintf(vf->vring[i].msix_name, 256, "ifcvf[%s]-%d\n", >>> +???????????? pci_name(pdev), i); >>> +??????? vector = i + IFCVF_MSI_QUEUE_OFF; >>> +??????? irq = pci_irq_vector(pdev, vector); >>> +??????? ret = devm_request_irq(&pdev->dev, irq, >>> +?????????????????????? ifcvf_intr_handler, 0, >>> +?????????????????????? vf->vring[i].msix_name, >>> +?????????????????????? &vf->vring[i]); >>> +??????? if (ret) { >>> +??????????? IFCVF_ERR(pdev, >>> +??...
2020 Aug 07
0
[PATCH 1/2] vdpa: ifcvf: return err when fail to request config irq
...it 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 * 2; i++) { &...
2020 Apr 26
0
[PATCH V3 2/2] vdpa: implement config interrupt in IFCVF
...or, 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, we can just use pci_irq_vecotr(pdev, 0); vector will be reassigned soon :) Thanks > + ret = devm_request_irq(&pdev->dev, irq, > + ifcvf_config_changed, 0, > + vf->config_msix_name, vf); > > for (i = 0; i < IFCVF_MAX_QUEUE_PAIRS * 2; i++) { > snprintf(vf->vring[i].msix_name, 256, "ifcvf[%s]-%d\n",