LASSERT(conn->ibc_outstanding_credits <= conn->ibc_queue_depth);
LASSERT(conn->ibc_credits >= 0);
LASSERT(conn->ibc_credits <= conn->ibc_queue_depth);
- LASSERT(conn->ibc_nsends_posted <= conn->ibc_queue_depth);
+
+ if (conn->ibc_nsends_posted ==
+ conn->ibc_queue_depth) {
+ /* tx completions outstanding... */
+ CDEBUG(D_NET, "%s: posted enough\n",
+ libcfs_nid2str(peer_ni->ibp_nid));
+ return -EAGAIN;
+ }
if (credit != 0 && conn->ibc_credits == 0) { /* no credits */
CDEBUG(D_NET, "%s: no credits\n",