Commit 94810e82 authored by Eddie Wai's avatar Eddie Wai Committed by James Bottomley

[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: default avatarEddie Wai <eddie.wai@broadcom.com>
Reviewed-by: default avatarMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent 5bf3f39f
...@@ -2350,8 +2350,12 @@ static void bnx2i_cm_remote_close(struct cnic_sock *cm_sk) ...@@ -2350,8 +2350,12 @@ static void bnx2i_cm_remote_close(struct cnic_sock *cm_sk)
static void bnx2i_cm_remote_abort(struct cnic_sock *cm_sk) static void bnx2i_cm_remote_abort(struct cnic_sock *cm_sk)
{ {
struct bnx2i_endpoint *ep = (struct bnx2i_endpoint *) cm_sk->context; struct bnx2i_endpoint *ep = (struct bnx2i_endpoint *) cm_sk->context;
u32 old_state = ep->state;
ep->state = EP_STATE_TCP_RST_RCVD; ep->state = EP_STATE_TCP_RST_RCVD;
if (old_state == EP_STATE_DISCONN_START)
wake_up_interruptible(&ep->ofld_wait);
else
if (ep->conn) if (ep->conn)
bnx2i_recovery_que_add_conn(ep->hba, ep->conn); bnx2i_recovery_que_add_conn(ep->hba, ep->conn);
} }
......
...@@ -1907,6 +1907,7 @@ static int bnx2i_ep_tcp_conn_active(struct bnx2i_endpoint *bnx2i_ep) ...@@ -1907,6 +1907,7 @@ static int bnx2i_ep_tcp_conn_active(struct bnx2i_endpoint *bnx2i_ep)
switch (bnx2i_ep->state) { switch (bnx2i_ep->state) {
case EP_STATE_CONNECT_START: case EP_STATE_CONNECT_START:
case EP_STATE_CONNECT_FAILED:
case EP_STATE_CLEANUP_FAILED: case EP_STATE_CLEANUP_FAILED:
case EP_STATE_OFLD_FAILED: case EP_STATE_OFLD_FAILED:
case EP_STATE_DISCONN_TIMEDOUT: case EP_STATE_DISCONN_TIMEDOUT:
...@@ -1922,13 +1923,10 @@ static int bnx2i_ep_tcp_conn_active(struct bnx2i_endpoint *bnx2i_ep) ...@@ -1922,13 +1923,10 @@ static int bnx2i_ep_tcp_conn_active(struct bnx2i_endpoint *bnx2i_ep)
ret = 1; ret = 1;
break; break;
case EP_STATE_TCP_RST_RCVD: case EP_STATE_TCP_RST_RCVD:
ret = 0;
break;
case EP_STATE_CONNECT_FAILED:
if (cnic_dev_10g) if (cnic_dev_10g)
ret = 1;
else
ret = 0; ret = 0;
else
ret = 1;
break; break;
default: default:
ret = 0; ret = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment