From owner-freebsd-ppc@freebsd.org Wed Nov 4 16:46:57 2015 Return-Path: Delivered-To: freebsd-ppc@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9901A269C4 for ; Wed, 4 Nov 2015 16:46:57 +0000 (UTC) (envelope-from andreast-list@fgznet.ch) Received: from smtp.fgznet.ch (unknown [IPv6:2001:4060:1:1001::14:52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A75971920 for ; Wed, 4 Nov 2015 16:46:57 +0000 (UTC) (envelope-from andreast-list@fgznet.ch) Received: from [192.168.225.14] (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by fgznet.ch (Postfix) with ESMTPS id 36F20C5D25; Wed, 4 Nov 2015 17:46:53 +0100 (CET) Subject: Re: PowerMac G5 running 11-current kernel fails to read temperature sensors To: Jukka Ukkonen , freebsd-ppc@FreeBSD.org References: <676DB1F1-EA3A-4B85-8A41-0ACE2BDE34F7@gmail.com> From: Andreas Tobler Message-ID: <563A367D.7020708@fgznet.ch> Date: Wed, 4 Nov 2015 17:46:53 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <676DB1F1-EA3A-4B85-8A41-0ACE2BDE34F7@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.73 on 127.0.1.1 X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2015 16:46:58 -0000 On 04.11.15 08:32, Jukka Ukkonen wrote: > > Hello all, > > Just a quick question... Has anyone else tried to build > a ppc64 (GENERIC64) kernel locally on a PowerMac G5 > during the last month or so? > > When booting the CD snapshot kernel of Oct 2nd there > are no worries. Then again when I try to use a locally built > kernel using the latest sources from head, the system starts > complaining about I2C read errors and errors when trying to > read max6690 sensors. Those complaints repeat about > 5 times after which the system powers down automatically. > There is no genuine risk of overheating, though. > When running the snapshot kernel of Oct 2nd the CPU > sensors show temperatures around 45-50 C. All of the > other sensors including the two max6690 sensors show > values in the range of 25-45 C. > > When using the older snapshot kernel all of the temperature > sensors are visible in "sysctl dev" output. > When using the latest and greatest locally built kernel trying > the same sysctl only hangs when it triggers reading of those > sensors while I get to watch the complaints about I2C read > failures. > > With the older snapshot kernel the fans keep operating at > relatively slow speeds. With the locally built latest and greatest > kernel the fans keep adding rpms step by step to plain crazy > speeds until the system powers down. > > Does this ring any bells? Have there been any changes to > the I2C drivers or temperature sensor drivers during the last > month or so? Is there something I should try to inspect the > issue further? > Use this for now, I prepare a patch which distinguishes between 7-bit and 8-bit addresses. Hth, Andreas Index: sys/dev/ofw/ofw_iicbus.c =================================================================== --- sys/dev/ofw/ofw_iicbus.c (revision 290233) +++ sys/dev/ofw/ofw_iicbus.c (working copy) @@ -151,7 +151,7 @@ * OFW uses 7-bit I2C address format (see ePAPR), * but system expect 8-bit. */ - dinfo->opd_dinfo.addr = paddr << 1; + dinfo->opd_dinfo.addr = paddr; if (ofw_bus_gen_setup_devinfo(&dinfo->opd_obdinfo, child) != 0) { free(dinfo, M_DEVBUF);