]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC: r218812
authorken <ken@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 21 Feb 2011 18:11:56 +0000 (18:11 +0000)
committerken <ken@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 21 Feb 2011 18:11:56 +0000 (18:11 +0000)
commit2f9058dbf6c736ba178cf436f4b6c3c13d9244b6
tree196fd3edceb41d890c105bd75446fb8b92545506
parent95d5f665191ee33fccbb80c72eee5f74c662b1ca
MFC: r218812

Fix several issues with the mps(4) driver.

When the driver ran out of DMA chaining buffers, it kept the timeout for
the I/O, and I/O would stall.

The driver was not freezing the device queue on errors.

mps.c: Pull command completion logic into a separate
function, and call the callback/wakeup for commands
that are never sent due to lack of chain buffers.

Add a number of extra diagnostic sysctl variables.

Handle pre-hardware errors for configuration I/O.
This doesn't panic the system, but it will fail the
configuration I/O and there is no retry mechanism.
So the device probe will not succeed.  This should
be a very uncommon situation, however.

mps_sas.c: Freeze the SIM queue when we run out of chain
buffers, and unfreeze it when more commands
complete.

Freeze the device queue when errors occur, so that
CAM can insure proper command ordering.

Report pre-hardware errors for task management
commands.  In general, that shouldn't be possible
because task management commands don't have S/G
lists, and that is currently the only error path
before we get to the hardware.

Handle pre-hardware errors (like out of chain
elements) for SMP requests.  That shouldn't happen
either, since we should have enough space for two
S/G elements in the standard request.

For commands that end with
MPI2_IOCSTATUS_SCSI_IOC_TERMINATED and
MPI2_IOCSTATUS_SCSI_EXT_TERMINATED, return them
with CAM_REQUEUE_REQ to retry them unconditionally.
These seem to be related to back end, transport
related problems that are hopefully transient.  We
don't want to go through the retry count for
something that is not a permanent error.

Keep track of the number of outstanding I/Os.

mpsvar.h: Track the number of free chain elements.

Add variables for the number of outstanding I/Os,
and I/O high water mark.

Add variables to track the number of free chain
buffers and the chain low water mark, as well as
the number of chain allocation failures.

Add I/O state flags and an attach done flag.

git-svn-id: svn://svn.freebsd.org/base/stable/8@218922 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/dev/mps/mps.c
sys/dev/mps/mps_sas.c
sys/dev/mps/mpsvar.h