none
Storport miniport driver : How to debug what causes call to Remove device? RRS feed

  • Question

  • How can I debug what causes the call to remove device PnpProcessQueryRemoveAndEject() for storport miniport driver?

    After HwFindAdapter, Windows calls PnpProcessQueryRemoveAndEject() and this calls the HWstartIO which processes PnP event to Remove device. How can I debug what is causing the device to be removed?

    Thanks for your help. Please see the stack trace below:

    Stack trace for HwStartIo() call

    00 94daf8e0 9285d645 8d18f96c 8d18f8d0 94daf91c TestStor!TestHwStartIo(void * PDevExt = 0x8d18f96c, struct _SCSI_REQUEST_BLOCK * PSrb = 0x8d18f8d0) (FPO: [Non-Fpo]) (CONV: stdcall)
    01 94daf8f0 9285f2e2 8d207188 8d18f8d0 8d5af008 storport!RaCallMiniportStartIo+0x1e (FPO: [Non-Fpo])
    02 94daf91c 9285f55e 8d2070e8 8d5af008 94daf944 storport!RaidAdapterPostScatterGatherExecute+0x18b (FPO: [Non-Fpo])
    03 94daf92c 9286085c 8d2070e8 8d5af008 8d18f8d0 storport!RaidAdapterExecuteXrb+0x2d (FPO: [Non-Fpo])
    04 94daf944 92861455 8d2070e8 8d5af008 8d147b50 storport!RaidAdapterRaiseIrqlAndExecuteXrb+0x1c (FPO: [Non-Fpo])
    05 94daf974 928933f5 8d207030 00000002 00000000 storport!RaidPnPPassToMiniPort+0x1c6 (FPO: [Non-Fpo])
    06 94daf994 928936d4 8d2070e8 8d144268 8d2070e8 storport!RaidAdapterReleaseResources+0x29 (FPO: [Non-Fpo])
    07 94daf9b0 92893904 8d2070e8 8d144268 92871000 storport!RaidAdapterRemoveDeviceIrp+0x41 (FPO: [Non-Fpo])
    08 94daf9cc 92893eb5 00000002 00144268 8d144320 storport!RaidAdapterPnpIrp+0xbc (FPO: [Non-Fpo])
    09 94daf9e8 8986f169 8d207030 8d144268 94dafa8c storport!RaDriverPnpIrp+0x71 (FPO: [Non-Fpo])
    0a 94dafa00 89a15214 8d147b50 8d145668 8d147b50 nt!IofCallDriver+0x63
    0b 94dafa34 89b0434c 8d147b50 94dafa68 00000000 nt!IopSynchronousCall+0xba
    0c 94dafa90 8991510a 8d147b50 00000002 94a8efe8 nt!IopRemoveDevice+0xd5
    0d 94dafabc 89afc07d 0000000a 94a8efe8 00000000 nt!PnpRemoveLockedDeviceNode+0x16c
    0e 94dafad0 89afc333 00000002 0000000a 00000000 nt!PnpDeleteLockedDeviceNode+0x2d
    0f 94dafb04 89affd23 8d147b50 94a8efe8 00000002 nt!PnpDeleteLockedDeviceNodes+0x4c
    10 94dafbc4 899ed48b 94dafbf4 00000000 94a5b920 nt!PnpProcessQueryRemoveAndEject+0x946
    11 94dafbdc 899fb598 00000000 8d5aef10 8c7ba648 nt!PnpProcessTargetDeviceEvent+0x38
    12 94dafc00 898b63cb 8d5aef10 00000000 8c7ba648 nt!PnpDeviceEventWorker+0x216
    13 94dafc50 89a4563d 00000001 0ea4d4fc 00000000 nt!ExpWorkerThread+0x10d

    Wednesday, January 24, 2018 12:21 AM

Answers

  • It is most likely a failure in your driver in an initialization call that caused the StorPort to determine to the device was failing.   Unfortunately, these are not easy to debug, bottom line work through all the code that is run before this looking for anything suspicious.


    Don Burn Windows Driver Consulting Website: http://www.windrvr.com

    Wednesday, January 24, 2018 2:23 AM

All replies

  • It is most likely a failure in your driver in an initialization call that caused the StorPort to determine to the device was failing.   Unfortunately, these are not easy to debug, bottom line work through all the code that is run before this looking for anything suspicious.


    Don Burn Windows Driver Consulting Website: http://www.windrvr.com

    Wednesday, January 24, 2018 2:23 AM
  • Thanks.
    Wednesday, January 24, 2018 6:23 PM