]> git.baikalelectronics.ru Git - kernel.git/commit
i40iw: Fix incorrect assignment of SQ head
authorHenry Orosco <henry.orosco@intel.com>
Tue, 22 Nov 2016 15:44:20 +0000 (09:44 -0600)
committerDoug Ledford <dledford@redhat.com>
Mon, 5 Dec 2016 21:09:39 +0000 (16:09 -0500)
commit580cfe4cddd791e63d244f90612fd720f9660332
tree6d48618c5cda379b0eb0b60793fe86fd802b8245
parente2dcbe1e25226af5e357497490820726d01289a3
i40iw: Fix incorrect assignment of SQ head

The SQ head is incorrectly incremented when the number
of WQEs required is greater than the number available.
The fix is to use the I40IW_RING_MOV_HEAD_BY_COUNT
macro. This checks for the SQ full condition first and
only if SQ has room for the request, then we move the
head appropriately.

Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Henry Orosco <henry.orosco@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/i40iw/i40iw_uk.c