PATH 
ADC Home > Documentation > Hardware > Device Managers and Drivers > PCI Card Services > Designing PCI Cards and Drivers for Power Macintosh Computers


  

Concurrent I/O Request Flow

The movement of multiple driver I/O requests from clients through the Device Manager to concurrent drivers and back again follows these steps:

  1. A client issues an I/O request.
  2. The request (in the form of an I/O parameter block) is passed to the Device Manager.
  3. The Device Manager uses the refNum in the I/O parameter block to locate the appropriate driver.
  4. The Device Manager checks the kdriverQueuesIOPB option bit. If the value of the bit is false, the Device Manager adds the I/O parameter block to the driver's DCE-based request queue.
  5. The Device Manager invokes the driver's DoDriverIO entry point.
  6. The driver may choose to leave the request on the DCE queue; alternately, if it is using the kdriverQueuesIOPB bit, the driver may put the request into a privately managed queue.
  7. The driver starts the I/O action; if it is truly asynchronous, it returns to the Device Manager without calling IOCommandIsComplete.
  8. If the client issued the request synchronously, the Device Manager waits for the completion of the request; otherwise, it returns control to the client.
  9. Some time later, the driver determines (through a hardware or secondary interrupt routine) that the device I/O action has finished. At this time, the driver scans its private queue looking for the I/O parameter block representing the I/O action.
  10. The driver uses the I/O parameter block commandID stored at ( ThePb -> ioParam.ioCmdAddr ) to issue an IOCommandIsComplete call. Drivers using the kdriverQueuesIOPB bit must make sure the I/O parameter block is not on any queue when calling IOCommandIsComplete.
  11. The Device Manager places the result in the I/O parameter block.
  12. If the I/O request was issued synchronously, control returns to the client. If the I/O request was issued asynchronously, the Device Manager invokes the client's completion routine (if one exists).
  13. Control returns to the driver. The driver should not attempt to access the I/O parameter block after calling IOCommandIsComplete.

© 1999 Apple Computer, Inc. – (Last Updated 26 March 99)