As well as updating some internal docs so they're current,
this patch adds the physical path to the data available
through hotplugging.  This feature was requested at the
LinuxKongress hotplug BOF, and was also on my 2.5 list.

And is already present with the DEVPATH environment variable, right?
No, DEVPATH isn't as stable as the physical path. And will
not be available on 2.4 ... which will be important for a
few years yet, particularly for layers above the kernel.

Ok, but this was a patch for 2.5, right?  We have DEVPATH, and don't
need to have USB_PATH for 2.5.
They don't solve the same problems though, so we _do_ need something
to solve the problem that usb_make_path() solves.


Plus, you were at pains to explain to me how DEVPATH should
not be perceived as a physical path.  They don't even try to
address the same problems.

Sure, but what is the problem?  It's as stable as what you are trying to
use, right?
No, as I had described.  USB bus numbers are not stable,
so having them in identifers is counter-productive:  they
reduce identifer stability.


Here's part of what I got from hotplugging one keyboard:

 DEVICE=/proc/bus/usb/001/006
 ACTION=add
 TYPE=9/0/0
 USB_PATH=usb-02:00.0-1.4
 DEVPATH=root/pci0/00:03.0/02:00.0/usb1/1-1/1-1.4/1-1.4:0
 PRODUCT=58f/9213/101

At best, DEVPATH needs a _lot_ of mangling to turn into
the physical ID.  And using long IDs is always error prone.

But the last file in DEVPATH is equal to what you wanted to use in
USB_PATH, right?   And if you really wanted the pci id, it's there too.
You mean "1-1.4:0"?  Compare -- only the "1.4" is significant.

And it's not necessarily a PCI ID ... remember that USB is usable
without PCI.  That's an example of where any approach of trying
to mangle DEVPATH is guaranteed to lose.


At worst, remember that identifiers like "pci0" and "usb1"
change a lot more readily than "02:00.0".  (Even on cardbus
and similar hotplug pci, since most people have control over
which slots they use.)  Using DEVPATH would ensure that
many more "should-be-minor" changes in system config will
need sysadmin and tool attention.  That's generally not-good,
particularly when needs for routine tool use are so easy to
avoid ... save tool work for the important stuff!

But I don't want to drag around two naming schemes for devices, let's
stick to the one the rest of the kernel is going to use, DEVPATH.
The rest of the kernel has quite a few schemes for identifying
devices, each appropriate to the problem at hand.  DEVPATH isn't
really helpful in all cases; it isn't used everywhere (can't be).



I do like your comment cleanups, if you want to send me that part of the
patch again.
Simpler for you to just edit out the USB_PATH fragment of the patch.

- Dave





-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to