diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-09-19 00:42:13 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-09-19 00:42:13 -0400 |
commit | 4a3381feb823e06c8e2da7e283c17b0b6fdbddcf (patch) | |
tree | e1bef4c3db854bb10fd13dc67415d77b5d999533 /drivers/ata | |
parent | fea63e38013ec628ab3f7fddc4c2148064b7910a (diff) | |
parent | 47a5c6fa0e204a2b63309c648bb2fde36836c826 (diff) |
Merge branch 'master' into upstream
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/libata-core.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index bb66a12c84e5..e85c2f8cf193 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -1276,10 +1276,15 @@ int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class, | |||
1276 | swap_buf_le16(id, ATA_ID_WORDS); | 1276 | swap_buf_le16(id, ATA_ID_WORDS); |
1277 | 1277 | ||
1278 | /* sanity check */ | 1278 | /* sanity check */ |
1279 | if ((class == ATA_DEV_ATA) != (ata_id_is_ata(id) | ata_id_is_cfa(id))) { | 1279 | rc = -EINVAL; |
1280 | rc = -EINVAL; | 1280 | reason = "device reports illegal type"; |
1281 | reason = "device reports illegal type"; | 1281 | |
1282 | goto err_out; | 1282 | if (class == ATA_DEV_ATA) { |
1283 | if (!ata_id_is_ata(id) && !ata_id_is_cfa(id)) | ||
1284 | goto err_out; | ||
1285 | } else { | ||
1286 | if (ata_id_is_ata(id)) | ||
1287 | goto err_out; | ||
1283 | } | 1288 | } |
1284 | 1289 | ||
1285 | if (post_reset && class == ATA_DEV_ATA) { | 1290 | if (post_reset && class == ATA_DEV_ATA) { |