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)
commitd4165e3abdf16707602c10f0d678d4d564a87e35
tree6d48618c5cda379b0eb0b60793fe86fd802b8245
parent78e945aace5b9aaf19404799cd29b4d155806053
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