diff options
author | Mike Marciniszyn <mike.marciniszyn@intel.com> | 2019-06-14 19:33:06 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2019-06-18 04:15:40 +0300 |
commit | 942a899335707fc9cfc97cb382a60734b2ff4e03 (patch) | |
tree | 1e2df0fe0cfc90f4cc58fa94350b8942054cf9fb /Documentation/atomic_bitops.txt | |
parent | 099a884ba4c00145cef283d36e050726311c2e95 (diff) | |
download | linux-942a899335707fc9cfc97cb382a60734b2ff4e03.tar.xz |
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: 7724105686e7 ("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>
Diffstat (limited to 'Documentation/atomic_bitops.txt')
0 files changed, 0 insertions, 0 deletions