From patchwork Sun Jul 8 19:04:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Nieder X-Patchwork-Id: 1170041 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id C3A9A40239 for ; Sun, 8 Jul 2012 19:08:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751999Ab2GHTEl (ORCPT ); Sun, 8 Jul 2012 15:04:41 -0400 Received: from mail-gh0-f174.google.com ([209.85.160.174]:39498 "EHLO mail-gh0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751916Ab2GHTEk (ORCPT ); Sun, 8 Jul 2012 15:04:40 -0400 Received: by ghrr11 with SMTP id r11so9574842ghr.19 for ; Sun, 08 Jul 2012 12:04:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=Q3kfkB6i06SyDzk33/EwDwvJb6xFJSSN4tKC0e1zZAw=; b=lZbQ9HYeNsU04F9t1xQnMl7lLkbO42FydlP1Yh8nR9U+NnxBAFeCDK3fcmjX+bznAC 6G1+e/C6OfyB7yRIMqv69QLivcB4DtkjmExzbElD6Ir94r3ZJUD7R1dekFSNjk0+mmLb Ix+sNa6VQ58AtSgW0UaAHf2SJW25AIk3enywwpMVC/QcuPZVqnjJGGMadaNvGQJHWhkA Kzxl513Rt+50VkPPSyYE1vPrXmm4nCyUs95T4n2vY+4PLS5sv0qRTsJwmPJ4SIgGvh9C DVGu47ZwfYTMXpz+q8CoTfL6MTh8ipgviIEBTFRHUatKAnIotGIFB/HN8P7tqDSwikIQ P7tA== Received: by 10.50.171.40 with SMTP id ar8mr6868198igc.14.1341774279761; Sun, 08 Jul 2012 12:04:39 -0700 (PDT) Received: from burratino (cl-1372.chi-02.us.sixxs.net. [2001:4978:f:55b::2]) by mx.google.com with ESMTPS id bp8sm16268009igb.12.2012.07.08.12.04.38 (version=SSLv3 cipher=OTHER); Sun, 08 Jul 2012 12:04:38 -0700 (PDT) Date: Sun, 8 Jul 2012 14:04:35 -0500 From: Jonathan Nieder To: Octavio Alvarez Cc: Bob Moore , Adrian Knoth , Shaohua Li , Len Brown , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ACPI: Leave Bus Master Arbitration enabled for suspend/resume Message-ID: <20120708190434.GD7328@burratino> References: <20120708025730.GE2961@burratino> <20120708090432.GF4625@burratino> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org This is an old suspend/resume lockup fix: commit 2780cc4660e1 Author: Len Brown Date: Thu Dec 23 13:43:30 2004 -0500 [ACPI] Fix suspend/resume lockup issue by leaving Bus Master Arbitration enabled. The ACPI spec mandates it be disabled only for C3. http://bugzilla.kernel.org/show_bug.cgi?id=3599 Signed-off-by: David Shaohua Li Signed-off-by: Len Brown The bug snuck back in in commit 33620c5419e8 (ACPICA: Support for custom ACPICA build for ACPI 5 reduced hardware, 2012-02-14), presumably by copy/pasting from the wrong source for the legacy case. On affected machines, after that commit, the machine locks up hard on resume from suspend. The same fix as seven years ago fixes it. Addresses . Reported-bisected-and-tested-by: Octavio Alvarez Reported-by: Adrian Knoth Signed-off-by: Jonathan Nieder Cc: # 3.4 Reported-by: Adrian Knoth Signed-off-by: Jonathan Nieder --- Octavio Alvarez wrote: > Given the complexity of the ACPI_DEBUG logging (particularly the > console part), I decided to give your patch a shot directly. > > Result: the system no longer locks up. Thanks! Here's a properly formatted patch. drivers/acpi/acpica/hwsleep.c | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/drivers/acpi/acpica/hwsleep.c b/drivers/acpi/acpica/hwsleep.c index 0ed85cac3231..615996a36bed 100644 --- a/drivers/acpi/acpica/hwsleep.c +++ b/drivers/acpi/acpica/hwsleep.c @@ -95,18 +95,6 @@ acpi_status acpi_hw_legacy_sleep(u8 sleep_state, u8 flags) return_ACPI_STATUS(status); } - if (sleep_state != ACPI_STATE_S5) { - /* - * Disable BM arbitration. This feature is contained within an - * optional register (PM2 Control), so ignore a BAD_ADDRESS - * exception. - */ - status = acpi_write_bit_register(ACPI_BITREG_ARB_DISABLE, 1); - if (ACPI_FAILURE(status) && (status != AE_BAD_ADDRESS)) { - return_ACPI_STATUS(status); - } - } - /* * 1) Disable/Clear all GPEs * 2) Enable all wakeup GPEs @@ -364,16 +352,6 @@ acpi_status acpi_hw_legacy_wake(u8 sleep_state, u8 flags) [ACPI_EVENT_POWER_BUTTON]. status_register_id, ACPI_CLEAR_STATUS); - /* - * Enable BM arbitration. This feature is contained within an - * optional register (PM2 Control), so ignore a BAD_ADDRESS - * exception. - */ - status = acpi_write_bit_register(ACPI_BITREG_ARB_DISABLE, 0); - if (ACPI_FAILURE(status) && (status != AE_BAD_ADDRESS)) { - return_ACPI_STATUS(status); - } - acpi_hw_execute_sleep_method(METHOD_PATHNAME__SST, ACPI_SST_WORKING); return_ACPI_STATUS(status); }