Make the bitfields in here work on big-endian machines. How this ever
worked is unclear. Patch from thorpej, tested by me.
This commit is contained in:
parent
0e7b1b9ec1
commit
ba7b2b4124
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: bhareg.h,v 1.13 1999/09/30 23:12:29 thorpej Exp $ */
|
||||
/* $NetBSD: bhareg.h,v 1.14 1999/12/23 00:15:12 wrstuden Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
|
||||
@ -191,11 +191,19 @@ struct bha_scat_gath {
|
||||
|
||||
struct bha_ccb {
|
||||
u_int8_t opcode;
|
||||
#if BYTE_ORDER == LITTLE_ENDIAN
|
||||
u_int8_t :3,
|
||||
data_in :1,
|
||||
data_out :1,
|
||||
wide_tag_enable :1, /* Wide Lun CCB format */
|
||||
wide_tag_type :2; /* Wide Lun CCB format */
|
||||
#else
|
||||
u_int8_t wide_tag_type :2, /* Wide Lun CCB format */
|
||||
wide_tag_enable :1, /* Wide Lun CCB format */
|
||||
data_out :1,
|
||||
data_in :1,
|
||||
:3;
|
||||
#endif
|
||||
u_int8_t scsi_cmd_length;
|
||||
u_int8_t req_sense_length;
|
||||
/*------------------------------------longword boundary */
|
||||
@ -208,9 +216,15 @@ struct bha_ccb {
|
||||
u_int8_t target_stat;
|
||||
/*------------------------------------longword boundary */
|
||||
u_int8_t target;
|
||||
#if BYTE_ORDER == LITTLE_ENDIAN
|
||||
u_int8_t lun :5,
|
||||
tag_enable :1,
|
||||
tag_type :2;
|
||||
#else
|
||||
u_int8_t tag_type :2,
|
||||
tag_enable :1,
|
||||
lun :5;
|
||||
#endif
|
||||
u_int8_t scsi_cmd[12];
|
||||
u_int8_t reserved2[1];
|
||||
u_int8_t link_id;
|
||||
@ -320,8 +334,13 @@ struct bha_config {
|
||||
struct {
|
||||
u_char chan;
|
||||
u_char intr;
|
||||
u_char scsi_dev:3;
|
||||
u_char :5;
|
||||
#if BYTE_ORDER == LITTLE_ENDIAN
|
||||
u_char scsi_dev :3,
|
||||
:5;
|
||||
#else
|
||||
u_char :5,
|
||||
scsi_dev :3;
|
||||
#endif
|
||||
} reply;
|
||||
};
|
||||
|
||||
@ -382,15 +401,27 @@ struct bha_devices {
|
||||
};
|
||||
|
||||
struct bha_sync {
|
||||
u_char offset:4;
|
||||
u_char period:3;
|
||||
u_char valid:1;
|
||||
#if BYTE_ORDER == LITTLE_ENDIAN
|
||||
u_char offset :4,
|
||||
period :3,
|
||||
valid :1;
|
||||
#else
|
||||
u_char valid :1,
|
||||
period :3,
|
||||
offset :4;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct bha_setup_reply {
|
||||
#if BYTE_ORDER == LITTLE_ENDIAN
|
||||
u_int8_t sync_neg :1,
|
||||
parity :1,
|
||||
:6;
|
||||
#else
|
||||
u_int8_t :6,
|
||||
parity :1,
|
||||
sync_neg :1;
|
||||
#endif
|
||||
u_int8_t speed;
|
||||
u_int8_t bus_on;
|
||||
u_int8_t bus_off;
|
||||
|
Loading…
Reference in New Issue
Block a user