aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rdma/hfi1/rc.c
diff options
context:
space:
mode:
authorMike Marciniszyn <mike.marciniszyn@intel.com>2016-02-14 12:45:18 -0800
committerDoug Ledford <dledford@redhat.com>2016-03-10 20:38:13 -0500
commit711e104ddca7b609889e1edf0a8482673ea4a7cc (patch)
tree5bac16a93873498a38717733056fd85b105cd051 /drivers/staging/rdma/hfi1/rc.c
parentstaging/rdma/hfi1: avoid passing pmtu (diff)
downloadlinux-dev-711e104ddca7b609889e1edf0a8482673ea4a7cc.tar.xz
linux-dev-711e104ddca7b609889e1edf0a8482673ea4a7cc.zip
staging/rdma/hfi1: fix panic in send engine
The send engine wasn't correctly handling pre-built packets, and worse, the pointer to a packet state's txreq wasn't initialized correctly. To fix: - all waiters need to save any prebuilt packets (smda waits already did) - the progress routine needs to handle a QPs prebuilt packet and initialize the txreq pointer properly To keep SDMA working, the dma send code needs to see if a packet has been built already. If not the code will build it. Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/staging/rdma/hfi1/rc.c')
-rw-r--r--drivers/staging/rdma/hfi1/rc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/staging/rdma/hfi1/rc.c b/drivers/staging/rdma/hfi1/rc.c
index d54d3ad1ed18..27042876ca62 100644
--- a/drivers/staging/rdma/hfi1/rc.c
+++ b/drivers/staging/rdma/hfi1/rc.c
@@ -348,6 +348,8 @@ normal:
}
qp->s_rdma_ack_cnt++;
qp->s_hdrwords = hwords;
+ /* pbc */
+ ps->s_txreq->hdr_dwords = hwords + 2;
qp->s_cur_size = len;
hfi1_make_ruc_header(qp, ohdr, bth0, bth2, middle, ps);
return 1;
@@ -750,6 +752,8 @@ int hfi1_make_rc_req(struct rvt_qp *qp, struct hfi1_pkt_state *ps)
}
qp->s_len -= len;
qp->s_hdrwords = hwords;
+ /* pbc */
+ ps->s_txreq->hdr_dwords = hwords + 2;
qp->s_cur_sge = ss;
qp->s_cur_size = len;
hfi1_make_ruc_header(