From bcasavan@angeltread.org  Wed Jul 30 21:56:40 2003
Return-Path: <bcasavan@angeltread.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 7279937B401
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 30 Jul 2003 21:56:40 -0700 (PDT)
Received: from rwcrmhc12.comcast.net (rwcrmhc12.comcast.net [216.148.227.85])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 97C4A43FB1
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 30 Jul 2003 21:56:37 -0700 (PDT)
	(envelope-from bcasavan@angeltread.org)
Received: from abigail.msp.angeltread.org (c-24-245-17-149.mn.client2.attbi.com[24.245.17.149](untrusted sender))
          by comcast.net (rwcrmhc12) with ESMTP
          id <2003073104562701400cl64ge>; Thu, 31 Jul 2003 04:56:27 +0000
Received: by abigail.msp.angeltread.org (Postfix, from userid 49841)
	id C441510; Wed, 30 Jul 2003 23:56:26 -0500 (CDT)
Message-Id: <20030731045626.C441510@abigail.msp.angeltread.org>
Date: Wed, 30 Jul 2003 23:56:26 -0500 (CDT)
From: Brent Casavant <bcasavan@angeltread.org>
Reply-To: Brent Casavant <b.j.casavant@iee.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] New Intel ichsmb controller added
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         55092
>Category:       kern
>Synopsis:       [PATCH] New Intel ichsmb controller added
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 30 22:00:26 PDT 2003
>Closed-Date:    Sat Aug 30 09:45:07 PDT 2003
>Last-Modified:  Sat Aug 30 09:45:07 PDT 2003
>Originator:     Brent Casavant
>Release:        FreeBSD 5.1-RELEASE i386
>Organization:
Angeltread Software Organization
>Environment:
System: FreeBSD abigail.msp.angeltread.org 5.1-RELEASE FreeBSD 5.1-RELEASE #7: Wed Jul 30 23:33:08 CDT 2003 bcasavan@abigail.msp.angeltread.org:/usr/home/bcasavan/Workarea/ac97/sys/i386/compile/abigail i386

P4 2.4GHz, Gigabyte GA-8IK1100 motherboard.

FreeBSD 5.1-RELEASE, with local modifications to enable hardware not
yet supported by -RELEASE (and maybe not even -CURRENT).

>Description:

The SMBus controller on this particular motherboard is not yet recognized
by the FreeBSD kernel and drivers.  The following is a patch to enable
its recognition.  It has not been tested, other than booting the kernel
and seeing that it is recognized.  I have no idea what sort of interesting
things one can do with the SMBus, thus the lack of testing.

With my local modifications, the pciconf output is as follows:

--- cut here ---
ichsmb0@pci0:31:3:      class=0x0c0500 card=0x24d21458 chip=0x24d38086 rev=0x02 hdr=0x00
    vendor   = 'Intel Corporation'
    class    = serial bus
    subclass = SMBus
--- cut here ---

And the dmesg output is:

--- cut here ---
ichsmb0: <Intel 82801DD (ICH5) SMBus controller> port 0x1400-0x141f irq 11 at device 31.3 on pci0
--- cut here ---

I'm not sure I named this thing correctly (Intel 82801DD in particular),
but this is an Intel ICH5R controller, and "82801DD" was the next sequential
controller name after those already in the code.  I don't know what
documentation would give me the official name, hopefully the maintainer
knows where to look.

>How-To-Repeat:

Boot a FreeBSD kernel on the Gigabyte GA-8IK1100 motherboard.

>Fix:

The following patch enables the existing ichsmb driver to recognize
the controller:

--- cut here ---
cvs diff -u sys/dev/ichsmb/ichsmb_pci.c
Index: sys/dev/ichsmb/ichsmb_pci.c
===================================================================
RCS file: /usr/FreeBSDCVS/src/sys/dev/ichsmb/ichsmb_pci.c,v
retrieving revision 1.6
diff -u -r1.6 ichsmb_pci.c
--- sys/dev/ichsmb/ichsmb_pci.c 18 Oct 2002 12:06:01 -0000      1.6
+++ sys/dev/ichsmb/ichsmb_pci.c 31 Jul 2003 04:28:16 -0000
@@ -71,6 +71,7 @@
 #define ID_82801BA                     0x24438086
 #define ID_82801CA                     0x24838086
 #define ID_82801DC                     0x24C38086
+#define ID_82801DD                     0x24D38086
  
 #define PCIS_SERIALBUS_SMBUS_PROGIF    0x00
  
@@ -131,6 +132,9 @@
                break;
        case ID_82801DC:
                device_set_desc(dev, "Intel 82801DC (ICH4) SMBus controller");
+               break;
+       case ID_82801DD:
+               device_set_desc(dev, "Intel 82801DD (ICH5) SMBus controller");
                break;
        default:
                if (pci_get_class(dev) == PCIC_SERIALBUS
--- cut here ---

I hope this proves useful.

Thanks,
Brent Casavant
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: hmp 
State-Changed-When: Sat Aug 30 09:43:56 PDT 2003 
State-Changed-Why:  
This PR is preceded by the correct one: kern/55485 

Thanks Brent. 


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