From owner-freebsd-current@FreeBSD.ORG Wed Sep 16 05:43:23 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43CEB1065670 for ; Wed, 16 Sep 2009 05:43:23 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward4.yandex.ru (forward4.yandex.ru [77.88.46.9]) by mx1.freebsd.org (Postfix) with ESMTP id 50AFF8FC08 for ; Wed, 16 Sep 2009 05:43:22 +0000 (UTC) Received: from smtp3.yandex.ru (smtp3.yandex.ru [77.88.46.103]) by forward4.yandex.ru (Yandex) with ESMTP id B12EE268434; Wed, 16 Sep 2009 09:43:20 +0400 (MSD) Received: from [127.0.0.1] (ns.kirov.so-cdu.ru [77.72.136.145]) by smtp3.yandex.ru (Yandex) with ESMTPSA id 3E9B68B8073; Wed, 16 Sep 2009 09:43:20 +0400 (MSD) Message-ID: <4AB07AF6.7010503@yandex.ru> Date: Wed, 16 Sep 2009 09:43:18 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla Thunderbird 1.5 (FreeBSD/20051231) MIME-Version: 1.0 To: Scott Long References: <200909091631.01446.hselasky@c2i.net> <200909100911.10237.hselasky@c2i.net> In-Reply-To: Content-Type: multipart/mixed; boundary="------------060503090601000308090708" X-Yandex-TimeMark: 1253079800 X-Yandex-Spam: 1 X-Yandex-Front: smtp3.yandex.ru Cc: FreeBSD CURRENT Mailing List , Hans Petter Selasky , Randi Harper , James Butler Subject: Re: Can't boot 8.0-BETA4 from USB stick X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Sep 2009 05:43:23 -0000 This is a multi-part message in MIME format. --------------060503090601000308090708 Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Scott Long wrote: > Delaying the mountroot doesn't fix the problem. The problem is that > there's a race between the process doing the USB tree discovery, and the > process doing the CAM/SCSI bus scan. The tree discovery needs to happen > before the bus scan, and no amount of root delay tweaks will help that, > except maybe accidentally by shifting timings. I'm working on the > correct solution. I'll hopefully have something tomorrow. Hi, Scott. I wrote small kld which i load from boot prompt and now my flash device detected (i know it's hack, but it can help until you are working on right solution) :) -- WBR, Andrey V. Elsukov --------------060503090601000308090708 Content-Type: text/plain; name="wait.c.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="wait.c.txt" /*- * Copyright (c) 2009 Andrey V. Elsukov * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include static struct callout wait_callout; static struct root_hold_token *wait_hold = NULL; static int wait_seconds = 15; static void wait_timeout(void *arg) { if (wait_hold != NULL) root_mount_rel(wait_hold); } static int wait_modevent(module_t mod, int type, void *unused) { switch (type) { case MOD_LOAD: wait_hold = root_mount_hold("USB Flash"); if (wait_hold != NULL) { callout_init(&wait_callout, 0); callout_reset(&wait_callout, hz * wait_seconds, wait_timeout, NULL); } break; case MOD_UNLOAD: if (wait_hold != NULL) callout_stop(&wait_callout); break; }; return (0); } static moduledata_t waitmod = { "wait", wait_modevent, 0 }; DECLARE_MODULE(wait, waitmod, SI_SUB_ROOT_CONF, SI_ORDER_ANY); --------------060503090601000308090708--