Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe9b34bf authored by Varun Prakash's avatar Varun Prakash Committed by Martin K. Petersen
Browse files

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: default avatarVarun Prakash <varun@chelsio.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 623290a2
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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);