aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorAnish Bhatt <anish@chelsio.com>2014-11-18 22:09:51 -0500
committerDavid S. Miller <davem@davemloft.net>2014-11-19 16:59:26 -0500
commitee7255ada313a6db99be47ce174b0bfb8295a041 (patch)
tree068f848d1f7921ea58036a0f02935e107db4c1d9 /drivers/scsi
parentffb1388a364d135810337182d6800a0c7ee44f48 (diff)
cxgb4i : Don't block unload/cxgb4 unload when remote closes TCP connection
cxgb4i was returning wrong error and not releasing module reference if remote end abruptly closed TCP connection. This prevents the cxgb4 network module from being unloaded, further affecting other network drivers dependent on cxgb4 Sending to net as this affects all cxgb4 based network drivers. Signed-off-by: Anish Bhatt <anish@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/cxgbi/cxgb4i/cxgb4i.c2
-rw-r--r--drivers/scsi/cxgbi/libcxgbi.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
index 3e0a0d315f72..f48f40ce9f87 100644
--- a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
+++ b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
@@ -828,6 +828,8 @@ static void do_act_open_rpl(struct cxgbi_device *cdev, struct sk_buff *skb)
828 if (status == CPL_ERR_RTX_NEG_ADVICE) 828 if (status == CPL_ERR_RTX_NEG_ADVICE)
829 goto rel_skb; 829 goto rel_skb;
830 830
831 module_put(THIS_MODULE);
832
831 if (status && status != CPL_ERR_TCAM_FULL && 833 if (status && status != CPL_ERR_TCAM_FULL &&
832 status != CPL_ERR_CONN_EXIST && 834 status != CPL_ERR_CONN_EXIST &&
833 status != CPL_ERR_ARP_MISS) 835 status != CPL_ERR_ARP_MISS)
diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c
index 674d498b46ab..9d63853c5fce 100644
--- a/drivers/scsi/cxgbi/libcxgbi.c
+++ b/drivers/scsi/cxgbi/libcxgbi.c
@@ -816,7 +816,7 @@ static void cxgbi_inform_iscsi_conn_closing(struct cxgbi_sock *csk)
816 read_lock_bh(&csk->callback_lock); 816 read_lock_bh(&csk->callback_lock);
817 if (csk->user_data) 817 if (csk->user_data)
818 iscsi_conn_failure(csk->user_data, 818 iscsi_conn_failure(csk->user_data,
819 ISCSI_ERR_CONN_FAILED); 819 ISCSI_ERR_TCP_CONN_CLOSE);
820 read_unlock_bh(&csk->callback_lock); 820 read_unlock_bh(&csk->callback_lock);
821 } 821 }
822} 822}