Date: Tue, 19 Jan 2010 12:13:58 GMT From: Alexander Motin <mav@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 173361 for review Message-ID: <201001191213.o0JCDwTn043860@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/chv.cgi?CH=173361 Change 173361 by mav@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");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001191213.o0JCDwTn043860>