]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r317774, r317776
authorken <ken@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 8 May 2017 17:02:03 +0000 (17:02 +0000)
committerken <ken@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 8 May 2017 17:02:03 +0000 (17:02 +0000)
commit7bb8643429d499604244b7e5935abacc6523371e
tree8b2c6e0911abc4d00ea27fe136781701597fa9c1
parentdcbcb185964c869fb41a3874379c4c9d5f0d3bdd
MFC r317774, r317776

r317774:
  Add the ability to rescan or reset devices specified by peripheral
  name and unit number in camcontrol(8).

  Previously camcontrol(8) only supported rescanning or resetting
  devices specified by bus:target:lun.  This is because for
  rescanning at least, you don't have a peripheral name and unit
  number (e.g. da4) for devices that don't exist yet.

  That is still the case after this change, but in other cases, when
  the device does exist in the CAM EDT (Existing Device Table), we
  do a careful lookup of the bus/target/lun if the user supplies a
  peripheral name and unit number to find the bus:target:lun and then
  issue the requested reset or rescan.

  The lookup is done without actually opening the device in question,
  since a rescan is often done to make a device go away after it has
  been pulled.  (This is especially true for busses/controllers, like
  parallel SCSI controllers, that don't automatically detect changes
  in topology.)  Opening a device that is no longer there to
  determine the bus/target/lun might result in error recovery actions
  when the user really just wanted to make the device go away.

  sbin/camcontrol/camcontrol.c:
   In dorescan_or_reset(), if the use hasn't specified a
   numeric argument, assume he has specified a device.  Lookup
   the pass(4) instance for that device using the transport
   layer CAMGETPASSTHRU ioctl.  If that is successful, we can
   use the returned bus:target:lun to rescan or reset the
   device.

   Under the hood, resetting a device using XPT_RESET_DEV is
   actually sent via the pass(4) device anyway.  But this
   provides a way for the user to specify devices in a more
   convenient way, and can work on device rescans when the
   device is going away, assuming it still exists in the EDT.

  sbin/camcontrol/camcontrol.8:
   Update the man page for the rescan and reset subcommands
   to reflect that you can now use a device name and unit
   number with them.

Sponsored by: Spectra Logic

r317776:
  Bump the camcontrol(8) man page date.

Sponsored by: Spectra Logic

git-svn-id: svn://svn.freebsd.org/base/stable/10@317947 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sbin/camcontrol/camcontrol.8
sbin/camcontrol/camcontrol.c