> 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.

First question is why you need to poll the status register, since quite
likely there is a better solution to whatever that reason is..
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at