2002-03-10 02:32:37

by Kai Engert

[permalink] [raw]
Subject: [patch] Missing module for ISDN / AVM PCMCIA card

Dear Kernel developers,

when using the stock 2.4.x kernel on RedHat 7.x, the
device
http://www.avm.de/en/products/hardware/FRITZ_Card/FRITZ_Card_PCMCIA/index.html
does not work, because of a missing module (avma1_cs). However, it works
with RedHat's kernel.

You can look at
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=50999
for a discussion, that led to the inclusion of the missing patch in the
RedHat kernel.

When I apply the patch posted at:
========================>
http://uwsg.iu.edu/hypermail/linux/kernel/0103.1/att-0957/01-avmdiff
<========================
into any 2.4.x kernel (including 2.4.18), the card immediately works on my
Dell Laptop.

Could you please consider including this patch in the standard kernel?

The patch was attached to a message available at:
http://uwsg.iu.edu/hypermail/linux/kernel/0103.1/0957.html

I think, this patch is based on a work described at:
http://www.wimmer-net.de/avm-pcmcia/
(looks outdated, patches there did not help me)

Cheers,
Kai

(Please note that Red Hat seems to have modified that patch a little, the
file included in their kernel 2.4.9-31 has 3 lines changed. Let me know if you
want me to send you their file, I can't judge whether their changes are
needed for 2.4.18. They also moved the file to drivers/isdn/hisax/avma1_cs.c,
while the above patch places it at drivers/isdn/pcmcia/avma1_cs.c.)

(I'm not subscribed to this list, please CC me on answers, thanks a lot!).


2002-03-10 08:55:55

by Jochen Friedrich

[permalink] [raw]
Subject: Re: [patch] Missing module for ISDN / AVM PCMCIA card

Hi Kai,

> The patch was attached to a message available at:
> http://uwsg.iu.edu/hypermail/linux/kernel/0103.1/0957.html
>
> I think, this patch is based on a work described at:
> http://www.wimmer-net.de/avm-pcmcia/
> (looks outdated, patches there did not help me)
>
> Cheers,
> Kai
>
> (Please note that Red Hat seems to have modified that patch a little, the
> file included in their kernel 2.4.9-31 has 3 lines changed.

This might be the bug fix Kai Germaschewski added to my patch:

http://www.uwsg.indiana.edu/hypermail/linux/kernel/0106.1/0805.html

For current 2.4.x kernels, you also need to add the line:

MODULE_LICENSE("GPL");

Cheers,
Jochen


2002-03-10 16:17:57

by Kai Engert

[permalink] [raw]
Subject: Re: [patch] Missing module for ISDN / AVM PCMCIA card

Hi Jochen,

> > (Please note that Red Hat seems to have modified that patch a little,
> the
> > file included in their kernel 2.4.9-31 has 3 lines changed.
>
> This might be the bug fix Kai Germaschewski added to my patch:

ok, let me clear the mystery.

Your patch:
http://uwsg.iu.edu/hypermail/linux/kernel/0103.1/att-0957/01-avmdiff

Kai Germaschewski changed:
-MODULE_PARM(isdnprot, "1-4");

+MODULE_PARM(isdnprot, "1-4i");


RedHat did not include Kai's fix, but changed:
---[snip]--------

--- /usr/src/linux/drivers/isdn/pcmcia/avma1_cs.c Sun Mar 10 01:50:58 2002
+++
/home/inst/up2date/t/usr/src/linux-2.4.9-31/drivers/isdn/hisax/avma1_cs.c Sun Mar 10 01:18:09 2002
@@ -7,10 +7,12 @@
======================================================================*/

#include <linux/module.h>
+
+
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/ptrace.h>
-#include <linux/malloc.h>
+#include <linux/slab.h>
#include <linux/string.h>
#include <linux/timer.h>
#include <asm/io.h>
@@ -349,16 +351,16 @@
link->conf.ConfigIndex = cf->index;
link->io.BasePort1 = cf->io.win[0].base;
link->io.NumPorts1 = cf->io.win[0].len;
- link->io.BasePort2 = 0;
link->io.NumPorts2 = 0;
printk(KERN_INFO "avma1_cs: testing i/o %#x-%#x\n",
link->io.BasePort1,
- link->io.BasePort1+link->io.NumPorts1);
+ link->io.BasePort1+link->io.NumPorts1 - 1);
i = CardServices(RequestIO, link->handle, &link->io);
if (i == CS_SUCCESS) goto found_port;
}
i = next_tuple(handle, &tuple, &parse);
}
+
found_port:
if (i != CS_SUCCESS) {
cs_error(link->handle, RequestIO, i);
@@ -487,7 +489,7 @@
case CS_EVENT_CARD_REMOVAL:
link->state &= ~DEV_PRESENT;
if (link->state & DEV_CONFIG) {
- link->release.expires = (jiffies+(HZ/20));
+ link->release.expires = jiffies + HZ/20;
add_timer(&link->release);
}
break;
@@ -539,3 +541,5 @@
avma1cs_detach(dev_list);
}
}
+
+MODULE_LICENSE("GPL");

---[snip]--------

Thanks,
Kai