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
Ensure that COMPARE AND WRITE is executed atomically by serializing
all COMPARE AND WRITE commands per device (SCST_SERIALIZED).
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5334 d57e44dd-8a1f-0410-8b47-8ef2f437770f
There is already an implementation of the VERIFY command for vdisk_fileio
devices. Add an implementation for vdisk_blockio devices.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5333 d57e44dd-8a1f-0410-8b47-8ef2f437770f
In r5316 the default vendor name for vdisk_blockio devices was changed
into "SCST_FIO". Change this back into "SCST_BIO".
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5332 d57e44dd-8a1f-0410-8b47-8ef2f437770f
The "struct vdisk_cmd_params *p" parameter is neither used by vdisk_fsync(),
vdisk_fsync_blockio() nor by vdisk_fsync_fileio() so remove it.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5331 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Keep the default size of vdisk_nullio devices at VDISK_NULLIO_SIZE. Add
a sysfs attribute 'size' which is the size of a vdisk device in
bytes. Make the size of vdisk_nullio devices configurable. Accept
"size" and "size_mb" as creation parameters for vdisk_nullio
devices. Generate a CAPACITY DATA HAS CHANGED unit attention after size
changes. Refuse any attempt to change the size into a number that is
not a multiple of the block size.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5322 d57e44dd-8a1f-0410-8b47-8ef2f437770f