aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEddie Wai <eddie.wai@broadcom.com>2010-11-23 18:29:24 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-12-21 13:24:12 -0500
commit94810e824df1509ad3ba401e57f74b922fd928c5 (patch)
treecbecc4b016c531ffa0a1d76f2a703b2bbf118925
parent5bf3f39f9bda2750145a7da69ea9ae76d0054956 (diff)
[SCSI] bnx2i: Fixed the remote TCP RST handling for the 570X (1g)
Modified the handling of the remote TCP RST code so the chip can now flush the tx pipe accordingly upon a remote TCP RST reception. Signed-off-by: Eddie Wai <eddie.wai@broadcom.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
-rw-r--r--drivers/scsi/bnx2i/bnx2i_hwi.c8
-rw-r--r--drivers/scsi/bnx2i/bnx2i_iscsi.c8
2 files changed, 9 insertions, 7 deletions
diff --git a/drivers/scsi/bnx2i/bnx2i_hwi.c b/drivers/scsi/bnx2i/bnx2i_hwi.c
index c9a3c0ff3c2f..0d40daefd572 100644
--- a/drivers/scsi/bnx2i/bnx2i_hwi.c
+++ b/drivers/scsi/bnx2i/bnx2i_hwi.c
@@ -2350,10 +2350,14 @@ static void bnx2i_cm_remote_close(struct cnic_sock *cm_sk)
2350static void bnx2i_cm_remote_abort(struct cnic_sock *cm_sk) 2350static void bnx2i_cm_remote_abort(struct cnic_sock *cm_sk)
2351{ 2351{
2352 struct bnx2i_endpoint *ep = (struct bnx2i_endpoint *) cm_sk->context; 2352 struct bnx2i_endpoint *ep = (struct bnx2i_endpoint *) cm_sk->context;
2353 u32 old_state = ep->state;
2353 2354
2354 ep->state = EP_STATE_TCP_RST_RCVD; 2355 ep->state = EP_STATE_TCP_RST_RCVD;
2355 if (ep->conn) 2356 if (old_state == EP_STATE_DISCONN_START)
2356 bnx2i_recovery_que_add_conn(ep->hba, ep->conn); 2357 wake_up_interruptible(&ep->ofld_wait);
2358 else
2359 if (ep->conn)
2360 bnx2i_recovery_que_add_conn(ep->hba, ep->conn);
2357} 2361}
2358 2362
2359 2363
diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx2i_iscsi.c
index b7668122cf19..4882b00b3539 100644
--- a/drivers/scsi/bnx2i/bnx2i_iscsi.c
+++ b/drivers/scsi/bnx2i/bnx2i_iscsi.c
@@ -1907,6 +1907,7 @@ static int bnx2i_ep_tcp_conn_active(struct bnx2i_endpoint *bnx2i_ep)
1907 1907
1908 switch (bnx2i_ep->state) { 1908 switch (bnx2i_ep->state) {
1909 case EP_STATE_CONNECT_START: 1909 case EP_STATE_CONNECT_START:
1910 case EP_STATE_CONNECT_FAILED:
1910 case EP_STATE_CLEANUP_FAILED: 1911 case EP_STATE_CLEANUP_FAILED:
1911 case EP_STATE_OFLD_FAILED: 1912 case EP_STATE_OFLD_FAILED:
1912 case EP_STATE_DISCONN_TIMEDOUT: 1913 case EP_STATE_DISCONN_TIMEDOUT:
@@ -1922,13 +1923,10 @@ static int bnx2i_ep_tcp_conn_active(struct bnx2i_endpoint *bnx2i_ep)
1922 ret = 1; 1923 ret = 1;
1923 break; 1924 break;
1924 case EP_STATE_TCP_RST_RCVD: 1925 case EP_STATE_TCP_RST_RCVD:
1925 ret = 0;
1926 break;
1927 case EP_STATE_CONNECT_FAILED:
1928 if (cnic_dev_10g) 1926 if (cnic_dev_10g)
1929 ret = 1;
1930 else
1931 ret = 0; 1927 ret = 0;
1928 else
1929 ret = 1;
1932 break; 1930 break;
1933 default: 1931 default:
1934 ret = 0; 1932 ret = 0;