linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: linux-hotplug@vger.kernel.org
Subject: Re: New hotplug interface is not working right for me
Date: Fri, 11 Mar 2005 15:38:35 +0000	[thread overview]
Message-ID: <4231BB7B.5060502@suse.de> (raw)
In-Reply-To: <20050311060405.GA16141@thyrsus.com>

Kay Sievers wrote:
> On Thu, 2005-03-10 at 22:45 -0800, Greg KH wrote:
>>On Fri, Mar 11, 2005 at 01:04:05AM -0500, Eric S. Raymond wrote:
>>>Greg KH <greg@kroah.com>:
>>>>On Fri, Mar 11, 2005 at 12:20:54AM -0500, Eric S. Raymond wrote:
>>>>>Greg KH <greg@kroah.com>:
>>>>>>>The problem appears to be that whatever thread of control is creating 
>>>>>>>the /dev/ttyUSB* node is running asynchronously with the hotplug
>>>>>>>script and does not reliably (or even usually) create it before the
>>>>>>>gpsd instance gets spawned and goes looking for the node.
>>>>>>Then use the /etc/dev.d/ interface instead.  That requires udev and a
>>>>>>2.6 kernel, but is the only way you can know exactly when the /dev entry
>>>>>>is created.
>>>>>Where is this documented?
>>>>In the udev documentation and a simple google search brings it up.
>>>>
>>>>>Even if the /etc/dev.d/ interface works, that doesn't really make it
>>>>>acceptable that the /etc/hotplug.d/ interface is broken.  There is some
>>>>>locking that ought to be happening and isn't.
>>>>The interface is not broken, you are trying to trigger off of two
>>>>different hotplug events (one when the device appears, and a different
>>>>one when the device node is to be created.)
>>>If it's not broken, then it's not documented either.
>>You are watching for the wrong hotplug event, how can we document that?
>>:)
> 
> If the hotplug helper in /proc/sys/kernel/hotplug is set
> to /sbin/udevsend, what all major distributions seems to do today, than
> there is nearly no difference between /etc/hotplug.d/ and /etc/dev.d/.
True. Especially since hotplug.d is _always_ called after dev.d.
Having them in seperate directories just adds to the maintenance overhead.
> Yeah, I'm all for doing this with udev rules. It is already working on
> my box. We just need to agree if and how we should do that. The plan is
> to add hotplug scripts with udev rules and execute scripts based on the
> same rule logic we use to name the device node.
> 
> Your hook into hotplug with a udev rule would look like this:
>   ACTION="add", SYSFS{vendor}="GPS", SYSFS{product}="0815", NAME="gps", HOTPLUG="/usr/bin/gps-something"
> 
And that would be really nice.
Then we would have a truly fine-grained selection for which devices we
actually need to call scripts.
Booting with full event replay is slow enough as it is, any speed-up is
greatly welcome.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke			hare@suse.de
SuSE Linux AG				S390 & zSeries
Maxfeldstraße 5				+49 911 74053 688
90409 Nürnberg				http://www.suse.de


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&opÃk
_______________________________________________
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:[~2005-03-11 15:38 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-11  6:04 New hotplug interface is not working right for me Eric S. Raymond
2005-03-11  6:45 ` Greg KH
2005-03-11  8:54 ` Kay Sievers
2005-03-11 13:38 ` Eric S. Raymond
2005-03-11 14:16 ` Kay Sievers
2005-03-11 15:38 ` Hannes Reinecke [this message]
2005-03-11 15:40 ` Eric S. Raymond
2005-03-11 16:05 ` Kay Sievers
2005-03-11 17:03 ` Eric S. Raymond
2005-03-11 17:32 ` Kay Sievers
2005-03-11 18:58 ` Christian Zoz
2005-03-11 19:07 ` Eric S. Raymond
2005-03-11 20:35 ` Kay Sievers
2005-03-11 20:48 ` Eric S. Raymond
2005-03-14 17:06 ` Darren Salt
2005-03-14 18:16 ` Marco d'Itri
2005-03-14 18:25 ` Kay Sievers

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=4231BB7B.5060502@suse.de \
    --to=hare@suse.de \
    --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).