From patchwork Sun Jul 8 19:45:19 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Nieder X-Patchwork-Id: 1170091 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 394FF3FD4F for ; Sun, 8 Jul 2012 19:58:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752066Ab2GHTp3 (ORCPT ); Sun, 8 Jul 2012 15:45:29 -0400 Received: from mail-gg0-f174.google.com ([209.85.161.174]:40108 "EHLO mail-gg0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751938Ab2GHTp2 (ORCPT ); Sun, 8 Jul 2012 15:45:28 -0400 Received: by gglu4 with SMTP id u4so9570497ggl.19 for ; Sun, 08 Jul 2012 12:45:28 -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=uY1bDCMjwjN0qeU4CN7QBcnga2HEIoPNvxVQ2Df4Lq8=; b=ZGHnm16DCUnksZRJJGBlHQZ1MapxRrMb9G4G7qBRrGkUbZxa0qfKoX7oxdobipOFAg 4lqnv0Y5Ahs6otrGujqJ4FeQpgq6BWaaHYy3nt0Nh1WOtIl9LdIG5406YE0jkIwn0bLr EsoLGvQElugNTtL2K6naJss8dazL4icW71bg/IWHe+YVBOy7fPsEOKDBF+Skmn0JkB7M TXstcXIB95YcfAK/VjR93C44cQiA7za2dZYFu8oLGZK/y+sJBTkkcsvDFuh+7blzqaRI qCQ6eh3qoC0rtMlPq61kQC9ZTzMhMCa9skIft4PmymQq7QWspRqTi6Cpj11b5/lIC48z 565A== Received: by 10.42.89.72 with SMTP id f8mr19371808icm.33.1341776727670; Sun, 08 Jul 2012 12:45:27 -0700 (PDT) Received: from burratino (cl-1372.chi-02.us.sixxs.net. [2001:4978:f:55b::2]) by mx.google.com with ESMTPS id y5sm16415498igb.11.2012.07.08.12.45.26 (version=SSLv3 cipher=OTHER); Sun, 08 Jul 2012 12:45:27 -0700 (PDT) Date: Sun, 8 Jul 2012 14:45:19 -0500 From: Jonathan Nieder To: "Rafael J. Wysocki" Cc: Octavio Alvarez , Bob Moore , Adrian Knoth , Shaohua Li , Len Brown , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] ACPI: Leave Bus Master Arbitration enabled for suspend/resume Message-ID: <20120708194519.GA8807@burratino> References: <20120708190434.GD7328@burratino> <20120708193204.GF7328@burratino> <201207082143.04099.rjw@sisk.pl> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <201207082143.04099.rjw@sisk.pl> 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 2feec47d4c5f (ACPICA: ACPI 5: Support for new FADT SleepStatus, SleepControl registers, 2012-02-14), presumably by copy/pasting a copy of the code without that fix 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 still works. Addresses . Reported-bisected-and-tested-by: Octavio Alvarez Reported-by: Adrian Knoth Signed-off-by: Jonathan Nieder Cc: # 3.4 --- Rafael J. Wysocki wrote: > Can you please repost it with _both_ the changelog and the patch? Here you go. Sorry about that. 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); }