From patchwork Fri Jun 10 13:52:36 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Renninger X-Patchwork-Id: 869762 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p5ADndil027491 for ; Fri, 10 Jun 2011 13:52:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757252Ab1FJNwj (ORCPT ); Fri, 10 Jun 2011 09:52:39 -0400 Received: from cantor.suse.de ([195.135.220.2]:56191 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757313Ab1FJNwj (ORCPT ); Fri, 10 Jun 2011 09:52:39 -0400 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id 107DB939FD; Fri, 10 Jun 2011 15:52:37 +0200 (CEST) From: Thomas Renninger Organization: SUSE Products GmbH To: stable@kernel.org Subject: [PATCH 2.6.32] ACPI: use _HID when supplied by root-level devices Date: Fri, 10 Jun 2011 15:52:36 +0200 User-Agent: KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; ) Cc: linux-acpi@vger.kernel.org, bjorn@helgaas.com References: <201106101549.36559.trenn@suse.de> In-Reply-To: <201106101549.36559.trenn@suse.de> MIME-Version: 1.0 Message-Id: <201106101552.37056.trenn@suse.de> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 10 Jun 2011 13:52:40 +0000 (UTC) From: Bjorn Helgaas Git-commit: b7b30de53aef6ce773d34837ba7d8422bd3baeec trenn: This one also solves the problem of not registered processor devices declared with _HID("ACPI0007") in _PR scope (which is handled at this place as if the device is declared under ROOT scope). Previously, we assumed the only Device object immediately below the root was the \_SB Scope (which the ACPI CA treats as a Device), so we forced the HID of all such objects to ACPI_BUS_HID ("LNXSYBUS"). However, there are DSDTs that supply root-level Device objects with _HIDs. This patch makes us pay attention to those _HIDs and only add the synthetic ACPI_BUS_HID for root-level objects that do not supply their own _HID. For example, this DSDT: https://bugzilla.kernel.org/show_bug.cgi?id=15605 contains: Scope (_SB) { ... } Device (AMW0) { Name (_HID, EisaId ("PNP0C14")) ... } and we should use "PNP0C14" for the AMW0 device, not "LNXSYBUS". Signed-off-by: Bjorn Helgaas Acked-by: Zhang Rui Tested-by: Yong Wang Signed-off-by: Len Brown Signed-off-by: Thomas Renninger Tested-by: Thomas Renninger --- drivers/acpi/scan.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 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.32-SLE11-SP1/drivers/acpi/scan.c =================================================================== --- linux-2.6.32-SLE11-SP1.orig/drivers/acpi/scan.c +++ linux-2.6.32-SLE11-SP1/drivers/acpi/scan.c @@ -1046,12 +1046,6 @@ static void acpi_device_set_id(struct ac if (ACPI_IS_ROOT_DEVICE(device)) { acpi_add_id(device, ACPI_SYSTEM_HID); break; - } else if (ACPI_IS_ROOT_DEVICE(device->parent)) { - /* \_SB_, the only root-level namespace device */ - acpi_add_id(device, ACPI_BUS_HID); - strcpy(device->pnp.device_name, ACPI_BUS_DEVICE_NAME); - strcpy(device->pnp.device_class, ACPI_BUS_CLASS); - break; } status = acpi_get_object_info(device->handle, &info); @@ -1089,6 +1083,12 @@ static void acpi_device_set_id(struct ac acpi_add_id(device, ACPI_BAY_HID); else if (ACPI_SUCCESS(acpi_dock_match(device))) acpi_add_id(device, ACPI_DOCK_HID); + else if (!acpi_device_hid(device) && + ACPI_IS_ROOT_DEVICE(device->parent)) { + acpi_add_id(device, ACPI_BUS_HID); /* \_SB, LNXSYBUS */ + strcpy(device->pnp.device_name, ACPI_BUS_DEVICE_NAME); + strcpy(device->pnp.device_class, ACPI_BUS_CLASS); + } break; case ACPI_BUS_TYPE_POWER: