A driver must check its device state at appropriate points in order to avoid needlessly committing resources. The ddi_get_devstate(9F) function enables the driver to determine the device's current state, as maintained by the framework.
ddi_devstate_t ddi_get_devstate(dev_info_t *dip);
The driver is not normally called upon to handle a device that is OFFLINE. Generally, the device state will reflect earlier device fault reports, possibly modified by any reconfiguration activities that have taken place.