diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2009-05-22 14:25:34 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-05-22 14:25:34 -0400 |
commit | e4b636366c00738b9609cda307014d71b1225b7f (patch) | |
tree | 760b67b3624eda62e943e48ce93635c30a5b47bf /include/scsi | |
parent | b9ed7252d219c1c663944bf03846eabb515dbe75 (diff) | |
parent | 279e677faa775ad16e75c32e1bf4a37f8158bc61 (diff) |
Merge branch 'master' into for-2.6.31
Conflicts:
drivers/block/hd.c
drivers/block/mg_disk.c
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/fc/fc_fs.h | 1 | ||||
-rw-r--r-- | include/scsi/libfc.h | 1 | ||||
-rw-r--r-- | include/scsi/libiscsi.h | 2 | ||||
-rw-r--r-- | include/scsi/osd_protocol.h | 96 |
4 files changed, 75 insertions, 25 deletions
diff --git a/include/scsi/fc/fc_fs.h b/include/scsi/fc/fc_fs.h index 1b7af3a64c7c..ac4cd38c860e 100644 --- a/include/scsi/fc/fc_fs.h +++ b/include/scsi/fc/fc_fs.h | |||
@@ -149,6 +149,7 @@ enum fc_rctl { | |||
149 | * Well-known fabric addresses. | 149 | * Well-known fabric addresses. |
150 | */ | 150 | */ |
151 | enum fc_well_known_fid { | 151 | enum fc_well_known_fid { |
152 | FC_FID_NONE = 0x000000, /* No destination */ | ||
152 | FC_FID_BCAST = 0xffffff, /* broadcast */ | 153 | FC_FID_BCAST = 0xffffff, /* broadcast */ |
153 | FC_FID_FLOGI = 0xfffffe, /* fabric login */ | 154 | FC_FID_FLOGI = 0xfffffe, /* fabric login */ |
154 | FC_FID_FCTRL = 0xfffffd, /* fabric controller */ | 155 | FC_FID_FCTRL = 0xfffffd, /* fabric controller */ |
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h index 0303a6a098cc..45f9cc642c46 100644 --- a/include/scsi/libfc.h +++ b/include/scsi/libfc.h | |||
@@ -637,6 +637,7 @@ struct fc_disc { | |||
637 | enum fc_disc_event); | 637 | enum fc_disc_event); |
638 | 638 | ||
639 | struct list_head rports; | 639 | struct list_head rports; |
640 | struct list_head rogue_rports; | ||
640 | struct fc_lport *lport; | 641 | struct fc_lport *lport; |
641 | struct mutex disc_mutex; | 642 | struct mutex disc_mutex; |
642 | struct fc_gpn_ft_resp partial_buf; /* partial name buffer */ | 643 | struct fc_gpn_ft_resp partial_buf; /* partial name buffer */ |
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h index 7ffaed2f94dd..0289f5745fb9 100644 --- a/include/scsi/libiscsi.h +++ b/include/scsi/libiscsi.h | |||
@@ -36,6 +36,7 @@ struct scsi_transport_template; | |||
36 | struct scsi_host_template; | 36 | struct scsi_host_template; |
37 | struct scsi_device; | 37 | struct scsi_device; |
38 | struct Scsi_Host; | 38 | struct Scsi_Host; |
39 | struct scsi_target; | ||
39 | struct scsi_cmnd; | 40 | struct scsi_cmnd; |
40 | struct socket; | 41 | struct socket; |
41 | struct iscsi_transport; | 42 | struct iscsi_transport; |
@@ -350,6 +351,7 @@ extern struct Scsi_Host *iscsi_host_alloc(struct scsi_host_template *sht, | |||
350 | bool xmit_can_sleep); | 351 | bool xmit_can_sleep); |
351 | extern void iscsi_host_remove(struct Scsi_Host *shost); | 352 | extern void iscsi_host_remove(struct Scsi_Host *shost); |
352 | extern void iscsi_host_free(struct Scsi_Host *shost); | 353 | extern void iscsi_host_free(struct Scsi_Host *shost); |
354 | extern int iscsi_target_alloc(struct scsi_target *starget); | ||
353 | 355 | ||
354 | /* | 356 | /* |
355 | * session management | 357 | * session management |
diff --git a/include/scsi/osd_protocol.h b/include/scsi/osd_protocol.h index cd3cbf764650..62b2ab8c69d4 100644 --- a/include/scsi/osd_protocol.h +++ b/include/scsi/osd_protocol.h | |||
@@ -24,17 +24,18 @@ enum { | |||
24 | OSDv1_ADDITIONAL_CDB_LENGTH = 192, | 24 | OSDv1_ADDITIONAL_CDB_LENGTH = 192, |
25 | OSDv1_TOTAL_CDB_LEN = OSDv1_ADDITIONAL_CDB_LENGTH + 8, | 25 | OSDv1_TOTAL_CDB_LEN = OSDv1_ADDITIONAL_CDB_LENGTH + 8, |
26 | OSDv1_CAP_LEN = 80, | 26 | OSDv1_CAP_LEN = 80, |
27 | |||
27 | /* Latest supported version */ | 28 | /* Latest supported version */ |
28 | /* OSD_ADDITIONAL_CDB_LENGTH = 216,*/ | 29 | OSDv2_ADDITIONAL_CDB_LENGTH = 228, |
29 | OSD_ADDITIONAL_CDB_LENGTH = | 30 | OSD_ADDITIONAL_CDB_LENGTH = |
30 | OSDv1_ADDITIONAL_CDB_LENGTH, /* FIXME: Pete rev-001 sup */ | 31 | OSDv2_ADDITIONAL_CDB_LENGTH, |
31 | OSD_TOTAL_CDB_LEN = OSD_ADDITIONAL_CDB_LENGTH + 8, | 32 | OSD_TOTAL_CDB_LEN = OSD_ADDITIONAL_CDB_LENGTH + 8, |
32 | /* OSD_CAP_LEN = 104,*/ | 33 | OSD_CAP_LEN = 104, |
33 | OSD_CAP_LEN = OSDv1_CAP_LEN,/* FIXME: Pete rev-001 sup */ | ||
34 | 34 | ||
35 | OSD_SYSTEMID_LEN = 20, | 35 | OSD_SYSTEMID_LEN = 20, |
36 | OSD_CRYPTO_KEYID_SIZE = 20, | 36 | OSDv1_CRYPTO_KEYID_SIZE = 20, |
37 | /*FIXME: OSDv2_CRYPTO_KEYID_SIZE = 32,*/ | 37 | OSDv2_CRYPTO_KEYID_SIZE = 32, |
38 | OSD_CRYPTO_KEYID_SIZE = OSDv2_CRYPTO_KEYID_SIZE, | ||
38 | OSD_CRYPTO_SEED_SIZE = 4, | 39 | OSD_CRYPTO_SEED_SIZE = 4, |
39 | OSD_CRYPTO_NONCE_SIZE = 12, | 40 | OSD_CRYPTO_NONCE_SIZE = 12, |
40 | OSD_MAX_SENSE_LEN = 252, /* from SPC-3 */ | 41 | OSD_MAX_SENSE_LEN = 252, /* from SPC-3 */ |
@@ -164,7 +165,11 @@ struct osd_cdb_head { | |||
164 | /* called allocation_length in some commands */ | 165 | /* called allocation_length in some commands */ |
165 | /*32*/ __be64 length; | 166 | /*32*/ __be64 length; |
166 | /*40*/ __be64 start_address; | 167 | /*40*/ __be64 start_address; |
167 | /*48*/ __be32 list_identifier;/* Rarely used */ | 168 | union { |
169 | /*48*/ __be32 list_identifier;/* Rarely used */ | ||
170 | /* OSD2r05 5.2.5 CDB continuation length */ | ||
171 | /*48*/ __be32 cdb_continuation_length; | ||
172 | }; | ||
168 | } __packed v2; | 173 | } __packed v2; |
169 | }; | 174 | }; |
170 | /*52*/ union { /* selected attributes mode Page/List/Single */ | 175 | /*52*/ union { /* selected attributes mode Page/List/Single */ |
@@ -204,29 +209,40 @@ struct osd_cdb_head { | |||
204 | /*80*/ | 209 | /*80*/ |
205 | 210 | ||
206 | /*160 v1*/ | 211 | /*160 v1*/ |
207 | /*184 v2*/ | 212 | struct osdv1_security_parameters { |
208 | struct osd_security_parameters { | 213 | /*160*/u8 integrity_check_value[OSDv1_CRYPTO_KEYID_SIZE]; |
209 | /*160*/u8 integrity_check_value[OSD_CRYPTO_KEYID_SIZE]; | ||
210 | /*180*/u8 request_nonce[OSD_CRYPTO_NONCE_SIZE]; | 214 | /*180*/u8 request_nonce[OSD_CRYPTO_NONCE_SIZE]; |
211 | /*192*/osd_cdb_offset data_in_integrity_check_offset; | 215 | /*192*/osd_cdb_offset data_in_integrity_check_offset; |
212 | /*196*/osd_cdb_offset data_out_integrity_check_offset; | 216 | /*196*/osd_cdb_offset data_out_integrity_check_offset; |
213 | } __packed; | 217 | } __packed; |
214 | /*200 v1*/ | 218 | /*200 v1*/ |
215 | /*224 v2*/ | ||
216 | 219 | ||
217 | /* FIXME: osdv2_security_parameters */ | 220 | /*184 v2*/ |
221 | struct osdv2_security_parameters { | ||
222 | /*184*/u8 integrity_check_value[OSDv2_CRYPTO_KEYID_SIZE]; | ||
223 | /*216*/u8 request_nonce[OSD_CRYPTO_NONCE_SIZE]; | ||
224 | /*228*/osd_cdb_offset data_in_integrity_check_offset; | ||
225 | /*232*/osd_cdb_offset data_out_integrity_check_offset; | ||
226 | } __packed; | ||
227 | /*236 v2*/ | ||
228 | |||
229 | struct osd_security_parameters { | ||
230 | union { | ||
231 | struct osdv1_security_parameters v1; | ||
232 | struct osdv2_security_parameters v2; | ||
233 | }; | ||
234 | }; | ||
218 | 235 | ||
219 | struct osdv1_cdb { | 236 | struct osdv1_cdb { |
220 | struct osd_cdb_head h; | 237 | struct osd_cdb_head h; |
221 | u8 caps[OSDv1_CAP_LEN]; | 238 | u8 caps[OSDv1_CAP_LEN]; |
222 | struct osd_security_parameters sec_params; | 239 | struct osdv1_security_parameters sec_params; |
223 | } __packed; | 240 | } __packed; |
224 | 241 | ||
225 | struct osdv2_cdb { | 242 | struct osdv2_cdb { |
226 | struct osd_cdb_head h; | 243 | struct osd_cdb_head h; |
227 | u8 caps[OSD_CAP_LEN]; | 244 | u8 caps[OSD_CAP_LEN]; |
228 | struct osd_security_parameters sec_params; | 245 | struct osdv2_security_parameters sec_params; |
229 | /* FIXME: osdv2_security_parameters */ | ||
230 | } __packed; | 246 | } __packed; |
231 | 247 | ||
232 | struct osd_cdb { | 248 | struct osd_cdb { |
@@ -301,14 +317,25 @@ struct osd_attributes_list_attrid { | |||
301 | } __packed; | 317 | } __packed; |
302 | 318 | ||
303 | /* | 319 | /* |
320 | * NOTE: v1: is not aligned. | ||
321 | */ | ||
322 | struct osdv1_attributes_list_element { | ||
323 | __be32 attr_page; | ||
324 | __be32 attr_id; | ||
325 | __be16 attr_bytes; /* valid bytes at attr_val without padding */ | ||
326 | u8 attr_val[0]; | ||
327 | } __packed; | ||
328 | |||
329 | /* | ||
304 | * osd2r03: 7.1.3.3 List entry format for retrieved attributes and | 330 | * osd2r03: 7.1.3.3 List entry format for retrieved attributes and |
305 | * for setting attributes | 331 | * for setting attributes |
306 | * NOTE: v2 is 8-bytes aligned, v1 is not aligned. | 332 | * NOTE: v2 is 8-bytes aligned |
307 | */ | 333 | */ |
308 | struct osd_attributes_list_element { | 334 | struct osdv2_attributes_list_element { |
309 | __be32 attr_page; | 335 | __be32 attr_page; |
310 | __be32 attr_id; | 336 | __be32 attr_id; |
311 | __be16 attr_bytes; | 337 | u8 reserved[6]; |
338 | __be16 attr_bytes; /* valid bytes at attr_val without padding */ | ||
312 | u8 attr_val[0]; | 339 | u8 attr_val[0]; |
313 | } __packed; | 340 | } __packed; |
314 | 341 | ||
@@ -324,13 +351,13 @@ enum { | |||
324 | 351 | ||
325 | static inline unsigned osdv1_attr_list_elem_size(unsigned len) | 352 | static inline unsigned osdv1_attr_list_elem_size(unsigned len) |
326 | { | 353 | { |
327 | return ALIGN(len + sizeof(struct osd_attributes_list_element), | 354 | return ALIGN(len + sizeof(struct osdv1_attributes_list_element), |
328 | OSDv1_ATTRIBUTES_ELEM_ALIGN); | 355 | OSDv1_ATTRIBUTES_ELEM_ALIGN); |
329 | } | 356 | } |
330 | 357 | ||
331 | static inline unsigned osdv2_attr_list_elem_size(unsigned len) | 358 | static inline unsigned osdv2_attr_list_elem_size(unsigned len) |
332 | { | 359 | { |
333 | return ALIGN(len + sizeof(struct osd_attributes_list_element), | 360 | return ALIGN(len + sizeof(struct osdv2_attributes_list_element), |
334 | OSD_ATTRIBUTES_ELEM_ALIGN); | 361 | OSD_ATTRIBUTES_ELEM_ALIGN); |
335 | } | 362 | } |
336 | 363 | ||
@@ -419,15 +446,35 @@ struct osd_data_out_integrity_info { | |||
419 | __be64 data_bytes; | 446 | __be64 data_bytes; |
420 | __be64 set_attributes_bytes; | 447 | __be64 set_attributes_bytes; |
421 | __be64 get_attributes_bytes; | 448 | __be64 get_attributes_bytes; |
422 | __be64 integrity_check_value; | 449 | __u8 integrity_check_value[OSD_CRYPTO_KEYID_SIZE]; |
423 | } __packed; | 450 | } __packed; |
424 | 451 | ||
452 | /* Same osd_data_out_integrity_info is used for OSD2/OSD1. The only difference | ||
453 | * Is the sizeof the structure since in OSD1 the last array is smaller. Use | ||
454 | * below for version independent handling of this structure | ||
455 | */ | ||
456 | static inline int osd_data_out_integrity_info_sizeof(bool is_ver1) | ||
457 | { | ||
458 | return sizeof(struct osd_data_out_integrity_info) - | ||
459 | (is_ver1 * (OSDv2_CRYPTO_KEYID_SIZE - OSDv1_CRYPTO_KEYID_SIZE)); | ||
460 | } | ||
461 | |||
425 | struct osd_data_in_integrity_info { | 462 | struct osd_data_in_integrity_info { |
426 | __be64 data_bytes; | 463 | __be64 data_bytes; |
427 | __be64 retrieved_attributes_bytes; | 464 | __be64 retrieved_attributes_bytes; |
428 | __be64 integrity_check_value; | 465 | __u8 integrity_check_value[OSD_CRYPTO_KEYID_SIZE]; |
429 | } __packed; | 466 | } __packed; |
430 | 467 | ||
468 | /* Same osd_data_in_integrity_info is used for OSD2/OSD1. The only difference | ||
469 | * Is the sizeof the structure since in OSD1 the last array is smaller. Use | ||
470 | * below for version independent handling of this structure | ||
471 | */ | ||
472 | static inline int osd_data_in_integrity_info_sizeof(bool is_ver1) | ||
473 | { | ||
474 | return sizeof(struct osd_data_in_integrity_info) - | ||
475 | (is_ver1 * (OSDv2_CRYPTO_KEYID_SIZE - OSDv1_CRYPTO_KEYID_SIZE)); | ||
476 | } | ||
477 | |||
431 | struct osd_timestamp { | 478 | struct osd_timestamp { |
432 | u8 time[6]; /* number of milliseconds since 1/1/1970 UT (big endian) */ | 479 | u8 time[6]; /* number of milliseconds since 1/1/1970 UT (big endian) */ |
433 | } __packed; | 480 | } __packed; |
@@ -477,7 +524,7 @@ enum osd_capability_bit_masks { | |||
477 | 524 | ||
478 | OSD_SEC_CAP_NONE1 = BIT(8), | 525 | OSD_SEC_CAP_NONE1 = BIT(8), |
479 | OSD_SEC_CAP_NONE2 = BIT(9), | 526 | OSD_SEC_CAP_NONE2 = BIT(9), |
480 | OSD_SEC_CAP_NONE3 = BIT(10), | 527 | OSD_SEC_GBL_REM = BIT(10), /*v2 only*/ |
481 | OSD_SEC_CAP_QUERY = BIT(11), /*v2 only*/ | 528 | OSD_SEC_CAP_QUERY = BIT(11), /*v2 only*/ |
482 | OSD_SEC_CAP_M_OBJECT = BIT(12), /*v2 only*/ | 529 | OSD_SEC_CAP_M_OBJECT = BIT(12), /*v2 only*/ |
483 | OSD_SEC_CAP_POL_SEC = BIT(13), | 530 | OSD_SEC_CAP_POL_SEC = BIT(13), |
@@ -552,8 +599,7 @@ struct osdv1_capability { | |||
552 | 599 | ||
553 | struct osd_capability { | 600 | struct osd_capability { |
554 | struct osd_capability_head h; | 601 | struct osd_capability_head h; |
555 | /* struct osd_cap_object_descriptor od;*/ | 602 | struct osd_cap_object_descriptor od; |
556 | struct osdv1_cap_object_descriptor od; /* FIXME: Pete rev-001 sup */ | ||
557 | } __packed; | 603 | } __packed; |
558 | 604 | ||
559 | /** | 605 | /** |