diff options
author | Jeff Garzik <jeff@garzik.org> | 2008-05-09 15:00:55 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-05-09 15:00:55 -0400 |
commit | 005b1f7495e812b99b73de5adbc73afd7a1cbcaf (patch) | |
tree | d0ee13a35bbda1f53577db2a79eb288c71f3e6c2 /include/linux/libata.h | |
parent | 28a4acb48586dc21d2d14a75a7aab7be78b7c83b (diff) |
[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: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r-- | include/linux/libata.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index 7e206da1fbfb..0f17643e0a6e 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -1384,17 +1384,14 @@ static inline struct ata_port *ata_shost_to_port(struct Scsi_Host *host) | |||
1384 | 1384 | ||
1385 | static inline int ata_check_ready(u8 status) | 1385 | static inline int ata_check_ready(u8 status) |
1386 | { | 1386 | { |
1387 | /* Some controllers report 0x77 or 0x7f during intermediate | 1387 | if (!(status & ATA_BUSY)) |
1388 | * not-ready stages. | 1388 | return 1; |
1389 | */ | ||
1390 | if (status == 0x77 || status == 0x7f) | ||
1391 | return 0; | ||
1392 | 1389 | ||
1393 | /* 0xff indicates either no device or device not ready */ | 1390 | /* 0xff indicates either no device or device not ready */ |
1394 | if (status == 0xff) | 1391 | if (status == 0xff) |
1395 | return -ENODEV; | 1392 | return -ENODEV; |
1396 | 1393 | ||
1397 | return !(status & ATA_BUSY); | 1394 | return 0; |
1398 | } | 1395 | } |
1399 | 1396 | ||
1400 | 1397 | ||