aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2006-06-28 13:00:31 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-06-29 11:09:06 -0400
commit6a8a0d3621745279a131d95f0204dc9ddac60d55 (patch)
treee3e856d0a8b3f0697a1e59492dd840dbd3babb8a /include
parent8434aa8b6fe5af27a33b8aa830c24e3680356c83 (diff)
[SCSI] iscsi: pass target nr to session creation
So the drivers do not use the channel numbers, but some do use the target numbers. We were just adding some goofy variable that just increases for the target nr. This is useless for software iscsi because it is always zero. And for qla4xxx the target nr is actually the index of the target/session in its FW or FLASH tables. We needed to expose this to userspace so apps could access those numbers so this patch just adds the target nr to the iscsi session creation functions. This way when qla4xxx's Hw thinks a session is at target nr 4 in its hw, it is exposed as that number in sysfs. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include')
-rw-r--r--include/scsi/scsi_transport_iscsi.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h
index 53493d591355..f7b0db5f2f5b 100644
--- a/include/scsi/scsi_transport_iscsi.h
+++ b/include/scsi/scsi_transport_iscsi.h
@@ -203,7 +203,6 @@ struct iscsi_cls_session {
203 iscsi_dev_to_session(_stgt->dev.parent) 203 iscsi_dev_to_session(_stgt->dev.parent)
204 204
205struct iscsi_host { 205struct iscsi_host {
206 int next_target_id;
207 struct list_head sessions; 206 struct list_head sessions;
208 struct mutex mutex; 207 struct mutex mutex;
209}; 208};
@@ -213,9 +212,11 @@ struct iscsi_host {
213 */ 212 */
214extern struct iscsi_cls_session *iscsi_alloc_session(struct Scsi_Host *shost, 213extern struct iscsi_cls_session *iscsi_alloc_session(struct Scsi_Host *shost,
215 struct iscsi_transport *transport); 214 struct iscsi_transport *transport);
216extern int iscsi_add_session(struct iscsi_cls_session *session); 215extern int iscsi_add_session(struct iscsi_cls_session *session,
216 unsigned int target_id);
217extern struct iscsi_cls_session *iscsi_create_session(struct Scsi_Host *shost, 217extern struct iscsi_cls_session *iscsi_create_session(struct Scsi_Host *shost,
218 struct iscsi_transport *t); 218 struct iscsi_transport *t,
219 unsigned int target_id);
219extern void iscsi_remove_session(struct iscsi_cls_session *session); 220extern void iscsi_remove_session(struct iscsi_cls_session *session);
220extern void iscsi_free_session(struct iscsi_cls_session *session); 221extern void iscsi_free_session(struct iscsi_cls_session *session);
221extern int iscsi_destroy_session(struct iscsi_cls_session *session); 222extern int iscsi_destroy_session(struct iscsi_cls_session *session);