staging/rdma/hfi1: don't cache "prescan head"
authorArthur Kepner <arthur.kepner@intel.com>
Thu, 5 Nov 2015 02:10:09 +0000 (21:10 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Nov 2015 04:02:47 +0000 (20:02 -0800)
commit3e7ccca08dbe46665ca432d09a5472d80aaadb6f
treeb685940732dae5feca02cc4154f32e60dcb34169
parent701e441d82689c21afd699b229d338783f3463b1
staging/rdma/hfi1: don't cache "prescan head"

When HFI1_CAP_DMA_RTAIL is toggled off the "prescan head" can get out of sync
with the receive context's "head". This happens when, after prescan_rxq() newly
arrived packets are then received, and processed by an RX interrupt handler.
This is an unavoidable race, and to avoid getting out of sync we always start
prescanning at the current "rcd->head" entry.

Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Arthur Kepner <arthur.kepner@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rdma/hfi1/driver.c
drivers/staging/rdma/hfi1/hfi.h