zoukankan      html  css  js  c++  java
  • usb topology分析

    在linux doc的proc_usb_info.txt 中:

    /proc/bus/usb/devices 中T = Topology (etc.)开头的行可以分析拓扑

    Topology info:

    T:  Bus=dd Lev=dd Prnt=dd Port=dd Cnt=dd Dev#=ddd Spd=ddd MxCh=dd
    |   |      |      |       |       |      |        |       |__MaxChildren
    |   |      |      |       |       |      |        |__Device Speed in Mbps
    |   |      |      |       |       |      |__DeviceNumber
    |   |      |      |       |       |__Count of devices at this level
    |   |      |      |       |__Connector/Port on Parent for this device
    |   |      |      |__Parent DeviceNumber
    |   |      |__Level in topology for this bus
    |   |__Bus number
    |__Topology info tag

        Speed may be:
            1.5    Mbit/s for low speed USB
        12    Mbit/s for full speed USB
        480    Mbit/s for high speed USB (added for USB 2.0)

    例子:

    T:  Bus=00 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
    T:  Bus=00 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  MxCh= 4
    I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
    T:  Bus=00 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#=  3 Spd=1.5 MxCh= 0
    I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=02 Driver=mouse
    T:  Bus=00 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#=  4 Spd=12  MxCh= 0
    I:  If#= 0 Alt= 0 #EPs= 3 Cls=00(>ifc ) Sub=00 Prot=00 Driver=serial

    Physically this looks like (or could be converted to):

                          +------------------+
                          |  PC/root_hub (12)|   Dev# = 1
                          +------------------+   (nn) is Mbps.
        Level 0           |  CN.0   |  CN.1  |   [CN = connector/port #]
                          +------------------+
                              /
                             /
                +-----------------------+
      Level 1   | Dev#2: 4-port hub (12)|
                +-----------------------+
                |CN.0 |CN.1 |CN.2 |CN.3 |
                +-----------------------+
                    \           \____________________
                     \_____                          \
                           \                          \
                   +--------------------+      +--------------------+
      Level 2      | Dev# 3: mouse (1.5)|      | Dev# 4: serial (12)|
                   +--------------------+      +--------------------+

    Or, in a more tree-like structure (ports [Connectors] without
    connections could be omitted):

    PC:  Dev# 1, root hub, 2 ports, 12 Mbps
    |_ CN.0:  Dev# 2, hub, 4 ports, 12 Mbps
         |_ CN.0:  Dev #3, mouse, 1.5 Mbps
         |_ CN.1:
         |_ CN.2:  Dev #4, serial, 12 Mbps
         |_ CN.3:
    |_ CN.1:

                             ### END ###

  • 相关阅读:
    Redis源代码分析(十三)--- redis-benchmark性能測试
    kvm中运行kvm
    umount.nfs device busy day virsh extend diskSpace, attachDisk
    ultravnc
    openNebula dubug
    maintenance ShellScripts
    virsh VMI deploy data serial xml
    cloud computing platform,virtual authentication encryption
    基于C 的libvirt 接口调用
    storage theory
  • 原文地址:https://www.cnblogs.com/cute/p/2024718.html
Copyright © 2011-2022 走看看