How to make sure driver install doesn't require restart

Hi,
I have a driver for Serial Attached SCSI HBA, which sometimes asks for system restart upon installation on a default windows driver. The system asks for restart sometimes but not always, but when it does, I see a event logged in windows event viewer
" The start type of the service was changed from demand start to boot start".
I have mentioned start type in my INF as “SERVICE_BOOT_START”. Is there a possibility that default windows driver (lsi_sas3i.sys) has start type mentioned as “SEVICE_DEMAND_START” and that is why windows is asking me to reboot the system?

The start type of the service was changed from demand start to boot start

Because… the driver you’re supporting contains the boot volume?? That’s a guess/question.

Is there a possibility that default windows driver (lsi_sas3i.sys) has start type mentioned as “SEVICE_DEMAND_START” and that is why windows is asking me to reboot the system?

No. The start type of any OTHER driver in the systems doesn’t affect the start type of YOUR driver.

Peter

Are you using the same service name as the default driver?

Peter,

No. The start type of any OTHER driver in the systems doesn’t affect the start type of YOUR driver.

What about the situation when a driver X somehow depends on the driver Y? For example, consider the scenario when the driver Y is a driver library (like, for example, NDIS.SYS), and your driver X imports from it. In this case your driver cannot get loaded before the driver Y, right. How is the system going to handle the case if a driver X is, say, a boot driver, and some particular driver Y that it depends on is a demand-start one?

Anton Bassov

How is the system going to handle the case if a driver X is, say, a boot driver, and some particular driver Y that it depends on is a demand-start one?

IIRC, the required dependency gets loaded automatically when the first referencing driver gets loaded. It is, after all, just a DLL.

Peter

IIRC, the required dependency gets loaded automatically when the first referencing driver gets loaded. It is, after all, just a DLL.

The problem is that certain functionalities that a demand-start driver library may depend upon may be still unavailable at the early stages of the boot process. To make it even worse, in some cases it may be impossible to know it at the time when a driver gets loaded, so that it may get discovered only at the runtime. For example, IIRC, only parts of the Registry are available to boot drivers, so that a demand-start driver
library may not, probably, get all the info that it expects to find in the Registry if you try to initialise it at some earlier stage of the boot process.

Certainly, we can logically conclude that the scenario of a boot-time driver being dependent on some demand-start driver library is
a classical example of a faulty design. Therefore, my question can be rephrased simply as “will the system catch this inconsistency right at the installation time?” After all, the only thing that it has to do is to check driver dependencies and their load order during the installation process.

Anton Bassov