From martin@email.aon.at  Sun Jun 24 11:14:03 2007
Return-Path: <martin@email.aon.at>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 0AF2916A400
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 24 Jun 2007 11:14:03 +0000 (UTC)
	(envelope-from martin@email.aon.at)
Received: from email.aon.at (nat-warsl417-01.aon.at [195.3.96.119])
	by mx1.freebsd.org (Postfix) with ESMTP id 6190013C4B9
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 24 Jun 2007 11:14:02 +0000 (UTC)
	(envelope-from martin@email.aon.at)
Received: (qmail 9760 invoked from network); 24 Jun 2007 10:47:21 -0000
Received: from unknown (HELO email.aon.at) ([172.18.5.238])
          (envelope-sender <martin@email.aon.at>)
          by fallback02.highway.telekom.at (qmail-ldap-1.03) with SMTP
          for <FreeBSD-gnats-submit@freebsd.org>; 24 Jun 2007 10:47:21 -0000
Received: (qmail 26531 invoked from network); 24 Jun 2007 10:47:18 -0000
Received: from m1262p026.adsl.highway.telekom.at (HELO gandalf.xyzzy) ([80.121.29.186])
          (envelope-sender <martin@email.aon.at>)
          by smarthub74.highway.telekom.at (qmail-ldap-1.03) with SMTP
          for <FreeBSD-gnats-submit@freebsd.org>; 24 Jun 2007 10:47:18 -0000
Received: from gandalf.xyzzy (localhost.xyzzy [127.0.0.1])
	by gandalf.xyzzy (8.13.8/8.13.8) with ESMTP id l5OAlGwB001980
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 24 Jun 2007 12:47:16 +0200 (CEST)
	(envelope-from martin@gandalf.xyzzy)
Received: (from martin@localhost)
	by gandalf.xyzzy (8.13.8/8.13.8/Submit) id l5OAlF0Q001979;
	Sun, 24 Jun 2007 12:47:15 +0200 (CEST)
	(envelope-from martin)
Message-Id: <200706241047.l5OAlF0Q001979@gandalf.xyzzy>
Date: Sun, 24 Jun 2007 12:47:15 +0200 (CEST)
From: Martin Birgmeier <martin@email.aon.at>
Reply-To: Martin Birgmeier <martin@email.aon.at>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] [acpi] viapm.ko kernel module incorrectly reprograms SMBus base address, thereby causing a hang on the ASUS A7V when trying to shutdown -p
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         113986
>Category:       kern
>Synopsis:       [patch] [acpi] viapm.ko kernel module incorrectly reprograms SMBus base address, thereby causing a hang on the ASUS A7V when trying to shutdown -p
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-acpi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jun 24 11:20:01 GMT 2007
>Closed-Date:    Sun Jun 24 23:47:23 GMT 2007
>Last-Modified:  Sun Jun 24 23:47:23 GMT 2007
>Originator:     Martin Birgmeier
>Release:        FreeBSD 6.2-RELEASE i386
>Organization:
MBi at home
>Environment:
System: FreeBSD gandalf.xyzzy 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Sat Jan 13 20:23:55 CET 2007 root@gandalf.xyzzy:/d/14.1/OBJ/FreeBSD/RELENG_6_2_0_RELEASE/src/sys/XYZZY i386


>Description:
	The Makefile for the viapm.ko kernel module (at
	sys/modules/i2c/controllers/viapm/Makefile) sets

	    CFLAGS         += -DVIAPM_BASE_ADDR=0x6000

	which breaks the power-off function (shutdown -p) on my ASUS A7V
	motherboard.

	The reason for the latter is that the ACPI \_SI.SST method of
	the A7V bios only knows about the standard base address of the
	SMBus controller (0xe800). If the controller suddenly appears
	at another address, "empty space" will be read, causing an
	infinite loop while executing the method during acpi_shutdown_final()
	in sys/dev/acpica/acpi.c.

	This fixes i386/97468.

	p.s. The e-mail address is bogus as I am paranoid of junk mail.
	Please reply via adding to the PR.

>How-To-Repeat:
	Use FreeBSD source as is. :-)

>Fix:

*** ./sys/modules/i2c/controllers/viapm/Makefile.ORIG	Tue Nov  8 18:03:55 2005
--- ./sys/modules/i2c/controllers/viapm/Makefile	Sun Jun 24 12:12:18 2007
***************
*** 4,9 ****
  KMOD		= viapm
  SRCS		= device_if.h bus_if.h isa_if.h iicbb_if.h pci_if.h smbus_if.h \
  		  opt_isa.h viapm.c
- CFLAGS		+= -DVIAPM_BASE_ADDR=0x6000
  
  .include <bsd.kmod.mk>
--- 4,8 ----

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-acpi 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sun Jun 24 15:27:25 UTC 2007 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=113986 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/113986: commit references a PR
Date: Sun, 24 Jun 2007 20:36:05 +0000 (UTC)

 njl         2007-06-24 20:35:59 UTC
 
   FreeBSD src repository
 
   Modified files:
     sys/modules/i2c/controllers/alpm Makefile 
     sys/modules/i2c/controllers/viapm Makefile 
   Log:
   The viapm module build had what appear to be some debugging CFLAGS left
   around to force the IO port to a fixed address.  They were only turned
   on in the module build and were present since the original import.  This
   breaks soft power-off on the Asus A7V since it reprograms the SMBus base
   address to a different one than the BIOS expects.  A similar issue was
   found in the alpm(4) module build.
   
   PR:             kern/113986, i386/97468
   MFC after:      3 days
   Approved by:    re
   
   Revision  Changes    Path
   1.2       +0 -1      src/sys/modules/i2c/controllers/alpm/Makefile
   1.3       +0 -1      src/sys/modules/i2c/controllers/viapm/Makefile
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: njl 
State-Changed-When: Sun Jun 24 23:47:10 UTC 2007 
State-Changed-Why:  
Fix committed, thank you very much for your debugging effort. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=113986 
>Unformatted:
