A.1.3.4 Setting up Device Extensions

In the device extension of each device object, the class driver provides storage for whatever driver-determined data it uses to manage I/O requests for the device, such as the pointer to the port driver’s HBA-specific device object, a back pointer to its own device object, and so forth.

Most SCSI class drivers also provide storage for the following SCSI-specific information:

Note that a SCSI class driver’s original call to IoGetDeviceObjectPointer creates a reference to the handle of the file object associated with the port driver’s generic device object. The class driver must call ObDereferenceObject to release this reference if the class driver is unloaded.

A Windows NT SCSI class driver cannot send requests through the system-supplied port driver to its device without using the port driver’s HBA-specific device object pointer that was stored in the device extension by the ClaimDevice routine.