diff options
author | Varun Prakash <varun@chelsio.com> | 2016-12-01 20:28:28 +0530 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-12-14 15:08:33 -0500 |
commit | 586be7cb694fdbb3a35cc35c03387ce0fc534572 (patch) | |
tree | 8fb5f465e092ea2fb05fb02237b74ac1ff09702d /drivers/scsi/cxgbi/libcxgbi.c | |
parent | e0eed8ab7379faba26f9d85a5904b8292dc4d8b9 (diff) | |
download | linux-586be7cb694fdbb3a35cc35c03387ce0fc534572.tar.gz linux-586be7cb694fdbb3a35cc35c03387ce0fc534572.tar.bz2 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 'drivers/scsi/cxgbi/libcxgbi.c')
-rw-r--r-- | drivers/scsi/cxgbi/libcxgbi.c | 6 |
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); |