A.4.8.2 SCSI Miniport Driver’s HwScsiEnableInterruptsCallback Routine

A HwScsiEnableInterruptsCallback routine finishes processing an interrupt-driven I/O operation without inhibiting I/O operations for other devices in the machine.

When the HwScsiEnableInterruptsCallback routine gets control, all system device interrupts are enabled except from the HBA because the HwScsiInterrupt routine disabled interrupts on the HBA before it called ScsiPortNotification. Thus, the miniport’s HwScsiInterrupt routine cannot be called and cannot disturb the context data it set up about the current operation while the HwScsiEnableInterruptsCallback routine is running.

A HwScsiEnableInterruptsCallback routine should do the following:

  1. Use the context that was set up for the operation in the input device extension to complete processing of the request that caused the interrupt.

  2. Call ScsiPortNotification with the NotificationType RequestComplete and the just satisfied SRB.

  3. Call ScsiPortNotification with the NotificationType NextRequest, or with NextLuRequest if the HBA supports tagged queueing or multiple requests per logical unit.

  4. Call ScsiPortNotification with a pointer to the device extension, the NotificationType CallDisableInterrupts, and the miniport’s HwScsiDisableInterruptsCallback routine, described in Section A.4.8.3.

  5. Return control.

The Windows NT ScsiPortNotification calls the HwScsiDisableInterruptsCallback routine with a subset of the system device interrupts disabled. No device interrupt with a system-assigned hardware priority (IRQL) less than or equal to the HBA’s can occur.

For more information about IRQLs, see Chapter 16.