The IOB Structure

When the USBD driver performs an IO to a USB device through the host controller it starts the hcdPipeIO call vector.

The IOB structure is passed as one of the parameters of the call vector and is used for communication between the USBD driver and the adapter driver.

IOB Structure concepts

The IOB structure contains certain fields that are used to pass associated parameters to the adapter device driver. Other fields within this structure are used to pass returned status back to the USBD driver. The IOB structure is defined in the /usr/include/sys/usbdi.h file.
  • The pNext field is used to group together the IOBs
  • The hPipe field is used by the xHCD to identify the logical hardware pipe that is associated with the endpoint of a current USB device.
  • The pBuffer field points to the virtual address of the buffer.
  • The busAddr field points to the bus address associated with the pBuffer field.
  • The length field points to the length of the transaction in bytes if data transfer is associated with the IOB.
  • The flags field identifies whether the short transfer from device is successful. It also identifies the type of the packet.
  • The status field indicates the completion status of the IOB.
  • The frame field indicates the frame number that is associated with the I/O request. This field is only valid for isochronous endpoints.