summaryrefslogtreecommitdiff
path: root/sys/dev/ic/i82596reg.h
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2008-09-01 17:30:57 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2008-09-01 17:30:57 +0000
commitb5ddfff7891a756d08e42a986080abc019cf830c (patch)
tree2d2e16402c922e643d1ccadcc085c3796c7bb75d /sys/dev/ic/i82596reg.h
parent400b04c7f1f655a02a152b93e698f7448833e20e (diff)
Avoid #pragma pack(1) and unify everything towards using __packed.
This requires that structures defined within __packed structures must independently request that they themselves become __packed, too. worked on with toby CVS: ----------------------------------------------------------------------
Diffstat (limited to 'sys/dev/ic/i82596reg.h')
-rw-r--r--sys/dev/ic/i82596reg.h31
1 files changed, 14 insertions, 17 deletions
diff --git a/sys/dev/ic/i82596reg.h b/sys/dev/ic/i82596reg.h
index 61322f703b2..93eb7d2e240 100644
--- a/sys/dev/ic/i82596reg.h
+++ b/sys/dev/ic/i82596reg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: i82596reg.h,v 1.5 2008/06/26 05:42:15 ray Exp $ */
+/* $OpenBSD: i82596reg.h,v 1.6 2008/09/01 17:30:56 deraadt Exp $ */
/* $NetBSD: i82586reg.h,v 1.7 1998/02/28 01:07:45 pk Exp $ */
/*-
@@ -77,8 +77,6 @@
* We use integer offsets exclusively to access the i82586/596 data structures.
*/
-#pragma pack(1)
-
/*
* This is the master configuration block.
* It tells the hardware where all the rest of the stuff is.
@@ -88,7 +86,8 @@ struct __ie_sys_conf_ptr {
u_int8_t ie_bus_use; // true if 8-bit only
u_int8_t mbz2[5]; // must be zero
u_int32_t ie_iscp_ptr; // 24-bit physaddr of ISCP
-};
+} __packed;
+
*/
#define IE_SCP_SZ 12 /* keep paragraph alignment */
#define IE_SCP_BUS_USE(base) ((base) + 2)
@@ -111,7 +110,7 @@ struct __ie_int_sys_conf_ptr {
u_int8_t mbz;
u_int16_t ie_scb_offset; // 16-bit physaddr of next struct
caddr_t ie_base; // 24-bit physaddr for all 16-bit vars
-};
+} __packed;
*/
#define IE_ISCP_SZ 16
#define IE_ISCP_BUSY(base) ((base) + 0)
@@ -143,7 +142,7 @@ struct __ie_sys_ctl_block {
u_int16_t ie_err_align; // Alignment errors
u_int16_t ie_err_resource; // Resource errors
u_int16_t ie_err_overrun; // Overrun errors
-};
+} __packed;
*/
#define IE_SCB_SZ 16
#define IE_SCB_STATUS(base) ((base) + 0)
@@ -209,7 +208,7 @@ struct __ie_recv_frame_desc {
struct __ie_en_addr src; // source ether
u_int16_t ie_length; // 802 length/Ether type
u_short mbz; // must be zero
-};
+} __packed;
*/
#define IE_RFRAME_SZ 24
#define IE_RFRAME_ADDR(base,i) ((base) + (i) * 64)
@@ -249,7 +248,7 @@ struct __ie_recv_buf_desc {
caddr_t ie_rbd_buffer; // 24-pointer to buffer for this RBD
u_int16_t ie_rbd_length; // length of the buffer
u_int16_t mbz; // must be zero
-};
+} __packed;
*/
#define IE_RBD_SZ 12
#define IE_RBD_ADDR(base,i) ((base) + (i) * 32)
@@ -274,7 +273,7 @@ struct __ie_cmd_common {
u_int16_t ie_cmd_status; // status of this command
u_int16_t ie_cmd_cmd; // command word
u_int16_t ie_cmd_link; // link to next command
-};
+} __packed;
*/
#define IE_CMD_COMMON_SZ 6
#define IE_CMD_COMMON_STATUS(base) ((base) + 0)
@@ -320,7 +319,7 @@ struct __ie_xmit_cmd {
u_int16_t ie_xmit_desc; // pointer to buffer descriptor
struct __ie_en_addr ie_xmit_addr; // destination address
u_int16_t ie_xmit_length; // 802.3 length/Ether type field
-};
+} __packed;
*/
#define IE_CMD_XMIT_SZ (IE_CMD_COMMON_SZ + 10)
#define IE_CMD_XMIT_ADDR(base,i) ((base) + (i) * 32)
@@ -353,7 +352,7 @@ struct __ie_xmit_buf {
u_int16_t ie_xmit_flags; // see below
u_int16_t ie_xmit_next; // 16-pointer to next desc
caddr_t ie_xmit_buf; // 24-pointer to the actual buffer
-};
+} __packed;
*/
#define IE_XBD_SZ 8
#define IE_XBD_ADDR(base,i) ((base) + (i) * 32)
@@ -376,7 +375,7 @@ struct __ie_mcast_cmd {
// size (in bytes) of multicast addresses
u_int16_t ie_mcast_bytes;
struct __ie_en_addr ie_mcast_addrs[IE_MAXMCAST + 1];// space for them
-};
+} __packed;
*/
#define IE_CMD_MCAST_SZ (IE_CMD_COMMON_SZ + 2 /* + XXX */)
#define IE_CMD_MCAST_BYTES(base) ((base) + IE_CMD_COMMON_SZ + 0)
@@ -389,7 +388,7 @@ struct __ie_tdr_cmd {
struct __ie_cmd_common com; // common part
#define ie_tdr_status com.ie_cmd_status
u_short ie_tdr_time; // error bits and time
-};
+} __packed;
*/
#define IE_CMD_TDR_SZ (IE_CMD_COMMON_SZ + 2)
#define IE_CMD_TDR_TIME(base) ((base) + IE_CMD_COMMON_SZ + 0)
@@ -409,7 +408,7 @@ struct __ie_iasetup_cmd {
struct __ie_cmd_common com;
#define ie_iasetup_status com.ie_cmd_status
struct __ie_en_addr ie_address;
-};
+} __packed;
*/
#define IE_CMD_IAS_SZ (IE_CMD_COMMON_SZ + 6)
#define IE_CMD_IAS_EADDR(base) ((base) + IE_CMD_COMMON_SZ + 0)
@@ -433,7 +432,7 @@ struct __ie_config_cmd {
u_int8_t ie_crs_cdt; // CSMA/CD parameters (0x0)
u_int8_t ie_min_len; // min frame length (0x40)
u_int8_t ie_junk; // stuff for 82596 (0xff)
-};
+} __packed;
*/
#define IE_CMD_CFG_SZ (IE_CMD_COMMON_SZ + 12)
#define IE_CMD_CFG_CNT(base) ((base) + IE_CMD_COMMON_SZ + 0)
@@ -448,5 +447,3 @@ struct __ie_config_cmd {
#define IE_CMD_CFG_CRSCDT(base) ((base) + IE_CMD_COMMON_SZ + 9)
#define IE_CMD_CFG_MINLEN(base) ((base) + IE_CMD_COMMON_SZ + 10)
#define IE_CMD_CFG_JUNK(base) ((base) + IE_CMD_COMMON_SZ + 11)
-
-#pragma pack()