Skip to contentSkip to conversation

: [RFC] Error in ACPI error handling results in WARN_ON in IDE-sJ/[email protected]

PATCH New Prarit Bhargava 1 participant 1 message Feb 8, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : [RFC] Error in ACPI error handling results in WARN_ON in IDE-sJ/[email protected]

I found a bug in the error handling in ACPI.

The issue here is the error handling within the ACPI layer. gsi = 0 is a valid return value from acpi_pci_irq_lookup, while gsi = (-1) is the value returned when a PRT cannot be found.

This effects error handling within IRQ requests for IDE CD-ROM/DVD-ROM drives

Please apply this patch.

Thanks,

Prarit.

===== drivers/acpi/pci_irq.c 1.35 vs edited =====

drivers/acpi/pci_irq.c 2005-01-14 08:14:34 -05:00 renamed from drivers/acpi/pci_irq.c 2005-01-04 21:48:17 -05:00 +2 -2
@@ -487,10 +487,10 @@
        * If no PRT entry was found, we'll try to derive an IRQ from the
        * device's parent bridge.
        */
-       if (!gsi)
+       if (gsi == -1)
               gsi = acpi_pci_irq_derive(dev, pin,
                                         &edge_level, &active_high_low);
-       if (!gsi)
+       if (gsi == -1)
               return_VOID;
 
       /*

===== drivers/acpi/pci_irq.c 1.35 vs edited =====

drivers/acpi/pci_irq.c +2 -2
@@ -487,10 +487,10 @@
 	 * If no PRT entry was found, we'll try to derive an IRQ from the
 	 * device's parent bridge.
 	 */
-	if (!gsi)
+	if (gsi == -1)
  		gsi = acpi_pci_irq_derive(dev, pin,
 					  &edge_level, &active_high_low);
-	if (!gsi)
+	if (gsi == -1)
 		return_VOID;
 
 	/*