1USB_MAKE_PATH(9)        Host-Side Data Types and Macro        USB_MAKE_PATH(9)
2
3
4

NAME

6       usb_make_path - returns stable device path in the usb tree
7

SYNOPSIS

9       int usb_make_path(struct usb_device * dev, char * buf, size_t size);
10

ARGUMENTS

12       dev
13           the device whose path is being constructed
14
15       buf
16           where to put the string
17
18       size
19           how big is “buf”?
20

DESCRIPTION

22       Returns length of the string (> 0) or negative if size was too small.
23
24       This identifier is intended to be “stable”, reflecting physical paths
25       in hardware such as physical bus addresses for host controllers or
26       ports on USB hubs. That makes it stay the same until systems are
27       physically reconfigured, by re-cabling a tree of USB devices or by
28       moving USB host controllers. Adding and removing devices, including
29       virtual root hubs in host controller driver modules, does not change
30       these path identifers; neither does rebooting or re-enumerating. These
31       are more useful identifiers than changeable (“unstable”) ones like bus
32       numbers or device addresses.
33
34       With a partial exception for devices connected to USB 2.0 root hubs,
35       these identifiers are also predictable. So long as the device tree
36       isn´t changed, plugging any USB device into a given hub port always
37       gives it the same path. Because of the use of “companion” controllers,
38       devices connected to ports on USB 2.0 root hubs (EHCI host controllers)
39       will get one path ID if they are high speed, and a different one if
40       they are full or low speed.
41
43Kernel Hackers Manual 2.6.         June 2019                  USB_MAKE_PATH(9)
Impressum