Hi guys,
I’m trying to communicate with the hardware from HwAdapterControl function of my Storport driver. Basically I need to send a shutdown request to the device. The request is sent by writing some information to the device registers and waiting for the interrupt. In the interrupt a DPC is scheduled that does the completion work.
What I need to do in HwAdapterControl is to send the request, wait for the interrupt and the DPC to complete. The problem is that the HwAdapterControl is called at DPC level, and I must wait for the device to respond before allowing the execution to continue, otherwise the device will be shut down before it has a chance to process my request.
Is is possible to halt HwAdapterControl execution and wait for my DPC to arrive? If yes, how can it be accomplished? Thank you