From patchwork Wed Apr 8 01:44:29 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhang Rui X-Patchwork-Id: 16983 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 n381iWDN025669 for ; Wed, 8 Apr 2009 01:44:32 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753685AbZDHBo3 (ORCPT ); Tue, 7 Apr 2009 21:44:29 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752872AbZDHBo3 (ORCPT ); Tue, 7 Apr 2009 21:44:29 -0400 Received: from mga01.intel.com ([192.55.52.88]:33844 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751216AbZDHBo3 (ORCPT ); Tue, 7 Apr 2009 21:44:29 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 07 Apr 2009 18:35:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.39,340,1235980800"; d="scan'208";a="679693671" Received: from rzhang-dt.sh.intel.com (HELO [10.239.36.94]) ([10.239.36.94]) by fmsmga001.fm.intel.com with ESMTP; 07 Apr 2009 18:47:52 -0700 Subject: [PATCH] ACPI: revert 2f894ef9 From: Zhang Rui To: Len Brown Cc: linux-acpi , "Zhang, Rui" , "Li, Shaohua" Date: Wed, 08 Apr 2009 09:44:29 +0800 Message-Id: <1239155069.7661.108.camel@rzhang-dt> Mime-Version: 1.0 X-Mailer: Evolution 2.22.1 (2.22.1-2.fc9) Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org commit 2f894ef9 and commit d0e184ab are fixes for the same issue. revert 2f894ef9 to be consistent with ACPICA. http://bugzilla.kernel.org/show_bug.cgi?id=12270 CC: Li Shaohua Signed-off-by: Zhang Rui --- drivers/acpi/acpica/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/drivers/acpi/acpica/rscreate.c =================================================================== --- linux-2.6.orig/drivers/acpi/acpica/rscreate.c +++ linux-2.6/drivers/acpi/acpica/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: @@ -379,7 +356,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",