Patchwork [U-Boot,4/5] scsi/ahci: ata id little endian fix

login
register
mail settings
Submitter Rob Herring
Date June 1, 2011, 7:10 p.m.
Message ID <1306955427-18940-5-git-send-email-robherring2@gmail.com>
Download mbox | patch
Permalink /patch/98244/
State Accepted
Commit e5a6c79d4299ca8367edb73656ad9e51765ccd66
Headers show

Comments

Rob Herring - June 1, 2011, 7:10 p.m.
From: Rob Herring <rob.herring@calxeda.com>

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 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

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;
 }