]> 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)
commitc16a2194231390b5537dcb744dec8952b7a2a38e
tree6d48618c5cda379b0eb0b60793fe86fd802b8245
parente7a585022991f5583a6585b11d2e13b8ce7fc681
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