linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Neukum <oliver@neukum.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: Naming persistence of USB devices
Date: Wed, 08 Dec 2004 08:40:51 +0000	[thread overview]
Message-ID: <200412080940.51703.oliver@neukum.org> (raw)
In-Reply-To: <loom.20041208T040332-835@post.gmane.org>


> I assume there is no danger of the devices exchanging names through reboots as
> long as they stay plugged into the same ports on the same hub on the same root

Probing order on boot is deterministic. But nevertheless, device numbers
may still change if a device fails to enumerate.

> hub.  What if I change any of this?  What if I move the tree (I don't know the
> official USB term) of devices (hubs and peripherals) from one root hub to

Should be safe.

> another?  Upon reenumeration will the /dev names change?  What if I have a
> device plugged into a hub, power down and for whatever reason when I reattach
> the device I plug it into a different port, what if that port is on a different
> hub or root hub?
> 
> If anyone can point me to a document explaining the fundamentals of USB and 1394
> enumeration I would appreciate it.  My single biggest question is how does a

The kernel hands out device numbers strictly in order of discovery.

> device get it's /dev name, is it based off some world unique device number (like
> Ethernet MAC addresses) or maybe the Linux scans the first USB adapter/bridge it
> comes across on the PCI bus then follows some convention for the devices
> connected to hubs downstream.

The latter. USB devices in most cases lack any unique identifier. You have
a choice between naming based on topology or naming in discovery order.
You can use udev to implement either policy.

	HTH
		Oliver


-------------------------------------------------------
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://productguide.itmanagersjournal.com/
_______________________________________________
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

      reply	other threads:[~2004-12-08  8:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-08  3:21 Naming persistence of USB devices Adam Hunt
2004-12-08  8:40 ` Oliver Neukum [this message]

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=200412080940.51703.oliver@neukum.org \
    --to=oliver@neukum.org \
    --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).