diff options
author | Varun Prakash <varun@chelsio.com> | 2016-09-23 16:37:40 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-09-28 07:25:28 +0200 |
commit | fe9b34bfcb4e80b809a8a3dccdd49737d073593b (patch) | |
tree | f96481ac5aac8ef985c31806ac8d3f35c0e80154 /drivers/scsi/cxgbi | |
parent | MAINTAINERS: Update open-iscsi maintainers (diff) | |
download | linux-fe9b34bfcb4e80b809a8a3dccdd49737d073593b.tar.xz linux-fe9b34bfcb4e80b809a8a3dccdd49737d073593b.zip |
scsi: cxgb4i: Set completion bit in work request
If SKCBF_TX_FLAG_COMPL flag is set and unacknowledged credits are >= max
credits / 2, set completion bit in work request to reclaim credits.
Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/cxgbi')
-rw-r--r-- | drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c index e4ba2d2616cd..2487ae6be272 100644 --- a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c +++ b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c @@ -682,6 +682,11 @@ static int push_tx_frames(struct cxgbi_sock *csk, int req_completion) req_completion); csk->snd_nxt += len; cxgbi_skcb_clear_flag(skb, SKCBF_TX_NEED_HDR); + } else if (cxgbi_skcb_test_flag(skb, SKCBF_TX_FLAG_COMPL) && + (csk->wr_una_cred >= (csk->wr_max_cred / 2))) { + struct cpl_close_con_req *req = + (struct cpl_close_con_req *)skb->data; + req->wr.wr_hi |= htonl(FW_WR_COMPL_F); } total_size += skb->truesize; t4_set_arp_err_handler(skb, csk, arp_failure_skb_discard); |