From mboxrd@z Thu Jan 1 00:00:00 1970 From: Prarit Bhargava Subject: [PATCH]: [RFC] Error in ACPI error handling results in WARN_ON in IDE-sJ/iWh9BUns@public.gmane.org Date: Tue, 08 Feb 2005 07:53:37 -0500 Message-ID: <4208B651.6040401@sgi.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------010609000500080304020707" Sender: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-acpi@vger.kernel.org This is a multi-part message in MIME format. --------------010609000500080304020707 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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. Signed-off-by: Prarit Bhargava ===== drivers/acpi/pci_irq.c 1.35 vs edited ===== --- 1.35/drivers/acpi/pci_irq.c 2005-01-04 21:48:17 -05:00 +++ edited/drivers/acpi/pci_irq.c 2005-01-14 08:14:34 -05:00 @@ -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; /* --------------010609000500080304020707 Content-Type: text/plain; name="1-acpi-ide.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="1-acpi-ide.patch" Signed-off-by: Prarit Bhargava ===== drivers/acpi/pci_irq.c 1.35 vs edited ===== --- 1.35/drivers/acpi/pci_irq.c 2005-01-04 21:48:17 -05:00 +++ edited/drivers/acpi/pci_irq.c 2005-01-14 08:14:34 -05:00 @@ -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; /* --------------010609000500080304020707-- ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click