[PATCH 2.4] asus vt8235 router buggy bios workaround

From: Aleksey Gorelov
Date: Mon Sep 26 2005 - 21:48:55 EST


Hi Marcelo,

Here is backport to 2.4 for fix to
http://bugzilla.kernel.org/show_bug.cgi?id=5235.

Similar problem has been reported before here:
http://groups.google.com/group/linux.kernel/browse_thread/thread/def4ca1
9dbc3cd4/5cffbf349f2c87a4?tvc=2&q=Aleksey+Gorelov&hl=en#5cffbf349f2c87a4
and was related to bug in BIOS reporting 82C686 router compatible to
586.

I suspect BIOS on this board has similar issue: reports VT8235 router to
be
compatible with 586 one - which is obviously not true. Patch from the
link
above has already incorporated in both 2.6 & 2.4 series, but might not
work
in this particular case.

Signed-off-by: Aleksey Gorelov <aleksey_gorelov@xxxxxxxxxxx>

--- linux-2.4.32-rc1/arch/i386/kernel/pci-irq.c.orig 2005-09-26
19:32:48.000000000 -0700
+++ linux-2.4.32-rc1/arch/i386/kernel/pci-irq.c 2005-09-26
19:34:42.000000000 -0700
@@ -665,10 +665,27 @@
{
/* FIXME: We should move some of the quirk fixup stuff here */

- if (router->device == PCI_DEVICE_ID_VIA_82C686 &&
- device == PCI_DEVICE_ID_VIA_82C586_0) {
- /* Asus k7m bios wrongly reports 82C686A as
586-compatible */
- device = PCI_DEVICE_ID_VIA_82C686;
+ /*
+ * work arounds for some buggy BIOSes
+ */
+ if (device == PCI_DEVICE_ID_VIA_82C586_0) {
+ switch(router->device)
+ {
+ case PCI_DEVICE_ID_VIA_82C686:
+ /*
+ * Asus k7m bios wrongly reports 82C686A

+ * as 586-compatible
+ */
+ device = PCI_DEVICE_ID_VIA_82C686;
+ break;
+ case PCI_DEVICE_ID_VIA_8235:
+ /**
+ * Asus a7v-x bios wrongly reports 8235
+ * as 586-compatible
+ */
+ device = PCI_DEVICE_ID_VIA_8235;
+ break;
+ }
}

switch(device)
@@ -681,6 +698,7 @@
case PCI_DEVICE_ID_VIA_82C596:
case PCI_DEVICE_ID_VIA_82C686:
case PCI_DEVICE_ID_VIA_8231:
+ case PCI_DEVICE_ID_VIA_8235:
/* FIXME: add new ones for 8233/5 */
r->name = "VIA";
r->get = pirq_via_get;
-
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/