ide: fix ide_fix_driveid()
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Tue, 5 Aug 2008 16:16:56 +0000 (18:16 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Tue, 5 Aug 2008 16:16:56 +0000 (18:16 +0200)
Fix byte-swapping for id->words161_175[], id->words206_254[]
and id->words206_254[].

Luckily all words previously left in little-endian byte-order
are marked as reserved so this fix shouldn't affect user-space
applications.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/ide-iops.c

index 8aae91764513afeaf71021bc5d32974683e8163d..2cbadffe922ef1204363ae5e50df712a693e79fd 100644 (file)
@@ -484,11 +484,11 @@ void ide_fix_driveid (struct hd_driveid *id)
        for (i = 0; i < 3; i++)
                id->words157_159[i] = __le16_to_cpu(id->words157_159[i]);
        id->cfa_power      = __le16_to_cpu(id->cfa_power);
-       for (i = 0; i < 14; i++)
+       for (i = 0; i < 15; i++)
                id->words161_175[i] = __le16_to_cpu(id->words161_175[i]);
-       for (i = 0; i < 31; i++)
+       for (i = 0; i < 30; i++)
                id->words176_205[i] = __le16_to_cpu(id->words176_205[i]);
-       for (i = 0; i < 48; i++)
+       for (i = 0; i < 49; i++)
                id->words206_254[i] = __le16_to_cpu(id->words206_254[i]);
        id->integrity_word  = __le16_to_cpu(id->integrity_word);
 # else