aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/scsi_transport_iscsi.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/scsi/scsi_transport_iscsi.h')
-rw-r--r--include/scsi/scsi_transport_iscsi.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h
index 9fcce7cd367..e1f210a173a 100644
--- a/include/scsi/scsi_transport_iscsi.h
+++ b/include/scsi/scsi_transport_iscsi.h
@@ -37,6 +37,7 @@ struct iscsi_cls_conn;
37struct iscsi_conn; 37struct iscsi_conn;
38struct iscsi_task; 38struct iscsi_task;
39struct sockaddr; 39struct sockaddr;
40struct iscsi_iface;
40 41
41/** 42/**
42 * struct iscsi_transport - iSCSI Transport template 43 * struct iscsi_transport - iSCSI Transport template
@@ -87,6 +88,8 @@ struct iscsi_transport {
87 /* LLD sets this to indicate what values it can export to sysfs */ 88 /* LLD sets this to indicate what values it can export to sysfs */
88 uint64_t param_mask; 89 uint64_t param_mask;
89 uint64_t host_param_mask; 90 uint64_t host_param_mask;
91 uint64_t iface_param_mask;
92
90 struct iscsi_cls_session *(*create_session) (struct iscsi_endpoint *ep, 93 struct iscsi_cls_session *(*create_session) (struct iscsi_endpoint *ep,
91 uint16_t cmds_max, uint16_t qdepth, 94 uint16_t cmds_max, uint16_t qdepth,
92 uint32_t sn); 95 uint32_t sn);
@@ -138,6 +141,9 @@ struct iscsi_transport {
138 uint32_t enable, struct sockaddr *dst_addr); 141 uint32_t enable, struct sockaddr *dst_addr);
139 int (*set_path) (struct Scsi_Host *shost, struct iscsi_path *params); 142 int (*set_path) (struct Scsi_Host *shost, struct iscsi_path *params);
140 int (*set_iface_param) (struct Scsi_Host *shost, char *data, int count); 143 int (*set_iface_param) (struct Scsi_Host *shost, char *data, int count);
144 int (*get_iface_param) (struct iscsi_iface *iface,
145 enum iscsi_param_type param_type,
146 int param, char *buf);
141}; 147};
142 148
143/* 149/*
@@ -229,6 +235,20 @@ struct iscsi_endpoint {
229 struct iscsi_cls_conn *conn; 235 struct iscsi_cls_conn *conn;
230}; 236};
231 237
238struct iscsi_iface {
239 struct device dev;
240 struct iscsi_transport *transport;
241 uint32_t iface_type; /* IPv4 or IPv6 */
242 uint32_t iface_num; /* iface number, 0 - n */
243 void *dd_data; /* LLD private data */
244};
245
246#define iscsi_dev_to_iface(_dev) \
247 container_of(_dev, struct iscsi_iface, dev)
248
249#define iscsi_iface_to_shost(_iface) \
250 dev_to_shost(_iface->dev.parent)
251
232/* 252/*
233 * session and connection functions that can be used by HW iSCSI LLDs 253 * session and connection functions that can be used by HW iSCSI LLDs
234 */ 254 */
@@ -262,5 +282,11 @@ extern struct iscsi_endpoint *iscsi_create_endpoint(int dd_size);
262extern void iscsi_destroy_endpoint(struct iscsi_endpoint *ep); 282extern void iscsi_destroy_endpoint(struct iscsi_endpoint *ep);
263extern struct iscsi_endpoint *iscsi_lookup_endpoint(u64 handle); 283extern struct iscsi_endpoint *iscsi_lookup_endpoint(u64 handle);
264extern int iscsi_block_scsi_eh(struct scsi_cmnd *cmd); 284extern int iscsi_block_scsi_eh(struct scsi_cmnd *cmd);
285extern struct iscsi_iface *iscsi_create_iface(struct Scsi_Host *shost,
286 struct iscsi_transport *t,
287 uint32_t iface_type,
288 uint32_t iface_num, int dd_size);
289extern void iscsi_destroy_iface(struct iscsi_iface *iface);
290extern struct iscsi_iface *iscsi_lookup_iface(int handle);
265 291
266#endif 292#endif