aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2008-05-21 16:54:01 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-07-12 09:22:16 -0400
commit5d91e209fb21fb9cc765729d4c6a85a9fb6c9187 (patch)
tree870367c290c1392fbe0d3762981553f0e24aa752 /include
parenta4804cd6eb19318ae8d08ea967cfeaaf5c5b68a6 (diff)
[SCSI] iscsi: remove session/conn_data_size from iscsi_transport
This removes the session and conn data_size fields from the iscsi_transport. Just pass in the value like with host allocation. This patch also makes it so the LLD iscsi_conn data is allocated with the iscsi_cls_conn. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'include')
-rw-r--r--include/scsi/libiscsi.h8
-rw-r--r--include/scsi/scsi_transport_iscsi.h9
2 files changed, 7 insertions, 10 deletions
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h
index 9a26d715a953..4e1c14f20ddd 100644
--- a/include/scsi/libiscsi.h
+++ b/include/scsi/libiscsi.h
@@ -313,8 +313,6 @@ struct iscsi_host {
313 char local_address[ISCSI_ADDRESS_BUF_LEN]; 313 char local_address[ISCSI_ADDRESS_BUF_LEN];
314}; 314};
315 315
316#define iscsi_host_priv(_shost) \
317 (shost_priv(_shost) + sizeof(struct iscsi_host))
318/* 316/*
319 * scsi host template 317 * scsi host template
320 */ 318 */
@@ -325,10 +323,12 @@ extern int iscsi_eh_device_reset(struct scsi_cmnd *sc);
325extern int iscsi_queuecommand(struct scsi_cmnd *sc, 323extern int iscsi_queuecommand(struct scsi_cmnd *sc,
326 void (*done)(struct scsi_cmnd *)); 324 void (*done)(struct scsi_cmnd *));
327 325
328
329/* 326/*
330 * iSCSI host helpers. 327 * iSCSI host helpers.
331 */ 328 */
329#define iscsi_host_priv(_shost) \
330 (shost_priv(_shost) + sizeof(struct iscsi_host))
331
332extern int iscsi_host_set_param(struct Scsi_Host *shost, 332extern int iscsi_host_set_param(struct Scsi_Host *shost,
333 enum iscsi_host_param param, char *buf, 333 enum iscsi_host_param param, char *buf,
334 int buflen); 334 int buflen);
@@ -360,7 +360,7 @@ extern int iscsi_session_get_param(struct iscsi_cls_session *cls_session,
360 * connection management 360 * connection management
361 */ 361 */
362extern struct iscsi_cls_conn *iscsi_conn_setup(struct iscsi_cls_session *, 362extern struct iscsi_cls_conn *iscsi_conn_setup(struct iscsi_cls_session *,
363 uint32_t); 363 int, uint32_t);
364extern void iscsi_conn_teardown(struct iscsi_cls_conn *); 364extern void iscsi_conn_teardown(struct iscsi_cls_conn *);
365extern int iscsi_conn_start(struct iscsi_cls_conn *); 365extern int iscsi_conn_start(struct iscsi_cls_conn *);
366extern void iscsi_conn_stop(struct iscsi_cls_conn *, int); 366extern void iscsi_conn_stop(struct iscsi_cls_conn *, int);
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h
index 761f62da7cc8..4028f121d548 100644
--- a/include/scsi/scsi_transport_iscsi.h
+++ b/include/scsi/scsi_transport_iscsi.h
@@ -83,10 +83,6 @@ struct iscsi_transport {
83 /* LLD sets this to indicate what values it can export to sysfs */ 83 /* LLD sets this to indicate what values it can export to sysfs */
84 uint64_t param_mask; 84 uint64_t param_mask;
85 uint64_t host_param_mask; 85 uint64_t host_param_mask;
86 /* LLD connection data size */
87 int conndata_size;
88 /* LLD session data size */
89 int sessiondata_size;
90 struct iscsi_cls_session *(*create_session) (struct Scsi_Host *shost, 86 struct iscsi_cls_session *(*create_session) (struct Scsi_Host *shost,
91 uint16_t cmds_max, uint16_t qdepth, 87 uint16_t cmds_max, uint16_t qdepth,
92 uint32_t sn, uint32_t *hn); 88 uint32_t sn, uint32_t *hn);
@@ -222,19 +218,20 @@ extern void iscsi_host_for_each_session(struct Scsi_Host *shost,
222 218
223extern int iscsi_session_chkready(struct iscsi_cls_session *session); 219extern int iscsi_session_chkready(struct iscsi_cls_session *session);
224extern struct iscsi_cls_session *iscsi_alloc_session(struct Scsi_Host *shost, 220extern struct iscsi_cls_session *iscsi_alloc_session(struct Scsi_Host *shost,
225 struct iscsi_transport *transport); 221 struct iscsi_transport *transport, int dd_size);
226extern int iscsi_add_session(struct iscsi_cls_session *session, 222extern int iscsi_add_session(struct iscsi_cls_session *session,
227 unsigned int target_id); 223 unsigned int target_id);
228extern int iscsi_session_event(struct iscsi_cls_session *session, 224extern int iscsi_session_event(struct iscsi_cls_session *session,
229 enum iscsi_uevent_e event); 225 enum iscsi_uevent_e event);
230extern struct iscsi_cls_session *iscsi_create_session(struct Scsi_Host *shost, 226extern struct iscsi_cls_session *iscsi_create_session(struct Scsi_Host *shost,
231 struct iscsi_transport *t, 227 struct iscsi_transport *t,
228 int dd_size,
232 unsigned int target_id); 229 unsigned int target_id);
233extern void iscsi_remove_session(struct iscsi_cls_session *session); 230extern void iscsi_remove_session(struct iscsi_cls_session *session);
234extern void iscsi_free_session(struct iscsi_cls_session *session); 231extern void iscsi_free_session(struct iscsi_cls_session *session);
235extern int iscsi_destroy_session(struct iscsi_cls_session *session); 232extern int iscsi_destroy_session(struct iscsi_cls_session *session);
236extern struct iscsi_cls_conn *iscsi_create_conn(struct iscsi_cls_session *sess, 233extern struct iscsi_cls_conn *iscsi_create_conn(struct iscsi_cls_session *sess,
237 uint32_t cid); 234 int dd_size, uint32_t cid);
238extern int iscsi_destroy_conn(struct iscsi_cls_conn *conn); 235extern int iscsi_destroy_conn(struct iscsi_cls_conn *conn);
239extern void iscsi_unblock_session(struct iscsi_cls_session *session); 236extern void iscsi_unblock_session(struct iscsi_cls_session *session);
240extern void iscsi_block_session(struct iscsi_cls_session *session); 237extern void iscsi_block_session(struct iscsi_cls_session *session);