Required and Optional SCSI Miniport Driver Routines

Every SCSI miniport driver must have at least the following system-defined routines:

Depending on each HBA and the driver designer, SCSI miniport drivers also have some or all of the following system-defined routines:

  • HwScsiInterruptto handle HBA-generated interrupts, which is optional if and only if the HBA does not generate interrupts so the miniport driver manages all I/O operations on its HBA by polling. However, using polling exclusively has an adverse effect on a miniport driver's performance and on its HBA's I/O throughput. Such a miniport driver should also have an HwScsiTimer routine.

  • HwScsiDisableInterruptsCallback and HwScsiEnableInterruptsCallback to handle deferred I/O processing if interrupt-driven I/O operations take a long time

  • HwScsiTimer to time operations that require long delays on the HBA, or for any other purpose determined by the driver designer. A miniport driver should have a HwScsiTimer routine if it has no HwScsiInterrupt routine so it can use the HwScsiTimer routine for efficient polling of its HBA.

  • HwScsiDmaStarted, which is required if the HBA uses a system DMA controller, to set up an HBA transfer after the system DMA controller has been programmed by the port driver

  • HwScsiAdapterState, which is optional if and only if the HBA has no BIOS or x86-real-mode driver and/or will never run in x86-only Microsoft Windows systems

  • HwScsiAdapterControl, which is required if the miniport driver supports Plug and Play

Each of the preceding miniport driver routines, except DriverEntry, has a name chosen to describe its functionality. Except for DriverEntry, which is a required name for every miniport driver's initial entry point, names for miniport driver routines can be anything the driver writer chooses.

The following sections describe the requirements for and functionality of each of these miniport driver routines. See SCSI Miniport Driver Routines for their formal definitions and for descriptions of their parameters.

Error Handling in SCSI Miniport Drivers describes error-handling requirements for SCSI miniport drivers.

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft. All rights reserved.