From nobody@FreeBSD.org  Fri Jun 11 19:40:05 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9DB391065750
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 11 Jun 2010 19:40:05 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 569278FC16
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 11 Jun 2010 19:40:05 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o5BJe5MX078188
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 11 Jun 2010 19:40:05 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o5BJe40g078179;
	Fri, 11 Jun 2010 19:40:04 GMT
	(envelope-from nobody)
Message-Id: <201006111940.o5BJe40g078179@www.freebsd.org>
Date: Fri, 11 Jun 2010 19:40:04 GMT
From: Garrett Cooper <yaneurabeya@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] device smbus missing from ipmi(4) synopsys section
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         147796
>Category:       docs
>Synopsis:       [patch] device smbus missing from ipmi(4) synopsys section
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-doc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 11 19:50:01 UTC 2010
>Closed-Date:    Tue Jun 15 01:32:03 UTC 2010
>Last-Modified:  Sun Feb 03 22:28:58 UTC 2013
>Originator:     Garrett Cooper
>Release:        9-CURRENT
>Organization:
Cisco Systems, Inc.
>Environment:
>Description:
Tried kldload(8)'ing ipmi(4) and it failed siting this in the dmesg:

KLD ipmi.ko: depends on smbus - not available or version mismatch
linker_load_file: Unsupported file type

I build and installed the i2c/smbus module and voila:

$ kldstat -v | grep ipmi
 8    1 0xffffffff80e17000 2cc      ipmi_linux.ko (/boot/TAMESHI_CURRENT.r206173/ipmi_linux.ko)
		229 ipmi_linux
 9    1 0xffffffff80e18000 6dc4     ipmi.ko (/boot/TAMESHI_CURRENT.r206173/ipmi.ko)
		234 smbus/ipmi_smbus
		233 pci/ipmi_pci
		232 pci/ipmi2_pci
		231 isa/ipmi_isa
		230 acpi/ipmi_acpi
>How-To-Repeat:
Don't build kernel with smbus(4), but build with ipmi(4) support. If built via modules, then ipmi will fail to load.
>Fix:
See attached patch.

Patch attached with submission follows:

Index: ipmi.4
===================================================================
--- ipmi.4	(revision 206173)
+++ ipmi.4	(working copy)
@@ -32,6 +32,7 @@
 .Nm ipmi
 .Nd "OpenIPMI compatible IPMI interface driver"
 .Sh SYNOPSIS
+.Cd "device smbus"
 .Cd "device ipmi"
 .Pp
 To manually specify I/O attachment in


>Release-Note:
>Audit-Trail:

From: John Baldwin <jhb@freebsd.org>
To: freebsd-doc@freebsd.org
Cc: Garrett Cooper <yaneurabeya@gmail.com>,
 freebsd-gnats-submit@freebsd.org
Subject: Re: docs/147796: [patch] device smbus missing from ipmi(4) synopsys section
Date: Mon, 14 Jun 2010 08:41:38 -0400

 > Don't build kernel with smbus(4), but build with ipmi(4) support. If built 
 > via modules, then ipmi will fail to load.
 
 Actually, if you have an smbus.ko around (which you do by default unless you 
 use NO_MODULES=yes or MODULES_OVERRIDE), it will autoload smbus.ko and work 
 fine.  Also, if you use 'device ipmi' without 'device smbus' in your config, 
 it will build fine (it just won't support IPMI SSIF devices that use smbus).  
 For that reason, I don't think this patch is needed (and is in fact wrong as 
 you can support 90+% of IPMI BMC's without 'device smbus').
 
 -- 
 John Baldwin
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Tue Jun 15 01:31:33 UTC 2010 
State-Changed-Why:  
jhb seems to think this is the wrong approach. 

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