<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/mps, branch release/9.3.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=release%2F9.3.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=release%2F9.3.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2014-05-22T16:36:01Z</updated>
<entry>
<title>MFC mpr(4) changes: r265484, r265485, r265709 and r265712</title>
<updated>2014-05-22T16:36:01Z</updated>
<author>
<name>Kenneth D. Merry</name>
<email>ken@FreeBSD.org</email>
</author>
<published>2014-05-22T16:36:01Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a58655bc08204a04a7f63d1d289b2c7b7ca8191f'/>
<id>urn:sha1:a58655bc08204a04a7f63d1d289b2c7b7ca8191f</id>
<content type='text'>
  ------------------------------------------------------------------------
  r265484 | ken | 2014-05-06 23:11:16 -0600 (Tue, 06 May 2014) | 5 lines

  Remove some debugging code.

  Submitted by:	Steve McConnell &lt;stephen.mcconnell@avagotech.com&gt;

  ------------------------------------------------------------------------
  ------------------------------------------------------------------------
  r265485 | ken | 2014-05-06 23:14:48 -0600 (Tue, 06 May 2014) | 9 lines

  Hold the SIM lock when calling xpt_create_path() and xpt_action() in
  mprsas_SSU_to_SATA_devices().

  This fixes an assertion on shutdown with INVARIANTS enabled with SATA
  drives present on an IR firmware controller.

  Reviewed by:	Steve McConnell &lt;stephen.mcconnell@avagotech.com&gt;.

  ------------------------------------------------------------------------
  ------------------------------------------------------------------------
  r265709 | ken | 2014-05-08 14:28:22 -0600 (Thu, 08 May 2014) | 15 lines

  Fix TLR (Transport Layer Retry) support in the mps(4) and mpr(4) drivers.

  TLR is necessary for reliable communication with SAS tape drives.

  This was broken by change 246713 in the mps(4) driver.  It changed the
  cm_data field for SCSI I/O requests to point to the CCB instead of the data
  buffer.  So, instead, look at the CCB's data pointer to determine whether
  or not we're talking to a tape drive.

  Also, take the residual into account to make sure that we don't go off the
  end of the request.

  Sponsored by:	Spectra Logic Corporation

  ------------------------------------------------------------------------
  ------------------------------------------------------------------------
  r265712 | ken | 2014-05-08 14:46:46 -0600 (Thu, 08 May 2014) | 10 lines

  Add #ifdefs in the mpr(4) driver so that versions of stable/9 that
  have implemented the PIM_NOSCAN rescan functionality will have it
  enabled.

  This is a no-op for head.

  Reviewed by:	slm
  Sponsored by:	Spectra Logic Corporation

  ------------------------------------------------------------------------

Sponsored by:	Spectra Logic, Avago
</content>
</entry>
<entry>
<title>MFC r262575:</title>
<updated>2014-03-06T14:32:55Z</updated>
<author>
<name>Alexander Motin</name>
<email>mav@FreeBSD.org</email>
</author>
<published>2014-03-06T14:32:55Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4e20c36ccdd1eb502569be9f49c37332a2c0846f'/>
<id>urn:sha1:4e20c36ccdd1eb502569be9f49c37332a2c0846f</id>
<content type='text'>
Restore SIM freeze/release match, broken at r253549.

This fixes problem with SIM left in frozen state after reinit, for example,
after firmware update.
</content>
</entry>
<entry>
<title>MFC r262553:</title>
<updated>2014-03-06T13:25:21Z</updated>
<author>
<name>Alexander Motin</name>
<email>mav@FreeBSD.org</email>
</author>
<published>2014-03-06T13:25:21Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=7f9509bd92b9d298f8bf47b0c145e65cdebde096'/>
<id>urn:sha1:7f9509bd92b9d298f8bf47b0c145e65cdebde096</id>
<content type='text'>
Pass proper pointer to bus_dmamem_free() in mps_iocfacts_free().

Passing there pointer into the middle of allocated area caused kernel
panic during reinit, for example, after firmware upgrade.
</content>
</entry>
<entry>
<title>MFC r254253, r254257:</title>
<updated>2013-10-09T19:59:25Z</updated>
<author>
<name>Alexander Motin</name>
<email>mav@FreeBSD.org</email>
</author>
<published>2013-10-09T19:59:25Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=933a9301f3c6e80514c6ea1b329d623738283ea5'/>
<id>urn:sha1:933a9301f3c6e80514c6ea1b329d623738283ea5</id>
<content type='text'>
r253460 accidentally some moderately expensive debugging code, even
when debugging isn't enabled.  Work around this.
</content>
</entry>
<entry>
<title>MFC r253809:</title>
<updated>2013-10-09T19:57:27Z</updated>
<author>
<name>Alexander Motin</name>
<email>mav@FreeBSD.org</email>
</author>
<published>2013-10-09T19:57:27Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=42d43c7a6c65e6bd535147d40cac30e00a959c6c'/>
<id>urn:sha1:42d43c7a6c65e6bd535147d40cac30e00a959c6c</id>
<content type='text'>
Fix a printf typo.
</content>
</entry>
<entry>
<title>MFC r241759 (by jwd):</title>
<updated>2013-10-09T19:55:55Z</updated>
<author>
<name>Alexander Motin</name>
<email>mav@FreeBSD.org</email>
</author>
<published>2013-10-09T19:55:55Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=83e9dc9de264fde740065413ce87636dc14803d4'/>
<id>urn:sha1:83e9dc9de264fde740065413ce87636dc14803d4</id>
<content type='text'>
Don't lose the 255'th disk behind the initiator.
</content>
</entry>
<entry>
<title>MFC r241145 (by ken):</title>
<updated>2013-10-09T19:53:42Z</updated>
<author>
<name>Alexander Motin</name>
<email>mav@FreeBSD.org</email>
</author>
<published>2013-10-09T19:53:42Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8af9cc03d28ed695062a51812ddca03af819b7e7'/>
<id>urn:sha1:8af9cc03d28ed695062a51812ddca03af819b7e7</id>
<content type='text'>
Add casts to unbreak the i386 PAE build for the mps(4) driver.
</content>
</entry>
<entry>
<title>MFC r255501</title>
<updated>2013-09-23T21:52:07Z</updated>
<author>
<name>Kenneth D. Merry</name>
<email>ken@FreeBSD.org</email>
</author>
<published>2013-09-23T21:52:07Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=165992728d93125bb5319a18ce0cd2975c1d4c15'/>
<id>urn:sha1:165992728d93125bb5319a18ce0cd2975c1d4c15</id>
<content type='text'>
This is slightly modified from the FreeBSD/head version, to include
version checks for the scanning changes for not only FreeBSD/head
(1000039 and higher) but also stable/9 (902502 and higher).

  ------------------------------------------------------------------------
  r255501 | ken | 2013-09-12 16:06:12 -0600 (Thu, 12 Sep 2013) | 18 lines

  Fix an issue that caused Integrated RAID volumes on LSI mps(4) controllers
  to not get scanned on boot.

  The problem originated in change 253549.  With the change to the mps(4)
  driver to scan only targets that it knows it has (as opposed to scanning
  the entire bus), scanning RAID volumes on boot was omitted.

  So, for versions of FreeBSD that have the scanning changes
  (__FreeBSD_version 1000039 and higher), scan RAID volumes that are added
  whether or not we're booting.

  PR:             kern/181784
  Reported by:    Xiguang Wang &lt;kurapica@gmail.com&gt;
  Tested by:      Dennis Glatting &lt;dg@pki2.com&gt;
  Sponsored by:   Spectra Logic

PR:		kern/181784
</content>
</entry>
<entry>
<title>MFC mps(4) driver changes 253460, 253549, 253550 and 254615.</title>
<updated>2013-08-26T21:34:43Z</updated>
<author>
<name>Kenneth D. Merry</name>
<email>ken@FreeBSD.org</email>
</author>
<published>2013-08-26T21:34:43Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6bc0d019358f750d6f3b6bc78902c1c8cce44a30'/>
<id>urn:sha1:6bc0d019358f750d6f3b6bc78902c1c8cce44a30</id>
<content type='text'>
There are some slight changes here from the version in head.

__FreeBSD_version has been bumped to 902502 for the inclusion of the
PIM_RESCAN CAM path inquiry flag.  The ifdefs in the mps(4) driver
have been changed accordingly.

In head, the TDP_NOSLEEPING thread flag has been removed but it
still exists in stable/9.

  ------------------------------------------------------------------------
  r253460 | scottl | 2013-07-18 18:12:41 -0600 (Thu, 18 Jul 2013) | 5 lines

  Overhaul error, information, and debug logging.

  Obtained from:	Netflix

  ------------------------------------------------------------------------
  r253549 | ken | 2013-07-22 12:37:07 -0600 (Mon, 22 Jul 2013) | 57 lines

  CAM and mps(4) driver scanning changes.

  Add a PIM_NOSCAN flag to the CAM path inquiry CCB.  This tells CAM
  not to perform a rescan on a bus when it is registered.

  We now use this flag in the mps(4) driver.  Since it knows what
  devices it has attached, it is more efficient for it to just issue
  a target rescan on the targets that are attached.

  Also, remove the private rescan thread from the mps(4) driver in
  favor of the rescan thread already built into CAM.  Without this
  change, but with the change above, the MPS scanner could run before
  or during CAM's initial setup, which would cause duplicate device
  reprobes and announcements.

  sys/param.h:
  	Bump __FreeBSD_version to 1000039 for the inclusion of the
  	PIM_RESCAN CAM path inquiry flag.

  sys/cam/cam_ccb.h:
  sys/cam/cam_xpt.c:
  	Added a PIM_NOSCAN flag.  If a SIM sets this in the path
  	inquiry ccb, then CAM won't rescan the bus in
  	xpt_bus_regsister.

  sys/dev/mps/mps_sas.c
  	For versions of FreeBSD that have the PIM_NOSCAN path
  	inquiry flag, don't freeze the sim queue during scanning,
  	because CAM won't be scanning this bus.  Instead, hold
  	up the boot.  Don't call mpssas_rescan_target in
  	mpssas_startup_decrement; it's redundant and I don't
  	know why it was in there.

  	Set PIM_NOSCAN in path inquiry CCBs.

  	Remove methods related to the internal rescan daemon.

  	Always use async events to trigger a probe for EEDP support.
  	In older versions of FreeBSD where AC_ADVINFO_CHANGED is
  	not available, use AC_FOUND_DEVICE and issue the
  	necessary READ CAPACITY manually.

  	Provide a path to xpt_register_async() so that we only
  	receive events for our own SCSI domain.

  	Improve error reporting in cases where setup for EEDP
  	detection fails.

  sys/dev/mps/mps_sas.h:
  	Remove softc flags and data related to the scanner thread.

  sys/dev/mps/mps_sas_lsi.c:
  	Unconditionally rescan the target whenever a device is added.

  Sponsored by:	Spectra Logic

  ------------------------------------------------------------------------
  r253550 | ken | 2013-07-22 12:41:53 -0600 (Mon, 22 Jul 2013) | 93 lines

  Merge in phase 14+ -&gt; 16 mps driver fixes from LSI:

  ---------------------------------------------------------------
  System panics during a Port reset with ouststanding I/O
  ---------------------------------------------------------------
  It is possible to call mps_mapping_free_memory after this
  memory is already freed, causing a panic. Removed this extra
  call to mps_mappiing_free_memory and call mps_mapping_exit
  in place of the mps_mapping_free_memory call so that any
  outstanding mapping items can be flushed before memory is
  freed.

  ---------------------------------------------------------------
  Correct memory leak during a Port reset with ouststanding I/O
  ---------------------------------------------------------------
  In mps_reinit function, the mapping memory was not being
  freed before being re-allocated. Added line to call the
  memory free function for mapping memory.

  ---------------------------------------------------------------
  Use CAM_SIM_QUEUED flag in Driver IO path.
  ---------------------------------------------------------------
  This flag informs the XPT that successful abort of a CCB
  requires an abort ccb to be issued to the SIM.  While
  processing SCSI IO's, set the CAM_SIM_QUEUED flag in the
  status for the IO. When the command completes, clear this
  flag.

  ---------------------------------------------------------------
  Check for CAM_REQ_INPROG in I/O path.
  ---------------------------------------------------------------
  Added a check in mpssas_action_scsiio for the In Progress
  status for the IO. If this flag is set, the IO has already
  been aborted by the upper layer (before CAM_SIM_QUEUED was
  set) and there is no need to send the IO. The request will
  be completed without error.

  ---------------------------------------------------------------
  Improve "doorbell handshake method" for mps_get_iocfacts
  ---------------------------------------------------------------
  Removed call to get Port Facts since this information is
  not used currently.

  Added mps_iocfacts_allocate function to allocate memory
  that is based on IOC Facts data.  Added mps_iocfacts_free
  function to free memory that is based on IOC Facts data.
  Both of the functions are used when a Diag Reset is performed
  or when the driver is attached/detached. This is needed in
  case IOC Facts changes after a Diag Reset, which could
  happen if FW is upgraded.

  Moved call of mps_bases_static_config_pages from the attach
  routine to after the IOC is ready to process accesses based
  on the new memory allocations (instead of polling through
  the Doorbell).

  ---------------------------------------------------------------
  Set TimeStamp in INIT message in millisecond format Set the IOC
  ---------------------------------------------------------------

  ---------------------------------------------------------------
  Prefer mps_wait_command to mps_request_polled
  ---------------------------------------------------------------
  Instead of using mps_request_polled, call mps_wait_command
  whenever possible. Change the mps_wait_command function to
  check the current context and either use interrupt context
  or poll if required by using the pause or DELAY function.
  Added a check after waiting 50mSecs to see if the command
  has timed out. This is only done if polliing, the msleep
  command will automatically timeout if the command has taken
  too long to complete.

  ---------------------------------------------------------------
  Integrated RAID: Volume Activation Failed error message is
  displayed though the volume has been activated.
  ---------------------------------------------------------------
  Instead of failing an IOCTL request that does not have a
  large enough buffer to hold the complete reply, copy as
  much data from the reply as possible into the user's buffer
  and log a message saying that the user's buffer was smaller
  than the returned data.

  ---------------------------------------------------------------
  mapping_add_new_device failure due to persistent table FULL
  ---------------------------------------------------------------
  When a new device is added, if it is determined that the
  device persistent table is being used and is full, instead
  of displaying a message for this condition every time, only
  log a message if the MPS_INFO bit is set in the debug_flags.

  Submitted by:	LSI

  ------------------------------------------------------------------------
  r254615 | ken | 2013-08-21 15:30:56 -0600 (Wed, 21 Aug 2013) | 32 lines

  Fix mps(4) driver breakage that came in in change 253550 that
  manifested itself in out of chain frame conditions.

  When the driver ran out of chain frames, the request in question
  would get completed early, and go through mpssas_scsiio_complete().

  In mpssas_scsiio_complete(), the negation of the CAM status values
  (CAM_STATUS_MASK | CAM_SIM_QUEUED) was ORed in instead of being
  ANDed in.  This resulted in a bogus CAM CCB status value.  This
  didn't show up in the non-error case, because the status was reset
  to something valid (e.g. CAM_REQ_CMP) later on in the function.

  But in the error case, such as when the driver ran out of chain
  frames, the CAM_REQUEUE_REQ status was ORed in to the bogus status
  value.  This led to the CAM transport layer repeatedly releasing
  the SIM queue, because it though that the CAM_RELEASE_SIMQ flag had
  been set.  The symptom was messages like this on the console when
  INVARIANTS were enabled:

  xpt_release_simq: requested 1 &gt; present 0
  xpt_release_simq: requested 1 &gt; present 0
  xpt_release_simq: requested 1 &gt; present 0

  mps_sas.c:	In mpssas_scsiio_complete(), use &amp;= to take status
  		bits out.  |= adds them in.

  		In the error case in mpssas_scsiio_complete(), set
  		the status to CAM_REQUEUE_REQ, don't OR it in.

  Sponsored by:	Spectra Logic

  ------------------------------------------------------------------------
</content>
</entry>
<entry>
<title>Merge r254263:</title>
<updated>2013-08-13T22:05:50Z</updated>
<author>
<name>Scott Long</name>
<email>scottl@FreeBSD.org</email>
</author>
<published>2013-08-13T22:05:50Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=cffe159b0e61cee6bce082f4bd05a4f06a1d53a9'/>
<id>urn:sha1:cffe159b0e61cee6bce082f4bd05a4f06a1d53a9</id>
<content type='text'>
Update PCI drivers to no longer look at the MEMIO-enabled bit in the PCI
command register.  The lazy BAR allocation code in FreeBSD sometimes
disables this bit when it detects a range conflict, and will re-enable
it on demand when a driver allocates the BAR.  Thus, the bit is no longer
a reliable indication of capability, and should not be checked.  This
results in the elimination of a lot of code from drivers, and also gives
the opportunity to simplify a lot of drivers to use a helper API to set
the busmaster enable bit.

This changes fixes some recent reports of disk controllers and their
associated drives/enclosures disappearing during boot.

Candidate for 9.2

Submitted by:	jhb
Reviewed by:	jfv, marius, adrian, achim
</content>
</entry>
</feed>
