]> git.sur5r.net Git - u-boot/commitdiff
scsi/ahci: ata id little endian fix
authorRob Herring <rob.herring@calxeda.com>
Wed, 1 Jun 2011 09:10:26 +0000 (09:10 +0000)
committerWolfgang Denk <wd@denx.de>
Mon, 25 Jul 2011 22:06:08 +0000 (00:06 +0200)
The ata id string always needs swapping, not just on BE machines.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
drivers/block/ahci.c

index a3ca2dcaf70e7b3535816a24d2193c9ec31513d3..d431c5af913308c57430f0f9d50bebff664b0b15 100644 (file)
@@ -468,7 +468,7 @@ static char *ata_id_strcpy(u16 *target, u16 *src, int len)
 {
        int i;
        for (i = 0; i < len / 2; i++)
-               target[i] = le16_to_cpu(src[i]);
+               target[i] = swab16(src[i]);
        return (char *)target;
 }