I have got some very old computer which supports only usb 1.1. There is uhci controller onboard. As far as I know there is no usb-hub built in. The uhci controller has 2 physical usb ports.
我有一台非常旧的电脑,只支持usb 1.1。板载uhci控制器。据我所知,没有内置的usb-hub.uhci控制器有2个物理usb端口。
But when the linux starts it shows that it recognized 2-ports usb virtual root hub. I'd like to know if this "root hub" is some kind of abstraction layer for usb-stack? How linux could recognize root hub while there is not such device onboard?
但是当linux启动时,它表明它识别出2端口的usb虚拟根集线器。我想知道这个“根集线器”是否是usb-stack的某种抽象层?如果没有这样的设备,linux如何识别根集线器?
Is this virtual root hub some kind of mapping for those 2 usb ports just for make usb stack easier for programming?
这个虚拟根集线器是否为这两个usb端口提供了某种映射,只是为了使usb堆栈更易于编程?
1 个解决方案
#1
1
Yes, you are on the right track with your thinking. There is no separate hub device.
是的,你的想法是正确的。没有单独的集线器设备。
With simplifications: USB architecture distinguishes Host and Device. Within Host there is Host Controller. Yours is of the type UHCI. Root hub is part of the host controller architecture. Succinct description is here. Full precise details may be found in USB 2.0 specs. It may be noted that the root hub abstraction is integral to USB Host specifications, it is not just the linux USB stack that uses this abstraction.
通过简化:USB架构可区分主机和设备。在主机内有主机控制器。你的类型是UHCI。根集线器是主机控制器体系结构的一部分。简洁的描述在这里。 USB 2.0规范中可以找到完整的详细信息。可以注意到,根集线器抽象是USB主机规范的组成部分,它不仅仅是使用这种抽象的linux USB堆栈。
Software such as linux will know how to probe the host controller hardware, it will read registers giving necessary details e.g. how many ports are present.
诸如linux之类的软件将知道如何探测主机控制器硬件,它将读取寄存器,提供必要的细节,例如:有多少个端口。
Some additional good info in top answer here.
这里有一些额外的好消息。
#1
1
Yes, you are on the right track with your thinking. There is no separate hub device.
是的,你的想法是正确的。没有单独的集线器设备。
With simplifications: USB architecture distinguishes Host and Device. Within Host there is Host Controller. Yours is of the type UHCI. Root hub is part of the host controller architecture. Succinct description is here. Full precise details may be found in USB 2.0 specs. It may be noted that the root hub abstraction is integral to USB Host specifications, it is not just the linux USB stack that uses this abstraction.
通过简化:USB架构可区分主机和设备。在主机内有主机控制器。你的类型是UHCI。根集线器是主机控制器体系结构的一部分。简洁的描述在这里。 USB 2.0规范中可以找到完整的详细信息。可以注意到,根集线器抽象是USB主机规范的组成部分,它不仅仅是使用这种抽象的linux USB堆栈。
Software such as linux will know how to probe the host controller hardware, it will read registers giving necessary details e.g. how many ports are present.
诸如linux之类的软件将知道如何探测主机控制器硬件,它将读取寄存器,提供必要的细节,例如:有多少个端口。
Some additional good info in top answer here.
这里有一些额外的好消息。