summaryrefslogtreecommitdiffstats
path: root/sys/dev/twe
diff options
context:
space:
mode:
authorps <ps@FreeBSD.org>2003-11-06 08:09:29 +0000
committerps <ps@FreeBSD.org>2003-11-06 08:09:29 +0000
commitf6878e1535fecc3b5d7a672612978bd6973a3a61 (patch)
tree93c58f3b2ccbbe881a7b44e39e06155474b1f672 /sys/dev/twe
parentb3c44c7eee4fac9e6eb5df27f0285ec97bde1c25 (diff)
downloadFreeBSD-src-f6878e1535fecc3b5d7a672612978bd6973a3a61.zip
FreeBSD-src-f6878e1535fecc3b5d7a672612978bd6973a3a61.tar.gz
Correct the structure packing.
Reported by: Vinod Kashyap <vkashyap@3WARE.com>
Diffstat (limited to 'sys/dev/twe')
-rw-r--r--sys/dev/twe/twereg.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/sys/dev/twe/twereg.h b/sys/dev/twe/twereg.h
index d758971..705f419 100644
--- a/sys/dev/twe/twereg.h
+++ b/sys/dev/twe/twereg.h
@@ -160,7 +160,7 @@ typedef struct
{
u_int32_t address;
u_int32_t length;
-} TWE_SG_Entry __packed;
+} __packed TWE_SG_Entry;
typedef struct {
u_int8_t opcode:5; /* TWE_OP_INITCONNECTION */
@@ -173,7 +173,7 @@ typedef struct {
u_int8_t flags;
u_int16_t message_credits;
u_int32_t response_queue_pointer;
-} TWE_Command_INITCONNECTION __packed;
+} __packed TWE_Command_INITCONNECTION;
typedef struct
{
@@ -188,7 +188,7 @@ typedef struct
u_int16_t block_count;
u_int32_t lba;
TWE_SG_Entry sgl[TWE_MAX_SGL_LENGTH];
-} TWE_Command_IO __packed;
+} __packed TWE_Command_IO;
typedef struct
{
@@ -205,7 +205,7 @@ typedef struct
#define TWE_OP_HOTSWAP_ADD_CBOD 0x01 /* add CBOD to empty port */
#define TWE_OP_HOTSWAP_ADD_SPARE 0x02 /* add spare to empty port */
u_int8_t aport;
-} TWE_Command_HOTSWAP __packed;
+} __packed TWE_Command_HOTSWAP;
typedef struct
{
@@ -223,7 +223,7 @@ typedef struct
u_int8_t feature_mode;
u_int16_t all_units;
u_int16_t persistence;
-} TWE_Command_SETATAFEATURE __packed;
+} __packed TWE_Command_SETATAFEATURE;
typedef struct
{
@@ -236,7 +236,7 @@ typedef struct
u_int8_t status;
u_int8_t flags;
u_int16_t target_status; /* set low byte to target request's ID */
-} TWE_Command_CHECKSTATUS __packed;
+} __packed TWE_Command_CHECKSTATUS;
typedef struct
{
@@ -250,7 +250,7 @@ typedef struct
u_int8_t flags;
u_int16_t param_count;
TWE_SG_Entry sgl[TWE_MAX_SGL_LENGTH];
-} TWE_Command_PARAM __packed;
+} __packed TWE_Command_PARAM;
typedef struct
{
@@ -269,7 +269,7 @@ typedef struct
#define TWE_OP_REBUILDUNIT_STARTUNIT 5 /* rebuild src_unit (not supported) */
u_int8_t cs:1; /* request state change on src_unit */
u_int8_t logical_subunit; /* for RAID10 rebuild of logical subunit */
-} TWE_Command_REBUILDUNIT __packed;
+} __packed TWE_Command_REBUILDUNIT;
typedef struct
{
@@ -289,7 +289,7 @@ typedef struct
u_int8_t drive_head;
u_int8_t command;
TWE_SG_Entry sgl[TWE_MAX_ATA_SGL_LENGTH];
-} TWE_Command_ATA __packed;
+} __packed TWE_Command_ATA;
typedef struct
{
@@ -307,7 +307,7 @@ typedef struct
#define TWE_FLAGS_FATAL 0x03
#define TWE_FLAGS_PERCENTAGE (1<<8) /* bits 0-6 indicate completion percentage */
u_int16_t count; /* block count, parameter count, message credits */
-} TWE_Command_Generic __packed;
+} __packed TWE_Command_Generic;
/* command packet - must be TWE_ALIGNMENT aligned */
typedef union
@@ -451,7 +451,7 @@ typedef struct
u_int8_t log_drv_num; /* must be zero for configuration == 0x0f */
u_int32_t start_lba;
u_int32_t block_count; /* actual drive size if configuration == 0x0f, otherwise less DCB size */
-} TWE_Unit_Descriptor __packed;
+} __packed TWE_Unit_Descriptor;
typedef struct
{
@@ -459,7 +459,7 @@ typedef struct
u_int8_t res1;
u_int8_t mirunit_status[4]; /* bitmap of functional subunits in each mirror */
u_int8_t res2[6];
-} TWE_Mirror_Descriptor __packed;
+} __packed TWE_Mirror_Descriptor;
typedef struct
{
@@ -480,7 +480,7 @@ typedef struct
u_int32_t start_lba;
u_int32_t block_count; /* actual drive size if configuration == 0x0f, otherwise less DCB size */
TWE_Unit_Descriptor subunit[0]; /* subunit descriptors, in RAID10 mode is [mirunit][subunit] */
-} TWE_Array_Descriptor __packed;
+} __packed TWE_Array_Descriptor;
typedef struct
{
@@ -488,5 +488,5 @@ typedef struct
u_int8_t parameter_id;
u_int8_t parameter_size_bytes;
u_int8_t data[0];
-} TWE_Param __packed;
+} __packed TWE_Param;
OpenPOWER on IntegriCloud