USB device driver 1: Root hub Device Driver Installation

Source: Internet
Author: User

According to the bus, device, and driver modes of the device model, a bus will mount all the devices and drivers on the bus to the device Chain List and driver chain table of the bus, specific to the USB bus, the USB master controller, hub, and other devices must be mounted to the device linked list of the USB bus according to the requirements of the device model, the Hub driver is also mounted to the driver chain table, and the device and device drivers can be associated to enable the device to use and complete the functions of the device.

How is the USB hub driver mounted and associated with the hub device?

First, you must have a USB bus. a usb master controller corresponds to a USB bus. The number of USB master controllers in a system is the number of USB buses. Our common uhci, OHCI, and echi are different USB master controllers. Generally, these master controllers are PCI interfaces. By loading the corresponding PCI device drivers, the system adds a USB bus. These are all completed before our current work.

Secondly, the current USB master controller is integrated with a root hub. After we have driven the USB master controller, the next step is to use the device model to put the root Hub (root hub) add a device to the device queue of the USB bus, and check whether there is a driver that supports the device from the driver queue of the bus.ProgramIf the driver is found, you can associate the device, driver, and bus with corresponding pointer relationships based on the triangular relationship of the device model. If no driver is found, the root hub cannot work normally. It can only wait for the driver to be installed in the device queue of the bus, and then match whether it is OK. If there is no corresponding driver, then this bus cannot mount other devices.

After the root hub matches the driver, a process is cyclically run to find that the hub port has a device inserted or removed.

The general flowchart is as follows:

 

 

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.