The lsi-scsi driver expects the SCSI script in little-endian format. Do this conversion on PA-RISC (which is big-endian). On x86 this conversion will be optimized away.
Signed-off-by: Helge Deller deller@gmx.de --- src/hw/lsi-scsi.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/src/hw/lsi-scsi.c b/src/hw/lsi-scsi.c index 101544e..5583bd6 100644 --- a/src/hw/lsi-scsi.c +++ b/src/hw/lsi-scsi.c @@ -14,6 +14,7 @@ #include "block.h" // struct drive_s #include "blockcmd.h" // scsi_drive_setup #include "config.h" // CONFIG_* +#include "byteorder.h" // cpu_to_* #include "fw/paravirt.h" // runningOnQEMU #include "malloc.h" // free #include "output.h" // dprintf @@ -106,6 +107,9 @@ lsi_scsi_process_op(struct disk_op_s *op) }; u32 dsp = (u32)MAKE_FLATPTR(GET_SEG(SS), &script);
+ /* convert to little endian for PCI */ + convert_to_le32(script, sizeof(script)); + outb(dsp & 0xff, iobase + LSI_REG_DSP0); outb((dsp >> 8) & 0xff, iobase + LSI_REG_DSP1); outb((dsp >> 16) & 0xff, iobase + LSI_REG_DSP2); -- 2.29.2