Overall USB structure in Windows XP

Source: Internet
Author: User

Here we mainly talk about the overall structure of the USB driver protocol stack in Windows XP and some important internal data structures. When writing these things, I referred to the related forum posts of Daniel tiamo. The content is similar and I can't say that it is a repost.

The USB stack consists of the following driver files:

USB port. sys USB Host Controller shared driverCodeLibrary for The miniport driver to call.
USB hub. sys USB bus driver, USB Bus is also a type of USB device.
Usbehci. sys usb ehci host controller driver, which belongs to the miniport driver.
Usbuhci. sys USB uhci host controller driver, which belongs to the miniport driver.
Usbohci. sys usb ohci host controller driver, which belongs to the miniport driver.
Usbd. sys USB device drivers share the code library for USB device drivers and bus drivers to call.

USB ccgp. sys USB composite device driver.
USB stor. sys USB storage device driver.
Usbaudio. sys USB sound device driver.
USB video. sys USB video device driver.
Hidusb. sys usb hid device driver.

The host controller driver is the underlying driver of the USB protocol stack, on which is the USB bus driver and then the USB device driver.

There are usually other drivers on the USB driver. For example, there is a class driver for the storage device on the usb stor, and a hidclass driver on the USB. However, the above driver has little to do with the USB driver protocol stack. The relationship between device drivers and specific devices is not the focus of our discussion.

Which of the following is important?Controller and bus, the core of the USB driver protocol stack.

We know that USB2.0 has EHCI controller, and USB1.1 has uhci and OHCI controller. There are three controllers in total. What is the difference between them?
The role of the Controller should be described first,The USB protocol stack is not built out of thin air, and its lower layer is the PCI bus driver.(In general, it is not necessarily a PCI Bus), and the role of the controller is to deal with the PCI bus, the USB functions and operations into a series of operations on the PCI bus, it also serves as the daily management of the USB bus.

Different hardware vendors can have their own Controller specifications, which was particularly prominent in the early days of the USB protocol. However, this is not conducive to the development of the entire specification, So we began to unify the interface specification, which can meet most of the needs of everyone, so everyone will use the standard specification. USB
In 1.1, the OHCI and uhci camps were formed, while in, only EHCI was formed. Obviously, people still think that the less standard, the less trouble.

By comparing the uhci and OHCI, both of them provide support for the USB protocol. However,Uhci hardware implementation is relatively small and the cost is relatively low, but the software-driven complexity is relatively high.
Therefore, uhci is mostly used on PCs, and OHCI is mostly used in embedded devices.
. While EHCI is accompanied by USB
2.0 the specification came into being together (because everyone was fed up with the pain of supporting the two specifications at the same time), and it was also backward compatible with uhci and OHCI.

Okay, so much nonsense. You can check the details on the Internet. Next, let's talk about the controller driver. The specifications of various controllers differ greatly from the interfaces of the underlying PCI bus, but the functions of the Controller to control the USB bus are basically the same --
All comply with USB specifications. So,The underlying driver interfaces of major controllers are independent, while the USB Bus Management Department is extracted to form a common code library named
Usbport. sys
. That is to say, USB port. sys is not an independent driver, but a dynamic link library for others to call. This dynamic link library implements the vast majority of controller-driven functions, so we are used to regard it as the subject of controller-driven.

This article explains how USB port. sys is going on. It also describes usbd. sys. The role of usbd. sys is similar to that of USB port. SYS. It serves as a dynamic link library for USB device drivers and USB bus drivers. However, because usbd. sys has limited functions and is not as prominent as USB port. sys, it is relatively marginalized,
Ignore it in general discussions.

The overall structure of the USB driver stack is described here. The functions implemented by USB hub. sys and USB port. sys will be described later.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.