RE: [PATCH] 2.4.23-pre3 ACPI fixes series (3/3)

From: Brown, Len
Date: Fri Sep 05 2003 - 20:28:42 EST


This also was pulled into the acpi patch earlier this week -- sorry I
didn't mention it to you earlier -- e-mail list latency has been
horrible lately.

Thanks,
-Len

> -----Original Message-----
> From: Andrew de Quincey [mailto:adq_dvb@xxxxxxxxxxxxx]
> Sent: Friday, September 05, 2003 8:16 PM
> To: Jeff Garzik
> Cc: torvalds@xxxxxxxx; lkml;
> acpi-devel@xxxxxxxxxxxxxxxxxxxxx; linux-acpi
> Subject: [PATCH] 2.4.23-pre3 ACPI fixes series (3/3)
>
>
> This patch is actually a patch by "Jun Nakajima"
> <jun.nakajima@xxxxxxxxx>
> 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@xxxxxxxxxxxxxxx
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
-
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/