IB/hfi1: Fix pio wait counter double increment
authorMike Marciniszyn <[email protected]>
Thu, 12 May 2016 17:22:57 +0000 (10:22 -0700)
committerDoug Ledford <[email protected]>
Fri, 13 May 2016 23:39:15 +0000 (19:39 -0400)
The code unconditionlly increments the pio wait counter
making the counter inacurate and unusable.

Fixes: 14553ca11039 ("staging/rdma/hfi1: Adaptive PIO for short messages")
Reviewed-by: Dennis Dalessandro <[email protected]>
Signed-off-by: Mike Marciniszyn <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
drivers/staging/rdma/hfi1/verbs.c

index 9cdc85fa366f19e6b0c13ad43c582c7f73faf24d..f3531fdfef01cb83f3f10e95db958b20a52f9bcf 100644 (file)
@@ -946,7 +946,6 @@ static int pio_wait(struct rvt_qp *qp,
 
                        dev->n_piowait += !!(flag & RVT_S_WAIT_PIO);
                        dev->n_piodrain += !!(flag & RVT_S_WAIT_PIO_DRAIN);
-                       dev->n_piowait++;
                        qp->s_flags |= flag;
                        was_empty = list_empty(&sc->piowait);
                        list_add_tail(&priv->s_iowait.list, &sc->piowait);