]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Fri, 17 Jan 2020 17:22:22 +0000 (14:22 -0300)
commit6c6f2287366ad92fa190ffc93b8138ea35c91416
tree5ee3ba6634cbdf26f893025e75cc603827feb89b
parent9ffc68432d638d2cacb252ccaa5a059997080dec
IB/hfi1: Close VNIC sdma_progress sleep window

BugLink: https://bugs.launchpad.net/bugs/1857158
[ Upstream commit 18912c4524385dd6532c682cb9d4f6aa39ba8d47 ]

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 bcad29137a97 ("IB/hfi1: Serve the most starved iowait entry first")

Fixes: 64551ede6cd1 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/infiniband/hw/hfi1/vnic_sdma.c