How to switch from PIO to DMA mode on a SATA controller in code?

I am running Windows 7. I need to create an auto / automated test to use some SATA drives. One of the test requirements is to use the disk with DMA in both states (enabled and disabled).

To manually change this setting, you must:

   1) Open Device Manager.
   2) Expand "IDE ATA / ATAPI controllers".
   3) Pick one of the ATA Channels listed; right-click properties; Advanced tab.
   4) Toggle "Enable DMA".


As I said, I need to do this unattended. Any ideas on how this can be done? I searched for Windows Dev Center high and low including device instance and settings in driver development kit. I cannot find anything suitable there. I also searched for registry keys that might do the job, but didn't find anything there.

+3


source to share





All Articles