From patchwork Fri May 1 15:05:56 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Len Brown X-Patchwork-Id: 21492 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n41F6HBm020469 for ; Fri, 1 May 2009 15:06:18 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755444AbZEAPGQ (ORCPT ); Fri, 1 May 2009 11:06:16 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754771AbZEAPGP (ORCPT ); Fri, 1 May 2009 11:06:15 -0400 Received: from vms173007pub.verizon.net ([206.46.173.7]:35006 "EHLO vms173007pub.verizon.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755444AbZEAPGO (ORCPT ); Fri, 1 May 2009 11:06:14 -0400 Received: from localhost.localdomain ([96.237.168.40]) by vms173007.mailsrvcs.net (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPA id <0KIZ00AOD0LZCJ0G@vms173007.mailsrvcs.net> for linux-acpi@vger.kernel.org; Fri, 01 May 2009 10:06:05 -0500 (CDT) Received: from localhost.localdomain (d975xbx2 [127.0.0.1]) by localhost.localdomain (8.14.2/8.14.2) with ESMTP id n41F5wsp020746; Fri, 01 May 2009 11:05:59 -0400 Received: from localhost (lenb@localhost) by localhost.localdomain (8.14.2/8.14.2/Submit) with ESMTP id n41F5v0Q020741; Fri, 01 May 2009 11:05:57 -0400 X-Authentication-warning: localhost.localdomain: lenb owned process doing -bs Date: Fri, 01 May 2009 11:05:56 -0400 (EDT) From: Len Brown X-X-Sender: lenb@localhost.localdomain To: stable@kernel.org Cc: linux-acpi@vger.kernel.org, tmb@mandriva.org Subject: Subject: [PATCH 2.6.27.y..2.6.28.y] ACPI: Revert conflicting workaround for BIOS w/ mangled PRT entries Message-id: User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-version: 1.0 Content-type: TEXT/PLAIN; charset=US-ASCII Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Zhang Rui upstream 82babbb3887e234c995626e4121d411ea9070ca5 backported to apply cleanly to 2.6.27.21 and apply with offset -1 to 2.6.28.9 2f894ef9c8b36a35d80709bedca276d2fc691941 in Linux-2.6.21 worked around BIOS with mangled _PRT entries: http://bugzilla.kernel.org/show_bug.cgi?id=6859 d0e184abc5983281ef189db2c759d65d56eb1b80 worked around the same issue via ACPICA, and shipped in 2.6.27. Unfortunately the two workarounds conflict: http://bugzilla.kernel.org/show_bug.cgi?id=12270 So revert the Linux specific one. Signed-off-by: Zhang Rui Signed-off-by: Len Brown --- drivers/acpi/resources/rscreate.c | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-2.6.27.y/drivers/acpi/resources/rscreate.c =================================================================== --- linux-2.6.27.y.orig/drivers/acpi/resources/rscreate.c +++ linux-2.6.27.y/drivers/acpi/resources/rscreate.c @@ -191,8 +191,6 @@ acpi_rs_create_pci_routing_table(union a user_prt = ACPI_CAST_PTR(struct acpi_pci_routing_table, buffer); for (index = 0; index < number_of_elements; index++) { - int source_name_index = 2; - int source_index_index = 3; /* * Point user_prt past this current structure @@ -261,27 +259,6 @@ acpi_rs_create_pci_routing_table(union a return_ACPI_STATUS(AE_BAD_DATA); } - /* - * If BIOS erroneously reversed the _PRT source_name and source_index, - * then reverse them back. - */ - if (ACPI_GET_OBJECT_TYPE(sub_object_list[3]) != - ACPI_TYPE_INTEGER) { - if (acpi_gbl_enable_interpreter_slack) { - source_name_index = 3; - source_index_index = 2; - printk(KERN_WARNING - "ACPI: Handling Garbled _PRT entry\n"); - } else { - ACPI_ERROR((AE_INFO, - "(PRT[%X].source_index) Need Integer, found %s", - index, - acpi_ut_get_object_type_name - (sub_object_list[3]))); - return_ACPI_STATUS(AE_BAD_DATA); - } - } - user_prt->pin = (u32) obj_desc->integer.value; /* @@ -305,7 +282,7 @@ acpi_rs_create_pci_routing_table(union a * 3) Third subobject: Dereference the PRT.source_name * The name may be unresolved (slack mode), so allow a null object */ - obj_desc = sub_object_list[source_name_index]; + obj_desc = sub_object_list[2]; if (obj_desc) { switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { case ACPI_TYPE_LOCAL_REFERENCE: @@ -380,7 +357,7 @@ acpi_rs_create_pci_routing_table(union a /* 4) Fourth subobject: Dereference the PRT.source_index */ - obj_desc = sub_object_list[source_index_index]; + obj_desc = sub_object_list[3]; if (ACPI_GET_OBJECT_TYPE(obj_desc) != ACPI_TYPE_INTEGER) { ACPI_ERROR((AE_INFO, "(PRT[%X].SourceIndex) Need Integer, found %s",