A.1.3 SCSI Class Driver’s DriverEntry Routine

Like any other Windows NT kernel-mode higher-level driver, the DriverEntry routine of a SCSI class driver must do the following:

  1. Define its Dispatch entry points in the input driver object.

  2. Layer itself over the SCSI port driver by calling IoGetDeviceObjectPointer.

  3. Locate its device(s), if any are present in the machine.

  4. Create a device object to represent each physical, logical, and/or virtual device for which it handles IRPs.

The class driver’s initial call to IoGetDeviceObjectPointer returns a pointer to a generic device object created by the system port driver, rather than a pointer to a device object that represents a particular HBA. The class driver uses this generic device object pointer to find its device(s) on each bus driven by one or more HBAs in the machine.