kern/166239: missing module dependencies

Pavel Timofeev timp87 at gmail.com
Mon Mar 19 07:50:13 UTC 2012


>Number:         166239
>Category:       kern
>Synopsis:       missing module dependencies
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 19 07:50:12 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Pavel Timofeev
>Release:        FreeBSD 10.0-CURRENT amd64
>Organization:
>Environment:
>Description:
hptiop(4), hptmv(4) and isp(4) don't have necessary dependencies for loading themselves as modules.

Obtained from (see all thread)
http://lists.freebsd.org/pipermail/freebsd-stable/2012-March/066607.html
http://lists.freebsd.org/pipermail/freebsd-scsi/2012-March/005333.html
>How-To-Repeat:
remove such devices from kernconf. then recompile kernel and try to load hptiop(4), hptmv(4) and isp(4) as modules.
>Fix:
see attached patch

Patch attached with submission follows:

--- /sys/dev/hptiop/hptiop.c	2012-03-12 12:03:51.000000000 +0400
+++ ./hptiop/hptiop.c	2012-03-11 13:14:49.000000000 +0400
@@ -1268,6 +1268,7 @@
 };
 
 DRIVER_MODULE(hptiop, pci, hptiop_pci_driver, hptiop_devclass, 0, 0);
+MODULE_DEPEND(hptiop, cam, 1, 1, 1);
 
 static int hptiop_probe(device_t dev)
 {
--- /sys/dev/hptmv/entry.c	2012-03-12 12:03:51.000000000 +0400
+++ ./hptmv/entry.c	2012-03-11 13:15:14.000000000 +0400
@@ -108,6 +108,7 @@
 
 #define __DRIVER_MODULE(p1, p2, p3, p4, p5, p6) DRIVER_MODULE(p1, p2, p3, p4, p5, p6)
 __DRIVER_MODULE(PROC_DIR_NAME, pci, hpt_pci_driver, hpt_devclass, 0, 0);
+MODULE_DEPEND(PROC_DIR_NAME, cam, 1, 1, 1); 
 
 #define ccb_ccb_ptr spriv_ptr0
 #define ccb_adapter ccb_h.spriv_ptr1
--- /sys/dev/isp/isp_pci.c	2011-11-16 06:52:24.000000000 +0400
+++ ./isp/isp_pci.c	2012-03-13 11:28:28.000000000 +0400
@@ -372,6 +372,8 @@
 };
 static devclass_t isp_devclass;
 DRIVER_MODULE(isp, pci, isp_pci_driver, isp_devclass, 0, 0);
+MODULE_DEPEND(isp, cam, 1, 1, 1);
+MODULE_DEPEND(isp, firmware, 1, 1, 1);
 
 static int
 isp_pci_probe(device_t dev)
--- /sys/dev/isp/isp_sbus.c	2011-02-15 00:50:51.000000000 +0300
+++ ./isp/isp_sbus.c	2012-03-13 11:28:43.000000000 +0400
@@ -106,6 +106,8 @@
 };
 static devclass_t isp_devclass;
 DRIVER_MODULE(isp, sbus, isp_sbus_driver, isp_devclass, 0, 0);
+MODULE_DEPEND(isp, cam, 1, 1, 1);
+MODULE_DEPEND(isp, firmware, 1, 1, 1);
 
 static int
 isp_sbus_probe(device_t dev)


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list