Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 609504 Details for
Bug 705860
net-misc/dahdi-3.1.0: lacks support of zaphfc driver
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
93-fixes-for-non-digium-hardware-and-oslec.patch
93-fixes-for-non-digium-hardware-and-oslec.patch (text/plain), 6.71 KB, created by
Florian Evers
on 2020-01-30 22:38:06 UTC
(
hide
)
Description:
93-fixes-for-non-digium-hardware-and-oslec.patch
Filename:
MIME Type:
Creator:
Florian Evers
Created:
2020-01-30 22:38:06 UTC
Size:
6.71 KB
patch
obsolete
>diff -uNr dahdi-linux-3.1.0-99appl/drivers/dahdi/ap400/ap400_drv.c dahdi-linux-3.1.0-mypatch/drivers/dahdi/ap400/ap400_drv.c >--- dahdi-linux-3.1.0-99appl/drivers/dahdi/ap400/ap400_drv.c 2020-01-30 21:59:57.373100388 +0100 >+++ dahdi-linux-3.1.0-mypatch/drivers/dahdi/ap400/ap400_drv.c 2020-01-30 22:22:41.137990258 +0100 >@@ -87,6 +87,15 @@ > #ifndef IRQF_SHARED > #define IRQF_SHARED SA_SHIRQ > #endif >+ >+#ifndef IRQF_DISABLED >+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0) >+#define IRQF_DISABLED SA_INTERRUPT >+#else >+/* Support for disabling interrupts was completely removed from Linux Kernel 5.4.0 */ >+#define IRQF_DISABLED 0x0 >+#endif >+#endif > #ifndef __iomem > #define __iomem > #endif >@@ -1707,7 +1716,7 @@ > } > > >-DAHDI_IRQ_HANDLER(ap4_interrupt) >+static irqreturn_t ap4_interrupt(int irq, void *dev_id) > { > struct ap4 *wc = dev_id; > unsigned long flags; >@@ -2137,7 +2146,7 @@ > wc->tspans[x]->spanflags |= wc->dt->flags; > } > >- if (request_irq(pdev->irq, ap4_interrupt, IRQF_SHARED, "ap400", wc)) >+ if (request_irq(pdev->irq, ap4_interrupt, IRQF_DISABLED | IRQF_SHARED, "ap400", wc)) > { > printk("%s: Unable to request IRQ %d\n", wc->variety, pdev->irq); > res = -EIO; >@@ -2299,7 +2308,7 @@ > { > int res; > printk("Unified AP4XX PCI Card Driver\n"); >- res = dahdi_pci_module(&ap4_driver); >+ res = pci_register_driver(&ap4_driver); > if (res) { > return -ENODEV; > } >diff -uNr dahdi-linux-3.1.0-99appl/drivers/dahdi/opvxa1200/base.c dahdi-linux-3.1.0-mypatch/drivers/dahdi/opvxa1200/base.c >--- dahdi-linux-3.1.0-99appl/drivers/dahdi/opvxa1200/base.c 2020-01-30 22:02:04.864404817 +0100 >+++ dahdi-linux-3.1.0-mypatch/drivers/dahdi/opvxa1200/base.c 2020-01-29 23:29:33.067056884 +0100 >@@ -1347,7 +1347,7 @@ > wc->mod[card].fxs.lastrxhook = hook; > } > >-DAHDI_IRQ_HANDLER(wctdm_interrupt) >+static irqreturn_t wctdm_interrupt(int irq, void *dev_id) > { > struct wctdm *wc = dev_id; > unsigned char ints; >@@ -2787,7 +2787,7 @@ > pci_set_drvdata(pdev, wc); > > >- if (request_irq(pdev->irq, wctdm_interrupt, DAHDI_IRQ_SHARED, "opvxa1200", wc)) { >+ if (request_irq(pdev->irq, wctdm_interrupt, IRQF_SHARED, "opvxa1200", wc)) { > printk(KERN_NOTICE "opvxa1200: Unable to request IRQ %d\n", pdev->irq); > if (wc->freeregion & 0x01) > release_region(wc->ioaddr, 0xff); >@@ -3021,7 +3021,7 @@ > battthresh = fxo_modes[_opermode].battthresh; > } > >- res = dahdi_pci_module(&wctdm_driver); >+ res = pci_register_driver(&wctdm_driver); > if (res) > return -ENODEV; > return 0; >diff -uNr dahdi-linux-3.1.0-99appl/drivers/dahdi/opvxd115/base.c dahdi-linux-3.1.0-mypatch/drivers/dahdi/opvxd115/base.c >--- dahdi-linux-3.1.0-99appl/drivers/dahdi/opvxd115/base.c 2020-01-30 21:59:57.374100374 +0100 >+++ dahdi-linux-3.1.0-mypatch/drivers/dahdi/opvxd115/base.c 2020-01-29 23:30:14.166512731 +0100 >@@ -3574,7 +3574,7 @@ > } > > #ifdef SUPPORT_GEN1 >-DAHDI_IRQ_HANDLER(t4_interrupt) >+static irqreturn_t t4_interrupt(int irq, void *dev_id) > { > struct t4 *wc = dev_id; > unsigned long flags; >@@ -3778,7 +3778,7 @@ > #endif > } > >-DAHDI_IRQ_HANDLER(t4_interrupt_gen2) >+static irqreturn_t t4_interrupt_gen2(int irq, void *dev_id) > { > struct t4 *wc = dev_id; > unsigned int status; >@@ -4693,7 +4693,7 @@ > t4_hardware_init_2(wc); > > #ifdef SUPPORT_GEN1 >- if (request_irq(pdev->irq, (wc->flags & FLAG_2NDGEN) ? t4_interrupt_gen2 :t4_interrupt, DAHDI_IRQ_SHARED_DISABLED, "opvxd115", wc)) >+ if (request_irq(pdev->irq, (wc->flags & FLAG_2NDGEN) ? t4_interrupt_gen2 :t4_interrupt, IRQF_SHARED, "opvxd115", wc)) > #else > if (!(wc->tspans[0]->spanflags & FLAG_2NDGEN)) { > dev_notice(&wc->dev->dev, "This driver does not " >@@ -4701,7 +4701,7 @@ > free_wc(wc); > return -ENODEV; > } >- if (request_irq(pdev->irq, t4_interrupt_gen2, DAHDI_IRQ_SHARED_DISABLED, "opvxd115", wc)) >+ if (request_irq(pdev->irq, t4_interrupt_gen2, IRQF_SHARED, "opvxd115", wc)) > #endif > { > dev_notice(&wc->dev->dev, "opvxd115: Unable to request IRQ %d\n", >@@ -4848,7 +4848,7 @@ > static int __init t4_init(void) > { > int res; >- res = dahdi_pci_module(&t4_driver); >+ res = pci_register_driver(&t4_driver); > if (res) > return -ENODEV; > /* initialize cards since we have all of them */ >diff -uNr dahdi-linux-3.1.0-99appl/drivers/dahdi/opvxd115/vpm450m.c dahdi-linux-3.1.0-mypatch/drivers/dahdi/opvxd115/vpm450m.c >--- dahdi-linux-3.1.0-99appl/drivers/dahdi/opvxd115/vpm450m.c 2020-01-30 21:51:04.936177750 +0100 >+++ dahdi-linux-3.1.0-mypatch/drivers/dahdi/opvxd115/vpm450m.c 2020-01-30 22:31:39.927865858 +0100 >@@ -37,13 +37,24 @@ > UINT32 Oct6100UserGetTime(tPOCT6100_GET_TIME f_pTime) > { > /* Why couldn't they just take a timeval like everyone else? */ >- struct timeval tv; >- unsigned long long total_usecs; >+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0) >+ struct timeval tv; >+#else >+ struct timespec64 tv; >+#endif >+ unsigned long long total_usecs; > unsigned int mask = ~0; >- >+ >+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0) > do_gettimeofday(&tv); > total_usecs = (((unsigned long long)(tv.tv_sec)) * 1000000) + > (((unsigned long long)(tv.tv_usec))); >+#else >+ ktime_get_real_ts64(&tv); >+ total_usecs = (((unsigned long long)(tv.tv_sec)) * 1000000) + >+ (((unsigned long long)(tv.tv_nsec)) / 1000); >+#endif >+ > f_pTime->aulWallTimeUs[0] = (total_usecs & mask); > f_pTime->aulWallTimeUs[1] = (total_usecs >> 32); > return cOCT6100_ERR_OK; >diff -uNr dahdi-linux-3.1.0-99appl/drivers/dahdi/wcopenpci.c dahdi-linux-3.1.0-mypatch/drivers/dahdi/wcopenpci.c >--- dahdi-linux-3.1.0-99appl/drivers/dahdi/wcopenpci.c 2020-01-30 21:51:04.937177737 +0100 >+++ dahdi-linux-3.1.0-mypatch/drivers/dahdi/wcopenpci.c 2020-01-29 23:30:33.637254930 +0100 >@@ -828,7 +828,7 @@ > dahdi_receive(&wc->span); > } > >-DAHDI_IRQ_HANDLER(openpci_isr) >+static irqreturn_t openpci_isr(int irq, void *dev_id) > { > struct openpci *wc = dev_id; > unsigned long flags; >@@ -1672,7 +1672,7 @@ > /* Enable bus mastering */ > pci_set_master(pdev); > >- if (request_irq(pdev->irq, openpci_isr, DAHDI_IRQ_SHARED, NAME, wc)) { >+ if (request_irq(pdev->irq, openpci_isr, IRQF_SHARED, NAME, wc)) { > cardcrit(boardnum, "Cant get IRQ!"); > failret = -EIO; > goto hell_5; >@@ -1762,7 +1762,7 @@ > return -ENODEV; > #endif > >- if (dahdi_pci_module(&openpci_driver)) >+ if (pci_register_driver(&openpci_driver)) > return -ENODEV; > > info("Module loaded %s", debug ? "with debug enabled" : ""); >diff -uNr dahdi-linux-3.1.0-99appl/drivers/dahdi/zaphfc/base.c dahdi-linux-3.1.0-mypatch/drivers/dahdi/zaphfc/base.c >--- dahdi-linux-3.1.0-99appl/drivers/dahdi/zaphfc/base.c 2020-01-30 21:51:04.939177710 +0100 >+++ dahdi-linux-3.1.0-mypatch/drivers/dahdi/zaphfc/base.c 2020-01-29 23:08:29.615768276 +0100 >@@ -1664,6 +1664,6 @@ > hfc_proc_zaphfc_dir = proc_mkdir(hfc_DRIVER_NAME, proc_root_driver); > #endif > >- ret = dahdi_pci_module(&hfc_driver); >+ ret = pci_register_driver(&hfc_driver); > return ret; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 705860
:
608576
|
609498
|
609500
|
609502
| 609504