A.1.4 SCSI Class Driver’s Dispatch Routines
Class driver Dispatch routines for IRP_MJ_CREATE and IRP_MJ_CLOSE requests usually have no SCSI-specific requirements. Most SCSI class drivers are intermediate drivers; their Dispatch routines just return STATUS_SUCCESS to indicate that a given device object exists so that higher-level drivers and, indirectly, user-mode applications can open the device for I/O and close the device afterward.
A SCSI class driver must have a Dispatch routine for IRP_MJ_SHUTDOWN requests and possibly for IRP_MJ_FLUSH_BUFFERS requests if its device caches data internally, if its device might be attached to a bus driven by an HBA that caches data internally, or if a file system is layered above the class driver. To maintain data integrity, such a cache should be flushed to the device before the system is shut down.
See also Chapter 6 for more information about general requirements for Dispatch routines.