freebsd-dev/sys
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
..
amd64 Enable sound support by default on i386 and amd64. 2011-06-11 09:08:46 +00:00
arm MFC 2011-05-13 20:58:48 +00:00
boot Upgrade our copy of llvm/clang to r132879, from upstream's trunk. 2011-06-12 18:01:31 +00:00
bsm
cam Lay groundwork in CAM for recording and reporting physical path and 2011-06-14 14:53:17 +00:00
cddl Remove C constructs that are incompatible with C++ from various 2011-06-10 20:10:30 +00:00
compat Commit the missing linux_videdev2_compat.h (lost somewhere between 2011-05-04 13:09:20 +00:00
conf - Eliminate an incorrect include path from the mthca build. 2011-06-10 22:38:31 +00:00
contrib Add _mbuf() variants of various inpcb-related interfaces, including lookup, 2011-06-04 16:33:06 +00:00
crypto
ddb Fix making kernel dumps from the debugger by creating a command 2011-06-07 01:28:12 +00:00
dev Several enhancements to the Xen block back driver. 2011-06-13 20:36:29 +00:00
fs Add support for flock(2) locks to the new NFSv4 client. I think this 2011-06-05 20:22:56 +00:00
gdb
geom MFC 2011-06-03 17:09:15 +00:00
gnu Fix typo in unused function name 2011-05-22 09:58:48 +00:00
i386 Enable sound support by default on i386 and amd64. 2011-06-11 09:08:46 +00:00
ia64 Add the model number for the Montvale processor (marketed as Itanium 2 9100). 2011-06-11 02:22:11 +00:00
isa Move VT switching hack for suspend/resume from bus drivers to syscons.c 2011-05-09 18:46:49 +00:00
kern Instead of using an atomic operation to determine whether the devstat(9) 2011-06-13 22:08:24 +00:00
kgssapi
libkern
mips MFC 2011-06-04 22:05:20 +00:00
modules Rename recently added USB serial driver. 2011-06-04 20:40:24 +00:00
net Grab one of the ifcap bits for netmap, and enable printing in ifconfig. 2011-06-14 12:40:55 +00:00
net80211 Certain adapters have HT40 support on some but not all channels. The 2011-06-04 15:05:32 +00:00
netatalk
netgraph Sync ng_nat with recent (r222806) ipfw_nat changes: 2011-06-07 06:48:42 +00:00
netinet Implement "global" mode for ipfw nat. It is similar to natd(8) 2011-06-14 13:35:24 +00:00
netinet6 Add the missing call to ip6_ipsec_filtertunnel() to be able to control 2011-06-08 10:59:36 +00:00
netipsec Release SP's refcount in key_get_spdbyid(). 2011-05-09 13:16:21 +00:00
netipx
netnatm
netncp
netsmb
nfs Change the sysctl naming for the old and new NFS clients 2011-05-15 20:52:43 +00:00
nfsclient In the VOP_PUTPAGES() implementations, change the default error from 2011-06-01 21:00:28 +00:00
nfsserver Add a lock flags argument to the VFS_FHTOVP() file system 2011-05-22 01:07:54 +00:00
nlm Add a lock flags argument to the VFS_FHTOVP() file system 2011-05-22 01:07:54 +00:00
ofed MFC 2011-05-27 16:09:10 +00:00
opencrypto After the r219999 is merged to stable/8, rename fallocf(9) to falloc(9) 2011-04-01 13:28:34 +00:00
pc98 - Reduce diffs against i386. 2011-06-13 13:24:33 +00:00
pci Do a sweep of the tree replacing calls to pci_find_extcap() with calls to 2011-03-23 13:10:15 +00:00
powerpc Follow up r222980 on PowerPC: add sound(4) and common device drivers 2011-06-11 12:34:08 +00:00
rpc This patch is believed to fix a problem in the kernel rpc for 2011-04-27 18:19:26 +00:00
security
sparc64 - Merge r222980 from x86: add sound(4) and common device drivers. 2011-06-13 12:45:19 +00:00
sys Implement fully asynchronous partial truncation with softupdates journaling 2011-06-10 22:48:35 +00:00
teken mdoc: reorder sections consistently 2011-06-02 09:56:53 +00:00
tools GNU awk does not output escaped newlines in multi-line printc statements. This 2011-03-31 21:33:33 +00:00
ufs Use alternative, less messy solution to avoid breakage after r223020: 2011-06-13 16:05:41 +00:00
vm Assert that page is VPO_BUSY or page owner object is locked in 2011-06-11 20:15:19 +00:00
x86 Tidy up r222866. 2011-06-08 23:44:59 +00:00
xdr
xen Monitor and emit events for XenStore changes to XenBus trees 2011-06-11 04:59:01 +00:00
Makefile Include sys/xen in cscope tag file generation. 2011-06-10 20:51:41 +00:00