aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rdma/hfi1/sdma_txreq.h
diff options
context:
space:
mode:
authorMike Marciniszyn <mike.marciniszyn@intel.com>2016-02-14 12:45:53 -0800
committerDoug Ledford <dledford@redhat.com>2016-03-10 20:38:14 -0500
commita545f5308b6cf476def8a9326f7e82f89623bb03 (patch)
treeb89b9c1f95d75f69178dc3cdc9bcbe042f71622f /drivers/staging/rdma/hfi1/sdma_txreq.h
parentIB/qib, staging/rdma/hfi1, IB/rdmavt: progress selection changes (diff)
downloadlinux-dev-a545f5308b6cf476def8a9326f7e82f89623bb03.tar.xz
linux-dev-a545f5308b6cf476def8a9326f7e82f89623bb03.zip
staging/rdma/hfi: fix CQ completion order issue
The current implementation of the sdma_wait variable has a timing hole that can cause a completion Q entry to be returned from a pio send prior to an older sdma packets completion queue entry. The sdma_wait variable used to be decremented prior to calling the packet complete routine. The hole is between decrement and the verbs completion where send engine using pio could return a out of order completion in that window. This patch closes the hole by allowing an API option to specify an sdma_drained callback. The atomic dec is positioned after the complete callback to avoid the window as long as the pio path doesn't execute when there is a non-zero sdma count. Reviewed-by: Jubin John <jubin.john@intel.com> Signed-off-by: Dean Luick <dean.luick@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/sdma_txreq.h')
-rw-r--r--drivers/staging/rdma/hfi1/sdma_txreq.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/rdma/hfi1/sdma_txreq.h b/drivers/staging/rdma/hfi1/sdma_txreq.h
index 2effb35b9b91..bf7d777d756e 100644
--- a/drivers/staging/rdma/hfi1/sdma_txreq.h
+++ b/drivers/staging/rdma/hfi1/sdma_txreq.h
@@ -93,7 +93,7 @@ struct sdma_desc {
#define SDMA_TXREQ_F_USE_AHG 0x0004
struct sdma_txreq;
-typedef void (*callback_t)(struct sdma_txreq *, int, int);
+typedef void (*callback_t)(struct sdma_txreq *, int);
struct iowait;
struct sdma_txreq {