[U-Boot] [PATCH 3/5] scsi/ahci: ata id little endian fix
Vadim Bendebury (вб)
vbendeb at google.com
Tue Sep 6 21:16:24 CEST 2011
On Tue, Sep 6, 2011 at 12:07 PM, <vb at vsbe.com> wrote:
> ---------- Forwarded message ----------
> From: Rob Herring <robherring2 at gmail.com>
> Date: Tue, Jun 21, 2011 at 2:33 PM
> Subject: [U-Boot] [PATCH 3/5] scsi/ahci: ata id little endian fix
> To: u-boot at lists.denx.de
> Cc: Rob Herring <rob.herring at calxeda.com>
>
>
> 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
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
>
guys, I am looking into enabling the AHCI driver on the x86 platforms
(working off an older version of drivers/block/ahci.c, but planning to
reconcile).
One of my internal reviewers brought this up (and it seems quite a
reasonable question): why does one need to swap bytes always, no matter the
CPU endianness?
Also, can you please comment on what is going on in ata_scsiop_inquiry(),
in particular, what are the contents of the hdr[] array? Any hints would be
highly appreciated,
cheers,
/vb
More information about the U-Boot
mailing list