freebsd-dev/sbin
Justin T. Gibbs 3501942bbe Lay groundwork in CAM for recording and reporting physical path and
other device attributes stored in the CAM Existing Device Table (EDT).
This includes some infrastructure requried by the enclosure services
driver to export physical path information.

Make the CAM device advanced info interface accept store requests.

  sys/cam/scsi/scsi_all.c:
  sys/cam/scsi/scsi_all.h:
	- Replace scsi_get_sas_addr() with a scsi_get_devid() which takes
	  a callback that decides whether to accept a particular descriptor.
	  Provide callbacks for NAA IEEE Registered addresses and for SAS
	  addresses, replacing the old function.  This is needed because
	  the old function doesn't work for an enclosure address for a SAS
	  device, which is not flagged as a SAS address, but is NAA IEEE
	  Registered.  It may be worthwhile merging this interface with the
	  devid match interface.
	- Add a few more defines for some device ID fields.

  sbin/camcontrol/camcontrol.c:
	- Update for the CCB_DEV_ADVINFO interface change.

  cam/cam_xpt_internal.h:
	- Add the new fields for the physical path string to the CAM EDT.
  cam/cam_ccb.h:
	- Rename CCB_GDEV_ADVINFO to simply CCB_DEV_ADVINFO, and the ccb
	  structure to ccb_dev_advinfo.
	- Add a flag that changes this CCB's action to store, rather than
	  the default, retrieve.
	- Add a new buffer type, CDAI_TYPE_PHYS_PATH, for the new CAM EDT
	  physpath field.
	- Remove the never-implemented transport & proto flags.
  cam/cam_xpt.c:
  cam/cam_xpt.h:
	- Add xpt_getattr(), which provides a wrapper for fetching a device's
	  attribute using the GEOM strings as key.  This method currently
	  supports "GEOM::ident" and "GEOM::physpath".

Submitted by: will
Reviewed by : gibbs

Extend the XPT_DEV_MATCH api to allow a device search by device ID.
As far as the API is concerned, device ID is a binary blob to be
interpreted by the transport layer.  The SCSI implementation assumes
it is an array of VPD device ID descriptors.

  sys/cam/cam_ccb.h:
	Create a new structure, device_id_match_pattern, and
	update the XPT_DEV_MATCH datastructures and flags so
	that this pattern type can be used.

  sys/cam/cam_xpt.c:
	- A single pattern matching on both inquiry data and device
	  ID is invalid.  Report any violators.
	- Pass device ID match requests through to the new routine
	  scsi_devid_match().  The direct call of a SCSI routine is
	  a layering violation, but no worse than the one a few
	  lines up that checks inquiry data.  Defer cleaning this
	  up until our future, larger, rototilling of CAM.
	- Zero out cam_ed and cam_et nodes on allocation.  Prior to
	  this change, device_id_len and device_id were not inialized,
	  preventing proper detection of the presence of this
	  information.

  sys/cam/scsi/scsi_all.c:
  sys/cam/scsi/scsi_all.h:
	Add the scsi_match_devid() routine.

Add a helper function for extracting peripherial driver names

  sys/cam/cam_periph.c:
  sys/cam/cam_periph.h:
	Add the cam_periph_list() method which fills an sbuf
	with a comma delimited list of the peripheral instances
	associated with a given CAM path.

Add a helper functions for SCSI commands used by the SES driver.

  sys/cam/scsi/scsi_all.c:
  sys/cam/scsi/scsi_all.h:
	Add structure definitions and csio filling functions for
	the receive diagnostic results and send diagnostic commands.

Misc CAM XPT cleanups.

  sys/cam/cam_xpt.c:
	Broadcast AC_FOUND_DEVICE and AC_PATH_REGISTERED
	events at the time async event handlers are attached
	even when registering just for events on a partitular
	SIM.  Previously, you had to register for these
	events on all SIMs in the system in order to get
	the initial broadcast even though subsequent device
	and path arrivals would be delivered.

  sys/cam/cam_xpt.c:
	Remove SIM mutex held asserts from path accessors.
	CAM paths are reference counted and it is this
	reference count, not the sim mutex, that garantees
	they are stable.

Sponsored by: Spectra Logic Corporation
2011-06-14 14:53:17 +00:00
..
adjkerntz
atacontrol Re-encode files from ISO-8859-1 to UTF-8 2011-05-22 14:03:30 +00:00
atm MFtbemd: 2010-08-23 22:24:11 +00:00
badsect
bsdlabel Widen fields that display partition offset/length. 2011-03-10 08:24:33 +00:00
camcontrol Lay groundwork in CAM for recording and reporting physical path and 2011-06-14 14:53:17 +00:00
ccdconfig mdoc: drop redundant .Pp and .LP calls 2010-10-08 12:40:16 +00:00
clri
comcontrol
conscontrol Changed "conscontrol unset" to accept an existing virtual 2011-04-18 20:28:07 +00:00
ddb Plug an fd leak 2010-11-22 07:00:47 +00:00
devd Typo. For USB devices, 'serial' should be 'sernum'. 2011-05-10 02:34:11 +00:00
devfs
dhclient Use resolvconf(8) to update /etc/resolv.conf. 2011-03-18 12:23:20 +00:00
dmesg
dump The dump, fsck_ffs, fsdb, fsirand, newfs, makefs, and quot utilities 2011-01-24 06:17:05 +00:00
dumpfs We now have multiple filesystems (UFS, ZFS, ...), so for tools that only 2011-05-08 12:34:31 +00:00
dumpon
fdisk Supply maximum value as an argument to the decimal() function 2011-01-25 04:35:07 +00:00
fdisk_pc98
ffsinfo
fsck Fix typos and spelling mistakes. 2010-08-06 14:33:42 +00:00
fsck_ffs Implement fully asynchronous partial truncation with softupdates journaling 2011-06-10 22:48:35 +00:00
fsck_msdosfs
fsdb The dump, fsck_ffs, fsdb, fsirand, newfs, makefs, and quot utilities 2011-01-24 06:17:05 +00:00
fsirand The dump, fsck_ffs, fsdb, fsirand, newfs, makefs, and quot utilities 2011-01-24 06:17:05 +00:00
gbde MFtbemd: 2010-08-23 22:24:11 +00:00
geom Do not use LCM from stripesize and user specified alignment value. 2011-06-07 11:11:11 +00:00
ggate Because ggatel(8) operates on local GEOM providers, use unlimited queue size in 2011-04-02 06:59:05 +00:00
growfs We now have multiple filesystems (UFS, ZFS, ...), so for tools that only 2011-05-08 12:34:31 +00:00
gvinum * Add the readline(3) API to libedit. The libedit versions of 2011-04-05 18:41:01 +00:00
hastctl Keep statistics on number of BIO_READ, BIO_WRITE, BIO_DELETE and BIO_FLUSH 2011-05-23 21:15:19 +00:00
hastd Read from the socket using the same max buffer size as we use while 2011-06-04 16:01:30 +00:00
ifconfig Grab one of the ifcap bits for netmap, and enable printing in ifconfig. 2011-06-14 12:40:55 +00:00
init init(8): Document that login(1) is now responsible for recording logouts. 2011-01-23 14:54:45 +00:00
ipf
ipfw Implement "global" mode for ipfw nat. It is similar to natd(8) 2011-06-14 13:35:24 +00:00
iscontrol Fix compilation with debug on. 2011-01-25 22:25:16 +00:00
kldconfig
kldload Make flags in usage() and SYNOPSYS more style(9)-ish. 2010-08-30 07:29:27 +00:00
kldstat In printfile(), exit the process instead of only printing the warning. 2010-11-13 16:49:07 +00:00
kldunload
ldconfig
mca
md5
mdconfig Somewhere around the 473rd time I mistyped "mdconfig file" instead of 2011-04-29 22:40:11 +00:00
mdmfs
mknod Fix some more warnings found by clang. 2010-11-22 20:10:48 +00:00
mksnap_ffs Note that a UFS filesystem can have up to 20 active snapshots. 2011-02-15 07:25:54 +00:00
mount Add a special mount option "failok" to indicate that the administrator wants 2011-06-07 18:48:49 +00:00
mount_cd9660
mount_ext2fs
mount_hpfs
mount_msdosfs
mount_nfs Implemented a mount option "nocto" that disables cache coherency 2011-05-04 13:27:45 +00:00
mount_ntfs
mount_nullfs
mount_reiserfs Re-encode files from ISO-8859-1 to UTF-8 2011-05-22 14:03:30 +00:00
mount_std
mount_udf
mount_unionfs Fix SYNOPSIS. 2011-03-23 13:44:09 +00:00
natd Furthermore condition IP waiting behaviour also on -dynamic flag. 2011-04-18 23:45:50 +00:00
newfs Update the manual page to reflect the new 32K/4K defaults. 2011-05-28 15:14:50 +00:00
newfs_msdos MFtbemd: 2010-08-23 22:24:11 +00:00
nfsiod
nos-tun
pfctl
pflogd Append to CFLAGS, don't clobber it. 2010-11-05 11:31:39 +00:00
ping
ping6 Add __unused. Ansi prototypes. 2010-12-19 13:40:38 +00:00
quotacheck
rcorder Bump .Dd 2011-06-06 13:18:29 +00:00
reboot Remove vestiges of disklabel(5). 2011-04-14 08:53:04 +00:00
recoverdisk recoverdisk(8): treat output file consistently and abort on EINVAL 2011-05-01 20:14:10 +00:00
resolvconf Add resolvconf(8) which manages resolv.conf. 2011-03-18 12:18:52 +00:00
restore mdoc: make pages render with mandoc 2010-10-21 12:27:13 +00:00
route - Fix array bounds checking. [1] 2010-12-08 15:12:37 +00:00
routed Fix use of AND operator: should be bitwise instead of logical. 2010-11-22 19:40:27 +00:00
rtsol Add dump.c to the rtsol build. It is needed now that sec2str is non-static 2011-06-08 21:59:07 +00:00
savecore Remove the advertising clause from UCB copyrighted files in sbin. This 2010-12-12 21:26:12 +00:00
sconfig
setkey mdoc: fix markup 2011-06-02 09:56:42 +00:00
shutdown For compatibility with Linux and Solaris add poweroff(8). 2010-12-30 18:06:31 +00:00
spppcontrol
sunlabel mdoc: drop even more redundant .Pp calls 2010-10-19 12:35:40 +00:00
swapon
sysctl Introduce signed and unsigned version of CTLTYPE_QUAD, renaming 2011-01-19 23:00:25 +00:00
tunefs We now have multiple filesystems (UFS, ZFS, ...), so for tools that only 2011-05-08 12:34:31 +00:00
umount Add a sentence to the umount.8 man page to clarify the behaviour 2011-05-31 18:27:18 +00:00
Makefile Add resolvconf(8) which manages resolv.conf. 2011-03-18 12:18:52 +00:00
Makefile.amd64 MF tbemd: Move to using Makefile.arch to select what to build. 2010-09-13 02:25:21 +00:00
Makefile.arm MF tbemd: Move to using Makefile.arch to select what to build. 2010-09-13 02:25:21 +00:00
Makefile.i386 MF tbemd: Move to using Makefile.arch to select what to build. 2010-09-13 02:25:21 +00:00
Makefile.ia64 MF tbemd: Move to using Makefile.arch to select what to build. 2010-09-13 02:25:21 +00:00
Makefile.inc
Makefile.mips MF tbemd: Move to using Makefile.arch to select what to build. 2010-09-13 02:25:21 +00:00
Makefile.pc98 MF tbemd: Move to using Makefile.arch to select what to build. 2010-09-13 02:25:21 +00:00
Makefile.sparc64 MF tbemd: Move to using Makefile.arch to select what to build. 2010-09-13 02:25:21 +00:00