[PATCH] USB physical paths id
authorDavid Brownell <david-b@pacbell.net>
Tue, 9 Apr 2002 07:16:42 +0000 (00:16 -0700)
committerGreg Kroah-Hartman <greg@kroah.com>
Tue, 9 Apr 2002 07:16:42 +0000 (00:16 -0700)
commit3668d7cddd694a5deb60436ee0d528c54187b0b2
tree9c5c5b485a56e6f4c07cc8df80c2fd59c6058df9
parentc060c5c9485236acb9e4e0df4fb3c02dea322199
[PATCH] USB physical paths id

This provides something that gets discussed regularly: stable
device IDs.  Straightforward; most of it was already present:

    - Moves "bus_name" out of HCD framework into usb_bus.
      This accounts for _by far the bulk_ of this patch, since
      every use of that original field needed to change.

    - Make Vojtech's usb_make_path() use bus_name instead
      of unstable bus numbers ... and usb_device->devpath
      instead of recomputing that same info.  Combine two
      stable IDs, and the result is still stable.  And since both
      are precomputed, usb_make_path() turns into only an
      error check wrapped around snprintf() ... so I inlined it.

    - Minor tweak to usb_device->devpath construction.  It
      still uses "/" for the root hub (better suggestions?) but
      Vojtech wanted "." for separators, so I changed that.

    - The older HCDs (uhci.c etc) initialize usb_bus.bus_name,
      as well as the sharable HCD framework

    - HCD framework no longer uses "bus" member.

These IDs are currently exposed in "input" hotplugging, and
my next patch addresses that for USB network devices.
15 files changed:
drivers/usb/core/hcd.c
drivers/usb/core/hcd.h
drivers/usb/core/hub.c
drivers/usb/core/usb.c
drivers/usb/host/ehci-dbg.c
drivers/usb/host/ehci-hcd.c
drivers/usb/host/ehci-hub.c
drivers/usb/host/ehci-q.c
drivers/usb/host/ohci-dbg.c
drivers/usb/host/ohci-hcd.c
drivers/usb/host/ohci-hub.c
drivers/usb/host/uhci.c
drivers/usb/host/usb-ohci.c
drivers/usb/host/usb-uhci.c
include/linux/usb.h