Edit

Share via


Flushing Port Driver's Internal Queue

The SCSI Port driver supports a flush request that allows higher-level drivers to flush the caches of devices and adapters that cache data internally. To maintain data integrity, all internal caches should be flushed before the system is shut down. Upon receiving a flush request SCSI Port flushes its own internal queues as well, canceling all queued requests.

Higher-level drivers can flush a host adapter's cache and SCSI Port's internal queue by sending an SRB of type SRB_FUNCTION_FLUSH_QUEUE to the SCSI Port driver. Upon receiving this SRB, SCSI Port flushes the host adapter cache and then completes all requests in its internal queue with their SrbStatus members set to SRB_STATUS_REQUEST_FLUSHED. If SCSI Port's queue is frozen, SRB_FUNCTION_FLUSH_QUEUE has the side effect of unfreezing the queue.

For a discussion of how storage miniport drivers handle flush requests, see Handling SRB_FUNCTION_FLUSH and SRB_FUNCTION_SHUTDOWN.