arch/i386/kernel/pci-irq.c

Dennis Fleurbaaij (dennis@core-lan.nl)
Wed, 9 Jan 2002 22:18:32 +0100


Hello,

I'm sorry for my last posting, it seems that there are many ways to
incidently hit the send mail button.

I have stumbled upon an error in linux 2.4 that prevents my laptop from
using it's PCMCIA and PS2 mouse together. This is with every known 2.4
kernel and is a result of the BIOS not acknowleging the cardbus controller.
This problem was posted a couple of times to the lkm but has never been
fixed.

A simple solution is offered by suse in the form of a lilo trick. As can be
read in:
http://sdb.suse.de/en/sdb/html/pcmcia_install_kernel2.4.x.html. There is
also another problem description there.

In anycase I've been working to get rid of the bug without having to apply
tricks. The solution as it seems is very simple.

The problem is a follows:

If the kernel detects the controllers (there are 2 of them) it find that
thay both have an IRQ of 255 set by the bios. This is ofcourse rediculous.
It also finds ou that they have a irq map of f000 which is to use only irq
12, 13 and 14. The secont time that the IRQ handler is called is when the
yenta driver (i guess) orders the card to be found. This triggers a loop
that will search for a free IRQ. This loop is located inside
arch/i386/kernel/pci-irq.c line 574.

Now with that mapping, we are nearly guaranteed to cllide with either PS/2
or ide. And that is exactly what happens. This is avoided by allowing the
device to also look at the 'free' irq's 5, 8-11. this is done by adding the
bitmask of those irq's.

Just below the if statement on line 573 and above the loop place the code

mask |= 0x1e60;

that will allow linux to circumvent my braindead BIOS. In my computer it
also has the advantage of spreading the 2 controllers to 2 free IRQ's which
(in theory) should allow for more efficient communications. If the space
gets really cramped they both are put on the same irq, which is hwo it was
originally meant.

I hope that you will make this mainstream or give me pointers where to look
next in order to get rid of this bug.

-
I hope that I didn't waste any of your time.
Dennis Fleurbaaij
dennis@core-lan.nl

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