| Summary: | net-misc/dahdi-3.1.0: lacks support of zaphfc driver | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Florian Evers <florian-evers> |
| Component: | Current packages | Assignee: | Jaco Kroon <jaco> |
| Status: | RESOLVED FIXED | ||
| Severity: | major | CC: | florian-evers, proxy-maint |
| Priority: | Normal | Keywords: | PullRequest |
| Version: | unspecified | ||
| Hardware: | AMD64 | ||
| OS: | Linux | ||
| See Also: | https://github.com/gentoo/gentoo/pull/14944 | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: |
Patch file combining three Gentoo patches ported from dahdi-2.11.1-r1
90-non-digium-hardware-and-oslec.patch 91-irqf-disabled.patch 92-opvxa1200-nmi.patch 93-fixes-for-non-digium-hardware-and-oslec.patch |
||
|
Description
Florian Evers
2020-01-19 16:55:11 UTC
You are correct it was not. As per the commit message for the bump:
Unfortunately drops support for some cards previously maintained by
tzafrir (https://notabug.org/tzafrir/dahdi-linux-extra). Unfortunately
by his own admission these are really old, and looks like he dropped
support for most of those cards as well.
If required, please file a bug against me and I'll see what can be done.
How is your skill set w.r.t. porting code?
Hi Jaco, thanks for the hint. Sad to see that support for these devices seems to vanish. I use such an ISDN card in NT mode for my home to connect two ISDN phones to my asterisk server, and then to use SIP to connect to the network. My skill set... I'm proficient in C++ but have only limited experience with Linux kernel programming in C. Likely I'm going to fiddle with the patch set, remove all stuff that I do not need, and try to get it compiling. I'm still hoping that the architectural changes are not big enough to render this approach useless. However, please tell me if I can assist somehow. I would provide any help possible. Regards, Florian I would really appreciate if you can migrate the full patch set. I did look at it briefly, and it didn't look like it should be particularly hard, just more time consuming than I had time for at that point in time (things needs to be wrapped appropriately with #if blocks to handle kernel version differences). So kernel dev is not unlike other dev ... it's just ... well, intimidating because it's the "kernel". Libraries are just different, but there is no change in language at all. So I reckon: Step 1: Get the patch. Step 2: Make a copy of the workdir. Step 3: Apply it to a workdir (ie, after ebuild ... prepare) Step 4: Try to make it compile (ebuild ... compile). Step 5: Fix errors, repeat step 4 Step 6: Once it passes, rediff. Step 7: Post resulting diff here :). I'll run a diff from the original patch to the resulting patch to double-check you (obviously), and then we take it from there? Thanks for your advice. I'll give it a try, with all drivers. I'm going to post my results here :-) Got it. It compiles, but it's to late to test it today. I ported all drivers :-) One timespec issue, some macros that I removed according to similar patterns in other drivers, and some interrupt disable issues. No big deal in total. Currently, my patch combines these three previous patches, that only make sense together: - 97-non-digium-hardware-and-oslec.diff - 98-irqf-disabled.diff - 99-opvxa1200-nmi.diff Please have a look at "the diff of the diffs", if you know how to prepare one easily... I'm going to upload the patch file now, and am going to conduct a first test tomorrow. Regards, Florian Created attachment 608576 [details, diff]
Patch file combining three Gentoo patches ported from dahdi-2.11.1-r1
I messed the KERNEL_VERSION version numbers up. I'm going to fix that tomorrow. Created attachment 609498 [details, diff]
90-non-digium-hardware-and-oslec.patch
Created attachment 609500 [details, diff]
91-irqf-disabled.patch
Created attachment 609502 [details, diff]
92-opvxa1200-nmi.patch
Created attachment 609504 [details, diff]
93-fixes-for-non-digium-hardware-and-oslec.patch
Ok, done, and made the patches much prettier. It works on my live system here with gentoo-sources-5.4.16.
If I copy those four files to /etc/portage/patches/net-misc/dahdi-3.1.0 then it compiles and works fine:
90-non-digium-hardware-and-oslec.patch
91-irqf-disabled.patch
92-opvxa1200-nmi.patch
93-fixes-for-non-digium-hardware-and-oslec.patch
I assume that these patches can be added to the Gentoo patch set directly
1.) 90-non-digium-hardware-and-oslec.patch
This is the (just) renamed file 97-non-digium-hardware-and-oslec.diff from gentoo-dahdi-patchset-1.2.4.tar.bz2 of dahdi-2.11.1-r1. No modifications.
2.) 91-irqf-disabled.patch
This is file 98-irqf-disabled.diff from gentoo-dahdi-patchset-1.2.4.tar.bz2 with small modifications.
3.) 92-opvxa1200-nmi.patch
Was 99-opvxa1200-nmi.diff in gentoo-dahdi-patchset-1.2.4.tar.bz2, no modifications.
4.) 93-fixes-for-non-digium-hardware-and-oslec.patch
My stuff fixing all the remaining issues.
Furthermore, file 03-jnet-1.0.14-dahdi-3.1.0.diff requires a fix in line 96, a "!" character is missing:
<OLD>
- if (request_irq(gsmtmp->irq, ztgsm_interrupt, DAHDI_IRQ_SHARED, "ztgsm", gsmtmp)) {
+ if (request_irq(gsmtmp->irq, ztgsm_interrupt, IRQF_SHARED, "ztgsm", gsmtmp)) {
</OLD>
<NEW>
- if (request_irq(gsmtmp->irq, ztgsm_interrupt, DAHDI_IRQ_SHARED, "ztgsm", gsmtmp)) {
+ if (!request_irq(gsmtmp->irq, ztgsm_interrupt, IRQF_SHARED, "ztgsm", gsmtmp)) {
</NEW>
Just add my four files to the gentoo patchset, after your review, and create an ebuild for -r1 :-)
Learned a lot doing this, especially that "ebuild ... unpack" does not apply patches. "ebuild ... configure" is required.
Regards, and thanks,
Florian
The provided patches work fine gentoo-sources-5.5.6. Do you need any subsequent help from my side? Regards, Florian The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8ad433d565136589746b85d094482e0fe6d78707 commit 8ad433d565136589746b85d094482e0fe6d78707 Author: Jaco Kroon <jaco@uls.co.za> AuthorDate: 2020-03-13 14:13:02 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2020-03-15 17:51:48 +0000 net-misc/dahdi: rev-bump to re-introduce non-digium modules. Closes: https://bugs.gentoo.org/705860 Package-Manager: Portage-2.3.89, Repoman-2.3.20 Signed-off-by: Jaco Kroon <jaco@uls.co.za> Closes: https://github.com/gentoo/gentoo/pull/14944 Signed-off-by: Joonas Niilola <juippis@gentoo.org> net-misc/dahdi/Manifest | 1 + net-misc/dahdi/dahdi-3.1.0-r1.ebuild | 104 +++++++++++++++++++++++++++++++++++ 2 files changed, 105 insertions(+) |