diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2006-02-20 02:16:23 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-02-20 02:16:23 -0500 |
commit | 5b2ffed906a3ebd4e52a5bbef06b99a517c53e4b (patch) | |
tree | 2f900f89d93db6b0822d8bdf4f49851c581c12a6 /include/scsi | |
parent | f1b318793dcd2d9ff6b5ac06e7762098fa079cee (diff) | |
parent | bd71c2b17468a2531fb4c81ec1d73520845e97e1 (diff) |
Merge branch 'master'
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/iscsi_if.h | 3 | ||||
-rw-r--r-- | include/scsi/scsi.h | 2 | ||||
-rw-r--r-- | include/scsi/scsi_transport_iscsi.h | 34 |
3 files changed, 20 insertions, 19 deletions
diff --git a/include/scsi/iscsi_if.h b/include/scsi/iscsi_if.h index 3e5cb5ab2d34..e5618b90996e 100644 --- a/include/scsi/iscsi_if.h +++ b/include/scsi/iscsi_if.h | |||
@@ -163,9 +163,6 @@ enum iscsi_param { | |||
163 | }; | 163 | }; |
164 | #define ISCSI_PARAM_MAX 14 | 164 | #define ISCSI_PARAM_MAX 14 |
165 | 165 | ||
166 | typedef uint64_t iscsi_sessionh_t; /* iSCSI Data-Path session handle */ | ||
167 | typedef uint64_t iscsi_connh_t; /* iSCSI Data-Path connection handle */ | ||
168 | |||
169 | #define iscsi_ptr(_handle) ((void*)(unsigned long)_handle) | 166 | #define iscsi_ptr(_handle) ((void*)(unsigned long)_handle) |
170 | #define iscsi_handle(_ptr) ((uint64_t)(unsigned long)_ptr) | 167 | #define iscsi_handle(_ptr) ((uint64_t)(unsigned long)_ptr) |
171 | #define hostdata_session(_hostdata) (iscsi_ptr(*(unsigned long *)_hostdata)) | 168 | #define hostdata_session(_hostdata) (iscsi_ptr(*(unsigned long *)_hostdata)) |
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index c60b8ff2f5e4..9c331258bc27 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h | |||
@@ -433,4 +433,6 @@ struct scsi_lun { | |||
433 | /* Used to obtain the PCI location of a device */ | 433 | /* Used to obtain the PCI location of a device */ |
434 | #define SCSI_IOCTL_GET_PCI 0x5387 | 434 | #define SCSI_IOCTL_GET_PCI 0x5387 |
435 | 435 | ||
436 | int scsi_execute_in_process_context(void (*fn)(void *data), void *data); | ||
437 | |||
436 | #endif /* _SCSI_SCSI_H */ | 438 | #endif /* _SCSI_SCSI_H */ |
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h index 16602a547a63..b41cf077e54b 100644 --- a/include/scsi/scsi_transport_iscsi.h +++ b/include/scsi/scsi_transport_iscsi.h | |||
@@ -63,25 +63,28 @@ struct iscsi_transport { | |||
63 | int max_lun; | 63 | int max_lun; |
64 | unsigned int max_conn; | 64 | unsigned int max_conn; |
65 | unsigned int max_cmd_len; | 65 | unsigned int max_cmd_len; |
66 | struct Scsi_Host *(*create_session) (struct scsi_transport_template *t, | 66 | struct iscsi_cls_session *(*create_session) |
67 | uint32_t initial_cmdsn); | 67 | (struct scsi_transport_template *t, uint32_t sn, uint32_t *sid); |
68 | void (*destroy_session) (struct Scsi_Host *shost); | 68 | void (*destroy_session) (struct iscsi_cls_session *session); |
69 | struct iscsi_cls_conn *(*create_conn) (struct Scsi_Host *shost, | 69 | struct iscsi_cls_conn *(*create_conn) (struct iscsi_cls_session *sess, |
70 | uint32_t cid); | 70 | uint32_t cid); |
71 | int (*bind_conn) (iscsi_sessionh_t session, iscsi_connh_t conn, | 71 | int (*bind_conn) (struct iscsi_cls_session *session, |
72 | struct iscsi_cls_conn *cls_conn, | ||
72 | uint32_t transport_fd, int is_leading); | 73 | uint32_t transport_fd, int is_leading); |
73 | int (*start_conn) (iscsi_connh_t conn); | 74 | int (*start_conn) (struct iscsi_cls_conn *conn); |
74 | void (*stop_conn) (iscsi_connh_t conn, int flag); | 75 | void (*stop_conn) (struct iscsi_cls_conn *conn, int flag); |
75 | void (*destroy_conn) (struct iscsi_cls_conn *conn); | 76 | void (*destroy_conn) (struct iscsi_cls_conn *conn); |
76 | int (*set_param) (iscsi_connh_t conn, enum iscsi_param param, | 77 | int (*set_param) (struct iscsi_cls_conn *conn, enum iscsi_param param, |
77 | uint32_t value); | 78 | uint32_t value); |
78 | int (*get_conn_param) (void *conndata, enum iscsi_param param, | 79 | int (*get_conn_param) (struct iscsi_cls_conn *conn, |
80 | enum iscsi_param param, | ||
79 | uint32_t *value); | 81 | uint32_t *value); |
80 | int (*get_session_param) (struct Scsi_Host *shost, | 82 | int (*get_session_param) (struct iscsi_cls_session *session, |
81 | enum iscsi_param param, uint32_t *value); | 83 | enum iscsi_param param, uint32_t *value); |
82 | int (*send_pdu) (iscsi_connh_t conn, struct iscsi_hdr *hdr, | 84 | int (*send_pdu) (struct iscsi_cls_conn *conn, struct iscsi_hdr *hdr, |
83 | char *data, uint32_t data_size); | 85 | char *data, uint32_t data_size); |
84 | void (*get_stats) (iscsi_connh_t conn, struct iscsi_stats *stats); | 86 | void (*get_stats) (struct iscsi_cls_conn *conn, |
87 | struct iscsi_stats *stats); | ||
85 | }; | 88 | }; |
86 | 89 | ||
87 | /* | 90 | /* |
@@ -93,15 +96,14 @@ extern int iscsi_unregister_transport(struct iscsi_transport *tt); | |||
93 | /* | 96 | /* |
94 | * control plane upcalls | 97 | * control plane upcalls |
95 | */ | 98 | */ |
96 | extern void iscsi_conn_error(iscsi_connh_t conn, enum iscsi_err error); | 99 | extern void iscsi_conn_error(struct iscsi_cls_conn *conn, enum iscsi_err error); |
97 | extern int iscsi_recv_pdu(iscsi_connh_t conn, struct iscsi_hdr *hdr, | 100 | extern int iscsi_recv_pdu(struct iscsi_cls_conn *conn, struct iscsi_hdr *hdr, |
98 | char *data, uint32_t data_size); | 101 | char *data, uint32_t data_size); |
99 | 102 | ||
100 | struct iscsi_cls_conn { | 103 | struct iscsi_cls_conn { |
101 | struct list_head conn_list; /* item in connlist */ | 104 | struct list_head conn_list; /* item in connlist */ |
102 | void *dd_data; /* LLD private data */ | 105 | void *dd_data; /* LLD private data */ |
103 | struct iscsi_transport *transport; | 106 | struct iscsi_transport *transport; |
104 | iscsi_connh_t connh; | ||
105 | int active; /* must be accessed with the connlock */ | 107 | int active; /* must be accessed with the connlock */ |
106 | struct device dev; /* sysfs transport/container device */ | 108 | struct device dev; /* sysfs transport/container device */ |
107 | struct mempool_zone *z_error; | 109 | struct mempool_zone *z_error; |
@@ -113,7 +115,7 @@ struct iscsi_cls_conn { | |||
113 | container_of(_dev, struct iscsi_cls_conn, dev) | 115 | container_of(_dev, struct iscsi_cls_conn, dev) |
114 | 116 | ||
115 | struct iscsi_cls_session { | 117 | struct iscsi_cls_session { |
116 | struct list_head list; /* item in session_list */ | 118 | struct list_head sess_list; /* item in session_list */ |
117 | struct iscsi_transport *transport; | 119 | struct iscsi_transport *transport; |
118 | struct device dev; /* sysfs transport/container device */ | 120 | struct device dev; /* sysfs transport/container device */ |
119 | }; | 121 | }; |