[U-Boot] [PATCH 3/5] scsi/ahci: ata id little endian fix

Rob Herring robherring2 at gmail.com
Tue Jun 21 23:33:21 CEST 2011


From: Rob Herring <rob.herring at calxeda.com>

The ata id string always needs swapping, not just on BE machines.

Signed-off-by: Rob Herring <rob.herring at calxeda.com>
Cc: Wolfgang Denk <wd at denx.de>
---
 drivers/block/ahci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/block/ahci.c b/drivers/block/ahci.c
index a3ca2dc..d431c5a 100644
--- a/drivers/block/ahci.c
+++ b/drivers/block/ahci.c
@@ -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;
 }
 
-- 
1.7.4.1



More information about the U-Boot mailing list