diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-05-11 18:34:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-05-11 18:34:33 -0400 |
commit | f7a014af2d76a96e5af51b64f954328b700fa62f (patch) | |
tree | 85e75ffcd1f552401431c90797aed36aa711b333 /include | |
parent | dac07ec121de66b6be988b14ae2cd9ce45357b21 (diff) | |
parent | 6dd727da92290193d0f74fa39f3ad53f423524db (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: (25 commits)
[SCSI] mptfc: race between mptfc_register_dev and mptfc_target_alloc
[SCSI] lpfc 8.1.6 : Fix Data Corruption in Bus Reset Path
[SCSI] mptspi: revalidate negotiation parameters after host reset and resume
[SCSI] srp.h: avoid padding of structs
[SCSI] ibmvscsi: fix leak when failing to send srp event
[SCSI] qla2xxx: Correct eh_abort recovery logic.
[SCSI] megaraid_{mm,mbox}: fix a bug in reset handler
[SCSI] fusion - bug fix stack overflow in mptbase
[SCSI] scsi: Add IBM 2104-DU3 to blist
[SCSI] Fix DVD burning issues.
[SCSI] SCSI: aic7xxx_osm_pci resource leak fix.
[SCSI] - fusion - mptfc bug fix's to prevent deadlock situations
[SCSI] mptfusion: bug fix's for raid components adding/deleting
[SCSI] aic7xxx: ahc_pci_write_config() fix
[SCSI] megaraid: unused variable
[SCSI] qla2xxx: only free_irq() after request_irq() succeeds
[SCSI] Overrun in drivers/scsi/sim710.c
[SCSI] lpfc 8.1.5 : Change version number to 8.1.5
[SCSI] lpfc 8.1.5 : Misc small fixes
[SCSI] lpfc 8.1.5 : Additional fixes to LOGO, PLOGI, and RSCN processing
...
Diffstat (limited to 'include')
-rw-r--r-- | include/scsi/srp.h | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/include/scsi/srp.h b/include/scsi/srp.h index 6c2681dc5b46..637f77eccf0c 100644 --- a/include/scsi/srp.h +++ b/include/scsi/srp.h | |||
@@ -95,14 +95,15 @@ struct srp_direct_buf { | |||
95 | 95 | ||
96 | /* | 96 | /* |
97 | * We need the packed attribute because the SRP spec puts the list of | 97 | * We need the packed attribute because the SRP spec puts the list of |
98 | * descriptors at an offset of 20, which is not aligned to the size | 98 | * descriptors at an offset of 20, which is not aligned to the size of |
99 | * of struct srp_direct_buf. | 99 | * struct srp_direct_buf. The whole structure must be packed to avoid |
100 | * having the 20-byte structure padded to 24 bytes on 64-bit architectures. | ||
100 | */ | 101 | */ |
101 | struct srp_indirect_buf { | 102 | struct srp_indirect_buf { |
102 | struct srp_direct_buf table_desc; | 103 | struct srp_direct_buf table_desc; |
103 | __be32 len; | 104 | __be32 len; |
104 | struct srp_direct_buf desc_list[0] __attribute__((packed)); | 105 | struct srp_direct_buf desc_list[0]; |
105 | }; | 106 | } __attribute__((packed)); |
106 | 107 | ||
107 | enum { | 108 | enum { |
108 | SRP_MULTICHAN_SINGLE = 0, | 109 | SRP_MULTICHAN_SINGLE = 0, |
@@ -122,6 +123,11 @@ struct srp_login_req { | |||
122 | u8 target_port_id[16]; | 123 | u8 target_port_id[16]; |
123 | }; | 124 | }; |
124 | 125 | ||
126 | /* | ||
127 | * The SRP spec defines the size of the LOGIN_RSP structure to be 52 | ||
128 | * bytes, so it needs to be packed to avoid having it padded to 56 | ||
129 | * bytes on 64-bit architectures. | ||
130 | */ | ||
125 | struct srp_login_rsp { | 131 | struct srp_login_rsp { |
126 | u8 opcode; | 132 | u8 opcode; |
127 | u8 reserved1[3]; | 133 | u8 reserved1[3]; |
@@ -132,7 +138,7 @@ struct srp_login_rsp { | |||
132 | __be16 buf_fmt; | 138 | __be16 buf_fmt; |
133 | u8 rsp_flags; | 139 | u8 rsp_flags; |
134 | u8 reserved2[25]; | 140 | u8 reserved2[25]; |
135 | }; | 141 | } __attribute__((packed)); |
136 | 142 | ||
137 | struct srp_login_rej { | 143 | struct srp_login_rej { |
138 | u8 opcode; | 144 | u8 opcode; |
@@ -207,6 +213,11 @@ enum { | |||
207 | SRP_RSP_FLAG_DIUNDER = 1 << 5 | 213 | SRP_RSP_FLAG_DIUNDER = 1 << 5 |
208 | }; | 214 | }; |
209 | 215 | ||
216 | /* | ||
217 | * The SRP spec defines the size of the RSP structure to be 36 bytes, | ||
218 | * so it needs to be packed to avoid having it padded to 40 bytes on | ||
219 | * 64-bit architectures. | ||
220 | */ | ||
210 | struct srp_rsp { | 221 | struct srp_rsp { |
211 | u8 opcode; | 222 | u8 opcode; |
212 | u8 sol_not; | 223 | u8 sol_not; |
@@ -221,6 +232,6 @@ struct srp_rsp { | |||
221 | __be32 sense_data_len; | 232 | __be32 sense_data_len; |
222 | __be32 resp_data_len; | 233 | __be32 resp_data_len; |
223 | u8 data[0]; | 234 | u8 data[0]; |
224 | }; | 235 | } __attribute__((packed)); |
225 | 236 | ||
226 | #endif /* SCSI_SRP_H */ | 237 | #endif /* SCSI_SRP_H */ |