mirror of
https://github.com/reactos/reactos.git
synced 2025-06-14 15:08:30 +00:00
[STORPORT] Implement StorPortNotification() / EnablePassiveInitialization and call the passive initialization routine.
CORE-13866
This commit is contained in:
parent
f9f21574ba
commit
cc95d3ece3
3 changed files with 59 additions and 2 deletions
|
@ -63,6 +63,17 @@ PortFdoStartMiniport(
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Call the HwPassiveInitRoutine function, if available */
|
||||||
|
if (DeviceExtension->HwPassiveInitRoutine != NULL)
|
||||||
|
{
|
||||||
|
DPRINT1("Calling HwPassiveInitRoutine()\n");
|
||||||
|
if (!DeviceExtension->HwPassiveInitRoutine(&DeviceExtension->Miniport.MiniportExtension->HwDeviceExtension))
|
||||||
|
{
|
||||||
|
DPRINT1("HwPassiveInitRoutine() failed\n");
|
||||||
|
return STATUS_UNSUCCESSFUL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,7 @@ typedef struct _FDO_DEVICE_EXTENSION
|
||||||
PVOID UncachedExtensionVirtualBase;
|
PVOID UncachedExtensionVirtualBase;
|
||||||
PHYSICAL_ADDRESS UncachedExtensionPhysicalBase;
|
PHYSICAL_ADDRESS UncachedExtensionPhysicalBase;
|
||||||
ULONG UncachedExtensionSize;
|
ULONG UncachedExtensionSize;
|
||||||
|
PHW_PASSIVE_INITIALIZE_ROUTINE HwPassiveInitRoutine;
|
||||||
} FDO_DEVICE_EXTENSION, *PFDO_DEVICE_EXTENSION;
|
} FDO_DEVICE_EXTENSION, *PFDO_DEVICE_EXTENSION;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -992,7 +992,53 @@ StorPortNotification(
|
||||||
_In_ PVOID HwDeviceExtension,
|
_In_ PVOID HwDeviceExtension,
|
||||||
...)
|
...)
|
||||||
{
|
{
|
||||||
DPRINT1("StorPortNotification()\n");
|
PMINIPORT_DEVICE_EXTENSION MiniportExtension = NULL;
|
||||||
|
PFDO_DEVICE_EXTENSION DeviceExtension = NULL;
|
||||||
|
PHW_PASSIVE_INITIALIZE_ROUTINE HwPassiveInitRoutine;
|
||||||
|
PBOOLEAN Result;
|
||||||
|
va_list ap;
|
||||||
|
|
||||||
|
DPRINT1("StorPortNotification(%x %p)\n",
|
||||||
|
NotificationType, HwDeviceExtension);
|
||||||
|
|
||||||
|
/* Get the miniport extension */
|
||||||
|
if (HwDeviceExtension != NULL)
|
||||||
|
{
|
||||||
|
MiniportExtension = CONTAINING_RECORD(HwDeviceExtension,
|
||||||
|
MINIPORT_DEVICE_EXTENSION,
|
||||||
|
HwDeviceExtension);
|
||||||
|
DPRINT1("HwDeviceExtension %p MiniportExtension %p\n",
|
||||||
|
HwDeviceExtension, MiniportExtension);
|
||||||
|
|
||||||
|
DeviceExtension = MiniportExtension->Miniport->DeviceExtension;
|
||||||
|
}
|
||||||
|
|
||||||
|
va_start(ap, HwDeviceExtension);
|
||||||
|
|
||||||
|
switch (NotificationType)
|
||||||
|
{
|
||||||
|
case EnablePassiveInitialization:
|
||||||
|
DPRINT1("EnablePassiveInitialization\n");
|
||||||
|
HwPassiveInitRoutine = (PHW_PASSIVE_INITIALIZE_ROUTINE)va_arg(ap, PHW_PASSIVE_INITIALIZE_ROUTINE);
|
||||||
|
DPRINT1("HwPassiveInitRoutine %p\n", HwPassiveInitRoutine);
|
||||||
|
Result = (PBOOLEAN)va_arg(ap, PBOOLEAN);
|
||||||
|
|
||||||
|
*Result = FALSE;
|
||||||
|
|
||||||
|
if ((DeviceExtension != NULL) &&
|
||||||
|
(DeviceExtension->HwPassiveInitRoutine == NULL))
|
||||||
|
{
|
||||||
|
DeviceExtension->HwPassiveInitRoutine = HwPassiveInitRoutine;
|
||||||
|
*Result = TRUE;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
DPRINT1("Unsupported Notification %lx\n", NotificationType);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
va_end(ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue