Starting a Device in a Bus Driver
A bus driver starts a child device (child PDO) with a procedure such as the following in its DispatchPnP routine:
Start the device.
The exact steps vary from device to device.
For example, the PCI bus driver programs its mapping registers to enable requests on the PCI bus. The PnP ISA bus driver enables the PnP ISA card so the function driver can access it.
Complete the IRP.
If the bus driver's start operations were successful, the driver sets Irp->IoStatus.Status to STATUS_SUCCESS and calls IoCompleteRequest specifying a priority boost of IO_NO_INCREMENT. The bus driver returns STATUS_SUCCESS from its DispatchPnP routine.
If the bus driver encounters an error during its start operations, the driver sets an error status in the IRP, calls IoCompleteRequest with IO_NO_INCREMENT, and returns the error from its DispatchPnP routine.
If a bus driver requires some time to start the device, it can mark the IRP as pending and return STATUS_PENDING.