Why HWStartIO method is called synchronously?
Posted on 2013-01-24
With Storport driver, the routine HWBuildIO is called wihtout synchronization i.e. without taking any locks. Hence this routine gets invoked paralelly for multiple commands.
However the routine HWStartIO is only called asynchronously. I.e. A spin lock is acquired by storport before calling this routine and is it released only after completing the execution of this routine. I understood from an article that this is done to avoid the interrupts taking the control away from this routine while this routine is executing.
My question is why it is important not to allow the control to be preempted by the ISR while the HWStartIO is executing? What consequences it will have to allow the control to be preempted in the middle of StartIO? Can i get a practical example anywhere?