Date: Sat, 3 Oct 2009 10:05:32 -0600 From: Scott Long <scottl@samsco.org> To: Hans Petter Selasky <hselasky@c2i.net> Cc: freebsd-current@freebsd.org Subject: Re: [PATCH] Fix for USB media not found at boot Message-ID: <D04BD0AA-F598-40AF-998A-1D07A3C90837@samsco.org> In-Reply-To: <200910031800.24896.hselasky@c2i.net> References: <20091002150931.K35591@pooker.samsco.org> <200910031230.51044.hselasky@c2i.net> <F22AB1E4-C293-4825-89BB-9863606F2C60@samsco.org> <200910031800.24896.hselasky@c2i.net>
index | next in thread | previous in thread | raw e-mail
On Oct 3, 2009, at 10:00 AM, Hans Petter Selasky wrote:
> On Saturday 03 October 2009 17:05:35 Scott Long wrote:
>> On Oct 3, 2009, at 4:30 AM, Hans Petter Selasky wrote:
>>> On Saturday 03 October 2009 10:19:57 Scott Long wrote:
>>>> config_intrhook system will sleep after all
>>>
>>> Then why do you need the intr hook callback?
>>
>> The config_intrhook lets you know that interrupts are enabled, the
>> scheduler is running, and mountroot hasn't run yet. It provides a
>> very convenient and standard way to do exactly what we want with USB
>> enumeration.
>
> Hi,
>
> The root HUB attach and explore code is already running from a
> separate
> thread, so won't that be superfluous? I mean, the HUB explore code
> for any USB
> HUB will not run until the scheduler is running anyway.
>
> In my opinion delaying the system until the boot disk is present is
> just not
> good. We should rather be event driven, so that every time a new
> disk becomes
> present it checks it for mountroot.
>
> while (1) {
> if (mountroot is successful)
> break;
> if (ctrl+c is pressed)
> manual_mountroot();
> printf("Waiting 1 second for root-disk to appear. Press CTRL+C
> to
> abort.\n");
> sleep(1);
> }
>
That's an interesting idea. If you can make this work, go for it.
Meanwhile, I'm going to continue to look at the usb enumeration code.
Scott
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D04BD0AA-F598-40AF-998A-1D07A3C90837>
