JustKernel

Ray Of Hope

USBOIP – The Underlying USB architecture

For USBOIP project , I need to <strong>implement virtual host controller driver</strong>.

  • Why we need this driver and
  • what will be its functionality
  • What will be the architecture / high level design for this approach

Answers to all these queries will be there in the series of articles on USBOIP.

The primary hardware and software elements associated with USB solution includes

USB Hardware

  •  USB Host Controller/ Root Hub
  • USB Hubs
  • USB Devices

USB Software

  • USB Device driver
  • USB driver
  • USB Controller Driver.

USB Client Driver: USB Client drivers issue request to USB bus driver via IRPs. These IRPs initiate a given transfer to or from a target USB device.

USB Bus Driver:  knows the characteristics of the USB target device and hot to communicate with the device via USB. The USB characterisitics are detected by the USB driver when it parses the device descriptors during device configuration.

When an IRP is received from a USB client driver, the USB driver organizes the request into individual transactions that will be executed during a series of intervals called frames.

USB Host Controller Driver: (This is the driver that we need to filter for USBOIP)</strong> : The USB host controller driver schedules transactions to be broadcasted over the USB. Transactions are scheduled by the host controller driver via a series of transaction list. Each list consists of pending transaction targeted for one or more of the USB devices attached to the bus and defines the sequences of transactions to be performed during each frame or microframe. The USB host controller fetches and executes a new list every 1 ms or 125usec.Note that a single block transfer requested by a USB client may be performed as a series of transactions that are scheduled and executed during consecutive frames.

The USB host controller initiates transactions via its root hub or hubs. Each frame begins with Start Of Frame (SOF) packet and is followed by the serial broadcast of the transactions contained in the current list. for eg. if one of the requested transactions is a request to transfer data to a USB printer, the host controller would obtain the data to be sent from a memory buffer supplied by the client software and transmit the data over the USB. <em><strong>The hub potion of the controller converts the requested transactions into the low level protocols required by the USB.</strong></em>

This is the functionality I need to replicate for my USBOIP project. My virtual host controller driver need to manage the transaction and transaction list for every request from the client driver. This transaction management will be the main activity for for virtual host controller driver for USBOIP project.
Originally Posted On: 2010-10-06 04:48:01
Anshul Makkar, anshul_makkar@justkernel.com

Tags:


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.