diff options
author | Paul Mackerras <paulus@samba.org> | 2006-09-13 17:07:18 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-09-13 17:07:18 -0400 |
commit | c547fc28ab3e8716076fdaf4bd0260c5d63a18f7 (patch) | |
tree | 34af1fa64a63618660187ae58ad182665a1861ef /drivers/scsi/libata-core.c | |
parent | 3dd836a56de0d4f049438412959b905e1db4666e (diff) | |
parent | 63b98080daa35f0d682db04f4fb7ada010888752 (diff) |
Merge branch 'linux-2.6'
Diffstat (limited to 'drivers/scsi/libata-core.c')
-rw-r--r-- | drivers/scsi/libata-core.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 73dd6c8deede..427b73a3886a 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -1256,10 +1256,15 @@ int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class, | |||
1256 | swap_buf_le16(id, ATA_ID_WORDS); | 1256 | swap_buf_le16(id, ATA_ID_WORDS); |
1257 | 1257 | ||
1258 | /* sanity check */ | 1258 | /* sanity check */ |
1259 | if ((class == ATA_DEV_ATA) != (ata_id_is_ata(id) | ata_id_is_cfa(id))) { | 1259 | rc = -EINVAL; |
1260 | rc = -EINVAL; | 1260 | reason = "device reports illegal type"; |
1261 | reason = "device reports illegal type"; | 1261 | |
1262 | goto err_out; | 1262 | if (class == ATA_DEV_ATA) { |
1263 | if (!ata_id_is_ata(id) && !ata_id_is_cfa(id)) | ||
1264 | goto err_out; | ||
1265 | } else { | ||
1266 | if (ata_id_is_ata(id)) | ||
1267 | goto err_out; | ||
1263 | } | 1268 | } |
1264 | 1269 | ||
1265 | if (post_reset && class == ATA_DEV_ATA) { | 1270 | if (post_reset && class == ATA_DEV_ATA) { |