[SCSI] aic byteorder fixes after recent cleanup
authorOlaf Hering <olh@suse.de>
Tue, 19 Jul 2005 20:04:24 +0000 (22:04 +0200)
committerJames Bottomley <jejb@mulgrave.(none)>
Sat, 30 Jul 2005 14:08:20 +0000 (09:08 -0500)
 aic doesnt work anymore after this change which appeared int 2.6.13-rc1:
 [SCSI] aic7xxx/aic79xx: remove useless byte order macro cruft

 2 files did not include byteorder.h, aic died with panic
 "Unknown opcode encountered in seq program"
 This patch fixes it for me.

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/aic7xxx/aicasm/aicasm.c
drivers/scsi/aic7xxx/aicasm/aicasm_insformat.h

index c34639481904bf9e023992c295db5fe88b26909c..f936b691232f90d4d020998d8a3420508b36cc85 100644 (file)
@@ -369,7 +369,7 @@ output_code()
 
                fprintf(ofile, "%s\t0x%02x, 0x%02x, 0x%02x, 0x%02x",
                        cur_instr == STAILQ_FIRST(&seq_program) ? "" : ",\n",
-#if BYTE_ORDER == LITTLE_ENDIAN
+#ifdef __LITTLE_ENDIAN
                        cur_instr->format.bytes[0],
                        cur_instr->format.bytes[1],
                        cur_instr->format.bytes[2],
@@ -613,7 +613,7 @@ output_listing(char *ifilename)
                                line++;
                }
                fprintf(listfile, "%03x %02x%02x%02x%02x", instrptr,
-#if BYTE_ORDER == LITTLE_ENDIAN
+#ifdef __LITTLE_ENDIAN
                        cur_instr->format.bytes[0],
                        cur_instr->format.bytes[1],
                        cur_instr->format.bytes[2],
index 3e80f07df49c5a4a3902a516272ea35842a53adf..e64f802bbaaa165884bafc117082eab38c23f701 100644 (file)
  * $FreeBSD$
  */
 
+#include <asm/byteorder.h>
+
 struct ins_format1 {
-#if BYTE_ORDER == LITTLE_ENDIAN
+#ifdef __LITTLE_ENDIAN
        uint32_t        immediate       : 8,
                        source          : 9,
                        destination     : 9,
@@ -61,7 +63,7 @@ struct ins_format1 {
 };
 
 struct ins_format2 {
-#if BYTE_ORDER == LITTLE_ENDIAN
+#ifdef __LITTLE_ENDIAN
        uint32_t        shift_control   : 8,
                        source          : 9,
                        destination     : 9,
@@ -79,7 +81,7 @@ struct ins_format2 {
 };
 
 struct ins_format3 {
-#if BYTE_ORDER == LITTLE_ENDIAN
+#ifdef __LITTLE_ENDIAN
        uint32_t        immediate       : 8,
                        source          : 9,
                        address         : 10,