]> git.baikalelectronics.ru Git - kernel.git/commit
IB/hfi1: Close PSM sdma_progress sleep window
authorMike Marciniszyn <mike.marciniszyn@intel.com>
Fri, 7 Jun 2019 12:25:31 +0000 (08:25 -0400)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 11 Jun 2019 20:06:45 +0000 (17:06 -0300)
commitbbaaa65ef6613d588ec8dce9491a4506290afe92
tree336cbfb929371d36fb606e8d769a2dea105bdc4f
parent12e585482417d9386114cd26aeb7de36c9168819
IB/hfi1: Close PSM sdma_progress sleep window

The call to sdma_progress() is called outside the wait lock.

In this case, there is a race condition where sdma_progress() can return
false and the sdma_engine can idle.  If that happens, there will be no
more sdma interrupts to cause the wakeup and the user_sdma xmit will hang.

Fix by moving the lock to enclose the sdma_progress() call.

Also, delete busycount. The need for this was removed by:
commit f623b219a1b1 ("IB/hfi1: Serve the most starved iowait entry first")

Cc: <stable@vger.kernel.org>
Fixes: 458784dfebc5 ("IB/hfi1: add driver files")
Reviewed-by: Gary Leshner <Gary.S.Leshner@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hfi1/user_sdma.c
drivers/infiniband/hw/hfi1/user_sdma.h