The IDE PATA interface: the 0x1F7 register is used as status regs when read and command regs when write.
But if I first write a command(i.e 0x20 ) to tell device that