linux/drivers/infiniband/hw/hfi1
Michael J. Ruhl a93a0a3111 IB/hfi1: Reorder incorrect send context disable
User send context integrity bits are cleared before the context is
disabled.  If the send context is still processing data, any packets
that need those integrity bits will cause an error and halt the send
context.

During the disable handling, the driver waits for the context to drain.
If the context is halted, the driver will eventually timeout because
the context won't drain and then incorrectly bounce the link.

Reorder the bit clearing and the context disable.

Examine the software state and send context status as well as the
egress status to determine if a send context is in the halted state.

Promote the check macros to static functions for consistency with the
new check and to follow kernel style.

Remove an unused define that refers to the egress timeout.

Cc: <stable@vger.kernel.org> # 4.9.x
Reviewed-by: Mitko Haralanov <mitko.haralanov@intel.com>
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
2018-05-09 15:53:29 -04:00
..
affinity.c IB/hfi1: Fix memory leak in exception path in get_irq_affinity() 2018-05-03 15:24:48 -04:00
affinity.h
aspm.h IB/hfi1: Convert timers to use timer_setup() 2017-10-18 11:48:19 -04:00
chip_registers.h IB/hfi1: Prevent LNI hang when LCB can't obtain lanes 2018-05-09 15:53:29 -04:00
chip.c IB/hfi1: Return correct value for device state 2018-05-09 15:53:29 -04:00
chip.h IB/hfi1: Prevent LNI hang when LCB can't obtain lanes 2018-05-09 15:53:29 -04:00
common.h IB/hfi1: Eliminate allocation while atomic 2017-10-18 10:12:59 -04:00
debugfs.c IB/hfi1: Fix fault injection init/exit issues 2018-05-09 15:53:29 -04:00
debugfs.h
device.c
device.h
driver.c IB/hfi1: Fix handling of FECN marked multicast packet 2018-05-03 15:24:44 -04:00
efivar.c
efivar.h
eprom.c IB/hfi1: Check eeprom config partition validity 2017-09-27 11:10:36 -04:00
eprom.h
exp_rcv.c
exp_rcv.h
file_ops.c IB/hfi1: Reorder incorrect send context disable 2018-05-09 15:53:29 -04:00
firmware.c IB/hfi1: Fix infinite loop in 8051 command error path 2018-01-05 13:34:55 -05:00
hfi.h IB/hfi1: Fix handling of FECN marked multicast packet 2018-05-03 15:24:44 -04:00
init.c IB/{hfi1, rdmavt}: Fix memory leak in hfi1_alloc_devdata() upon failure 2018-05-03 15:24:48 -04:00
intr.c IB/hfi1: Allow MgmtAllowed on B2B setups 2017-11-13 15:53:56 -05:00
iowait.h IB/hfi1: Remove dependence on qp->s_hdrwords 2018-02-01 15:24:32 -07:00
Kconfig
mad.c IB/hfi1: Complete check for locally terminated smp 2018-05-09 15:53:29 -04:00
mad.h IB/hfi1: Convert PortXmitWait/PortVLXmitWait counters to flit times 2018-02-01 15:43:30 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mmu_rb.c mm, mmu_notifier: annotate mmu notifiers with blockable invalidate callbacks 2018-01-31 17:18:38 -08:00
mmu_rb.h
opa_compat.h
pcie.c IB/hfi1: Fix NULL pointer dereference when invalid num_vls is used 2018-05-03 15:24:47 -04:00
pio_copy.c
pio.c IB/hfi1: Reorder incorrect send context disable 2018-05-09 15:53:29 -04:00
pio.h IB/hfi1: Do not allocate PIO send contexts for VNIC 2017-11-13 15:53:57 -05:00
platform.c IB/{hfi1, rdmavt}: Fix memory leak in hfi1_alloc_devdata() upon failure 2018-05-03 15:24:48 -04:00
platform.h
qp.c IB/hfi1: Fix a kernel-doc warning 2018-03-13 16:21:14 -04:00
qp.h IB/hfi1: Remove dependence on qp->s_hdrwords 2018-02-01 15:24:32 -07:00
qsfp.c IB/{hfi1, rdmavt}: Fix memory leak in hfi1_alloc_devdata() upon failure 2018-05-03 15:24:48 -04:00
qsfp.h
rc.c Second pull request for 4.16 merge window 2018-02-06 11:09:45 -08:00
ruc.c IB/hfi1: Fix loss of BECN with AHG 2018-05-03 15:24:47 -04:00
sdma_txreq.h
sdma.c Second pull request for 4.16 merge window 2018-02-06 11:09:45 -08:00
sdma.h IB/hfi1: Fix for early release of sdma context 2018-02-01 15:24:32 -07:00
sysfs.c IB/hfi1: Fix incorrect available receive user context count 2017-10-04 15:39:44 -04:00
trace_ctxts.h treewide: remove large struct-pass-by-value from tracepoint arguments 2018-03-28 22:55:18 +02:00
trace_dbg.h
trace_ibhdrs.h IB/hfi1: Remove unnecessary fecn and becn fields 2018-02-01 15:43:29 -07:00
trace_misc.h
trace_mmu.h
trace_rc.h
trace_rx.h IB/hfi1: Add 16B rcvhdr trace support 2018-02-01 15:43:32 -07:00
trace_tx.h
trace.c IB/hfi1: Remove unnecessary fecn and becn fields 2018-02-01 15:43:29 -07:00
trace.h IB/hfi1: Extend input hdr tracing for packet type 2017-09-27 11:34:13 -04:00
uc.c Second pull request for 4.16 merge window 2018-02-06 11:09:45 -08:00
ud.c IB/hfi1: Fix handling of FECN marked multicast packet 2018-05-03 15:24:44 -04:00
user_exp_rcv.c IB/hfi1: Return actual error value from program_rcvarray() 2018-05-09 15:53:29 -04:00
user_exp_rcv.h
user_pages.c
user_sdma.c Updates for 4.15 kernel merge window 2017-11-15 14:54:53 -08:00
user_sdma.h IB/hfi1: Convert the macro AHG_HEADER_SET into an inline function 2017-09-27 11:34:13 -04:00
verbs_txreq.c
verbs_txreq.h IB/hfi1: Remove dependence on qp->s_hdrwords 2018-02-01 15:24:32 -07:00
verbs.c IB/uverbs: Extend uverbs_ioctl header with driver_id 2018-03-19 14:45:17 -06:00
verbs.h IB/hfi1: Remove blind constants from 16B update 2018-02-01 15:43:30 -07:00
vnic_main.c IB/hfi1: Do not allocate PIO send contexts for VNIC 2017-11-13 15:53:57 -05:00
vnic_sdma.c
vnic.h