* having the 20-byte structure padded to 24 bytes on 64-bit architectures.
*/
struct srp_indirect_buf {
- struct srp_direct_buf table_desc;
+ struct srp_direct_buf table_desc __packed __aligned(4);
__be32 len;
- struct srp_direct_buf desc_list[];
-} __attribute__((packed));
+ struct srp_direct_buf desc_list[] __packed __aligned(4);
+};
/* Immediate data buffer descriptor as defined in SRP2. */
struct srp_imm_buf {
u8 opcode;
u8 reserved1[3];
__be32 req_lim_delta;
- u64 tag;
+ u64 tag __packed __aligned(4);
__be32 max_it_iu_len;
__be32 max_ti_iu_len;
__be16 buf_fmt;
u8 rsp_flags;
u8 reserved2[25];
-} __attribute__((packed));
+};
struct srp_login_rej {
u8 opcode;
u64 tag;
};
-/*
- * We need the packed attribute because the SRP spec only aligns the
- * 8-byte LUN field to 4 bytes.
- */
struct srp_tsk_mgmt {
u8 opcode;
u8 sol_not;
u8 reserved5[8];
};
-/*
- * We need the packed attribute because the SRP spec only aligns the
- * 8-byte LUN field to 4 bytes.
- */
struct srp_cmd {
u8 opcode;
u8 sol_not;
u8 sol_not;
u8 reserved1[2];
__be32 req_lim_delta;
- u64 tag;
+ u64 tag __packed __aligned(4);
u8 reserved2[2];
u8 flags;
u8 status;
__be32 sense_data_len;
__be32 resp_data_len;
u8 data[];
-} __attribute__((packed));
+};
struct srp_cred_req {
u8 opcode;
u8 sol_not;
u8 reserved[2];
__be32 req_lim_delta;
- u64 tag;
+ u64 tag __packed __aligned(4);
u32 reserved2;
struct scsi_lun lun;
__be32 sense_data_len;
u32 reserved3;
u8 sense_data[];
-} __attribute__((packed));
+};
struct srp_aer_rsp {
u8 opcode;