diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/scsi/iscsi_if.h | 37 | ||||
-rw-r--r-- | include/scsi/scsi_transport_iscsi.h | 7 |
2 files changed, 29 insertions, 15 deletions
diff --git a/include/scsi/iscsi_if.h b/include/scsi/iscsi_if.h index e5618b90996e..933a91b1474e 100644 --- a/include/scsi/iscsi_if.h +++ b/include/scsi/iscsi_if.h | |||
@@ -60,59 +60,68 @@ struct iscsi_uevent { | |||
60 | uint32_t initial_cmdsn; | 60 | uint32_t initial_cmdsn; |
61 | } c_session; | 61 | } c_session; |
62 | struct msg_destroy_session { | 62 | struct msg_destroy_session { |
63 | uint64_t session_handle; | ||
64 | uint32_t sid; | 63 | uint32_t sid; |
65 | } d_session; | 64 | } d_session; |
66 | struct msg_create_conn { | 65 | struct msg_create_conn { |
67 | uint64_t session_handle; | ||
68 | uint32_t cid; | ||
69 | uint32_t sid; | 66 | uint32_t sid; |
67 | uint32_t cid; | ||
70 | } c_conn; | 68 | } c_conn; |
71 | struct msg_bind_conn { | 69 | struct msg_bind_conn { |
72 | uint64_t session_handle; | 70 | uint32_t sid; |
73 | uint64_t conn_handle; | 71 | uint32_t cid; |
74 | uint32_t transport_fd; | 72 | uint32_t transport_fd; |
75 | uint32_t is_leading; | 73 | uint32_t is_leading; |
76 | } b_conn; | 74 | } b_conn; |
77 | struct msg_destroy_conn { | 75 | struct msg_destroy_conn { |
78 | uint64_t conn_handle; | 76 | uint32_t sid; |
79 | uint32_t cid; | 77 | uint32_t cid; |
80 | } d_conn; | 78 | } d_conn; |
81 | struct msg_send_pdu { | 79 | struct msg_send_pdu { |
80 | uint32_t sid; | ||
81 | uint32_t cid; | ||
82 | uint32_t hdr_size; | 82 | uint32_t hdr_size; |
83 | uint32_t data_size; | 83 | uint32_t data_size; |
84 | uint64_t conn_handle; | ||
85 | } send_pdu; | 84 | } send_pdu; |
86 | struct msg_set_param { | 85 | struct msg_set_param { |
87 | uint64_t conn_handle; | 86 | uint32_t sid; |
87 | uint32_t cid; | ||
88 | uint32_t param; /* enum iscsi_param */ | 88 | uint32_t param; /* enum iscsi_param */ |
89 | uint32_t value; | 89 | uint32_t value; |
90 | } set_param; | 90 | } set_param; |
91 | struct msg_start_conn { | 91 | struct msg_start_conn { |
92 | uint64_t conn_handle; | 92 | uint32_t sid; |
93 | uint32_t cid; | ||
93 | } start_conn; | 94 | } start_conn; |
94 | struct msg_stop_conn { | 95 | struct msg_stop_conn { |
96 | uint32_t sid; | ||
97 | uint32_t cid; | ||
95 | uint64_t conn_handle; | 98 | uint64_t conn_handle; |
96 | uint32_t flag; | 99 | uint32_t flag; |
97 | } stop_conn; | 100 | } stop_conn; |
98 | struct msg_get_stats { | 101 | struct msg_get_stats { |
99 | uint64_t conn_handle; | 102 | uint32_t sid; |
103 | uint32_t cid; | ||
100 | } get_stats; | 104 | } get_stats; |
101 | } u; | 105 | } u; |
102 | union { | 106 | union { |
103 | /* messages k -> u */ | 107 | /* messages k -> u */ |
104 | uint64_t handle; | ||
105 | int retcode; | 108 | int retcode; |
106 | struct msg_create_session_ret { | 109 | struct msg_create_session_ret { |
107 | uint64_t session_handle; | ||
108 | uint32_t sid; | 110 | uint32_t sid; |
111 | uint32_t host_no; | ||
109 | } c_session_ret; | 112 | } c_session_ret; |
113 | struct msg_create_conn_ret { | ||
114 | uint32_t sid; | ||
115 | uint32_t cid; | ||
116 | } c_conn_ret; | ||
110 | struct msg_recv_req { | 117 | struct msg_recv_req { |
118 | uint32_t sid; | ||
119 | uint32_t cid; | ||
111 | uint64_t recv_handle; | 120 | uint64_t recv_handle; |
112 | uint64_t conn_handle; | ||
113 | } recv_req; | 121 | } recv_req; |
114 | struct msg_conn_error { | 122 | struct msg_conn_error { |
115 | uint64_t conn_handle; | 123 | uint32_t sid; |
124 | uint32_t cid; | ||
116 | uint32_t error; /* enum iscsi_err */ | 125 | uint32_t error; /* enum iscsi_err */ |
117 | } connerror; | 126 | } connerror; |
118 | } r; | 127 | } r; |
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h index b41cf077e54b..631463cd4892 100644 --- a/include/scsi/scsi_transport_iscsi.h +++ b/include/scsi/scsi_transport_iscsi.h | |||
@@ -60,11 +60,13 @@ struct iscsi_transport { | |||
60 | int ihostdata_size; | 60 | int ihostdata_size; |
61 | /* LLD connection data size */ | 61 | /* LLD connection data size */ |
62 | int conndata_size; | 62 | int conndata_size; |
63 | /* LLD session data size */ | ||
64 | int sessiondata_size; | ||
63 | int max_lun; | 65 | int max_lun; |
64 | unsigned int max_conn; | 66 | unsigned int max_conn; |
65 | unsigned int max_cmd_len; | 67 | unsigned int max_cmd_len; |
66 | struct iscsi_cls_session *(*create_session) | 68 | struct iscsi_cls_session *(*create_session) |
67 | (struct scsi_transport_template *t, uint32_t sn, uint32_t *sid); | 69 | (struct scsi_transport_template *t, uint32_t sn, uint32_t *hn); |
68 | void (*destroy_session) (struct iscsi_cls_session *session); | 70 | void (*destroy_session) (struct iscsi_cls_session *session); |
69 | struct iscsi_cls_conn *(*create_conn) (struct iscsi_cls_session *sess, | 71 | struct iscsi_cls_conn *(*create_conn) (struct iscsi_cls_session *sess, |
70 | uint32_t cid); | 72 | uint32_t cid); |
@@ -104,6 +106,7 @@ struct iscsi_cls_conn { | |||
104 | struct list_head conn_list; /* item in connlist */ | 106 | struct list_head conn_list; /* item in connlist */ |
105 | void *dd_data; /* LLD private data */ | 107 | void *dd_data; /* LLD private data */ |
106 | struct iscsi_transport *transport; | 108 | struct iscsi_transport *transport; |
109 | uint32_t cid; /* connection id */ | ||
107 | int active; /* must be accessed with the connlock */ | 110 | int active; /* must be accessed with the connlock */ |
108 | struct device dev; /* sysfs transport/container device */ | 111 | struct device dev; /* sysfs transport/container device */ |
109 | struct mempool_zone *z_error; | 112 | struct mempool_zone *z_error; |
@@ -117,6 +120,8 @@ struct iscsi_cls_conn { | |||
117 | struct iscsi_cls_session { | 120 | struct iscsi_cls_session { |
118 | struct list_head sess_list; /* item in session_list */ | 121 | struct list_head sess_list; /* item in session_list */ |
119 | struct iscsi_transport *transport; | 122 | struct iscsi_transport *transport; |
123 | int sid; /* session id */ | ||
124 | void *dd_data; /* LLD private data */ | ||
120 | struct device dev; /* sysfs transport/container device */ | 125 | struct device dev; /* sysfs transport/container device */ |
121 | }; | 126 | }; |
122 | 127 | ||