freebsd-skq/sys/cam/scsi
gibbs 19d8ec29e2 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
..
scsi_all.c Lay groundwork in CAM for recording and reporting physical path and 2011-06-14 14:53:17 +00:00
scsi_all.h Lay groundwork in CAM for recording and reporting physical path and 2011-06-14 14:53:17 +00:00
scsi_cd.c scsi_cd: silence READ_TOC errors in CDIOREADTOCHEADER ioctl 2011-05-07 10:06:43 +00:00
scsi_cd.h
scsi_ch.c Make CAM report devices with ATA/SATA transport to devstat(9) as IDE. 2011-04-14 21:25:32 +00:00
scsi_ch.h Make additional definitions up to and including SPC-4. Add in definitions 2010-06-08 05:14:18 +00:00
scsi_da.c Move a comment to the right place. The rearrange done in r208928 left 2011-04-16 08:38:11 +00:00
scsi_da.h
scsi_dvcfg.h
scsi_iu.h
scsi_low_pisa.c
scsi_low_pisa.h
scsi_low.c MFp4: Large set of CAM inprovements. 2010-01-28 08:41:30 +00:00
scsi_low.h Add a new 'why' argument to kdb_enter(), and a set of constants to use 2007-12-25 17:52:02 +00:00
scsi_message.h
scsi_pass.c Lay groundwork in CAM for recording and reporting physical path and 2011-06-14 14:53:17 +00:00
scsi_pass.h
scsi_pt.c Make CAM report devices with ATA/SATA transport to devstat(9) as IDE. 2011-04-14 21:25:32 +00:00
scsi_pt.h
scsi_sa.c Make CAM report devices with ATA/SATA transport to devstat(9) as IDE. 2011-04-14 21:25:32 +00:00
scsi_sa.h
scsi_ses.c Remove extraneous semicolons, no functional changes. 2010-01-07 21:01:37 +00:00
scsi_ses.h Change new constant names to ones used by OpenSolaris. 2011-05-27 03:44:47 +00:00
scsi_sg.c Make CAM report devices with ATA/SATA transport to devstat(9) as IDE. 2011-04-14 21:25:32 +00:00
scsi_sg.h A fix for the SG_GET_TIMEOUT function slipped into a previous commit by 2007-04-10 20:03:42 +00:00
scsi_targ_bh.c Remove extraneous semicolons, no functional changes. 2010-01-07 21:01:37 +00:00
scsi_target.c Fix two (very common) occurrences of s/sytem/system in comments. 2010-08-02 18:06:49 +00:00
scsi_targetio.h
scsi_xpt.c Lay groundwork in CAM for recording and reporting physical path and 2011-06-14 14:53:17 +00:00
smp_all.c Add Serial Management Protocol (SMP) passthrough support to CAM. 2010-11-30 22:39:46 +00:00
smp_all.h Add Serial Management Protocol (SMP) passthrough support to CAM. 2010-11-30 22:39:46 +00:00