From 17fa575eec7254fb089f858cae135d64cd015440 Mon Sep 17 00:00:00 2001 From: Manish Rangankar Date: Mon, 25 Jul 2011 13:48:52 -0500 Subject: [SCSI] scsi_transport_iscsi: Add conn login, kernel to user, event to support offload session login. Offload drivers like qla4xxx will offload the sending of the login/logout pdus still, so this patch adds iscsi_conn_login_event which is used by these types of drivers to notify userspace that the connection has changed state. It also adds a iscsi_is_session_online helper so the lld can query the sessions state field. Signed-off-by: Manish Rangankar Signed-off-by: Lalit Chandivade Signed-off-by: Mike Christie Signed-off-by: James Bottomley --- include/scsi/scsi_transport_iscsi.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/scsi/scsi_transport_iscsi.h') diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h index 4a3edeeae8f6..3389cd5ea94c 100644 --- a/include/scsi/scsi_transport_iscsi.h +++ b/include/scsi/scsi_transport_iscsi.h @@ -156,6 +156,8 @@ extern int iscsi_unregister_transport(struct iscsi_transport *tt); */ extern void iscsi_conn_error_event(struct iscsi_cls_conn *conn, enum iscsi_err error); +extern void iscsi_conn_login_event(struct iscsi_cls_conn *conn, + enum iscsi_conn_state state); extern int iscsi_recv_pdu(struct iscsi_cls_conn *conn, struct iscsi_hdr *hdr, char *data, uint32_t data_size); @@ -268,6 +270,7 @@ struct iscsi_iface { dev_printk(prefix, &(_cls_conn)->dev, fmt, ##a) extern int iscsi_session_chkready(struct iscsi_cls_session *session); +extern int iscsi_is_session_online(struct iscsi_cls_session *session); extern struct iscsi_cls_session *iscsi_alloc_session(struct Scsi_Host *shost, struct iscsi_transport *transport, int dd_size); extern int iscsi_add_session(struct iscsi_cls_session *session, -- cgit v1.2.3-59-g8ed1b