]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC mpr(4) driver changes.
authorken <ken@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 9 May 2014 03:59:12 +0000 (03:59 +0000)
committerken <ken@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 9 May 2014 03:59:12 +0000 (03:59 +0000)
commit0d3c7790b4d394f6aacbec30dcd0208c437cc858
treee3be7144ec4e5b15386f072768898e1592172630
parentb7366682b5abc262119391f8557f4b3d813c0b02
MFC mpr(4) driver changes.

This includes r265386, r265424, and r265473.

  ------------------------------------------------------------------------
  r265386 | ken | 2014-05-05 13:53:03 -0600 (Mon, 05 May 2014) | 15 lines

  Adjust #if statements inside mprsas_send_smpcmd() to more accurately
  reflect when unmapped I/O support was added.

  For FreeBSD 10, it arrived just prior to __FreeBSD_version 1000028.
  For FreeBSD 9, it arrived just prior to __FreeBSD_version 902001.

  Also, fix compiler warnings in mprsas_send_smpcmd() that happen in the
  i386 PAE build for non-unmapped I/O builds.  These were fixed in mps(4)
  in revision 241145, but didn't make it into the mpr(4) driver.  This
  change should only affect FreeBSD versions outside the above revisions,
  and thus doesn't affect head.

  Sponsored by: Spectra Logic Corporation

  ------------------------------------------------------------------------
  ------------------------------------------------------------------------
  r265424 | ken | 2014-05-06 00:18:43 -0600 (Tue, 06 May 2014) | 33 lines

  Fix a problem with async notifications in the mpr(4) driver.

  This problem only occurs on versions of FreeBSD prior to the recent CAM
  locking changes.  (i.e. stable/9 and older versions of stable/10)  This
  change should be a no-op for head and stable/10.

  If a path isn't specified, xpt_register_async() will create a fully
  wildcarded path and acquire a lock (the XPT lock in older versions,
  and via xpt_path_lock() in newer versions) to call xpt_action() for the
  XPT_SASYNC_CB CCB.  It will then drop the lock and if the requested event
  includes AC_FOUND_DEVICE or AC_PATH_REGISTERED, it will get the caller up
  to date with any device arrivals or path registrations.

  The issue is that before the locking changes, each SIM lock would get
  acquired in turn during the EDT tree traversal process.  If a path is
  specified for xpt_register_async(), it won't acquire and drop its own lock,
  but instead expects the caller to hold its own SIM lock.  That works for
  the first part of xpt_register_async(), but causes a recursive lock
  acquisition once the EDT traversal happens and it comes to the SIM in
  question.  And it isn't possible to call xpt_action() without holding a SIM
  lock.

  The locking changes fix this by using the XPT topology lock for EDT
  traversal, so it is no longer an issue to hold the SIM lock while calling
  xpt_register_async().

  The solution for FreeBSD versions before the locking changes is to request
  notification of all device arrivals (so we pass a NULL path into
  xpt_register_async()) and then filter out the arrivals that are not ours.

  Sponsored by: Spectra Logic Corporation

  ------------------------------------------------------------------------
  ------------------------------------------------------------------------
  r265473 | ken | 2014-05-06 16:13:38 -0600 (Tue, 06 May 2014) | 7 lines

  Change the device name for mpr(4) from /dev/mpr_N to /dev/mprN.

  This is more consistent with the existing mps(4) behavior.

  Reviewed by: Steve McConnell <stephen.mcconnell@avagotech.com>

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

Sponsored by: LSI, Spectra Logic

git-svn-id: svn://svn.freebsd.org/base/stable/10@265730 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/dev/mpr/mpr_sas.c
sys/dev/mpr/mpr_user.c