[2.4 patch] HiSax I-Talk/I-Surf doesn't configure card properlyusing kernel isapnp

From: Hilko Bengen
Date: Mon Feb 16 2004 - 19:21:46 EST


This patch is still needed as of 2.4.25-rc3. Please apply.

-Hilko

Subject: [patch] 2.4 HiSax I-Talk/I-Surf doesn't work together with kernel
isapnp
From: Hilko Bengen <bengen@xxxxxxxxxxxxxxxx>
To: marcelo.tosatti@xxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx, keil@xxxxxxxxxxxxx,
kai.germaschewski@xxxxxx, isdn4linux@xxxxxxxxxxxxxxxxxxxxxx,
perex@xxxxxxx
Date: Thu, 05 Feb 2004 23:16:39 +0100
Message-ID: <87isiluq7s.fsf@xxxxxxxxxxxxxxxx>

In 2.4, the HiSax I-Talk/I-Surf driver can only be initialized
successfully if the card has been activated using the isapnp userspace
tools. Automatic configuration using the isa-pnp module in the kernel
fails with messages such as:

Feb 4 00:28:19 paranoia kernel: ISurfPnP:some resources are missing 5/100/0
Feb 4 00:28:19 paranoia kernel: HiSax: Card Siemens I-Surf not installed !

There are two reasons for this failure:
(1) The isapnp code correctly builds the data structures, but the code
in isurf.c looks in the wrong place for the mem parameter.
(2) The IO memory upper limit address is not set by isapnp code. I'm
unsure whether this is a bug in isapnp.c or a hardware bug. I
assumed the latter and did the fix in the I-Surf initialization
routine.

The attached patch fixes the two issues. Please apply it to the 2.4
tree. I have successfully tested it on the two of my systems that have
an I-Surf.

Greetings,
-Hilko

diff -uir orig/linux-2.4.24/drivers/isdn/hisax/isurf.c linux-2.4.24/drivers/isdn/hisax/isurf.c
--- orig/linux-2.4.24/drivers/isdn/hisax/isurf.c 2002-11-29 00:53:13.000000000 +0100
+++ linux-2.4.24/drivers/isdn/hisax/isurf.c 2004-02-05 15:44:20.000000000 +0100
@@ -235,8 +235,18 @@
pd->prepare(pd);
pd->deactivate(pd);
pd->activate(pd);
+ /* The ISA-PnP logic apparently
+ * expects upper limit address to be
+ * set. Since the isa-pnp module
+ * doesn't do this, so we have to make
+ * up for it.
+ */
+ isapnp_cfg_begin(pd->bus->number, pd->devfn);
+ isapnp_write_word(ISAPNP_CFG_MEM+3,
+ pd->resource[8].end >> 8);
+ isapnp_cfg_end();
cs->hw.isurf.reset = pd->resource[0].start;
- cs->hw.isurf.phymem = pd->resource[1].start;
+ cs->hw.isurf.phymem = pd->resource[8].start;
cs->irq = pd->irq_resource[0].start;
if (!cs->irq || !cs->hw.isurf.reset || !cs->hw.isurf.phymem) {
printk(KERN_ERR "ISurfPnP:some resources are missing %d/%x/%lx\n",

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/