HwScsiInterrupt routine
HwScsiInterrupt is called when the HBA generates an interrupt. Miniport drivers of HBAs that do not generate interrupts do not have this routine.
Note The SCSI port driver and SCSI miniport driver models may be altered or unavailable in the future. Instead, we recommend using the Storport driver and Storport miniport driver models.
Syntax
BOOLEAN HwScsiInterrupt(
_In_ PVOID DeviceExtension
);
Parameters
- DeviceExtension [in]
Points to the miniport driver's per-HBA storage area.
Return value
If the miniport driver finds that its HBA did not generate the interrupt, HwScsiInterrupt should return FALSE as soon as possible.
Remarks
HwScsiInterrupt is responsible for completing interrupt-driven I/O operations. This routine must clear the interrupt on the HBA before it returns TRUE.
Miniport drivers of HBAs that require interrupt processing that takes more than 50 microseconds should have a pair of HwScsi..InterruptsCallback routines. Such a driver's HwScsiInterrupt routine should do the following, rather than calling ScsiPortStallExecution to tie up the processor while its HBA updates hardware state:
Disable interrupts on the HBA.
Set up the DeviceExtension with any context necessary to complete the operation.
Call ScsiPortNotification with the NotificationType value CallEnableInterrupts and the entry point for the driver's HwScsiEnableInterruptsCallback routine.
Return control.
Using this technique improves overall I/O throughput, including that of any other HBAs the miniport driver supports.
If a miniport driver's HwScsiInterrupt routine cannot disable interrupts on its HBA but its interrupt-driven transfer operations take more than 50 microseconds in the HwScsiInterrupt routine, the miniport driver should limit the maximum size for transfers that it accepts. Such a miniport driver's HwScsiFindAdapter routine can set the MaximumTransferLength member of the PORT_CONFIGURATION_INFORMATION structure to a value that restricts execution time in the HwScsiInterrupt routine for transfers. The miniport driver writer should adjust this value during driver development so there is no user-noticeable impact on the performance of the mouse, serial, and/or parallel drivers. Otherwise, the mouse pointer can appear to "jump" or the serial/parallel throughput to degrade noticeably whenever that miniport driver is transferring data.
The name HwScsiInterrupt is just a placeholder. The actual prototype of this routine is defined in srb.h as follows:
typedef
BOOLEAN
(*PHW_INTERRUPT) (
IN PVOID DeviceExtension
);
For more information about the HwScsiInterrupt routine, see SCSI Miniport Driver's HwScsiInterrupt Routine.
Requirements
Target platform |
Desktop |
Header |
Miniport.h (include Scsi.h) |
See also
HwScsiDisableInterruptsCallback
HwScsiEnableInterruptsCallback