Skip to content

Commit f7c80c9

Browse files
olafheringLinus Torvalds
authored andcommitted
[PATCH] aic byteorder fixes after recent cleanup
Rebuild the aic7xxx firmware doesn't work anymore after this change which appeared int 2.6.13-rc1: [SCSI] aic7xxx/aic79xx: remove useless byte order macro cruft Two files did not include byteorder.h, resulting in aic dying with a panic "Unknown opcode encountered in seq program" This fixes it for me. Signed-off-by: Olaf Hering <olh@suse.de> Acked-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent f7d1d23 commit f7c80c9

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

drivers/scsi/aic7xxx/aicasm/aicasm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ output_code()
369369

370370
fprintf(ofile, "%s\t0x%02x, 0x%02x, 0x%02x, 0x%02x",
371371
cur_instr == STAILQ_FIRST(&seq_program) ? "" : ",\n",
372-
#if BYTE_ORDER == LITTLE_ENDIAN
372+
#ifdef __LITTLE_ENDIAN
373373
cur_instr->format.bytes[0],
374374
cur_instr->format.bytes[1],
375375
cur_instr->format.bytes[2],
@@ -613,7 +613,7 @@ output_listing(char *ifilename)
613613
line++;
614614
}
615615
fprintf(listfile, "%03x %02x%02x%02x%02x", instrptr,
616-
#if BYTE_ORDER == LITTLE_ENDIAN
616+
#ifdef __LITTLE_ENDIAN
617617
cur_instr->format.bytes[0],
618618
cur_instr->format.bytes[1],
619619
cur_instr->format.bytes[2],

drivers/scsi/aic7xxx/aicasm/aicasm_insformat.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,10 @@
4242
* $FreeBSD$
4343
*/
4444

45+
#include <asm/byteorder.h>
46+
4547
struct ins_format1 {
46-
#if BYTE_ORDER == LITTLE_ENDIAN
48+
#ifdef __LITTLE_ENDIAN
4749
uint32_t immediate : 8,
4850
source : 9,
4951
destination : 9,
@@ -61,7 +63,7 @@ struct ins_format1 {
6163
};
6264

6365
struct ins_format2 {
64-
#if BYTE_ORDER == LITTLE_ENDIAN
66+
#ifdef __LITTLE_ENDIAN
6567
uint32_t shift_control : 8,
6668
source : 9,
6769
destination : 9,
@@ -79,7 +81,7 @@ struct ins_format2 {
7981
};
8082

8183
struct ins_format3 {
82-
#if BYTE_ORDER == LITTLE_ENDIAN
84+
#ifdef __LITTLE_ENDIAN
8385
uint32_t immediate : 8,
8486
source : 9,
8587
address : 10,

0 commit comments

Comments
 (0)