Avoid that checkpatch reports the following error message:
ERROR: return is not a function, parentheses are not required
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5398 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Avoid that checkpatch reports the following error message:
ERROR: "(foo*)" should be "(foo *)"
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5397 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Complain if srpt_abort_cmd() is called for an I/O context that is
being processed by SCST and not by the HCA.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5393 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Only complain about a missing completion for I/O contexts that are
in a state where the ib_srpt driver is waiting for the HCA.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5392 d57e44dd-8a1f-0410-8b47-8ef2f437770f
The comment above scst_nexus_loss() is somewhat confusing so change
it into something that is more clear.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5387 d57e44dd-8a1f-0410-8b47-8ef2f437770f
The to_scst_lcl_sess() macro is based on container_of() and hence never
returns NULL. Hence remove the two tests that compare the result of that
macro against NULL.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5385 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Scst_mutex intentially used directly in the sysfs handler, because
comming sysfs improvements will allow that.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5382 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Apparently with mlx4 firmware up to and including 2.30.8000 it is not
guaranteed that for a QP associated with an SRQ error completions are
generated for all pending work requests. Avoid triggering
srpt_pending_cmd_timeout() for missing error completions.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5370 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Invoking srpt_zerolength_write() before the queue pair has reached
the error state is a bug, so complain loudly if that happens.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5369 d57e44dd-8a1f-0410-8b47-8ef2f437770f
The overhead of atomic_add_return() is lower than that of a
spin_lock() / spin_unlock() pair, hence switch to the former.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5367 d57e44dd-8a1f-0410-8b47-8ef2f437770f
All callers guarantee that the completion queue is empty so it is
not necessary to invoke ib_poll_cq() from inside this function.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5366 d57e44dd-8a1f-0410-8b47-8ef2f437770f
After having changed the queue pair state into "error", queue an additional
work request instead of waiting for the last WQE event.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5357 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This is necessary to avoid that a login gets rejected due to reusing a
queue pair number that has not yet been freed by the target side.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5356 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Store initiator and target port ID's once per nexus instead of in each
channel data structure.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5354 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Although harmless for SCSI commands with SIMPLE ordering, avoid that commands
received before RTU can get reordered.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5349 d57e44dd-8a1f-0410-8b47-8ef2f437770f
The mlx4_core driver generates a GID change event after a port has been
changed from IB into Ethernet mode. Avoid that this causes the following
error message to appear in the system log:
ib_srpt: ***ERROR***: received unrecognized IB event 18
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5346 d57e44dd-8a1f-0410-8b47-8ef2f437770f
All ioctx->state manipulations are serialized per command so it is
not necessary to use locking to protect these manipulations.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5345 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Make the behavior of SCST sysfs attributes more clear by adding
examples in scst/README of code for reading and writing these attributes.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5340 d57e44dd-8a1f-0410-8b47-8ef2f437770f