From patchwork Sun Aug 30 18:54:20 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 32591 X-Patchwork-Delegate: benh@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 2312AB7BD8 for ; Mon, 31 Aug 2009 05:01:56 +1000 (EST) Received: by ozlabs.org (Postfix) id 10F51DDD0B; Mon, 31 Aug 2009 05:01:56 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from bilbo.ozlabs.org (bilbo.ozlabs.org [203.10.76.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "bilbo.ozlabs.org", Issuer "CAcert Class 3 Root" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 0F2CEDDD01 for ; Mon, 31 Aug 2009 05:01:56 +1000 (EST) Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by bilbo.ozlabs.org (Postfix) with ESMTP id 12DD1B7BD8 for ; Mon, 31 Aug 2009 05:01:47 +1000 (EST) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 58BC0B7063 for ; Mon, 31 Aug 2009 05:01:29 +1000 (EST) Received: by ozlabs.org (Postfix) id 4B767DDD0B; Mon, 31 Aug 2009 05:01:29 +1000 (EST) Delivered-To: linuxppc-dev@ozlabs.org Received: from mail-fx0-f222.google.com (mail-fx0-f222.google.com [209.85.220.222]) by ozlabs.org (Postfix) with ESMTP id 891EADDD01 for ; Mon, 31 Aug 2009 05:01:27 +1000 (EST) Received: by fxm22 with SMTP id 22so1425019fxm.9 for ; Sun, 30 Aug 2009 12:01:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:cc:mime-version:message-id:content-type :content-transfer-encoding; bh=bkukJXxUUtiTy0pXPH/fzQlxbjdprRSQZJEJiuZlqec=; b=aNXIlE2k0W3Cs37h5AIkm2juQv2E4IuLgvNYuYS0PYJmcE+6mq1Wf0l/8PTOXenzLE fgsNSlFFYMC9J1crbHwF++ifq6lZp5yWqk5KO3wyz82HRdhLCAGaYvd5OusYkjavG00J HdgHNuLyezZwq46yOlpoL4q5owV5dfOOkVjNs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:mime-version:message-id :content-type:content-transfer-encoding; b=D5Bq82voCOQV/Dj7VJv1BwWSUT7NGjf+PS+tZzCs0/nx5yetqQWGv6OyMNg5JR8CnY 0tq/ImH2PQrxCgx6qXTO2PfX6Uwqjgt0RfuwHdIdWyxIJvyLMSBStWy01okmBM6g8EZR rn2PAaGNb/45xRILsrNguPNDRJqX9CfwEkk10= Received: by 10.103.48.20 with SMTP id a20mr1664936muk.121.1251658523205; Sun, 30 Aug 2009 11:55:23 -0700 (PDT) Received: from localhost.localdomain (chello089077034197.chello.pl [89.77.34.197]) by mx.google.com with ESMTPS id w5sm15286319mue.34.2009.08.30.11.55.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 30 Aug 2009 11:55:22 -0700 (PDT) From: Bartlomiej Zolnierkiewicz To: Benjamin Herrenschmidt Subject: [PATCH] powermac: thermal control turns system off in normal temperature conditions Date: Sun, 30 Aug 2009 20:54:20 +0200 User-Agent: KMail/1.12.0 (Linux/2.6.31-rc8-00015-gadda766-dirty; KDE/4.3.0; i686; ; ) MIME-Version: 1.0 Message-Id: <200908302054.20498.bzolnier@gmail.com> Cc: linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org, Lyonel Vincent X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org From: Lyonel Vincent Subject: [PATCH] powermac: thermal control turns system off in normal temperature conditions On certain PowerMacs, a module (therm_windtunnel) controls various thermal settings (it can report CPU/case temperature, change speed of internal fans, etc.) By default, the hardware thermal control has a temperature limit to protect the computer from damages (the default limit seems to be 80°C) but therm_windtunnel.c reduces it to an anormaly low value (65°C), which means that he computer will shut down randomly when hit by direct sun light or during summer (summer in France can be quite hot), actually possibly losing data instead of protecting it. The overheat limit in therm_windtunnel.c:253-254 should be set to 75°C and 70°C instead of 65°C and 60°C respectively. From: Lyonel Vincent Signed-off-by: Bartlomiej Zolnierkiewicz --- Resurrected from Fedora's bugzilla (aka The Big Black Hole): https://bugzilla.redhat.com/show_bug.cgi?id=171937 The patch itself seems perfectly valid to me (especially given comments in therm_windtunnel.c). drivers/macintosh/therm_windtunnel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Index: b/drivers/macintosh/therm_windtunnel.c =================================================================== --- a/drivers/macintosh/therm_windtunnel.c +++ b/drivers/macintosh/therm_windtunnel.c @@ -239,8 +239,8 @@ setup_hardware( void ) * to be on the safe side (OSX doesn't)... */ if( x.overheat_temp == (80 << 8) ) { - x.overheat_temp = 65 << 8; - x.overheat_hyst = 60 << 8; + x.overheat_temp = 75 << 8; + x.overheat_hyst = 70 << 8; write_reg( x.thermostat, 2, x.overheat_hyst, 2 ); write_reg( x.thermostat, 3, x.overheat_temp, 2 );