lkml.org 
[lkml]   [2003]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] 2.4.23-pre3 ACPI fixes series (3/3)
Date
This patch is actually a patch by "Jun Nakajima" <jun.nakajima@intel.com>
When setting an IRQ link device, it checks if the value returned by _CRS is 0.
If so, it assumes everything went OK. This fixes problems on MANY VIA bioses.
It seems to be a standard-ish way of saying "the _CRS IRQ setting cannot be read".


--- linux-2.4.23-pre3.extirq/drivers/acpi/pci_link.c 2003-09-05 23:54:59.945755216 +0100
+++ linux-2.4.23-pre3.null_crs/drivers/acpi/pci_link.c 2003-09-05 23:57:39.782456344 +0100
@@ -277,6 +277,32 @@


static int
+acpi_pci_link_try_get_current (
+ struct acpi_pci_link *link,
+ int irq)
+{
+ int result;
+
+ ACPI_FUNCTION_TRACE("acpi_pci_link_try_get_current");
+
+ result = acpi_pci_link_get_current(link);
+ if (result && link->irq.active)
+ {
+ return_VALUE(result);
+ }
+
+ if (!link->irq.active)
+ {
+ ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "No active IRQ resource found\n"));
+ printk(KERN_WARNING "_CRS returns NULL! Using IRQ %d for device (%s [%s]).\n", irq, acpi_device_name(link->device), acpi_device_bid(link->device));
+ link->irq.active = irq;
+ }
+
+ return 0;
+}
+
+
+static int
acpi_pci_link_set (
struct acpi_pci_link *link,
int irq)
@@ -382,7 +408,7 @@
}

/* Make sure the active IRQ is the one we requested. */
- result = acpi_pci_link_get_current(link);
+ result = acpi_pci_link_try_get_current(link, irq);
if (result) {
return_VALUE(result);
}
@@ -600,10 +626,6 @@
else
printk(" %d", link->irq.possible[i]);
}
- if (!link->irq.active)
- printk(", disabled");
- else if (!found)
- printk(", enabled at IRQ %d", link->irq.active);
printk(")\n");

/* TBD: Acquire/release lock */
-
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/

\
 
 \ /
  Last update: 2005-03-22 13:48    [W:0.143 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site