OpenCloudOS-Kernel/drivers/infiniband/hw/hfi1
Mike Marciniszyn 942a899335 IB/hfi1: Handle port down properly in pio
The call to sc_buffer_alloc currently returns NULL (no buffer) or
a buffer descriptor.

There is a third case when the port is down.  Currently that
returns NULL and this prevents the caller from properly handling the
sc_buffer_alloc() failure.  A verbs code link test after the call is
racy so the indication needs to come from the state check inside the allocation
routine to be valid.

Fix by encoding the ECOMM failure like SDMA.   IS_ERR_OR_NULL() tests
are added at all call sites.  For verbs send, this needs to treat any
error by returning a completion without any MMIO copy.

Fixes: 7724105686 ("IB/hfi1: add driver files")
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@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>
2019-06-17 21:15:40 -04:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile IB/hfi1: OPFN interface 2019-01-31 11:36:05 -05:00
affinity.c mm: replace all open encodings for NUMA_NO_NODE 2019-03-05 21:07:14 -08:00
affinity.h IB/{hfi1, rdmavt, qib}: Implement CQ completion vector support 2018-05-09 15:53:30 -04:00
aspm.h IB/hfi1: Convert timers to use timer_setup() 2017-10-18 11:48:19 -04:00
chip.c IB/hfi1: Correct tid qp rcd to match verbs context 2019-06-11 17:06:45 -03:00
chip.h IB/hfi1: Correct tid qp rcd to match verbs context 2019-06-11 17:06:45 -03:00
chip_registers.h IB/hfi1: Add selected Rcv counters 2019-04-24 11:48:10 -03:00
common.h IB/hfi1: Remove reference to RHF.VCRCErr 2019-04-24 11:48:11 -03:00
debugfs.c IB/hfi1: Add debugfs to control expansion ROM write protect 2019-04-24 11:26:41 -03:00
debugfs.h infiniband: hfi1: drop crazy DEBUGFS_SEQ_FILE_CREATE() macro 2019-01-24 09:22:29 -07:00
device.c infiniband: utilize the new cdev_set_parent function 2017-03-21 06:44:33 +01:00
device.h
driver.c IB/hfi1: Remove reference to RHF.VCRCErr 2019-04-24 11:48:11 -03:00
efivar.c IB/hfi1: Check upper-case EFI variables 2017-02-19 09:18:37 -05:00
efivar.h
eprom.c IB/hfi1: Check eeprom config partition validity 2017-09-27 11:10:36 -04:00
eprom.h IB/hfi1: Add ability to read platform config from the EPROM 2016-10-02 08:42:20 -04:00
exp_rcv.c IB/hfi1: Remove WARN_ON when freeing expected receive groups 2019-04-03 15:27:30 -03:00
exp_rcv.h IB/hfi1: Cleanup of exp_rcv 2018-05-24 09:39:25 -06:00
fault.c IB/hfi1: Validate fault injection opcode user input 2019-06-11 17:06:37 -03:00
fault.h IB/hfi1: Rework fault injection machinery 2018-05-09 15:53:30 -04:00
file_ops.c IB/hfi1: Remove overly conservative VM_EXEC flag check 2019-01-21 14:20:08 -07: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: Create inline to get extended headers 2019-06-17 21:15:40 -04:00
init.c IB/hfi1: Fix WQ_MEM_RECLAIM warning 2019-05-06 12:57:45 -03:00
intr.c IB/hfi1: Allow MgmtAllowed on B2B setups 2017-11-13 15:53:56 -05:00
iowait.c IB/hfi1: Prioritize the sending of ACK packets 2019-02-05 18:07:44 -05:00
iowait.h IB/hfi1: Prioritize the sending of ACK packets 2019-02-05 18:07:44 -05:00
mad.c RDMA: Mark if create address handle is in a sleepable context 2018-12-19 16:17:19 -07:00
mad.h IB/hfi1: Convert PortXmitWait/PortVLXmitWait counters to flit times 2018-02-01 15:43:30 -07:00
mmu_rb.c mm/mmu_notifier: use structure for invalidate_range_start/end callback 2018-12-28 12:11:50 -08:00
mmu_rb.h IB/hfi1: Don't remove RB entry when not needed. 2017-06-27 16:56:33 -04:00
msix.c IB/hfi1: Rework the IRQ API to be more flexible 2018-09-01 08:13:38 -04:00
msix.h IB/hfi1: Make the MSIx resource allocation a bit more flexible 2018-09-01 08:13:38 -04:00
opa_compat.h IB/hfi1: Document phys port state bits not used in IB 2017-08-22 14:22:37 -04:00
opfn.c IB/hfi1: Add TID RDMA retry timer 2019-02-05 18:07:43 -05:00
opfn.h IB/hfi1: Make opfn.h self sufficient 2019-04-24 11:31:49 -03:00
pcie.c First merge window pull request 2018-10-26 07:38:19 -07:00
pio.c IB/hfi1: Handle port down properly in pio 2019-06-17 21:15:40 -04:00
pio.h IB/hfi1: Reduce lock contention on iowait_lock for sdma and pio 2018-12-06 20:15:36 -07:00
pio_copy.c IB/hfi1: Optimize pio_buf and send_context structs 2016-11-15 16:37:27 -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 IB/hfi1: Define platform_config_table_limits once 2016-12-11 15:29:42 -05:00
qp.c Merge HFI1 updates into k.o/for-next 2019-04-03 15:28:05 -03:00
qp.h IB/hfi1: Add the dual leg code 2019-02-05 18:07:44 -05: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 IB/hfi1: Fetch monitor values on-demand for CableInfo query 2016-08-22 14:31:41 -04:00
rc.c IB/hfi1: Handle port down properly in pio 2019-06-17 21:15:40 -04:00
rc.h IB/hfi1: Delay the release of destination mr for TID RDMA WRITE DATA 2019-04-03 15:27:30 -03:00
ruc.c IB/{rdmavt, hfi1): Miscellaneous comment fixes 2019-04-24 11:31:48 -03:00
sdma.c IB/hfi1: Wakeup QPs orphaned on wait list after flush 2019-06-17 21:15:40 -04:00
sdma.h IB/hfi1: Reduce lock contention on iowait_lock for sdma and pio 2018-12-06 20:15:36 -07:00
sdma_txreq.h IB/hfi1: Prioritize the sending of ACK packets 2019-02-05 18:07:44 -05:00
sysfs.c RDMA: Introduce and use rdma_device_to_ibdev() 2019-01-14 13:12:03 -07:00
tid_rdma.c IB/hfi1: Correct tid qp rcd to match verbs context 2019-06-11 17:06:45 -03:00
tid_rdma.h IB/hfi1: Unify the software PSN check for TID RDMA READ/WRITE 2019-04-03 15:27:30 -03:00
trace.c IB/hfi1: Add static trace for TID RDMA WRITE protocol 2019-02-05 18:07:44 -05:00
trace.h IB/hfi1: Add static trace for OPFN 2019-01-31 11:37:40 -05: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 IB/hfi1: Fix two format strings 2019-03-28 11:03:49 -03:00
trace_ibhdrs.h IB/hfi1: Add static trace for TID RDMA WRITE protocol 2019-02-05 18:07:44 -05:00
trace_iowait.h IB/hfi1: Add static trace for iowait 2018-09-30 19:21:12 -06:00
trace_misc.h IB/hfi1: Add traces for TID operations 2017-06-27 16:58:13 -04:00
trace_mmu.h IB/hif1: Remove static tracing from SDMA hot path 2017-08-28 19:12:27 -04:00
trace_rc.h IB/hfi1: Add static trace for TID RDMA READ protocol 2019-02-05 17:53:56 -05:00
trace_rx.h IB/hfi1: Add static trace for OPFN 2019-01-31 11:37:40 -05:00
trace_tid.h IB/hfi1: Unify the software PSN check for TID RDMA READ/WRITE 2019-04-03 15:27:30 -03:00
trace_tx.h IB/hfi1: Add static trace for TID RDMA WRITE protocol 2019-02-05 18:07:44 -05:00
uc.c IB/hfi1: OPFN support discovery 2019-01-31 11:36:04 -05:00
ud.c IB/hfi1: Handle port down properly in pio 2019-06-17 21:15:40 -04:00
user_exp_rcv.c IB/hfi1: Validate page aligned for a given virtual address 2019-05-29 12:56:05 -03:00
user_exp_rcv.h IB/hfi1: TID RDMA RcvArray programming and TID allocation 2019-02-05 17:53:55 -05:00
user_pages.c IB/hfi1: use the new FOLL_LONGTERM flag to get_user_pages_fast() 2019-05-14 09:47:46 -07:00
user_sdma.c IB/hfi1: Close PSM sdma_progress sleep window 2019-06-11 17:06:45 -03:00
user_sdma.h IB/hfi1: Close PSM sdma_progress sleep window 2019-06-11 17:06:45 -03:00
verbs.c IB/hfi1: Handle port down properly in pio 2019-06-17 21:15:40 -04:00
verbs.h IB/hfi1: Use aborts to trigger RC throttling 2019-06-17 21:15:40 -04:00
verbs_txreq.c IB/hfi1: Silence txreq allocation warnings 2019-06-17 21:15:40 -04:00
verbs_txreq.h IB/hfi1: Silence txreq allocation warnings 2019-06-17 21:15:40 -04:00
vnic.h IB/hfi1: Add support to receive 16B bypass packets 2017-08-22 14:22:37 -04:00
vnic_main.c 5.2 Merge Window pull request 2019-05-09 09:02:46 -07:00
vnic_sdma.c IB/hfi1: Prioritize the sending of ACK packets 2019-02-05 18:07:44 -05:00