If interrupt-driven I/O operations take a long time to complete, a miniport driver should have a pair of HwScsiEnableInterruptsCallback and HwScsiDisableInterruptsCallback routines.
For example, if a miniport must stall for longer than 50 microseconds doing PIO, its HwScsiInterrupt routine should not retain control of the CPU for the full polling interval in order to complete a requested operation. Instead, its HwScsiInterrupt routine should do the following:
The Windows NT ScsiPortNotification calls the HwScsiEnableInterruptsCallback routine as a DPC routine. For more information about DPCs, see Chapter 3.
If a miniport’s HwScsiInterrupt routine cannot disable interrupts on the HBA but its interrupt-driven transfers can take more than 50 microseconds in the HwScsiInterrupt routine, the driver writer should tune the miniport by limiting the size of the transfers that it accepts. Otherwise, the mouse pointer will appear “jumpy” and/or serial and parallel throughput will degrade noticeably every time the miniport is transferring data concurrently.
Such a miniport’s HwScsiFindAdapter routine should reset the MaximumTransferLength value in the PORT_CONFIGURATION_INFORMATION to a value that allows the miniport to carry out interrupt-driven transfers without noticeably affecting the performance of other system drivers.
Such a miniport driver also might call ScsiPortNotification with a miniport-supplied HwScsiTimer routine. For more information about HwScsiTimer routines, which are synchronized with HwScsiInterrupt routines, see Section A.4.9.