The /proc/bus/usb/devices got moved to sysfs. It is now sitting at: /sys/kernel/debug/usb/devices Fix the old references at the USB documentation Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxxx> --- Documentation/driver-api/usb/usb.rst | 14 +++++++------- Documentation/usb/acm.txt | 2 +- Documentation/usb/gadget_serial.txt | 4 ++-- Documentation/usb/proc_usb_info.txt | 20 ++++++++++---------- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Documentation/driver-api/usb/usb.rst b/Documentation/driver-api/usb/usb.rst index 6824089ef4c8..036e77038d42 100644 --- a/Documentation/driver-api/usb/usb.rst +++ b/Documentation/driver-api/usb/usb.rst @@ -233,7 +233,7 @@ What files are in "usbfs"? Conventionally mounted at ``/proc/bus/usb``, usbfs features include: -- ``/proc/bus/usb/devices`` ... a text file showing each of the USB +- ``/sys/kernel/debug/usb/devices`` ... a text file showing each of the USB devices on known to the kernel, and their configuration descriptors. You can also poll() this to learn about new devices. @@ -299,23 +299,23 @@ invocations of *mount*, are: 0) *listgid*\ =NNNNN - Controls the GID used for the /proc/bus/usb/devices and drivers + Controls the GID used for the /sys/kernel/debug/usb/devices and drivers files. (Default: 0) *listmode*\ =MMM - Controls the file mode used for the /proc/bus/usb/devices and + Controls the file mode used for the /sys/kernel/debug/usb/devices and drivers files. (Default: 0444) *listuid*\ =NNNNN - Controls the UID used for the /proc/bus/usb/devices and drivers + Controls the UID used for the /sys/kernel/debug/usb/devices and drivers files. (Default: 0) Note that many Linux distributions hard-wire the mount options for usbfs in their init scripts, such as ``/etc/rc.d/rc.sysinit``, rather than making it easy to set this per-system policy in ``/etc/fstab``. -/proc/bus/usb/devices ---------------------- +/sys/kernel/debug/usb/devices +----------------------------- This file is handy for status viewing tools in user mode, which can scan the text format and ignore most of it. More detailed device status @@ -330,7 +330,7 @@ to detect when devices are added or removed:: int fd; struct pollfd pfd; - fd = open("/proc/bus/usb/devices", O_RDONLY); + fd = open("/sys/kernel/debug/usb/devices", O_RDONLY); pfd = { fd, POLLIN, 0 }; for (;;) { /* The first time through, this call will return immediately. */ diff --git a/Documentation/usb/acm.txt b/Documentation/usb/acm.txt index 17f5c2e1a570..903abca10517 100644 --- a/Documentation/usb/acm.txt +++ b/Documentation/usb/acm.txt @@ -64,7 +64,7 @@ minicom, ppp and mgetty with them. 2. Verifying that it works ~~~~~~~~~~~~~~~~~~~~~~~~~~ - The first step would be to check /proc/bus/usb/devices, it should look + The first step would be to check /sys/kernel/debug/usb/devices, it should look like this: T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2 diff --git a/Documentation/usb/gadget_serial.txt b/Documentation/usb/gadget_serial.txt index 6b4a88a8c8e3..d1def3186782 100644 --- a/Documentation/usb/gadget_serial.txt +++ b/Documentation/usb/gadget_serial.txt @@ -189,7 +189,7 @@ Once the gadget serial driver is loaded and the USB device connected to the Linux host with a USB cable, the host system should recognize the gadget serial device. For example, the command - cat /proc/bus/usb/devices + cat /sys/kernel/debug/usb/devices should show something like this: @@ -221,7 +221,7 @@ Once the gadget serial driver is loaded and the USB device connected to the Linux host with a USB cable, the host system should recognize the gadget serial device. For example, the command - cat /proc/bus/usb/devices + cat /sys/kernel/debug/usb/devices should show something like this: diff --git a/Documentation/usb/proc_usb_info.txt b/Documentation/usb/proc_usb_info.txt index 98be91982677..06d7960e9ae6 100644 --- a/Documentation/usb/proc_usb_info.txt +++ b/Documentation/usb/proc_usb_info.txt @@ -4,7 +4,7 @@ The usbfs filesystem for USB devices is traditionally mounted at -/proc/bus/usb. It provides the /proc/bus/usb/devices file, as well as +/proc/bus/usb. It provides the /sys/kernel/debug/usb/devices file, as well as the /proc/bus/usb/BBB/DDD files. In many modern systems the usbfs filesystem isn't used at all. Instead @@ -24,7 +24,7 @@ USB device nodes are created under /dev/usb/ or someplace similar. The none /proc/bus/usb usbfs defaults 0 0 to /etc/fstab. This will mount usbfs at each reboot. - You can then issue `cat /proc/bus/usb/devices` to extract + You can then issue `cat /sys/kernel/debug/usb/devices` to extract USB device information, and user mode drivers can use usbfs to interact with USB devices. @@ -60,7 +60,7 @@ descriptors are in bus endian format! The configuration descriptor are wTotalLength bytes apart. If a device returns less configuration descriptor data than indicated by wTotalLength there will be a hole in the file for the missing bytes. This information is also shown -in text form by the /proc/bus/usb/devices file, described later. +in text form by the /sys/kernel/debug/usb/devices file, described later. These files may also be used to write user-level drivers for the USB devices. You would open the /proc/bus/usb/BBB/DDD file read/write, @@ -79,9 +79,9 @@ usbfs mount options such as "devmode=0666" may be helpful. -THE /proc/bus/usb/devices FILE: +THE /sys/kernel/debug/usb/devices FILE: ------------------------------- -In /proc/bus/usb/devices, each device's output has multiple +In /sys/kernel/debug/usb/devices, each device's output has multiple lines of ASCII output. I made it ASCII instead of binary on purpose, so that someone can obtain some useful data from it without the use of an @@ -104,7 +104,7 @@ E = Endpoint descriptor info. ======================================================================= -/proc/bus/usb/devices output format: +/sys/kernel/debug/usb/devices output format: Legend: d = decimal number (may have leading spaces or 0's) @@ -277,16 +277,16 @@ E: Ad=xx(s) Atr=xx(ssss) MxPS=dddd Ivl=dddss If a user or script is interested only in Topology info, for -example, use something like "grep ^T: /proc/bus/usb/devices" +example, use something like "grep ^T: /sys/kernel/debug/usb/devices" for only the Topology lines. A command like -"grep -i ^[tdp]: /proc/bus/usb/devices" can be used to list +"grep -i ^[tdp]: /sys/kernel/debug/usb/devices" can be used to list only the lines that begin with the characters in square brackets, where the valid characters are TDPCIE. With a slightly more able script, it can display any selected lines (for example, only T, D, and P lines) and change their output format. (The "procusb" Perl script is the beginning of this idea. It will list only selected lines [selected from TBDPSCIE] or "All" lines from -/proc/bus/usb/devices.) +/sys/kernel/debug/usb/devices.) The Topology lines can be used to generate a graphic/pictorial of the USB devices on a system's root hub. (See more below @@ -297,7 +297,7 @@ being used for each device, and which altsetting it activated. The Configuration lines could be used to list maximum power (in milliamps) that a system's USB devices are using. -For example, "grep ^C: /proc/bus/usb/devices". +For example, "grep ^C: /sys/kernel/debug/usb/devices". Here's an example, from a system which has a UHCI root hub, -- 2.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html