summaryrefslogtreecommitdiff
path: root/drivers/scsi/scsi.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-04-24 19:39:14 -0400
committerTom Rini <trini@konsulko.com>2021-04-24 19:39:14 -0400
commit4dda435131251a94b29afd52f010cf1ec5a7ceb2 (patch)
tree16bda495e53e1e5d6afc58077f2ec8e6ca670d1c /drivers/scsi/scsi.c
parente1333435afbf0c6290b1d16bb446b57807f75502 (diff)
parentb1d9554e058e5e8510a9d22183ae8321290ee87b (diff)
Merge tag 'mips-pull-2021-04-24' of https://source.denx.de/u-boot/custodians/u-boot-mips
- MIPS: octeon: fix minor bugs of initial merge - MIPS: octeon: add support for QLM and PCI-E controller - MIPS: octeon: add support for AHCI and SATA - MIPS: octeon: add E1000 ethernet support - MIPS: octeon: add Octeon III NIC23 board - ata/scsi: add support for Big Endian platforms
Diffstat (limited to 'drivers/scsi/scsi.c')
-rw-r--r--drivers/scsi/scsi.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 73894844905..ce69750c7ff 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -9,6 +9,7 @@
#include <bootstage.h>
#include <dm.h>
#include <env.h>
+#include <libata.h>
#include <log.h>
#include <part.h>
#include <pci.h>
@@ -594,6 +595,11 @@ static int do_scsi_scan_one(struct udevice *dev, int id, int lun, bool verbose)
memcpy(&bdesc->vendor, &bd.vendor, sizeof(bd.vendor));
memcpy(&bdesc->product, &bd.product, sizeof(bd.product));
memcpy(&bdesc->revision, &bd.revision, sizeof(bd.revision));
+ if (IS_ENABLED(CONFIG_SYS_BIG_ENDIAN)) {
+ ata_swap_buf_le16((u16 *)&bdesc->vendor, sizeof(bd.vendor) / 2);
+ ata_swap_buf_le16((u16 *)&bdesc->product, sizeof(bd.product) / 2);
+ ata_swap_buf_le16((u16 *)&bdesc->revision, sizeof(bd.revision) / 2);
+ }
if (verbose) {
printf(" Device %d: ", bdesc->devnum);