linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zach Welch <trackir@superlucidity.net>
To: linux-hotplug@vger.kernel.org
Subject: Re: should the module script be invoked every time?
Date: Mon, 25 Nov 2002 22:04:39 +0000	[thread overview]
Message-ID: <marc-linux-hotplug-103826241408089@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-103825785302736@msgid-missing>

Gene Cash wrote:
 > OK, now what documentation I've seen says that this script should be
 > called *every* time the palm connects on the USB, which it does when
 > it tries to initiate a hotsync.  Is this right?

That's my feeling as well.  In my case, the device must have its
firmware loaded via fxload, but it never works if the kernel module has
alread been loaded.  As a result, these devices never end up connecting
to the kernel driver.  The only workaround I've found is to disconnect
all of those devices, unload its kernel module, then plug all device in
simultaneously.  Yuck!

 > However, due to (I believe) a bug in load_drivers() in
 > hotplug.functions, it only gets called when the visor module is first
 >  loaded, and never called again until that module is unloaded. I can
 > provide a patch.

I just took a glance at that function, and I began to wonder if the
problem stems from the 'if ! lsmod ..' never reaching its body. This
would seem to be caused by the fact that both yours and my hotplug usb
scripts are named the same as their corresponding kernel module. If you
change the userspace script name by adding a '.sh' extension (and update
the associated usermap), I think you will find the problem magically
solved; at least, that has solved my problems.  Hurrah!

Note: if you only have one usermap device entry to update, you probably 
want to call modprobe from within the visor.sh script.  In my case, I 
have two device ids - one is the bare device, the other is provided by 
the newly loaded firmware.  Previously, both usermap entries were named 
'foo', now the pre-renumeration handler is called 'foo.sh'.

 > Which behavour is correct?  And if the current behaviour is correct,
 > then how do I get a script to run every time?

Personally, I believe the behaviour you are trying to acheive is
correct, and the current behaviour is wrong.  However, it's really more
a matter of the documentation not clearly stating that you can't name
the kernel driver the same as the hotplug script. :-p

Thanks for sending this message - I wouldn't have otherwise found the
solution today, and I love crossing issues like this off my list. :)

Cheers,

Zach Welch
Superlucidity Services




-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power & Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

  parent reply	other threads:[~2002-11-25 22:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-25 20:49 should the module script be invoked every time? Gene Cash
2002-11-25 21:39 ` Pedro Lopez-Cabanillas
2002-11-25 21:57 ` David Brownell
2002-11-25 21:58 ` Gene Cash
2002-11-25 22:04 ` Zach Welch [this message]
2002-11-25 22:13 ` Pedro Lopez-Cabanillas
2002-11-25 22:40 ` Pedro Lopez-Cabanillas
2002-11-25 23:12 ` David Brownell
2002-11-26 16:04 ` Gene Cash
2003-06-09 15:12 ` Chris Weiss
2003-06-09 15:55 ` David Brownell
2003-06-09 17:19 ` Chris Weiss
2003-06-09 17:24 ` David Brownell
2003-06-09 21:25 ` Paul Hedderly

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=marc-linux-hotplug-103826241408089@msgid-missing \
    --to=trackir@superlucidity.net \
    --cc=linux-hotplug@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;
as well as URLs for NNTP newsgroup(s).