aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVikas Chaudhary <vikas.chaudhary@qlogic.com>2012-02-13 18:30:48 +0530
committerJames Bottomley <JBottomley@Parallels.com>2012-02-19 09:34:50 -0600
commitac20c7bf070df2b0feb410558ec4d75dbe59b701 (patch)
tree7af9b3e1ef4b8abbb8232fb264a1db51c57f6679 /include
parentff884430801c08bd909fd95f6cb1a0446afd30db (diff)
[SCSI] iscsi_transport: Added Ping support
Added ping support for iscsi adapter, application can use this interface for diagnostic network connection. Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'include')
-rw-r--r--include/scsi/iscsi_if.h17
-rw-r--r--include/scsi/scsi_transport_iscsi.h8
2 files changed, 25 insertions, 0 deletions
diff --git a/include/scsi/iscsi_if.h b/include/scsi/iscsi_if.h
index 3aac99155e8..7ff9678b7e7 100644
--- a/include/scsi/iscsi_if.h
+++ b/include/scsi/iscsi_if.h
@@ -60,6 +60,7 @@ enum iscsi_uevent_e {
ISCSI_UEVENT_PATH_UPDATE = UEVENT_BASE + 20,
ISCSI_UEVENT_SET_IFACE_PARAMS = UEVENT_BASE + 21,
+ ISCSI_UEVENT_PING = UEVENT_BASE + 22,
/* up events */
ISCSI_KEVENT_RECV_PDU = KEVENT_BASE + 1,
@@ -73,6 +74,7 @@ enum iscsi_uevent_e {
ISCSI_KEVENT_IF_DOWN = KEVENT_BASE + 8,
ISCSI_KEVENT_CONN_LOGIN_STATE = KEVENT_BASE + 9,
ISCSI_KEVENT_HOST_EVENT = KEVENT_BASE + 10,
+ ISCSI_KEVENT_PING_COMP = KEVENT_BASE + 11,
};
enum iscsi_tgt_dscvr {
@@ -186,6 +188,14 @@ struct iscsi_uevent {
uint32_t host_no;
uint32_t count;
} set_iface_params;
+ struct msg_iscsi_ping {
+ uint32_t host_no;
+ uint32_t iface_num;
+ uint32_t iface_type;
+ uint32_t payload_size;
+ uint32_t pid; /* unique ping id associated
+ with each ping request */
+ } iscsi_ping;
} u;
union {
/* messages k -> u */
@@ -235,6 +245,13 @@ struct iscsi_uevent {
uint32_t data_size;
enum iscsi_host_event_code code;
} host_event;
+ struct msg_ping_comp {
+ uint32_t host_no;
+ uint32_t status;
+ uint32_t pid; /* unique ping id associated
+ with each ping request */
+ uint32_t data_size;
+ } ping_comp;
} r;
} __attribute__ ((aligned (sizeof(uint64_t))));
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h
index 7f047314281..aede513f99b 100644
--- a/include/scsi/scsi_transport_iscsi.h
+++ b/include/scsi/scsi_transport_iscsi.h
@@ -144,6 +144,9 @@ struct iscsi_transport {
int param, char *buf);
umode_t (*attr_is_visible)(int param_type, int param);
int (*bsg_request)(struct bsg_job *job);
+ int (*send_ping) (struct Scsi_Host *shost, uint32_t iface_num,
+ uint32_t iface_type, uint32_t payload_size,
+ uint32_t pid, struct sockaddr *dst_addr);
};
/*
@@ -172,6 +175,11 @@ extern void iscsi_post_host_event(uint32_t host_no,
uint32_t data_size,
uint8_t *data);
+extern void iscsi_ping_comp_event(uint32_t host_no,
+ struct iscsi_transport *transport,
+ uint32_t status, uint32_t pid,
+ uint32_t data_size, uint8_t *data);
+
struct iscsi_cls_conn {
struct list_head conn_list; /* item in connlist */
void *dd_data; /* LLD private data */