I am currently writing some code to send some ATA commands directly to
the drive using ioctl and SG_IO which seems to work fine. However I
also need to read the ATA status register values in real time which I
am unsure how to do.
I have seen in the libata developers guide the following functions to
read the status and alternative status registers:-
u8 (*check_status)(struct ata_port *ap);
u8 (*check_altstatus)(struct ata_port *ap);
u8 (*check_err)(struct ata_port *ap);
However I have no idea how to access these functions directly or even
if this is the best way to go about it. Any help at all would be much
appreciated.