in my USB driver, when WdfRequestSend is called from my DPC, i get BSOD with ATTEMPTED_SWITCH_FROM_DPC. can anyone shed any light as to what might be the problem. thanks.
ATTEMPTED_SWITCH_FROM_DPC (b8)
A wait operation, attach process, or yield was attempted from a DPC routine.
This is an illegal operation and the stack track will lead to the offending
code and original DPC routine.
Arguments:
Arg1: 00000000, Original thread which is the cause of the failure
Arg2: 00000000, New thread
Arg3: 00000000, Stack address of the original thread
Arg4: 00000000
TACK_TEXT:
nt!RtlpBreakWithStatusInstruction
nt!KiBugCheckDebugBreak+0x19
nt!KeBugCheck2+0x574
nt!KeBugCheck+0x14
nt!ScPatchFxe+0x46
nt!KiSwapContext+0x2f
nt!KiSwapThread+0x6b
nt!KeWaitForSingleObject+0x1c2
Wdf01000!FxCREvent::EnterCRAndWait+0x1d
Wdf01000!FxCREvent::EnterCRAndWaitAndLeave+0xe
Wdf01000!FxIoTarget::SubmitSync+0x1db
Wdf01000!imp_WdfRequestSend+0x178
acexusb!WdfRequestSend+0x1d [c:\winddk\6000\inc\wdf\kmdf\10\wdfrequest.h @ 569]
acexusb!DdcSfpUsbSndIoctlWrite+0x36 [d:\69092s0 merge\drivers\acexusb\solution\project\sys\sfpusb.c @ 597]
acexusb!sfpUsbWrite+0xe9 [d:\69092s0 merge\drivers\acexusb\solution\project\sys\sfpusb.c @ 256]
acexusb!bdInterruptSet+0x44 [d:\69092s0 merge\drivers\acexusb\solution\project\sys\bd.c @ 249]
acexusb!EvtSfpIntHandler+0x82 [d:\69092s0 merge\drivers\acexusb\solution\project\sys\device.c @ 341]
Wdf01000!FxDpc::DpcHandler+0x54
Wdf01000!FxDpc::FxDpcThunk+0x16
nt!KiRetireDpcList+0x61
nt!KiIdleLoop+0x28
STACK_COMMAND: kb
FOLLOWUP_IP:
acexusb!WdfRequestSend+1d [c:\winddk\6000\inc\wdf\kmdf\10\wdfrequest.h @ 569]
f4bd7d8d 5d pop ebp
FAULTING_SOURCE_CODE:
565: PWDF_REQUEST_SEND_OPTIONS Options
566: )
567: {
568: return ((PFN_WDFREQUESTSEND) WdfFunctions[WdfRequestSendTableIndex])(WdfDriverGlobals, Request, Target, Options);
569: }
570:
571: //
572: // WDF Function: WdfRequestGetStatus
573: //
574: typedef