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:
The class driver can pass the time-out value in SRBs it sends to the port driver, which optionally times requests on behalf of each class driver. The port driver returns an SRB with its SrbStatus member set to SRB_STATUS_TIMEOUT if the interval between when the port driver sends the request to the miniport driver and when the request completes exceeds the specified time-out value.
See Section A.1.5 for more information about error-handling in SCSI class drivers.
This identifies the SCSI bus on which the device is attached. It is a required value in SRBs.
This identifies the TID of the controller or device. It is a required value in SRBs.
This identifies the logical unit number of the device. It is a required value in SRBs.
A class driver must allocate memory for returned request-sense data from cache-aligned, nonpaged pool. For more information about allocating memory for driver buffers, see Chapter 16.
If the driver calls the ExInterlocked..Zone routines for its SRBs, it also must provide storage for and initialize a spin lock that protects the zone’s free list. For more information about using zones and spin locks, see Chapter 16.
How class drivers get and use this data was described in Section A.1.3.3.
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.