diff options
Diffstat (limited to 'drivers/net/ethernet/brocade/bna/bfi.h')
-rw-r--r-- | drivers/net/ethernet/brocade/bna/bfi.h | 70 |
1 files changed, 33 insertions, 37 deletions
diff --git a/drivers/net/ethernet/brocade/bna/bfi.h b/drivers/net/ethernet/brocade/bna/bfi.h index 63645accb5bc..3e97077bcfc0 100644 --- a/drivers/net/ethernet/brocade/bna/bfi.h +++ b/drivers/net/ethernet/brocade/bna/bfi.h @@ -21,8 +21,6 @@ #include "bfa_defs.h" -#pragma pack(1) - /* BFI FW image type */ #define BFI_FLASH_CHUNK_SZ 256 /*!< Flash chunk size */ #define BFI_FLASH_CHUNK_SZ_WORDS (BFI_FLASH_CHUNK_SZ/sizeof(u32)) @@ -36,10 +34,10 @@ struct bfi_mhdr { struct { u8 qid; u8 fn_lpu; /*!< msg destination */ - } h2i; + } __packed h2i; u16 i2htok; /*!< token in msgs to host */ - } mtag; -}; + } __packed mtag; +} __packed; #define bfi_fn_lpu(__fn, __lpu) ((__fn) << 1 | (__lpu)) #define bfi_mhdr_2_fn(_mh) ((_mh)->mtag.h2i.fn_lpu >> 1) @@ -75,14 +73,14 @@ union bfi_addr_u { struct { u32 addr_lo; u32 addr_hi; - } a32; -}; + } __packed a32; +} __packed; /* Generic DMA addr-len pair. */ struct bfi_alen { union bfi_addr_u al_addr; /* DMA addr of buffer */ u32 al_len; /* length of buffer */ -}; +} __packed; /* * Large Message structure - 128 Bytes size Msgs @@ -96,7 +94,7 @@ struct bfi_alen { struct bfi_mbmsg { struct bfi_mhdr mh; u32 pl[BFI_MBMSG_SZ]; -}; +} __packed; /* Supported PCI function class codes (personality) */ enum bfi_pcifn_class { @@ -184,7 +182,7 @@ enum bfi_ioc_i2h_msgs { struct bfi_ioc_getattr_req { struct bfi_mhdr mh; union bfi_addr_u attr_addr; -}; +} __packed; struct bfi_ioc_attr { u64 mfg_pwwn; /*!< Mfg port wwn */ @@ -211,14 +209,14 @@ struct bfi_ioc_attr { char optrom_version[BFA_VERSION_LEN]; struct bfa_mfg_vpd vpd; u32 card_type; /*!< card type */ -}; +} __packed; /* BFI_IOC_I2H_GETATTR_REPLY message */ struct bfi_ioc_getattr_reply { struct bfi_mhdr mh; /*!< Common msg header */ u8 status; /*!< cfg reply status */ u8 rsvd[3]; -}; +} __packed; /* Firmware memory page offsets */ #define BFI_IOC_SMEM_PG0_CB (0x40) @@ -256,7 +254,7 @@ struct bfi_ioc_fwver { u8 build; u8 rsvd[2]; #endif -}; +} __packed; struct bfi_ioc_image_hdr { u32 signature; /*!< constant signature */ @@ -269,7 +267,7 @@ struct bfi_ioc_image_hdr { u32 rsvd_b[2]; struct bfi_ioc_fwver fwver; u32 md5sum[BFI_IOC_MD5SUM_SZ]; -}; +} __packed; enum bfi_ioc_img_ver_cmp { BFI_IOC_IMG_VER_INCOMP, @@ -301,7 +299,7 @@ enum bfi_port_mode { struct bfi_ioc_hbeat { struct bfi_mhdr mh; /*!< common msg header */ u32 hb_count; /*!< current heart beat count */ -}; +} __packed; /* IOC hardware/firmware state */ enum bfi_ioc_state { @@ -353,7 +351,7 @@ struct bfi_ioc_ctrl_req { u16 clscode; u16 rsvd; u32 tv_sec; -}; +} __packed; /* BFI_IOC_I2H_ENABLE_REPLY & BFI_IOC_I2H_DISABLE_REPLY messages */ struct bfi_ioc_ctrl_reply { @@ -362,7 +360,7 @@ struct bfi_ioc_ctrl_reply { u8 port_mode; /*!< enum bfa_mode */ u8 cap_bm; /*!< capability bit mask */ u8 rsvd; -}; +} __packed; #define BFI_IOC_MSGSZ 8 /* H2I Messages */ @@ -372,14 +370,14 @@ union bfi_ioc_h2i_msg_u { struct bfi_ioc_ctrl_req disable_req; struct bfi_ioc_getattr_req getattr_req; u32 mboxmsg[BFI_IOC_MSGSZ]; -}; +} __packed; /* I2H Messages */ union bfi_ioc_i2h_msg_u { struct bfi_mhdr mh; struct bfi_ioc_ctrl_reply fw_event; u32 mboxmsg[BFI_IOC_MSGSZ]; -}; +} __packed; /*---------------------------------------------------------------------- * MSGQ @@ -408,7 +406,7 @@ struct bfi_msgq_mhdr { u16 num_entries; u8 enet_id; u8 rsvd[1]; -}; +} __packed; #define bfi_msgq_mhdr_set(_mh, _mc, _mid, _tok, _enet_id) do { \ (_mh).msg_class = (_mc); \ @@ -430,21 +428,21 @@ struct bfi_msgq { union bfi_addr_u addr; u16 q_depth; /* Total num of entries in the queue */ u8 rsvd[2]; -}; +} __packed; /* BFI_ENET_MSGQ_CFG_REQ TBD init or cfg? */ struct bfi_msgq_cfg_req { struct bfi_mhdr mh; struct bfi_msgq cmdq; struct bfi_msgq rspq; -}; +} __packed; /* BFI_ENET_MSGQ_CFG_RSP */ struct bfi_msgq_cfg_rsp { struct bfi_mhdr mh; u8 cmd_status; u8 rsvd[3]; -}; +} __packed; /* BFI_MSGQ_H2I_DOORBELL */ struct bfi_msgq_h2i_db { @@ -452,8 +450,8 @@ struct bfi_msgq_h2i_db { union { u16 cmdq_pi; u16 rspq_ci; - } idx; -}; + } __packed idx; +} __packed; /* BFI_MSGQ_I2H_DOORBELL */ struct bfi_msgq_i2h_db { @@ -461,8 +459,8 @@ struct bfi_msgq_i2h_db { union { u16 rspq_pi; u16 cmdq_ci; - } idx; -}; + } __packed idx; +} __packed; #define BFI_CMD_COPY_SZ 28 @@ -470,14 +468,14 @@ struct bfi_msgq_i2h_db { struct bfi_msgq_h2i_cmdq_copy_rsp { struct bfi_mhdr mh; u8 data[BFI_CMD_COPY_SZ]; -}; +} __packed; /* BFI_MSGQ_I2H_CMD_COPY_REQ */ struct bfi_msgq_i2h_cmdq_copy_req { struct bfi_mhdr mh; u16 offset; u16 len; -}; +} __packed; /* * FLASH module specific @@ -505,7 +503,7 @@ enum bfi_flash_i2h_msgs { struct bfi_flash_query_req { struct bfi_mhdr mh; /* Common msg header */ struct bfi_alen alen; -}; +} __packed; /* * Flash write request @@ -519,7 +517,7 @@ struct bfi_flash_write_req { u8 rsv[2]; u32 offset; u32 length; -}; +} __packed; /* * Flash read request @@ -532,7 +530,7 @@ struct bfi_flash_read_req { u32 offset; u32 length; struct bfi_alen alen; -}; +} __packed; /* * Flash query response @@ -540,7 +538,7 @@ struct bfi_flash_read_req { struct bfi_flash_query_rsp { struct bfi_mhdr mh; /* Common msg header */ u32 status; -}; +} __packed; /* * Flash read response @@ -552,7 +550,7 @@ struct bfi_flash_read_rsp { u8 rsv[3]; u32 status; u32 length; -}; +} __packed; /* * Flash write response @@ -564,8 +562,6 @@ struct bfi_flash_write_rsp { u8 rsv[3]; u32 status; u32 length; -}; - -#pragma pack() +} __packed; #endif /* __BFI_H__ */ |