From dmitry@atlantis.dp.ua  Wed May 28 05:15:09 2003
Return-Path: <dmitry@atlantis.dp.ua>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id E5C7037B401
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 28 May 2003 05:15:09 -0700 (PDT)
Received: from smtp.atlantis.dp.ua (smtp.atlantis.dp.ua [193.108.46.231])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 3D99C43FAF
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 28 May 2003 05:14:43 -0700 (PDT)
	(envelope-from dmitry@atlantis.dp.ua)
Received: from atlantis.dp.ua (localhost [127.0.0.1])
	by smtp.atlantis.dp.ua (8.12.6p2/8.12.6) with ESMTP id h4SCDShM095574
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 28 May 2003 15:13:28 +0300 (EEST)
	(envelope-from dmitry@atlantis.dp.ua)
Received: (from dmitry@localhost)
	by atlantis.dp.ua (8.12.6p2/8.12.6/Submit) id h4SCDRwp095565;
	Wed, 28 May 2003 15:13:27 +0300 (EEST)
	(envelope-from dmitry)
Message-Id: <200305281213.h4SCDRwp095565@atlantis.dp.ua>
Date: Wed, 28 May 2003 15:13:27 +0300 (EEST)
From: Dmitry Pryanishnikov <dmitry@atlantis.dp.ua>
Reply-To: Dmitry Pryanishnikov <dmitry@atlantis.dp.ua>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] SMBus controller on ICH4 not recognized in -STABLE
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         52752
>Category:       kern
>Synopsis:       [ichsmb] [patch] SMBus controller on ICH4 not recognized in -STABLE
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 28 05:20:14 PDT 2003
>Closed-Date:    Wed Dec 06 20:59:02 GMT 2006
>Last-Modified:  Wed Dec 06 20:59:02 GMT 2006
>Originator:     Dmitry Pryanishnikov
>Release:        FreeBSD 4.7-RELEASE i386
>Organization:
Atlantis ISP
>Environment:
System: FreeBSD atlantis.atlantis.dp.ua 4.7-RELEASE FreeBSD 4.7-RELEASE #0: Sat Mar 29 14:01:49 EET 2003 root@atlantis.atlantis.dp.ua:/usr/src/sys/compile/ATLANTIS i386

Intel D845EBG2 motherboard, south bridge is ICH4.

>Description:

 4-STABLE doesn't recognize SMBus controller in ICH4 southbridge, dmesg
shows only one line:
 
ichsmb0: <SMBus controller> port 0xe000-0xe01f irq 11 at device 31.3 on pci0

and no "smbus0:" or "smb0:" lines, healthd -S doesn't work (device not
configured). Motherboards with ICH4 are popular, and there is thermal monitor
chip on SMBus that would be nice to access.

>How-To-Repeat:

 Build custom kernel with the following options on 4-STABLE:
 
 device          smbus
 device          ichsmb
 device          smb
 
 Boot it on motherboard with ICH4 southbridge. Note that there is no smb0
 device.

>Fix:

 Apply the following patch in /sys/dev/ichsmb (this is actually an MFC of
revision 1.5):

======================================================================== 
--- ichsmb_pci.c.orig	Sun Oct 20 00:00:00 2002
+++ ichsmb_pci.c	Fri Apr 25 12:14:00 2003
@@ -41,7 +41,7 @@
 
 /*
  * Support for the SMBus controller logical device which is part of the
- * Intel 81801AA (ICH) and 81801AB (ICH0) I/O controller hub chips.
+ * Intel 81801AA/AB/BA/CA/DC (ICH/ICH[0234]) I/O controller hub chips.
  */
 
 #include <sys/param.h>
@@ -68,6 +68,7 @@
 #define ID_82801AB			0x24238086
 #define ID_82801BA			0x24438086
 #define ID_82801CA			0x24838086
+#define ID_82801DC			0x24C38086
 
 #define PCIS_SERIALBUS_SMBUS_PROGIF	0x00
 
@@ -125,6 +126,9 @@
 		break;
 	case ID_82801CA:
 		device_set_desc(dev, "Intel 82801CA (ICH3) SMBus controller");
+		break;
+	case ID_82801DC:
+		device_set_desc(dev, "Intel 82801DC (ICH4) SMBus controller");
 		break;
 	default:
 		if (pci_get_class(dev) == PCIC_SERIALBUS
======================================================================== 

Rebuild and install kernel, reboot. Now dmesg's output will contain:

ichsmb0: <Intel 82801DC (ICH4) SMBus controller> port 0xe000-0xe01f irq 11 at
 device 31.3 on pci0
smbus0: <System Management Bus> on ichsmb0
smb0: <SMBus general purpose I/O> on smbus0

and SMBus access works correctly (tested with my own healthd patch for AD1025
thermal monitor).
>Release-Note:
>Audit-Trail:

From: Dmitry Pryanishnikov <dmitry@atlantis.dp.ua>
To: bug-followup@FreeBSD.org, dmitry@atlantis.dp.ua
Cc:  
Subject: Re: kern/52752: [ichsmb] [patch] SMBus controller on ICH4 not recognized
 in -STABLE
Date: Wed, 06 Dec 2006 22:41:30 +0200

 Hello!
 
   This PR is definitely stale (even RELENG_4 and 4_11 currently have 
 ichsmb_pci.c version 1.1.2.4 2003/08/31 which supports
 Intel 81801AA/AB/BA/CA/DC/EB (ICH/ICH[02345]) I/O controller hub chips). 
 Please close PR.
 
 Sincerely, Dmitry
 
 
State-Changed-From-To: open->closed 
State-Changed-By: ru 
State-Changed-When: Wed Dec 6 20:58:37 UTC 2006 
State-Changed-Why:  
Closed per originator's request. 

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