Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Feb 2011 17:06:06 +0000 (UTC)
From:      "Kenneth D. Merry" <ken@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/sys/dev/mps mps.c mps_sas.c mpsvar.h
Message-ID:  <201102181706.p1IH6JSS024074@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
ken         2011-02-18 17:06:06 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/mps          mps.c mps_sas.c mpsvar.h 
  Log:
  SVN rev 218812 on 2011-02-18 17:06:06Z by ken
  
  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.
  
  MFC after:      3 days
  
  Revision  Changes    Path
  1.12      +66 -10    src/sys/dev/mps/mps.c
  1.9       +119 -4    src/sys/dev/mps/mps_sas.c
  1.7       +15 -1     src/sys/dev/mps/mpsvar.h



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201102181706.p1IH6JSS024074>