]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[libata] revert new check-ready Status register logic
authorJeff Garzik <jeff@garzik.org>
Fri, 9 May 2008 19:00:55 +0000 (15:00 -0400)
committerJeff Garzik <jgarzik@redhat.com>
Fri, 9 May 2008 19:00:55 +0000 (15:00 -0400)
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: Jeff Garzik <jgarzik@redhat.com>
include/linux/libata.h

index 7e206da1fbfb4e88807b0609bdb814b38d247ebe..0f17643e0a6e06c6942ceba10017b99c12674027 100644 (file)
@@ -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)
 {
-       /* Some controllers report 0x77 or 0x7f during intermediate
-        * not-ready stages.
-        */
-       if (status == 0x77 || status == 0x7f)
-               return 0;
+       if (!(status & ATA_BUSY))
+               return 1;
 
        /* 0xff indicates either no device or device not ready */
        if (status == 0xff)
                return -ENODEV;
 
-       return !(status & ATA_BUSY);
+       return 0;
 }