Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 68104
b: refs/heads/master
c: d7fbee0
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Oct 12, 2007
1 parent a0ff49a commit 74e2eaa
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3f19859ee95a38c066a0420eb8a30c76ecd67a42
refs/heads/master: d7fbee050753e153622b5d41bc8bd1cb19cda9b9
18 changes: 14 additions & 4 deletions trunk/drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -751,10 +751,20 @@ unsigned int ata_dev_try_classify(struct ata_device *dev, int present,
/* determine if device is ATA or ATAPI */
class = ata_dev_classify(&tf);

if (class == ATA_DEV_UNKNOWN)
return ATA_DEV_NONE;
if ((class == ATA_DEV_ATA) && (ata_chk_status(ap) == 0))
return ATA_DEV_NONE;
if (class == ATA_DEV_UNKNOWN) {
/* If the device failed diagnostic, it's likely to
* have reported incorrect device signature too.
* Assume ATA device if the device seems present but
* device signature is invalid with diagnostic
* failure.
*/
if (present && (dev->horkage & ATA_HORKAGE_DIAGNOSTIC))
class = ATA_DEV_ATA;
else
class = ATA_DEV_NONE;
} else if ((class == ATA_DEV_ATA) && (ata_chk_status(ap) == 0))
class = ATA_DEV_NONE;

return class;
}

Expand Down

0 comments on commit 74e2eaa

Please sign in to comment.