diff options
author | David S. Miller <davem@davemloft.net> | 2009-06-15 06:02:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-06-15 06:02:23 -0400 |
commit | 9cbc1cb8cd46ce1f7645b9de249b2ce8460129bb (patch) | |
tree | 8d104ec2a459346b99413b0b77421ca7b9936c1a /include/scsi | |
parent | ca44d6e60f9de26281fda203f58b570e1748c015 (diff) | |
parent | 45e3e1935e2857c54783291107d33323b3ef33c8 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
Documentation/feature-removal-schedule.txt
drivers/scsi/fcoe/fcoe.c
net/core/drop_monitor.c
net/core/net-traces.c
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/fc/fc_fip.h | 7 | ||||
-rw-r--r-- | include/scsi/iscsi_if.h | 49 | ||||
-rw-r--r-- | include/scsi/libfc.h | 1 | ||||
-rw-r--r-- | include/scsi/libiscsi.h | 8 | ||||
-rw-r--r-- | include/scsi/osd_attributes.h | 74 | ||||
-rw-r--r-- | include/scsi/osd_initiator.h | 14 | ||||
-rw-r--r-- | include/scsi/osd_protocol.h | 8 | ||||
-rw-r--r-- | include/scsi/scsi_cmnd.h | 2 | ||||
-rw-r--r-- | include/scsi/scsi_transport_fc.h | 4 | ||||
-rw-r--r-- | include/scsi/scsi_transport_iscsi.h | 8 |
10 files changed, 156 insertions, 19 deletions
diff --git a/include/scsi/fc/fc_fip.h b/include/scsi/fc/fc_fip.h index 0627a9ae6347..3d138c1fcf8a 100644 --- a/include/scsi/fc/fc_fip.h +++ b/include/scsi/fc/fc_fip.h | |||
@@ -22,13 +22,6 @@ | |||
22 | * http://www.t11.org/ftp/t11/pub/fc/bb-5/08-543v1.pdf | 22 | * http://www.t11.org/ftp/t11/pub/fc/bb-5/08-543v1.pdf |
23 | */ | 23 | */ |
24 | 24 | ||
25 | /* | ||
26 | * The FIP ethertype eventually goes in net/if_ether.h. | ||
27 | */ | ||
28 | #ifndef ETH_P_FIP | ||
29 | #define ETH_P_FIP 0x8914 /* FIP Ethertype */ | ||
30 | #endif | ||
31 | |||
32 | #define FIP_DEF_PRI 128 /* default selection priority */ | 25 | #define FIP_DEF_PRI 128 /* default selection priority */ |
33 | #define FIP_DEF_FC_MAP 0x0efc00 /* default FCoE MAP (MAC OUI) value */ | 26 | #define FIP_DEF_FC_MAP 0x0efc00 /* default FCoE MAP (MAC OUI) value */ |
34 | #define FIP_DEF_FKA 8000 /* default FCF keep-alive/advert period (mS) */ | 27 | #define FIP_DEF_FKA 8000 /* default FCF keep-alive/advert period (mS) */ |
diff --git a/include/scsi/iscsi_if.h b/include/scsi/iscsi_if.h index d0ed5226f8c4..4426f00da5ff 100644 --- a/include/scsi/iscsi_if.h +++ b/include/scsi/iscsi_if.h | |||
@@ -22,6 +22,11 @@ | |||
22 | #define ISCSI_IF_H | 22 | #define ISCSI_IF_H |
23 | 23 | ||
24 | #include <scsi/iscsi_proto.h> | 24 | #include <scsi/iscsi_proto.h> |
25 | #include <linux/in.h> | ||
26 | #include <linux/in6.h> | ||
27 | |||
28 | #define ISCSI_NL_GRP_ISCSID 1 | ||
29 | #define ISCSI_NL_GRP_UIP 2 | ||
25 | 30 | ||
26 | #define UEVENT_BASE 10 | 31 | #define UEVENT_BASE 10 |
27 | #define KEVENT_BASE 100 | 32 | #define KEVENT_BASE 100 |
@@ -50,7 +55,10 @@ enum iscsi_uevent_e { | |||
50 | ISCSI_UEVENT_TGT_DSCVR = UEVENT_BASE + 15, | 55 | ISCSI_UEVENT_TGT_DSCVR = UEVENT_BASE + 15, |
51 | ISCSI_UEVENT_SET_HOST_PARAM = UEVENT_BASE + 16, | 56 | ISCSI_UEVENT_SET_HOST_PARAM = UEVENT_BASE + 16, |
52 | ISCSI_UEVENT_UNBIND_SESSION = UEVENT_BASE + 17, | 57 | ISCSI_UEVENT_UNBIND_SESSION = UEVENT_BASE + 17, |
53 | ISCSI_UEVENT_CREATE_BOUND_SESSION = UEVENT_BASE + 18, | 58 | ISCSI_UEVENT_CREATE_BOUND_SESSION = UEVENT_BASE + 18, |
59 | ISCSI_UEVENT_TRANSPORT_EP_CONNECT_THROUGH_HOST = UEVENT_BASE + 19, | ||
60 | |||
61 | ISCSI_UEVENT_PATH_UPDATE = UEVENT_BASE + 20, | ||
54 | 62 | ||
55 | /* up events */ | 63 | /* up events */ |
56 | ISCSI_KEVENT_RECV_PDU = KEVENT_BASE + 1, | 64 | ISCSI_KEVENT_RECV_PDU = KEVENT_BASE + 1, |
@@ -59,6 +67,9 @@ enum iscsi_uevent_e { | |||
59 | ISCSI_KEVENT_DESTROY_SESSION = KEVENT_BASE + 4, | 67 | ISCSI_KEVENT_DESTROY_SESSION = KEVENT_BASE + 4, |
60 | ISCSI_KEVENT_UNBIND_SESSION = KEVENT_BASE + 5, | 68 | ISCSI_KEVENT_UNBIND_SESSION = KEVENT_BASE + 5, |
61 | ISCSI_KEVENT_CREATE_SESSION = KEVENT_BASE + 6, | 69 | ISCSI_KEVENT_CREATE_SESSION = KEVENT_BASE + 6, |
70 | |||
71 | ISCSI_KEVENT_PATH_REQ = KEVENT_BASE + 7, | ||
72 | ISCSI_KEVENT_IF_DOWN = KEVENT_BASE + 8, | ||
62 | }; | 73 | }; |
63 | 74 | ||
64 | enum iscsi_tgt_dscvr { | 75 | enum iscsi_tgt_dscvr { |
@@ -131,6 +142,10 @@ struct iscsi_uevent { | |||
131 | struct msg_transport_connect { | 142 | struct msg_transport_connect { |
132 | uint32_t non_blocking; | 143 | uint32_t non_blocking; |
133 | } ep_connect; | 144 | } ep_connect; |
145 | struct msg_transport_connect_through_host { | ||
146 | uint32_t host_no; | ||
147 | uint32_t non_blocking; | ||
148 | } ep_connect_through_host; | ||
134 | struct msg_transport_poll { | 149 | struct msg_transport_poll { |
135 | uint64_t ep_handle; | 150 | uint64_t ep_handle; |
136 | uint32_t timeout_ms; | 151 | uint32_t timeout_ms; |
@@ -154,6 +169,9 @@ struct iscsi_uevent { | |||
154 | uint32_t param; /* enum iscsi_host_param */ | 169 | uint32_t param; /* enum iscsi_host_param */ |
155 | uint32_t len; | 170 | uint32_t len; |
156 | } set_host_param; | 171 | } set_host_param; |
172 | struct msg_set_path { | ||
173 | uint32_t host_no; | ||
174 | } set_path; | ||
157 | } u; | 175 | } u; |
158 | union { | 176 | union { |
159 | /* messages k -> u */ | 177 | /* messages k -> u */ |
@@ -187,10 +205,39 @@ struct iscsi_uevent { | |||
187 | struct msg_transport_connect_ret { | 205 | struct msg_transport_connect_ret { |
188 | uint64_t handle; | 206 | uint64_t handle; |
189 | } ep_connect_ret; | 207 | } ep_connect_ret; |
208 | struct msg_req_path { | ||
209 | uint32_t host_no; | ||
210 | } req_path; | ||
211 | struct msg_notify_if_down { | ||
212 | uint32_t host_no; | ||
213 | } notify_if_down; | ||
190 | } r; | 214 | } r; |
191 | } __attribute__ ((aligned (sizeof(uint64_t)))); | 215 | } __attribute__ ((aligned (sizeof(uint64_t)))); |
192 | 216 | ||
193 | /* | 217 | /* |
218 | * To keep the struct iscsi_uevent size the same for userspace code | ||
219 | * compatibility, the main structure for ISCSI_UEVENT_PATH_UPDATE and | ||
220 | * ISCSI_KEVENT_PATH_REQ is defined separately and comes after the | ||
221 | * struct iscsi_uevent in the NETLINK_ISCSI message. | ||
222 | */ | ||
223 | struct iscsi_path { | ||
224 | uint64_t handle; | ||
225 | uint8_t mac_addr[6]; | ||
226 | uint8_t mac_addr_old[6]; | ||
227 | uint32_t ip_addr_len; /* 4 or 16 */ | ||
228 | union { | ||
229 | struct in_addr v4_addr; | ||
230 | struct in6_addr v6_addr; | ||
231 | } src; | ||
232 | union { | ||
233 | struct in_addr v4_addr; | ||
234 | struct in6_addr v6_addr; | ||
235 | } dst; | ||
236 | uint16_t vlan_id; | ||
237 | uint16_t pmtu; | ||
238 | } __attribute__ ((aligned (sizeof(uint64_t)))); | ||
239 | |||
240 | /* | ||
194 | * Common error codes | 241 | * Common error codes |
195 | */ | 242 | */ |
196 | enum iscsi_err { | 243 | enum iscsi_err { |
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h index 45f9cc642c46..ebdd9f4cf070 100644 --- a/include/scsi/libfc.h +++ b/include/scsi/libfc.h | |||
@@ -679,6 +679,7 @@ struct fc_lport { | |||
679 | unsigned int e_d_tov; | 679 | unsigned int e_d_tov; |
680 | unsigned int r_a_tov; | 680 | unsigned int r_a_tov; |
681 | u8 max_retry_count; | 681 | u8 max_retry_count; |
682 | u8 max_rport_retry_count; | ||
682 | u16 link_speed; | 683 | u16 link_speed; |
683 | u16 link_supported_speeds; | 684 | u16 link_supported_speeds; |
684 | u16 lro_xid; /* max xid for fcoe lro */ | 685 | u16 lro_xid; /* max xid for fcoe lro */ |
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h index 0289f5745fb9..196525cd402f 100644 --- a/include/scsi/libiscsi.h +++ b/include/scsi/libiscsi.h | |||
@@ -82,9 +82,12 @@ enum { | |||
82 | 82 | ||
83 | 83 | ||
84 | enum { | 84 | enum { |
85 | ISCSI_TASK_FREE, | ||
85 | ISCSI_TASK_COMPLETED, | 86 | ISCSI_TASK_COMPLETED, |
86 | ISCSI_TASK_PENDING, | 87 | ISCSI_TASK_PENDING, |
87 | ISCSI_TASK_RUNNING, | 88 | ISCSI_TASK_RUNNING, |
89 | ISCSI_TASK_ABRT_TMF, /* aborted due to TMF */ | ||
90 | ISCSI_TASK_ABRT_SESS_RECOV, /* aborted due to session recovery */ | ||
88 | }; | 91 | }; |
89 | 92 | ||
90 | struct iscsi_r2t_info { | 93 | struct iscsi_r2t_info { |
@@ -181,9 +184,7 @@ struct iscsi_conn { | |||
181 | 184 | ||
182 | /* xmit */ | 185 | /* xmit */ |
183 | struct list_head mgmtqueue; /* mgmt (control) xmit queue */ | 186 | struct list_head mgmtqueue; /* mgmt (control) xmit queue */ |
184 | struct list_head mgmt_run_list; /* list of control tasks */ | 187 | struct list_head cmdqueue; /* data-path cmd queue */ |
185 | struct list_head xmitqueue; /* data-path cmd queue */ | ||
186 | struct list_head run_list; /* list of cmds in progress */ | ||
187 | struct list_head requeue; /* tasks needing another run */ | 188 | struct list_head requeue; /* tasks needing another run */ |
188 | struct work_struct xmitwork; /* per-conn. xmit workqueue */ | 189 | struct work_struct xmitwork; /* per-conn. xmit workqueue */ |
189 | unsigned long suspend_tx; /* suspend Tx */ | 190 | unsigned long suspend_tx; /* suspend Tx */ |
@@ -406,6 +407,7 @@ extern int __iscsi_complete_pdu(struct iscsi_conn *, struct iscsi_hdr *, | |||
406 | char *, int); | 407 | char *, int); |
407 | extern int iscsi_verify_itt(struct iscsi_conn *, itt_t); | 408 | extern int iscsi_verify_itt(struct iscsi_conn *, itt_t); |
408 | extern struct iscsi_task *iscsi_itt_to_ctask(struct iscsi_conn *, itt_t); | 409 | extern struct iscsi_task *iscsi_itt_to_ctask(struct iscsi_conn *, itt_t); |
410 | extern struct iscsi_task *iscsi_itt_to_task(struct iscsi_conn *, itt_t); | ||
409 | extern void iscsi_requeue_task(struct iscsi_task *task); | 411 | extern void iscsi_requeue_task(struct iscsi_task *task); |
410 | extern void iscsi_put_task(struct iscsi_task *task); | 412 | extern void iscsi_put_task(struct iscsi_task *task); |
411 | extern void __iscsi_get_task(struct iscsi_task *task); | 413 | extern void __iscsi_get_task(struct iscsi_task *task); |
diff --git a/include/scsi/osd_attributes.h b/include/scsi/osd_attributes.h index f888a6fda073..56e920ade326 100644 --- a/include/scsi/osd_attributes.h +++ b/include/scsi/osd_attributes.h | |||
@@ -29,6 +29,7 @@ enum { | |||
29 | OSD_APAGE_PARTITION_INFORMATION = OSD_APAGE_PARTITION_FIRST + 1, | 29 | OSD_APAGE_PARTITION_INFORMATION = OSD_APAGE_PARTITION_FIRST + 1, |
30 | OSD_APAGE_PARTITION_QUOTAS = OSD_APAGE_PARTITION_FIRST + 2, | 30 | OSD_APAGE_PARTITION_QUOTAS = OSD_APAGE_PARTITION_FIRST + 2, |
31 | OSD_APAGE_PARTITION_TIMESTAMP = OSD_APAGE_PARTITION_FIRST + 3, | 31 | OSD_APAGE_PARTITION_TIMESTAMP = OSD_APAGE_PARTITION_FIRST + 3, |
32 | OSD_APAGE_PARTITION_ATTR_ACCESS = OSD_APAGE_PARTITION_FIRST + 4, | ||
32 | OSD_APAGE_PARTITION_SECURITY = OSD_APAGE_PARTITION_FIRST + 5, | 33 | OSD_APAGE_PARTITION_SECURITY = OSD_APAGE_PARTITION_FIRST + 5, |
33 | OSD_APAGE_PARTITION_LAST = 0x5FFFFFFF, | 34 | OSD_APAGE_PARTITION_LAST = 0x5FFFFFFF, |
34 | 35 | ||
@@ -51,7 +52,9 @@ enum { | |||
51 | OSD_APAGE_RESERVED_TYPE_LAST = 0xEFFFFFFF, | 52 | OSD_APAGE_RESERVED_TYPE_LAST = 0xEFFFFFFF, |
52 | 53 | ||
53 | OSD_APAGE_COMMON_FIRST = 0xF0000000, | 54 | OSD_APAGE_COMMON_FIRST = 0xF0000000, |
54 | OSD_APAGE_COMMON_LAST = 0xFFFFFFFE, | 55 | OSD_APAGE_COMMON_LAST = 0xFFFFFFFD, |
56 | |||
57 | OSD_APAGE_CURRENT_COMMAND = 0xFFFFFFFE, | ||
55 | 58 | ||
56 | OSD_APAGE_REQUEST_ALL = 0xFFFFFFFF, | 59 | OSD_APAGE_REQUEST_ALL = 0xFFFFFFFF, |
57 | }; | 60 | }; |
@@ -106,10 +109,30 @@ enum { | |||
106 | OSD_ATTR_RI_PRODUCT_REVISION_LEVEL = 0x7, /* 4 */ | 109 | OSD_ATTR_RI_PRODUCT_REVISION_LEVEL = 0x7, /* 4 */ |
107 | OSD_ATTR_RI_PRODUCT_SERIAL_NUMBER = 0x8, /* variable */ | 110 | OSD_ATTR_RI_PRODUCT_SERIAL_NUMBER = 0x8, /* variable */ |
108 | OSD_ATTR_RI_OSD_NAME = 0x9, /* variable */ | 111 | OSD_ATTR_RI_OSD_NAME = 0x9, /* variable */ |
112 | OSD_ATTR_RI_MAX_CDB_CONTINUATION_LEN = 0xA, /* 4 */ | ||
109 | OSD_ATTR_RI_TOTAL_CAPACITY = 0x80, /* 8 */ | 113 | OSD_ATTR_RI_TOTAL_CAPACITY = 0x80, /* 8 */ |
110 | OSD_ATTR_RI_USED_CAPACITY = 0x81, /* 8 */ | 114 | OSD_ATTR_RI_USED_CAPACITY = 0x81, /* 8 */ |
111 | OSD_ATTR_RI_NUMBER_OF_PARTITIONS = 0xC0, /* 8 */ | 115 | OSD_ATTR_RI_NUMBER_OF_PARTITIONS = 0xC0, /* 8 */ |
112 | OSD_ATTR_RI_CLOCK = 0x100, /* 6 */ | 116 | OSD_ATTR_RI_CLOCK = 0x100, /* 6 */ |
117 | OARI_DEFAULT_ISOLATION_METHOD = 0X110, /* 1 */ | ||
118 | OARI_SUPPORTED_ISOLATION_METHODS = 0X111, /* 32 */ | ||
119 | |||
120 | OARI_DATA_ATOMICITY_GUARANTEE = 0X120, /* 8 */ | ||
121 | OARI_DATA_ATOMICITY_ALIGNMENT = 0X121, /* 8 */ | ||
122 | OARI_ATTRIBUTES_ATOMICITY_GUARANTEE = 0X122, /* 8 */ | ||
123 | OARI_DATA_ATTRIBUTES_ATOMICITY_MULTIPLIER = 0X123, /* 1 */ | ||
124 | |||
125 | OARI_MAXIMUM_SNAPSHOTS_COUNT = 0X1C1, /* 0 or 4 */ | ||
126 | OARI_MAXIMUM_CLONES_COUNT = 0X1C2, /* 0 or 4 */ | ||
127 | OARI_MAXIMUM_BRANCH_DEPTH = 0X1CC, /* 0 or 4 */ | ||
128 | OARI_SUPPORTED_OBJECT_DUPLICATION_METHOD_FIRST = 0X200, /* 0 or 4 */ | ||
129 | OARI_SUPPORTED_OBJECT_DUPLICATION_METHOD_LAST = 0X2ff, /* 0 or 4 */ | ||
130 | OARI_SUPPORTED_TIME_OF_DUPLICATION_METHOD_FIRST = 0X300, /* 0 or 4 */ | ||
131 | OARI_SUPPORTED_TIME_OF_DUPLICATION_METHOD_LAST = 0X30F, /* 0 or 4 */ | ||
132 | OARI_SUPPORT_FOR_DUPLICATED_OBJECT_FREEZING = 0X310, /* 0 or 4 */ | ||
133 | OARI_SUPPORT_FOR_SNAPSHOT_REFRESHING = 0X311, /* 0 or 1 */ | ||
134 | OARI_SUPPORTED_CDB_CONTINUATION_DESC_TYPE_FIRST = 0X7000001,/* 0 or 4 */ | ||
135 | OARI_SUPPORTED_CDB_CONTINUATION_DESC_TYPE_LAST = 0X700FFFF,/* 0 or 4 */ | ||
113 | }; | 136 | }; |
114 | /* Root_Information_attributes_page does not have a get_page structure */ | 137 | /* Root_Information_attributes_page does not have a get_page structure */ |
115 | 138 | ||
@@ -120,7 +143,15 @@ enum { | |||
120 | OSD_ATTR_PI_PARTITION_ID = 0x1, /* 8 */ | 143 | OSD_ATTR_PI_PARTITION_ID = 0x1, /* 8 */ |
121 | OSD_ATTR_PI_USERNAME = 0x9, /* variable */ | 144 | OSD_ATTR_PI_USERNAME = 0x9, /* variable */ |
122 | OSD_ATTR_PI_USED_CAPACITY = 0x81, /* 8 */ | 145 | OSD_ATTR_PI_USED_CAPACITY = 0x81, /* 8 */ |
146 | OSD_ATTR_PI_USED_CAPACITY_INCREMENT = 0x84, /* 0 or 8 */ | ||
123 | OSD_ATTR_PI_NUMBER_OF_OBJECTS = 0xC1, /* 8 */ | 147 | OSD_ATTR_PI_NUMBER_OF_OBJECTS = 0xC1, /* 8 */ |
148 | |||
149 | OSD_ATTR_PI_ACTUAL_DATA_SPACE = 0xD1, /* 0 or 8 */ | ||
150 | OSD_ATTR_PI_RESERVED_DATA_SPACE = 0xD2, /* 0 or 8 */ | ||
151 | OSD_ATTR_PI_DEFAULT_SNAPSHOT_DUPLICATION_METHOD = 0x200,/* 0 or 4 */ | ||
152 | OSD_ATTR_PI_DEFAULT_CLONE_DUPLICATION_METHOD = 0x201,/* 0 or 4 */ | ||
153 | OSD_ATTR_PI_DEFAULT_SP_TIME_OF_DUPLICATION = 0x300,/* 0 or 4 */ | ||
154 | OSD_ATTR_PI_DEFAULT_CLONE_TIME_OF_DUPLICATION = 0x301,/* 0 or 4 */ | ||
124 | }; | 155 | }; |
125 | /* Partition Information attributes page does not have a get_page structure */ | 156 | /* Partition Information attributes page does not have a get_page structure */ |
126 | 157 | ||
@@ -131,6 +162,7 @@ enum { | |||
131 | OSD_ATTR_CI_PARTITION_ID = 0x1, /* 8 */ | 162 | OSD_ATTR_CI_PARTITION_ID = 0x1, /* 8 */ |
132 | OSD_ATTR_CI_COLLECTION_OBJECT_ID = 0x2, /* 8 */ | 163 | OSD_ATTR_CI_COLLECTION_OBJECT_ID = 0x2, /* 8 */ |
133 | OSD_ATTR_CI_USERNAME = 0x9, /* variable */ | 164 | OSD_ATTR_CI_USERNAME = 0x9, /* variable */ |
165 | OSD_ATTR_CI_COLLECTION_TYPE = 0xA, /* 1 */ | ||
134 | OSD_ATTR_CI_USED_CAPACITY = 0x81, /* 8 */ | 166 | OSD_ATTR_CI_USED_CAPACITY = 0x81, /* 8 */ |
135 | }; | 167 | }; |
136 | /* Collection Information attributes page does not have a get_page structure */ | 168 | /* Collection Information attributes page does not have a get_page structure */ |
@@ -144,6 +176,8 @@ enum { | |||
144 | OSD_ATTR_OI_USERNAME = 0x9, /* variable */ | 176 | OSD_ATTR_OI_USERNAME = 0x9, /* variable */ |
145 | OSD_ATTR_OI_USED_CAPACITY = 0x81, /* 8 */ | 177 | OSD_ATTR_OI_USED_CAPACITY = 0x81, /* 8 */ |
146 | OSD_ATTR_OI_LOGICAL_LENGTH = 0x82, /* 8 */ | 178 | OSD_ATTR_OI_LOGICAL_LENGTH = 0x82, /* 8 */ |
179 | SD_ATTR_OI_ACTUAL_DATA_SPACE = 0XD1, /* 0 OR 8 */ | ||
180 | SD_ATTR_OI_RESERVED_DATA_SPACE = 0XD2, /* 0 OR 8 */ | ||
147 | }; | 181 | }; |
148 | /* Object Information attributes page does not have a get_page structure */ | 182 | /* Object Information attributes page does not have a get_page structure */ |
149 | 183 | ||
@@ -248,7 +282,18 @@ struct object_timestamps_attributes_page { | |||
248 | struct osd_timestamp data_modified_time; | 282 | struct osd_timestamp data_modified_time; |
249 | } __packed; | 283 | } __packed; |
250 | 284 | ||
251 | /* 7.1.2.19 Collections attributes page */ | 285 | /* OSD2r05: 7.1.3.19 Attributes Access attributes page |
286 | * (OSD_APAGE_PARTITION_ATTR_ACCESS) | ||
287 | * | ||
288 | * each attribute is of the form below. Total array length is deduced | ||
289 | * from the attribute's length | ||
290 | * (See allowed_attributes_access of the struct osd_cap_object_descriptor) | ||
291 | */ | ||
292 | struct attributes_access_attr { | ||
293 | struct osd_attributes_list_attrid attr_list[0]; | ||
294 | } __packed; | ||
295 | |||
296 | /* OSD2r05: 7.1.2.21 Collections attributes page */ | ||
252 | /* TBD */ | 297 | /* TBD */ |
253 | 298 | ||
254 | /* 7.1.2.20 Root Policy/Security attributes page (OSD_APAGE_ROOT_SECURITY) */ | 299 | /* 7.1.2.20 Root Policy/Security attributes page (OSD_APAGE_ROOT_SECURITY) */ |
@@ -324,4 +369,29 @@ struct object_security_attributes_page { | |||
324 | __be32 policy_access_tag; | 369 | __be32 policy_access_tag; |
325 | } __packed; | 370 | } __packed; |
326 | 371 | ||
372 | /* OSD2r05: 7.1.3.31 Current Command attributes page | ||
373 | * (OSD_APAGE_CURRENT_COMMAND) | ||
374 | */ | ||
375 | enum { | ||
376 | OSD_ATTR_CC_RESPONSE_INTEGRITY_CHECK_VALUE = 0x1, /* 32 */ | ||
377 | OSD_ATTR_CC_OBJECT_TYPE = 0x2, /* 1 */ | ||
378 | OSD_ATTR_CC_PARTITION_ID = 0x3, /* 8 */ | ||
379 | OSD_ATTR_CC_OBJECT_ID = 0x4, /* 8 */ | ||
380 | OSD_ATTR_CC_STARTING_BYTE_ADDRESS_OF_APPEND = 0x5, /* 8 */ | ||
381 | OSD_ATTR_CC_CHANGE_IN_USED_CAPACITY = 0x6, /* 8 */ | ||
382 | }; | ||
383 | |||
384 | /*TBD: osdv1_current_command_attributes_page */ | ||
385 | |||
386 | struct osdv2_current_command_attributes_page { | ||
387 | struct osd_attr_page_header hdr; /* id=0xFFFFFFFE, size=0x44 */ | ||
388 | u8 response_integrity_check_value[OSD_CRYPTO_KEYID_SIZE]; | ||
389 | u8 object_type; | ||
390 | u8 reserved[3]; | ||
391 | __be64 partition_id; | ||
392 | __be64 object_id; | ||
393 | __be64 starting_byte_address_of_append; | ||
394 | __be64 change_in_used_capacity; | ||
395 | }; | ||
396 | |||
327 | #endif /*ndef __OSD_ATTRIBUTES_H__*/ | 397 | #endif /*ndef __OSD_ATTRIBUTES_H__*/ |
diff --git a/include/scsi/osd_initiator.h b/include/scsi/osd_initiator.h index b24d9616eb46..02bd9f716357 100644 --- a/include/scsi/osd_initiator.h +++ b/include/scsi/osd_initiator.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #include "osd_types.h" | 18 | #include "osd_types.h" |
19 | 19 | ||
20 | #include <linux/blkdev.h> | 20 | #include <linux/blkdev.h> |
21 | #include <scsi/scsi_device.h> | ||
21 | 22 | ||
22 | /* Note: "NI" in comments below means "Not Implemented yet" */ | 23 | /* Note: "NI" in comments below means "Not Implemented yet" */ |
23 | 24 | ||
@@ -47,6 +48,7 @@ enum osd_std_version { | |||
47 | */ | 48 | */ |
48 | struct osd_dev { | 49 | struct osd_dev { |
49 | struct scsi_device *scsi_device; | 50 | struct scsi_device *scsi_device; |
51 | struct file *file; | ||
50 | unsigned def_timeout; | 52 | unsigned def_timeout; |
51 | 53 | ||
52 | #ifdef OSD_VER1_SUPPORT | 54 | #ifdef OSD_VER1_SUPPORT |
@@ -69,6 +71,10 @@ void osd_dev_fini(struct osd_dev *od); | |||
69 | 71 | ||
70 | /* some hi level device operations */ | 72 | /* some hi level device operations */ |
71 | int osd_auto_detect_ver(struct osd_dev *od, void *caps); /* GFP_KERNEL */ | 73 | int osd_auto_detect_ver(struct osd_dev *od, void *caps); /* GFP_KERNEL */ |
74 | static inline struct request_queue *osd_request_queue(struct osd_dev *od) | ||
75 | { | ||
76 | return od->scsi_device->request_queue; | ||
77 | } | ||
72 | 78 | ||
73 | /* we might want to use function vector in the future */ | 79 | /* we might want to use function vector in the future */ |
74 | static inline void osd_dev_set_ver(struct osd_dev *od, enum osd_std_version v) | 80 | static inline void osd_dev_set_ver(struct osd_dev *od, enum osd_std_version v) |
@@ -363,7 +369,9 @@ void osd_req_create_object(struct osd_request *or, struct osd_obj_id *); | |||
363 | void osd_req_remove_object(struct osd_request *or, struct osd_obj_id *); | 369 | void osd_req_remove_object(struct osd_request *or, struct osd_obj_id *); |
364 | 370 | ||
365 | void osd_req_write(struct osd_request *or, | 371 | void osd_req_write(struct osd_request *or, |
366 | const struct osd_obj_id *, struct bio *data_out, u64 offset); | 372 | const struct osd_obj_id *obj, u64 offset, struct bio *bio, u64 len); |
373 | int osd_req_write_kern(struct osd_request *or, | ||
374 | const struct osd_obj_id *obj, u64 offset, void *buff, u64 len); | ||
367 | void osd_req_append(struct osd_request *or, | 375 | void osd_req_append(struct osd_request *or, |
368 | const struct osd_obj_id *, struct bio *data_out);/* NI */ | 376 | const struct osd_obj_id *, struct bio *data_out);/* NI */ |
369 | void osd_req_create_write(struct osd_request *or, | 377 | void osd_req_create_write(struct osd_request *or, |
@@ -378,7 +386,9 @@ void osd_req_flush_object(struct osd_request *or, | |||
378 | /*V2*/ u64 offset, /*V2*/ u64 len); | 386 | /*V2*/ u64 offset, /*V2*/ u64 len); |
379 | 387 | ||
380 | void osd_req_read(struct osd_request *or, | 388 | void osd_req_read(struct osd_request *or, |
381 | const struct osd_obj_id *, struct bio *data_in, u64 offset); | 389 | const struct osd_obj_id *obj, u64 offset, struct bio *bio, u64 len); |
390 | int osd_req_read_kern(struct osd_request *or, | ||
391 | const struct osd_obj_id *obj, u64 offset, void *buff, u64 len); | ||
382 | 392 | ||
383 | /* | 393 | /* |
384 | * Root/Partition/Collection/Object Attributes commands | 394 | * Root/Partition/Collection/Object Attributes commands |
diff --git a/include/scsi/osd_protocol.h b/include/scsi/osd_protocol.h index 62b2ab8c69d4..2cc8e8b1cc19 100644 --- a/include/scsi/osd_protocol.h +++ b/include/scsi/osd_protocol.h | |||
@@ -303,7 +303,15 @@ enum osd_service_actions { | |||
303 | OSD_ACT_V2(REMOVE_MEMBER_OBJECTS, 0x21) | 303 | OSD_ACT_V2(REMOVE_MEMBER_OBJECTS, 0x21) |
304 | OSD_ACT_V2(GET_MEMBER_ATTRIBUTES, 0x22) | 304 | OSD_ACT_V2(GET_MEMBER_ATTRIBUTES, 0x22) |
305 | OSD_ACT_V2(SET_MEMBER_ATTRIBUTES, 0x23) | 305 | OSD_ACT_V2(SET_MEMBER_ATTRIBUTES, 0x23) |
306 | |||
307 | OSD_ACT_V2(CREATE_CLONE, 0x28) | ||
308 | OSD_ACT_V2(CREATE_SNAPSHOT, 0x29) | ||
309 | OSD_ACT_V2(DETACH_CLONE, 0x2A) | ||
310 | OSD_ACT_V2(REFRESH_SNAPSHOT_CLONE, 0x2B) | ||
311 | OSD_ACT_V2(RESTORE_PARTITION_FROM_SNAPSHOT, 0x2C) | ||
312 | |||
306 | OSD_ACT_V2(READ_MAP, 0x31) | 313 | OSD_ACT_V2(READ_MAP, 0x31) |
314 | OSD_ACT_V2(READ_MAPS_COMPARE, 0x32) | ||
307 | 315 | ||
308 | OSD_ACT_V1_V2(PERFORM_SCSI_COMMAND, 0x8F7E, 0x8F7C) | 316 | OSD_ACT_V1_V2(PERFORM_SCSI_COMMAND, 0x8F7E, 0x8F7C) |
309 | OSD_ACT_V1_V2(SCSI_TASK_MANAGEMENT, 0x8F7F, 0x8F7D) | 317 | OSD_ACT_V1_V2(SCSI_TASK_MANAGEMENT, 0x8F7F, 0x8F7D) |
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index 43b50d36925c..3878d1dc7f59 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h | |||
@@ -270,7 +270,7 @@ static inline unsigned char scsi_get_prot_type(struct scsi_cmnd *scmd) | |||
270 | 270 | ||
271 | static inline sector_t scsi_get_lba(struct scsi_cmnd *scmd) | 271 | static inline sector_t scsi_get_lba(struct scsi_cmnd *scmd) |
272 | { | 272 | { |
273 | return scmd->request->sector; | 273 | return blk_rq_pos(scmd->request); |
274 | } | 274 | } |
275 | 275 | ||
276 | static inline unsigned scsi_prot_sg_count(struct scsi_cmnd *cmd) | 276 | static inline unsigned scsi_prot_sg_count(struct scsi_cmnd *cmd) |
diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h index c9184f756cad..68a8d873bbd9 100644 --- a/include/scsi/scsi_transport_fc.h +++ b/include/scsi/scsi_transport_fc.h | |||
@@ -680,7 +680,7 @@ fc_remote_port_chkready(struct fc_rport *rport) | |||
680 | if (rport->roles & FC_PORT_ROLE_FCP_TARGET) | 680 | if (rport->roles & FC_PORT_ROLE_FCP_TARGET) |
681 | result = 0; | 681 | result = 0; |
682 | else if (rport->flags & FC_RPORT_DEVLOSS_PENDING) | 682 | else if (rport->flags & FC_RPORT_DEVLOSS_PENDING) |
683 | result = DID_TRANSPORT_DISRUPTED << 16; | 683 | result = DID_IMM_RETRY << 16; |
684 | else | 684 | else |
685 | result = DID_NO_CONNECT << 16; | 685 | result = DID_NO_CONNECT << 16; |
686 | break; | 686 | break; |
@@ -688,7 +688,7 @@ fc_remote_port_chkready(struct fc_rport *rport) | |||
688 | if (rport->flags & FC_RPORT_FAST_FAIL_TIMEDOUT) | 688 | if (rport->flags & FC_RPORT_FAST_FAIL_TIMEDOUT) |
689 | result = DID_TRANSPORT_FAILFAST << 16; | 689 | result = DID_TRANSPORT_FAILFAST << 16; |
690 | else | 690 | else |
691 | result = DID_TRANSPORT_DISRUPTED << 16; | 691 | result = DID_IMM_RETRY << 16; |
692 | break; | 692 | break; |
693 | default: | 693 | default: |
694 | result = DID_NO_CONNECT << 16; | 694 | result = DID_NO_CONNECT << 16; |
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h index 457588e1119b..349c7f30720d 100644 --- a/include/scsi/scsi_transport_iscsi.h +++ b/include/scsi/scsi_transport_iscsi.h | |||
@@ -126,12 +126,14 @@ struct iscsi_transport { | |||
126 | int *index, int *age); | 126 | int *index, int *age); |
127 | 127 | ||
128 | void (*session_recovery_timedout) (struct iscsi_cls_session *session); | 128 | void (*session_recovery_timedout) (struct iscsi_cls_session *session); |
129 | struct iscsi_endpoint *(*ep_connect) (struct sockaddr *dst_addr, | 129 | struct iscsi_endpoint *(*ep_connect) (struct Scsi_Host *shost, |
130 | struct sockaddr *dst_addr, | ||
130 | int non_blocking); | 131 | int non_blocking); |
131 | int (*ep_poll) (struct iscsi_endpoint *ep, int timeout_ms); | 132 | int (*ep_poll) (struct iscsi_endpoint *ep, int timeout_ms); |
132 | void (*ep_disconnect) (struct iscsi_endpoint *ep); | 133 | void (*ep_disconnect) (struct iscsi_endpoint *ep); |
133 | int (*tgt_dscvr) (struct Scsi_Host *shost, enum iscsi_tgt_dscvr type, | 134 | int (*tgt_dscvr) (struct Scsi_Host *shost, enum iscsi_tgt_dscvr type, |
134 | uint32_t enable, struct sockaddr *dst_addr); | 135 | uint32_t enable, struct sockaddr *dst_addr); |
136 | int (*set_path) (struct Scsi_Host *shost, struct iscsi_path *params); | ||
135 | }; | 137 | }; |
136 | 138 | ||
137 | /* | 139 | /* |
@@ -148,6 +150,10 @@ extern void iscsi_conn_error_event(struct iscsi_cls_conn *conn, | |||
148 | extern int iscsi_recv_pdu(struct iscsi_cls_conn *conn, struct iscsi_hdr *hdr, | 150 | extern int iscsi_recv_pdu(struct iscsi_cls_conn *conn, struct iscsi_hdr *hdr, |
149 | char *data, uint32_t data_size); | 151 | char *data, uint32_t data_size); |
150 | 152 | ||
153 | extern int iscsi_offload_mesg(struct Scsi_Host *shost, | ||
154 | struct iscsi_transport *transport, uint32_t type, | ||
155 | char *data, uint16_t data_size); | ||
156 | |||
151 | struct iscsi_cls_conn { | 157 | struct iscsi_cls_conn { |
152 | struct list_head conn_list; /* item in connlist */ | 158 | struct list_head conn_list; /* item in connlist */ |
153 | void *dd_data; /* LLD private data */ | 159 | void *dd_data; /* LLD private data */ |