// storport.h
VOID StorPortMarkDeviceFailed(
PVOID HwDeviceExtension,
PSTOR_ADDRESS StorAddress,
ULONG Flags,
PWSTR FailReason
);
View the official Windows Driver Kit DDI referenceNo description available.
The StorPortMarkDeviceFailed routine marks a device with failed status. See also StorPortMarkDeviceFailedEx.
HwDeviceExtensionPointer to the hardware device extension for the host bus adapter (HBA).
StorAddressStorage unit device address. This parameter is NULL for adapter devices.
FlagsSet to STORPORT_MARK_DEVICE_FAILED_FLAG_REMOVE_DEVICE to remove the failed device.
FailReasonString that specifies the reason for the device failure along with other details.
A miniport driver can call this function to mark a failed device. If STORPORT_MARK_DEVICE_FAILED_FLAG_REMOVE_DEVICE is not set in Flags, Storport will only log the event.
The PnP manager will send an IRP to query the failed device's PnP state. If Flags is set to STORPORT_MARK_DEVICE_FAILED_FLAG_REMOVE_DEVICE, the PnP manager will then try to remove the failed device.