PERFORCE change 173361 for review
Alexander Motin
mav at FreeBSD.org
Tue Jan 19 12:13:58 UTC 2010
http://p4web.freebsd.org/chv.cgi?CH=173361
Change 173361 by mav at mav_mavtest on 2010/01/19 12:13:44
Add kern.cam.boot_delay tunable, to control time, which CAM will
wait for late SIMs (like umass) registration.
Affected files ...
.. //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#141 edit
Differences ...
==== //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#141 (text+ko) ====
@@ -111,6 +111,9 @@
struct intr_config_hook *xpt_config_hook;
+ int boot_delay;
+ struct callout boot_callout;
+
struct mtx xpt_topo_lock;
struct mtx xpt_lock;
};
@@ -147,6 +150,10 @@
/* Transport layer configuration information */
static struct xpt_softc xsoftc;
+TUNABLE_INT("kern.cam.boot_delay", &xsoftc.boot_delay);
+SYSCTL_INT(_kern_cam, OID_AUTO, boot_delay, CTLFLAG_RDTUN,
+ &xsoftc.boot_delay, 0, "Bus registration wait time");
+
/* Queues for our software interrupt handler */
typedef TAILQ_HEAD(cam_isrq, ccb_hdr) cam_isrq_t;
typedef TAILQ_HEAD(cam_simq, cam_sim) cam_simq_t;
@@ -4659,6 +4666,13 @@
}
static void
+xpt_boot_delay(void *arg)
+{
+
+ xpt_release_boot();
+}
+
+static void
xpt_config(void *arg)
{
/*
@@ -4696,7 +4710,9 @@
periphdriver_init(1);
xpt_hold_boot();
- xpt_release_boot();
+ callout_init(&xsoftc.boot_callout, 1);
+ callout_reset(&xsoftc.boot_callout, hz * xsoftc.boot_delay / 1000,
+ xpt_boot_delay, NULL);
/* Fire up rescan thread. */
if (kproc_create(xpt_scanner_thread, NULL, NULL, 0, 0, "xpt_thrd")) {
printf("xpt_init: failed to create rescan thread\n");
More information about the p4-projects
mailing list