https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9e642ea15b8f1e842b5eccb9a29a68cfcab8cd50
commit 9e642ea15b8f1e842b5eccb9a29a68cfcab8cd50 Author: Eric Kohl <eric.k...@reactos.org> AuthorDate: Sun Oct 22 09:25:36 2017 +0200 [STORPORT] Add the InitializeDpc code path to StorPortNotification(). CORE-13866 --- drivers/storage/port/storport/storport.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/storage/port/storport/storport.c b/drivers/storage/port/storport/storport.c index 39c6564c59..61982fcb77 100644 --- a/drivers/storage/port/storport/storport.c +++ b/drivers/storage/port/storport/storport.c @@ -996,6 +996,8 @@ StorPortNotification( PFDO_DEVICE_EXTENSION DeviceExtension = NULL; PHW_PASSIVE_INITIALIZE_ROUTINE HwPassiveInitRoutine; PBOOLEAN Result; + PSTOR_DPC Dpc; + PHW_DPC_ROUTINE HwDpcRoutine; va_list ap; DPRINT1("StorPortNotification(%x %p)\n", @@ -1033,6 +1035,19 @@ StorPortNotification( } break; + case InitializeDpc: + DPRINT1("InitializeDpc\n"); + Dpc = (PSTOR_DPC)va_arg(ap, PSTOR_DPC); + DPRINT1("Dpc %p\n", Dpc); + HwDpcRoutine = (PHW_DPC_ROUTINE)va_arg(ap, PHW_DPC_ROUTINE); + DPRINT1("HwDpcRoutine %p\n", HwDpcRoutine); + + KeInitializeDpc((PRKDPC)&Dpc->Dpc, + (PKDEFERRED_ROUTINE)HwDpcRoutine, + (PVOID)DeviceExtension); + KeInitializeSpinLock(&Dpc->Lock); + break; + default: DPRINT1("Unsupported Notification %lx\n", NotificationType); break;