]> git.baikalelectronics.ru Git - kernel.git/commit
IB/hfi1: Close VNIC sdma_progress sleep window
authorMike Marciniszyn <mike.marciniszyn@intel.com>
Wed, 28 Nov 2018 18:32:48 +0000 (10:32 -0800)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 7 Dec 2018 03:15:36 +0000 (20:15 -0700)
commitd3e3bcd60fb5c2641a7612648a5d70565bf841ef
tree6f6a9b3d270b88371744cd9a5e57258c732ff64d
parentc64e5632136c8942e79576d9331c3e7ab256afd0
IB/hfi1: Close VNIC 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 vnic_sdma xmit will hang.

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

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

Fixes: 3fab42bc77f5 ("IB/hfi1: VNIC SDMA support")
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/vnic_sdma.c