linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: linux-hotplug@vger.kernel.org
Subject: Re: Adding PCMCIA support to the kernel tree -- developers needed.
Date: Wed, 07 Feb 2001 18:24:53 +0000	[thread overview]
Message-ID: <marc-linux-hotplug-98157628626724@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-98118528107653@msgid-missing>

> > > > When I thought about this last year, my conclusion was that it SHOULD
> > > > be OK to have multiple event orderings so long as all were correctly
> > > > serialized with respect to essential criteria.  Just as if they were
> > >
> > > Essentially I believe you right. But which criteria ?
> >
> > "add" finishes before "remove" starts; the names of
> > devices are stable while those agents execute.
> > Minimal.
> 
> These are not enough. You must ensure that "remove" has finished before you
> start anything that reuses the device node.

I was assuming something that I suspect we should be considering
as a goal (an "architectural" one?): names passed by hotplug agents
must be stable.

Right now, PCI meets that requirement (PCI_SLOT).
USB does not, networking does not.

Before 2.4.0 went "final", USB changed its address assignment
so its names (busnum/devnum) were less unstable:  devnum is
assigned round-robin.  There's a patch I put together a while back
to give USB devices stable names, but it's not integrated.

I'll have to think more about Vojtech's comments.  I think I will
likely want the kernel to guarantee some stable name (is that a
place where devfs could really help?) and let all the mappings
to "virtual" names (like "eth0") be managed separately.


> You see, changing the order of events 2 and 3 is wrong.
> You'd have the wrong interfaces in printcap.  

Couldn't matter if the agent were passing the right stable names
though, right? 


> The amount of locking needed to be provided by shell scripts worries me.

Compiled code (C, Java, etc) accessing kernel configuration APIs can
kick in at any time it's really needed, don't worry about that one!


> > That means fixing some subsystem behaviors (using stable names for
> > network interfaces, as one example).  Architecturally, there is no sense
> > to letting two subsystems interfere with each other.
> 
> Then you'd need to have a stable name provided to the hotplug script.

Yes ...


> This is difficult, for several reasons.
> a) You need devfs (which is not PC)

"devfsd" is not PC for me, but I'm less clear why a "/devfs" wouldn't be fine.
Anyone care to start a separate thread on such topics?


> b) You know that name only after the driver is loaded. (You don't even know 
> the number of names, multifunction devices and bridges)

Device drivers can be viewed as adapters between namespaces:
loading a device driver may cause entries in other namespaces.

USB device "/proc/bus/usb/002/031" may be network interface "usb0".
The lower level name (USB) is known before "usbnet" is loaded,
but "usb0" isn't known till afterwards ... but then, USB hotplugging
sees the USB name, and network hotplugging is what sees "usb0".


> c) You'd need to call after drivers have bound to interfaces.

USB hotplug is called after the kernel gives drivers a chance to
bind to interfaces.

For network devices, hotplug is called after the driver created
and registered/named a new interface.


> d) There might be devices which have difficulties providing a stable name.

Then let them deal with it.  If the busses provide stable names, then we
can federate them in some namespace that can be used by layers above
the  busses.  "pci-02:7.3" can be a PCI device, and any driver that has
a hard time turning one stable name into another likely has other problems!


> These are conflicting requirements. In fact you'd need _two_ scripts. One to 
> load the driver, a second to configure the device the driver has bound to.

You mean like the difference between /etc/hotplug/*.agent (load driver FOO)
and /etc/hotplug/*/FOO (configure each new device)?  :-)

- Dave



_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

  parent reply	other threads:[~2001-02-07 18:24 UTC|newest]

Thread overview: 107+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-03  7:28 Adding PCMCIA support to the kernel tree -- developers needed Miles Lane
2001-02-03 10:07 ` Jeff Garzik
2001-02-03 19:27 ` David Woodhouse
2001-02-03 23:59 ` Miles Lane
2001-02-04  0:00 ` David Hinds
2001-02-04  0:05 ` David Woodhouse
2001-02-04  1:19 ` David Brownell
2001-02-04  1:58 ` Miles Lane
2001-02-04  3:26 ` Keith Owens
2001-02-04  5:59 ` Miles Lane
2001-02-04  8:56 ` David Hinds
2001-02-04  9:55 ` David Woodhouse
2001-02-04 10:00 ` David Woodhouse
2001-02-04 10:10 ` Oliver Neukum
2001-02-04 10:53 ` David Woodhouse
2001-02-04 11:37 ` David Woodhouse
2001-02-04 17:34 ` David Hinds
2001-02-04 18:02 ` Miles Lane
2001-02-04 18:16 ` Oliver Neukum
2001-02-04 18:54 ` Miles Lane
2001-02-05  1:14 ` Jeff Garzik
2001-02-05  1:56 ` David Brownell
2001-02-05  2:43 ` Miles Lane
2001-02-05  8:42 ` Miles Lane
2001-02-05 10:01 ` Keith Owens
2001-02-05 10:13 ` Keith Owens
2001-02-05 23:43 ` David Woodhouse
2001-02-05 23:45 ` David Woodhouse
2001-02-05 23:59 ` Oliver Neukum
2001-02-06  0:27 ` Miles Lane
2001-02-06  1:10 ` David Brownell
2001-02-06  1:40 ` David Brownell
2001-02-06  6:55 ` Miles Lane
2001-02-06  7:11 ` David Woodhouse
2001-02-06  7:58 ` David Hinds
2001-02-06  8:02 ` David Hinds
2001-02-06  8:13 ` David Hinds
2001-02-06  9:51 ` Oliver Neukum
2001-02-06 13:46 ` Andrew Morton
2001-02-06 15:15 ` Jeff Garzik
2001-02-06 15:20 ` David Woodhouse
2001-02-06 15:33 ` Oliver Neukum
2001-02-06 15:35 ` David Woodhouse
2001-02-06 15:54 ` Oliver Neukum
2001-02-06 16:43 ` Jeff Garzik
2001-02-06 18:56 ` David Brownell
2001-02-06 19:22 ` David Brownell
2001-02-06 19:31 ` David Brownell
2001-02-06 22:09 ` Adam J. Richter
2001-02-06 22:10 ` Andrew Morton
2001-02-06 22:50 ` Oliver Neukum
2001-02-06 23:07 ` Andrew Morton
2001-02-06 23:12 ` Andrew Morton
2001-02-06 23:14 ` Andrew Morton
2001-02-06 23:20 ` David Woodhouse
2001-02-06 23:30 ` Oliver Neukum
2001-02-06 23:34 ` Oliver Neukum
2001-02-06 23:36 ` Andrew Morton
2001-02-07  1:33 ` David Brownell
2001-02-07  2:11 ` Miles Lane
2001-02-07  2:38 ` Adam J. Richter
2001-02-07  9:02 ` Oliver Neukum
2001-02-07  9:09 ` Vojtech Pavlik
2001-02-07  9:10 ` David Woodhouse
2001-02-07  9:35 ` Oliver Neukum
2001-02-07  9:37 ` Vojtech Pavlik
2001-02-07  9:57 ` Oliver Neukum
2001-02-07 10:11 ` Vojtech Pavlik
2001-02-07 10:27 ` David Woodhouse
2001-02-07 10:29 ` Oliver Neukum
2001-02-07 10:30 ` David Woodhouse
2001-02-07 14:45 ` Oliver Neukum
2001-02-07 15:19 ` Adam J. Richter
2001-02-07 16:11 ` Oliver Neukum
2001-02-07 17:37 ` Miles Lane
2001-02-07 17:48 ` Vojtech Pavlik
2001-02-07 18:24 ` David Brownell [this message]
2001-02-07 18:42 ` David Brownell
2001-02-07 18:47 ` David Brownell
2001-02-07 18:47 ` Oliver Neukum
2001-02-07 19:00 ` David Brownell
2001-02-07 19:29 ` Vojtech Pavlik
2001-02-07 19:59 ` Miles Lane
2001-02-07 21:02 ` Oliver Neukum
2001-02-07 21:14 ` David Brownell
2001-02-07 22:43 ` Oliver Neukum
2001-02-08  7:22 ` Miles Lane
2001-02-08  9:29 ` Adam J. Richter
2001-02-08 10:24 ` Oliver Neukum
2001-02-08 12:47 ` Andrew Morton
2001-02-08 13:22 ` Oliver Neukum
2001-02-08 13:49 ` Andrew Morton
2001-02-08 14:07 ` Oliver Neukum
2001-02-08 15:00 ` Vojtech Pavlik
2001-02-08 15:10 ` Vojtech Pavlik
2001-02-08 15:13 ` Vojtech Pavlik
2001-02-09  7:42 ` Vojtech Pavlik
2001-02-09 11:48 ` Oliver Neukum
2001-02-09 12:45 ` Vojtech Pavlik
2001-02-09 13:09 ` Oliver Neukum
2001-02-09 14:15 ` David Brownell
2001-02-09 15:45 ` Vojtech Pavlik
2001-02-26 17:47 ` David Brownell
2001-02-26 21:45 ` Chris Brand
2001-02-27  7:56 ` David Hinds
2001-02-28 16:56 ` David Brownell
2001-02-28 17:32 ` David Hinds

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-98157628626724@msgid-missing \
    --to=david-b@pacbell.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).