IB/hfi1: Fix loss of BECN with AHG
authorMike Marciniszyn <mike.marciniszyn@intel.com>
Tue, 1 May 2018 12:35:51 +0000 (05:35 -0700)
committerDoug Ledford <dledford@redhat.com>
Thu, 3 May 2018 19:24:47 +0000 (15:24 -0400)
commit0a0bcb046b2f0c15b89f8c1b08ad3de601a83c66
treecfcf1960fc9336bb087cab584190814d50e2ddf3
parent5da9e742be44d9b7c68b1bf6e1aaf46a1aa7a52b
IB/hfi1: Fix loss of BECN with AHG

AHG may be armed to use the stored header, which by design is limited
to edits in the PSN/A 32 bit word (bth2).

When the code is trying to send a BECN, the use of the stored header
will lose the BECN bit.

Fix by avoiding AHG when getting ready to send a BECN. This is
accomplished by always claiming the packet is not a middle packet which
is an AHG precursor.  BECNs are not a normal case and this should not
hurt AHG optimizations.

Cc: <stable@vger.kernel.org> # 4.14.x
Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hfi1/ruc.c