Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
osd_protocol.h File Reference
#include <linux/types.h>
#include <linux/kernel.h>
#include <asm/unaligned.h>
#include <scsi/scsi.h>

Go to the source code of this file.

Data Structures

struct  osd_cdb_head
 
struct  osdv1_security_parameters
 
struct  osdv2_security_parameters
 
struct  osd_security_parameters
 
struct  osdv1_cdb
 
struct  osdv2_cdb
 
struct  osd_cdb
 
struct  osd_attributes_list_attrid
 
struct  osdv1_attributes_list_element
 
struct  osdv2_attributes_list_element
 
struct  osd_attributes_list_multi_header
 
struct  osdv1_attributes_list_header
 
struct  osdv2_attributes_list_header
 
struct  osd_obj_id_list
 
struct  osd_data_out_integrity_info
 
struct  osd_data_in_integrity_info
 
struct  osd_timestamp
 
struct  osd_key_identifier
 
struct  osd_capability_head
 
struct  osdv1_cap_object_descriptor
 
struct  osd_cap_object_descriptor
 
struct  osdv1_capability
 
struct  osd_capability
 
struct  osd_continuation_segment_header
 
struct  osd_continuation_descriptor_header
 
struct  osd_sg_list_entry
 
struct  osd_sg_continuation_descriptor
 

Macros

#define OSD_ACT___(Name, Num)
 
#define OSD_ACT_V2(Name, Num)   OSD_ACT_##Name = __constant_cpu_to_be16(0x8880 + Num),
 
#define OSD_ACT_V1_V2(Name, Num1, Num2)
 

Typedefs

typedef __be32 __bitwise osd_cdb_offset
 

Enumerations

enum  {
  OSDv1_ADDITIONAL_CDB_LENGTH = 192, OSDv1_TOTAL_CDB_LEN = OSDv1_ADDITIONAL_CDB_LENGTH + 8, OSDv1_CAP_LEN = 80, OSDv2_ADDITIONAL_CDB_LENGTH = 228,
  OSD_ADDITIONAL_CDB_LENGTH, OSD_TOTAL_CDB_LEN = OSD_ADDITIONAL_CDB_LENGTH + 8, OSD_CAP_LEN = 104, OSD_SYSTEMID_LEN = 20,
  OSDv1_CRYPTO_KEYID_SIZE = 20, OSDv2_CRYPTO_KEYID_SIZE = 32, OSD_CRYPTO_KEYID_SIZE = OSDv2_CRYPTO_KEYID_SIZE, OSD_CRYPTO_SEED_SIZE = 4,
  OSD_CRYPTO_NONCE_SIZE = 12, OSD_MAX_SENSE_LEN = 252, OSD_PARTITION_FIRST_ID = 0x10000, OSD_OBJECT_FIRST_ID = 0x10000
}
 
enum  osd_options_byte { OSD_CDB_FUA = 0x08, OSD_CDB_DPO = 0x10 }
 
enum  osd_options_byte_isolation {
  OSD_ISOLATION_DEFAULT = 0, OSD_ISOLATION_NONE = 1, OSD_ISOLATION_STRICT = 2, OSD_ISOLATION_RANGE = 4,
  OSD_ISOLATION_FUNCTIONAL = 5, OSD_ISOLATION_VENDOR = 7
}
 
enum  osd_options_flush_scope_values { OSD_CDB_FLUSH_ALL = 0, OSD_CDB_FLUSH_ATTR_ONLY = 1, OSD_CDB_FLUSH_ALL_RECURSIVE = 2, OSD_CDB_FLUSH_ALL_RANGE = 2 }
 
enum  { OSD_CDB_NORMAL_TIMESTAMPS = 0, OSD_CDB_BYPASS_TIMESTAMPS = 0x7f }
 
enum  osd_attributes_mode { OSD_CDB_SET_ONE_ATTR = 0x10, OSD_CDB_GET_ATTR_PAGE_SET_ONE = 0x20, OSD_CDB_GET_SET_ATTR_LISTS = 0x30, OSD_CDB_GET_SET_ATTR_MASK = 0x30 }
 
enum  {
  OSD_OFFSET_UNUSED = 0xFFFFFFFF, OSD_OFFSET_MAX_BITS = 28, OSDv1_OFFSET_MIN_SHIFT = 8, OSD_OFFSET_MIN_SHIFT = 3,
  OSD_OFFSET_MAX_SHIFT = 16
}
 
enum  osd_service_actions
 
enum  { OSDv1_ATTRIBUTES_ELEM_ALIGN = 1, OSD_ATTRIBUTES_ELEM_ALIGN = 8 }
 
enum  { OSD_ATTR_LIST_ALL_PAGES = 0xFFFFFFFF, OSD_ATTR_LIST_ALL_IN_PAGE = 0xFFFFFFFF }
 
enum  osd_attr_list_types { OSD_ATTR_LIST_GET = 0x1, OSD_ATTR_LIST_SET_RETRIEVE = 0x9, OSD_V2_ATTR_LIST_MULTIPLE = 0xE, OSD_V1_ATTR_LIST_CREATE_MULTIPLE = 0xF }
 
enum  { OSD_OBJ_ID_LIST_PAR = 0x1, OSD_OBJ_ID_LIST_LSTCHG = 0x2 }
 
enum  { OSD_SEC_CAP_FORMAT_NO_CAPS = 0, OSD_SEC_CAP_FORMAT_VER1 = 1, OSD_SEC_CAP_FORMAT_VER2 = 2 }
 
enum  { OSD_SEC_NOSEC = 0, OSD_SEC_CAPKEY = 1, OSD_SEC_CMDRSP = 2, OSD_SEC_ALLDATA = 3 }
 
enum  object_type { OSD_SEC_OBJ_ROOT = 0x1, OSD_SEC_OBJ_PARTITION = 0x2, OSD_SEC_OBJ_COLLECTION = 0x40, OSD_SEC_OBJ_USER = 0x80 }
 
enum  osd_capability_bit_masks {
  OSD_SEC_CAP_APPEND = BIT(0), OSD_SEC_CAP_OBJ_MGMT = BIT(1), OSD_SEC_CAP_REMOVE = BIT(2), OSD_SEC_CAP_CREATE = BIT(3),
  OSD_SEC_CAP_SET_ATTR = BIT(4), OSD_SEC_CAP_GET_ATTR = BIT(5), OSD_SEC_CAP_WRITE = BIT(6), OSD_SEC_CAP_READ = BIT(7),
  OSD_SEC_CAP_NONE1 = BIT(8), OSD_SEC_CAP_NONE2 = BIT(9), OSD_SEC_GBL_REM = BIT(10), OSD_SEC_CAP_QUERY = BIT(11),
  OSD_SEC_CAP_M_OBJECT = BIT(12), OSD_SEC_CAP_POL_SEC = BIT(13), OSD_SEC_CAP_GLOBAL = BIT(14), OSD_SEC_CAP_DEV_MGMT = BIT(15)
}
 
enum  { OSD_SEC_OBJ_DESC_NONE = 0, OSD_SEC_OBJ_DESC_OBJ = 1 << 4, OSD_SEC_OBJ_DESC_PAR = 2 << 4, OSD_SEC_OBJ_DESC_COL = 3 << 4 }
 
enum  osd_continuation_segment_format { CDB_CONTINUATION_FORMAT_V2 = 0x01 }
 
enum  osd_continuation_descriptor_type {
  NO_MORE_DESCRIPTORS = 0x0000, SCATTER_GATHER_LIST = 0x0001, QUERY_LIST = 0x0002, USER_OBJECT = 0x0003,
  COPY_USER_OBJECT_SOURCE = 0x0101, EXTENSION_CAPABILITIES = 0xFFEE
}
 

Functions

osd_cdb_offset __osd_encode_offset (u64 offset, unsigned *padding, int min_shift, int max_shift)
 

Variables

struct osd_cdb_head __packed
 

Macro Definition Documentation

#define OSD_ACT___ (   Name,
  Num 
)
Value:
OSD_ACT_##Name = __constant_cpu_to_be16(0x8880 + Num), \
OSDv1_ACT_##Name = __constant_cpu_to_be16(0x8800 + Num),

Definition at line 265 of file osd_protocol.h.

#define OSD_ACT_V1_V2 (   Name,
  Num1,
  Num2 
)
Value:
OSD_ACT_##Name = __constant_cpu_to_be16(Num2), \
OSDv1_ACT_##Name = __constant_cpu_to_be16(Num1),

Definition at line 273 of file osd_protocol.h.

#define OSD_ACT_V2 (   Name,
  Num 
)    OSD_ACT_##Name = __constant_cpu_to_be16(0x8880 + Num),

Definition at line 270 of file osd_protocol.h.

Typedef Documentation

Definition at line 110 of file osd_protocol.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
OSDv1_ADDITIONAL_CDB_LENGTH 
OSDv1_TOTAL_CDB_LEN 
OSDv1_CAP_LEN 
OSDv2_ADDITIONAL_CDB_LENGTH 
OSD_ADDITIONAL_CDB_LENGTH 
OSD_TOTAL_CDB_LEN 
OSD_CAP_LEN 
OSD_SYSTEMID_LEN 
OSDv1_CRYPTO_KEYID_SIZE 
OSDv2_CRYPTO_KEYID_SIZE 
OSD_CRYPTO_KEYID_SIZE 
OSD_CRYPTO_SEED_SIZE 
OSD_CRYPTO_NONCE_SIZE 
OSD_MAX_SENSE_LEN 
OSD_PARTITION_FIRST_ID 
OSD_OBJECT_FIRST_ID 

Definition at line 24 of file osd_protocol.h.

anonymous enum
Enumerator:
OSD_CDB_NORMAL_TIMESTAMPS 
OSD_CDB_BYPASS_TIMESTAMPS 

Definition at line 83 of file osd_protocol.h.

anonymous enum
Enumerator:
OSD_OFFSET_UNUSED 
OSD_OFFSET_MAX_BITS 
OSDv1_OFFSET_MIN_SHIFT 
OSD_OFFSET_MIN_SHIFT 
OSD_OFFSET_MAX_SHIFT 

Definition at line 112 of file osd_protocol.h.

anonymous enum
Enumerator:
OSDv1_ATTRIBUTES_ELEM_ALIGN 
OSD_ATTRIBUTES_ELEM_ALIGN 

Definition at line 351 of file osd_protocol.h.

anonymous enum
Enumerator:
OSD_ATTR_LIST_ALL_PAGES 
OSD_ATTR_LIST_ALL_IN_PAGE 

Definition at line 356 of file osd_protocol.h.

anonymous enum
Enumerator:
OSD_OBJ_ID_LIST_PAR 
OSD_OBJ_ID_LIST_LSTCHG 

Definition at line 426 of file osd_protocol.h.

anonymous enum
Enumerator:
OSD_SEC_CAP_FORMAT_NO_CAPS 
OSD_SEC_CAP_FORMAT_VER1 
OSD_SEC_CAP_FORMAT_VER2 

Definition at line 503 of file osd_protocol.h.

anonymous enum
Enumerator:
OSD_SEC_NOSEC 
OSD_SEC_CAPKEY 
OSD_SEC_CMDRSP 
OSD_SEC_ALLDATA 

Definition at line 510 of file osd_protocol.h.

anonymous enum
Enumerator:
OSD_SEC_OBJ_DESC_NONE 
OSD_SEC_OBJ_DESC_OBJ 
OSD_SEC_OBJ_DESC_PAR 
OSD_SEC_OBJ_DESC_COL 

Definition at line 545 of file osd_protocol.h.

Enumerator:
OSD_SEC_OBJ_ROOT 
OSD_SEC_OBJ_PARTITION 
OSD_SEC_OBJ_COLLECTION 
OSD_SEC_OBJ_USER 

Definition at line 517 of file osd_protocol.h.

Enumerator:
OSD_ATTR_LIST_GET 
OSD_ATTR_LIST_SET_RETRIEVE 
OSD_V2_ATTR_LIST_MULTIPLE 
OSD_V1_ATTR_LIST_CREATE_MULTIPLE 

Definition at line 376 of file osd_protocol.h.

Enumerator:
OSD_CDB_SET_ONE_ATTR 
OSD_CDB_GET_ATTR_PAGE_SET_ONE 
OSD_CDB_GET_SET_ATTR_LISTS 
OSD_CDB_GET_SET_ATTR_MASK 

Definition at line 92 of file osd_protocol.h.

Enumerator:
OSD_SEC_CAP_APPEND 
OSD_SEC_CAP_OBJ_MGMT 
OSD_SEC_CAP_REMOVE 
OSD_SEC_CAP_CREATE 
OSD_SEC_CAP_SET_ATTR 
OSD_SEC_CAP_GET_ATTR 
OSD_SEC_CAP_WRITE 
OSD_SEC_CAP_READ 
OSD_SEC_CAP_NONE1 
OSD_SEC_CAP_NONE2 
OSD_SEC_GBL_REM 
OSD_SEC_CAP_QUERY 
OSD_SEC_CAP_M_OBJECT 
OSD_SEC_CAP_POL_SEC 
OSD_SEC_CAP_GLOBAL 
OSD_SEC_CAP_DEV_MGMT 

Definition at line 524 of file osd_protocol.h.

Enumerator:
NO_MORE_DESCRIPTORS 
SCATTER_GATHER_LIST 
QUERY_LIST 
USER_OBJECT 
COPY_USER_OBJECT_SOURCE 
EXTENSION_CAPABILITIES 

Definition at line 648 of file osd_protocol.h.

Enumerator:
CDB_CONTINUATION_FORMAT_V2 

Definition at line 635 of file osd_protocol.h.

Enumerator:
OSD_CDB_FUA 
OSD_CDB_DPO 

Definition at line 51 of file osd_protocol.h.

Enumerator:
OSD_ISOLATION_DEFAULT 
OSD_ISOLATION_NONE 
OSD_ISOLATION_STRICT 
OSD_ISOLATION_RANGE 
OSD_ISOLATION_FUNCTIONAL 
OSD_ISOLATION_VENDOR 

Definition at line 61 of file osd_protocol.h.

Enumerator:
OSD_CDB_FLUSH_ALL 
OSD_CDB_FLUSH_ATTR_ONLY 
OSD_CDB_FLUSH_ALL_RECURSIVE 
OSD_CDB_FLUSH_ALL_RANGE 

Definition at line 73 of file osd_protocol.h.

Definition at line 277 of file osd_protocol.h.

Function Documentation

osd_cdb_offset __osd_encode_offset ( u64  offset,
unsigned *  padding,
int  min_shift,
int  max_shift 
)

Definition at line 2034 of file osd_initiator.c.

Variable Documentation