Commit 005b1f74 authored by Jeff Garzik's avatar Jeff Garzik Committed by Jeff Garzik

[libata] revert new check-ready Status register logic

This behavior differs across multiple controllers, so we cannot use
common logic for all controllers.

Revert back to the basic common behavior, and specific drivers will
be updated from here to take into account the unusual Status return
values.
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 28a4acb4
...@@ -1384,17 +1384,14 @@ static inline struct ata_port *ata_shost_to_port(struct Scsi_Host *host) ...@@ -1384,17 +1384,14 @@ static inline struct ata_port *ata_shost_to_port(struct Scsi_Host *host)
static inline int ata_check_ready(u8 status) static inline int ata_check_ready(u8 status)
{ {
/* Some controllers report 0x77 or 0x7f during intermediate if (!(status & ATA_BUSY))
* not-ready stages. return 1;
*/
if (status == 0x77 || status == 0x7f)
return 0;
/* 0xff indicates either no device or device not ready */ /* 0xff indicates either no device or device not ready */
if (status == 0xff) if (status == 0xff)
return -ENODEV; return -ENODEV;
return !(status & ATA_BUSY); return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment