Skip to content

Commit

Permalink
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/k…
Browse files Browse the repository at this point in the history
…ernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  [libata] revert new check-ready Status register logic
  • Loading branch information
Linus Torvalds committed May 11, 2008
2 parents 5bb7ff7 + 005b1f7 commit 633331f
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions include/linux/libata.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}


Expand Down

0 comments on commit 633331f

Please sign in to comment.