diff options
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/libfc.h | 2 | ||||
-rw-r--r-- | include/scsi/osd_initiator.h | 16 | ||||
-rw-r--r-- | include/scsi/osd_protocol.h | 42 | ||||
-rw-r--r-- | include/scsi/osd_types.h | 5 |
4 files changed, 63 insertions, 2 deletions
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h index 14be49b44e84..f986ab7ffe6f 100644 --- a/include/scsi/libfc.h +++ b/include/scsi/libfc.h | |||
@@ -721,7 +721,7 @@ struct libfc_function_template { | |||
721 | * struct fc_disc - Discovery context | 721 | * struct fc_disc - Discovery context |
722 | * @retry_count: Number of retries | 722 | * @retry_count: Number of retries |
723 | * @pending: 1 if discovery is pending, 0 if not | 723 | * @pending: 1 if discovery is pending, 0 if not |
724 | * @requesting: 1 if discovery has been requested, 0 if not | 724 | * @requested: 1 if discovery has been requested, 0 if not |
725 | * @seq_count: Number of sequences used for discovery | 725 | * @seq_count: Number of sequences used for discovery |
726 | * @buf_len: Length of the discovery buffer | 726 | * @buf_len: Length of the discovery buffer |
727 | * @disc_id: Discovery ID | 727 | * @disc_id: Discovery ID |
diff --git a/include/scsi/osd_initiator.h b/include/scsi/osd_initiator.h index a8f370126632..53a9e886612b 100644 --- a/include/scsi/osd_initiator.h +++ b/include/scsi/osd_initiator.h | |||
@@ -137,7 +137,7 @@ struct osd_request { | |||
137 | void *buff; | 137 | void *buff; |
138 | unsigned alloc_size; /* 0 here means: don't call kfree */ | 138 | unsigned alloc_size; /* 0 here means: don't call kfree */ |
139 | unsigned total_bytes; | 139 | unsigned total_bytes; |
140 | } set_attr, enc_get_attr, get_attr; | 140 | } cdb_cont, set_attr, enc_get_attr, get_attr; |
141 | 141 | ||
142 | struct _osd_io_info { | 142 | struct _osd_io_info { |
143 | struct bio *bio; | 143 | struct bio *bio; |
@@ -448,6 +448,20 @@ void osd_req_read(struct osd_request *or, | |||
448 | int osd_req_read_kern(struct osd_request *or, | 448 | int osd_req_read_kern(struct osd_request *or, |
449 | const struct osd_obj_id *obj, u64 offset, void *buff, u64 len); | 449 | const struct osd_obj_id *obj, u64 offset, void *buff, u64 len); |
450 | 450 | ||
451 | /* Scatter/Gather write/read commands */ | ||
452 | int osd_req_write_sg(struct osd_request *or, | ||
453 | const struct osd_obj_id *obj, struct bio *bio, | ||
454 | const struct osd_sg_entry *sglist, unsigned numentries); | ||
455 | int osd_req_read_sg(struct osd_request *or, | ||
456 | const struct osd_obj_id *obj, struct bio *bio, | ||
457 | const struct osd_sg_entry *sglist, unsigned numentries); | ||
458 | int osd_req_write_sg_kern(struct osd_request *or, | ||
459 | const struct osd_obj_id *obj, void **buff, | ||
460 | const struct osd_sg_entry *sglist, unsigned numentries); | ||
461 | int osd_req_read_sg_kern(struct osd_request *or, | ||
462 | const struct osd_obj_id *obj, void **buff, | ||
463 | const struct osd_sg_entry *sglist, unsigned numentries); | ||
464 | |||
451 | /* | 465 | /* |
452 | * Root/Partition/Collection/Object Attributes commands | 466 | * Root/Partition/Collection/Object Attributes commands |
453 | */ | 467 | */ |
diff --git a/include/scsi/osd_protocol.h b/include/scsi/osd_protocol.h index 685661283540..a6026da25f3e 100644 --- a/include/scsi/osd_protocol.h +++ b/include/scsi/osd_protocol.h | |||
@@ -631,4 +631,46 @@ static inline void osd_sec_set_caps(struct osd_capability_head *cap, | |||
631 | put_unaligned_le16(bit_mask, &cap->permissions_bit_mask); | 631 | put_unaligned_le16(bit_mask, &cap->permissions_bit_mask); |
632 | } | 632 | } |
633 | 633 | ||
634 | /* osd2r05a sec 5.3: CDB continuation segment formats */ | ||
635 | enum osd_continuation_segment_format { | ||
636 | CDB_CONTINUATION_FORMAT_V2 = 0x01, | ||
637 | }; | ||
638 | |||
639 | struct osd_continuation_segment_header { | ||
640 | u8 format; | ||
641 | u8 reserved1; | ||
642 | __be16 service_action; | ||
643 | __be32 reserved2; | ||
644 | u8 integrity_check[OSDv2_CRYPTO_KEYID_SIZE]; | ||
645 | } __packed; | ||
646 | |||
647 | /* osd2r05a sec 5.4.1: CDB continuation descriptors */ | ||
648 | enum osd_continuation_descriptor_type { | ||
649 | NO_MORE_DESCRIPTORS = 0x0000, | ||
650 | SCATTER_GATHER_LIST = 0x0001, | ||
651 | QUERY_LIST = 0x0002, | ||
652 | USER_OBJECT = 0x0003, | ||
653 | COPY_USER_OBJECT_SOURCE = 0x0101, | ||
654 | EXTENSION_CAPABILITIES = 0xFFEE | ||
655 | }; | ||
656 | |||
657 | struct osd_continuation_descriptor_header { | ||
658 | __be16 type; | ||
659 | u8 reserved; | ||
660 | u8 pad_length; | ||
661 | __be32 length; | ||
662 | } __packed; | ||
663 | |||
664 | |||
665 | /* osd2r05a sec 5.4.2: Scatter/gather list */ | ||
666 | struct osd_sg_list_entry { | ||
667 | __be64 offset; | ||
668 | __be64 len; | ||
669 | }; | ||
670 | |||
671 | struct osd_sg_continuation_descriptor { | ||
672 | struct osd_continuation_descriptor_header hdr; | ||
673 | struct osd_sg_list_entry entries[]; | ||
674 | }; | ||
675 | |||
634 | #endif /* ndef __OSD_PROTOCOL_H__ */ | 676 | #endif /* ndef __OSD_PROTOCOL_H__ */ |
diff --git a/include/scsi/osd_types.h b/include/scsi/osd_types.h index 3f5e88cc75c0..bd0be7ed4bcf 100644 --- a/include/scsi/osd_types.h +++ b/include/scsi/osd_types.h | |||
@@ -37,4 +37,9 @@ struct osd_attr { | |||
37 | void *val_ptr; /* in network order */ | 37 | void *val_ptr; /* in network order */ |
38 | }; | 38 | }; |
39 | 39 | ||
40 | struct osd_sg_entry { | ||
41 | u64 offset; | ||
42 | u64 len; | ||
43 | }; | ||
44 | |||
40 | #endif /* ndef __OSD_TYPES_H__ */ | 45 | #endif /* ndef __OSD_TYPES_H__ */ |