From nork@FreeBSD.org  Sat Dec  9 19:08:14 2006
Return-Path: <nork@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 20F9716A4B3;
	Sat,  9 Dec 2006 19:08:14 +0000 (UTC)
	(envelope-from nork@FreeBSD.org)
Received: from sakura.ninth-nine.com (sakura.ninth-nine.com [219.127.74.120])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 295BD43C9D;
	Sat,  9 Dec 2006 19:07:07 +0000 (GMT)
	(envelope-from nork@FreeBSD.org)
Received: from nadesico.ninth-nine.com (nadesico.ninth-nine.com [219.127.74.122]) by sakura.ninth-nine.com (8.13.8/8.13.8/NinthNine) with SMTP id kB9J8B91040458; Sun, 10 Dec 2006 04:08:11 +0900 (JST) (envelope-from nork@FreeBSD.org)
Message-Id: <20061210040811.83f1171e.nork@FreeBSD.org>
Date: Sun, 10 Dec 2006 04:08:11 +0900
From: Norikatsu Shigemura <nork@FreeBSD.org>
To: FreeBSD-gnats-submit@FreeBSD.org
Cc: Norikatsu Shigemura <nork@FreeBSD.org>, Matt Jacob <mjacob@FreeBSD.org>,
        ken@FreeBSD.org, scsi@FreeBSD.org
Subject: kldload mpt(4) doesn't work.

>Number:         106536
>Category:       kern
>Synopsis:       [modules] kldload mpt(4) doesn't work.
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    mjacob
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 09 19:10:11 GMT 2006
>Closed-Date:    Sun Dec 10 05:55:23 GMT 2006
>Last-Modified:  Sun Dec 10 13:27:05 GMT 2006
>Originator:     Norikatsu Shigemura
>Release:        FreeBSD 6.2-PRERELEASE i386
>Organization:
Ensure Technology LTD.
>Environment:
System: FreeBSD melfina.ninth-nine.com 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #39: Thu Nov 16 05:36:03 JST 2006 nork@melfina.ninth-nine.com:/usr/obj/usr/src/sys/MELFINA i386

>Description:
	I would try to kldload mpt(4).  But no works.  Because mpt.ko
	couldn't resolve cam related symbols.

>How-To-Repeat:
	# kldload mpt
	kldload: can't load mpt: No such file or directory
	# dmesg
	link_elf: symbol xpt_periph undefined

>Fix:
	SEE ALSO:
	http://lists.freebsd.org/pipermail/freebsd-current/2004-September/037056.html
	http://lists.freebsd.org/pipermail/freebsd-current/2004-September/037065.html
	http://lists.freebsd.org/pipermail/freebsd-current/2004-September/037067.html
	http://lists.freebsd.org/pipermail/freebsd-current/2004-September/037071.html

	http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061908.html
	http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061908.html
	http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061923.html
	http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061925.html
	http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061926.html
	http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061930.html
	http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061946.html
	http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061965.html
	http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061924.html

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



	mpt62.diff:	for RELENG_6_2
	mpt6x.diff:	for RELENG_6
	mpt70.diff:	for HEAD

--- mpt62.diff begins here ---
Index: mpt_pci.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/mpt/mpt_pci.c,v
retrieving revision 1.20.2.6
diff -u -r1.20.2.6 mpt_pci.c
--- mpt_pci.c	16 Sep 2006 05:42:06 -0000	1.20.2.6
+++ mpt_pci.c	9 Dec 2006 18:54:29 -0000
@@ -211,6 +211,8 @@
 static devclass_t mpt_devclass;
 DRIVER_MODULE(mpt, pci, mpt_driver, mpt_devclass, 0, 0);
 MODULE_VERSION(mpt, 1);
+MODULE_DEPEND(mpt, cam, 1, 1, 1);
+MODULE_DEPEND(mpt, pci, 1, 1, 1);
 
 static int
 mpt_pci_probe(device_t dev)
--- mpt62.diff ends here ---

--- mpt6x.diff begins here ---
Index: mpt_pci.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/mpt/mpt_pci.c,v
retrieving revision 1.20.2.6
diff -u -r1.20.2.6 mpt_pci.c
--- mpt_pci.c	16 Sep 2006 05:42:06 -0000	1.20.2.6
+++ mpt_pci.c	9 Dec 2006 18:53:10 -0000
@@ -211,6 +211,8 @@
 static devclass_t mpt_devclass;
 DRIVER_MODULE(mpt, pci, mpt_driver, mpt_devclass, 0, 0);
 MODULE_VERSION(mpt, 1);
+MODULE_DEPEND(mpt, cam, 1, 1, 1);
+MODULE_DEPEND(mpt, pci, 1, 1, 1);
 
 static int
 mpt_pci_probe(device_t dev)
--- mpt6x.diff ends here ---

--- mpt7x.diff begins here ---
Index: mpt_pci.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/mpt/mpt_pci.c,v
retrieving revision 1.44
diff -u -r1.44 mpt_pci.c
--- mpt_pci.c	19 Nov 2006 23:24:52 -0000	1.44
+++ mpt_pci.c	9 Dec 2006 18:52:27 -0000
@@ -211,6 +211,8 @@
 static devclass_t mpt_devclass;
 DRIVER_MODULE(mpt, pci, mpt_driver, mpt_devclass, 0, 0);
 MODULE_VERSION(mpt, 1);
+MODULE_DEPEND(mpt, cam, 1, 1, 1);
+MODULE_DEPEND(mpt, pci, 1, 1, 1);
 
 static int
 mpt_pci_probe(device_t dev)
--- mpt7x.diff ends here ---
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->mjacob 
Responsible-Changed-By: maxim 
Responsible-Changed-When: Sat Dec 9 19:28:15 UTC 2006 
Responsible-Changed-Why:  
Over to maintainer. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/106536: commit references a PR
Date: Sun, 10 Dec 2006 01:14:17 +0000 (UTC)

 mjacob      2006-12-10 01:13:56 UTC
 
   FreeBSD src repository
 
   Modified files:
     sys/dev/mpt          mpt_cam.c mpt_pci.c 
   Log:
   Make mpt_pci depend on pci and mpt_cam depend on CAM.
   
   PR:             106536
   Suggested by:   Norikatsu Shigemura
   MFC after:      3 days
   
   Revision  Changes    Path
   1.46      +1 -0      src/sys/dev/mpt/mpt_cam.c
   1.45      +1 -0      src/sys/dev/mpt/mpt_pci.c
 _______________________________________________
 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: mjacob 
State-Changed-When: Sun Dec 10 05:54:45 UTC 2006 
State-Changed-Why:  
Fixed in head. We'll see whether it's a PITA to put it into 6.2. 

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