From: "Patrick J. LoPresti" <patl@users.sourceforge.net>
To: Greg KH <greg@kroah.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Load hid.o module synchronously?
Date: 05 May 2004 11:19:56 -0400 [thread overview]
Message-ID: <s5gpt9jexwg.fsf@patl=users.sf.net> (raw)
In-Reply-To: <20040505025602.GA19873@kroah.com>
Greg KH <greg@kroah.com> writes:
> That is such an obvious troll and flame bait, I really do not know
> why I am responding. Please, try to be civil here.
I was out of line, and I apologize.
I do not mean to be uncivil. I do think this is a design flaw in
Linux, but I do not intend any personal attack.
> But before you try to do that (which basically is moving things back
> to the way things used to be years ago in 2.2), why don't you try to
> state the problem you are having. Perhaps it can be solved in a
> different manner than what you are trying to do.
What I want is to load a driver and not proceed until it has finished
loading, which I am told "does not fit into the way the kernel handles
drivers anymore". This strikes me as a clear misdesign.
> So, what are you trying to fix/solve/monitor/do here?
I have a custom Linux boot disk for my project
(http://unattended.sourceforge.net/). I want it to work unaltered on
as many different systems as possible. The boot disk can be
interactive or non-interactive, depending on how the system is
configured. Early on, it issues a prompt "Override boot disk
defaults?", which defaults to "no" after a ten-second timeout.
So, first, I want to load the driver for the keyboard, if any. I want
to wait until the keyboard is ready before I emit any prompts. Under
no circumstances do I want to wait forever.
This is just one example. I have now had essentially the same problem
three different times:
1) Loading hid.o to talk to the keyboard, as described.
2) Running cardmgr to probe for PCMCIA devices. Unless I delay a
few seconds, sometimes cardmgr finds zero PCMCIA sockets,
presumably because the yenta_socket.o driver takes a while to get
ready. I say "sometimes" because this behavior, and the delay
required, varies from system to system and from boot to boot.
3) When I load the network driver, I want to wait until it is ready
to use. Otherwise, when I try to obtain a DHCP lease, sometimes
it fails.
Right now, I deal with (2) by sleeping for a bit before running
cardmgr. I have increased my sleep time in response to bug reports
from my users. (Obviously, I want the delay to be as short as
possible.)
I deal with (3) by re-trying DHCP for fifteen seconds or so. I can
tell when it failed to get a lease, but I cannot easily tell why it
failed. So I just retry for a while before moving on to the next
interface.
In all of these cases, I am hacking around an apparent design flaw in
the kernel's device loading architecture. Obviously, random delays
are inherently unreliable; hence my comment about "unreliable by
design".
- Pat
next prev parent reply other threads:[~2004-05-05 15:20 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-26 19:10 Patrick J. LoPresti
2004-04-26 19:40 ` Chris Friesen
2004-04-26 19:50 ` Patrick J. LoPresti
2004-04-26 20:03 ` Chris Friesen
2004-04-26 20:19 ` Greg KH
2004-04-28 14:02 ` Bill Davidsen
[not found] ` <mit.lcs.mail.linux-kernel/c6od9g$53k$1@gatekeeper.tmr.com>
2004-05-01 13:21 ` Patrick J. LoPresti
2004-05-01 16:43 ` Kevin P. Fleming
2004-05-04 20:01 ` Greg KH
2004-05-04 21:56 ` Patrick J. LoPresti
2004-05-04 22:35 ` Greg KH
2004-05-05 2:49 ` Patrick J. LoPresti
2004-05-05 2:56 ` Greg KH
2004-05-05 15:19 ` Patrick J. LoPresti [this message]
2004-05-05 22:45 ` Greg KH
2004-05-06 13:54 ` Patrick J. LoPresti
2004-05-07 22:00 ` Greg KH
2004-05-05 3:21 ` Randy.Dunlap
2004-05-05 22:33 ` Oliver Neukum
2004-05-06 14:05 ` Patrick J. LoPresti
2004-05-07 16:19 ` Stefan Smietanowski
2004-05-07 17:50 ` Oliver Neukum
2004-04-27 6:02 ` Kim Holviala
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='s5gpt9jexwg.fsf@patl=users.sf.net' \
--to=patl@users.sourceforge.net \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®