Message ID | 1474641460-23106-1-git-send-email-varun@chelsio.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
>>>>> "Varun" == Varun Prakash <varun@chelsio.com> writes:
Varun> If SKCBF_TX_FLAG_COMPL flag is set and unacknowledged credits are
Varun> >= max credits / 2, set completion bit in work request to reclaim
Varun> credits.
Applied to 4.9/scsi-queue.
diff --git a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c index 7c0d7af..0039beb 100644 --- a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c +++ b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c @@ -685,6 +685,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);
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> --- drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 5 +++++ 1 file changed, 5 insertions(+)