diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2008-09-24 12:46:10 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-10-13 09:28:59 -0400 |
commit | e5bd7b54e93ef7151469a12b8c28d863b9f8a088 (patch) | |
tree | b1e63758dc0272346b7d5e9af6435a87fd94a7ad /drivers/scsi/scsi_transport_iscsi.c | |
parent | 1d9edf0270cb5a434d32e95279ce9493581906b3 (diff) |
[SCSI] libiscsi: Support drivers initiating session removal
If the driver knows when hardware is removed like with cxgb3i,
bnx2i, qla4xxx and iser then we will want to remove the sessions/devices
that are bound to that device before removing the host.
cxgb3i and in the future bnx2i will remove the host and that will
remove all the sessions on the hba. iser can call iscsi_kill_session
when it gets an event that indicates that a hca is removed.
And when qla4xxx is hooked in to the lib (it is only hooked into
the class right now) it can call iscsi remove host like the
partial offload card drivers.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/scsi_transport_iscsi.c')
-rw-r--r-- | drivers/scsi/scsi_transport_iscsi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c index cbaae48f47ed..f9e45f83e467 100644 --- a/drivers/scsi/scsi_transport_iscsi.c +++ b/drivers/scsi/scsi_transport_iscsi.c | |||
@@ -1010,7 +1010,7 @@ int iscsi_recv_pdu(struct iscsi_cls_conn *conn, struct iscsi_hdr *hdr, | |||
1010 | 1010 | ||
1011 | skb = alloc_skb(len, GFP_ATOMIC); | 1011 | skb = alloc_skb(len, GFP_ATOMIC); |
1012 | if (!skb) { | 1012 | if (!skb) { |
1013 | iscsi_conn_error(conn, ISCSI_ERR_CONN_FAILED); | 1013 | iscsi_conn_error_event(conn, ISCSI_ERR_CONN_FAILED); |
1014 | iscsi_cls_conn_printk(KERN_ERR, conn, "can not deliver " | 1014 | iscsi_cls_conn_printk(KERN_ERR, conn, "can not deliver " |
1015 | "control PDU: OOM\n"); | 1015 | "control PDU: OOM\n"); |
1016 | return -ENOMEM; | 1016 | return -ENOMEM; |
@@ -1031,7 +1031,7 @@ int iscsi_recv_pdu(struct iscsi_cls_conn *conn, struct iscsi_hdr *hdr, | |||
1031 | } | 1031 | } |
1032 | EXPORT_SYMBOL_GPL(iscsi_recv_pdu); | 1032 | EXPORT_SYMBOL_GPL(iscsi_recv_pdu); |
1033 | 1033 | ||
1034 | void iscsi_conn_error(struct iscsi_cls_conn *conn, enum iscsi_err error) | 1034 | void iscsi_conn_error_event(struct iscsi_cls_conn *conn, enum iscsi_err error) |
1035 | { | 1035 | { |
1036 | struct nlmsghdr *nlh; | 1036 | struct nlmsghdr *nlh; |
1037 | struct sk_buff *skb; | 1037 | struct sk_buff *skb; |
@@ -1063,7 +1063,7 @@ void iscsi_conn_error(struct iscsi_cls_conn *conn, enum iscsi_err error) | |||
1063 | iscsi_cls_conn_printk(KERN_INFO, conn, "detected conn error (%d)\n", | 1063 | iscsi_cls_conn_printk(KERN_INFO, conn, "detected conn error (%d)\n", |
1064 | error); | 1064 | error); |
1065 | } | 1065 | } |
1066 | EXPORT_SYMBOL_GPL(iscsi_conn_error); | 1066 | EXPORT_SYMBOL_GPL(iscsi_conn_error_event); |
1067 | 1067 | ||
1068 | static int | 1068 | static int |
1069 | iscsi_if_send_reply(int pid, int seq, int type, int done, int multi, | 1069 | iscsi_if_send_reply(int pid, int seq, int type, int done, int multi, |