summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/cxgbi/libcxgbi.c
diff options
context:
space:
mode:
authorVarun Prakash <varun@chelsio.com>2016-12-01 15:58:28 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2016-12-14 21:08:33 +0100
commit586be7cb694fdbb3a35cc35c03387ce0fc534572 (patch)
tree8fb5f465e092ea2fb05fb02237b74ac1ff09702d /drivers/scsi/cxgbi/libcxgbi.c
parentscsi: cxgb4i: use cxgb4_tp_smt_idx() to get smt_idx (diff)
downloadlinux-586be7cb694fdbb3a35cc35c03387ce0fc534572.tar.xz
linux-586be7cb694fdbb3a35cc35c03387ce0fc534572.zip
scsi: cxgb4i: libcxgbi: add active open cmd for T6 adapters
Add T6 active open cmd to open active connections on T6 adapters. Signed-off-by: Varun Prakash <varun@chelsio.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to '')
-rw-r--r--drivers/scsi/cxgbi/libcxgbi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c
index 2ffe029ff2b6..542337889224 100644
--- a/drivers/scsi/cxgbi/libcxgbi.c
+++ b/drivers/scsi/cxgbi/libcxgbi.c
@@ -1627,15 +1627,15 @@ static void csk_return_rx_credits(struct cxgbi_sock *csk, int copied)
csk->rcv_wup, cdev->rx_credit_thres,
csk->rcv_win);
+ if (!cdev->rx_credit_thres)
+ return;
+
if (csk->state != CTP_ESTABLISHED)
return;
credits = csk->copied_seq - csk->rcv_wup;
if (unlikely(!credits))
return;
- if (unlikely(cdev->rx_credit_thres == 0))
- return;
-
must_send = credits + 16384 >= csk->rcv_win;
if (must_send || credits >= cdev->rx_credit_thres)
csk->rcv_wup += cdev->csk_send_rx_credits(csk, credits);