freebsd-dev/sys/conf
Kenneth D. Merry 06e794928b Add Serial Management Protocol (SMP) passthrough support to CAM.
This includes support in the kernel, camcontrol(8), libcam and the mps(4)
driver for SMP passthrough.

The CAM SCSI probe code has been modified to fetch Inquiry VPD page 0x00
to determine supported pages, and will now fetch page 0x83 in addition to
page 0x80 if supported.

Add two new CAM CCBs, XPT_SMP_IO, and XPT_GDEV_ADVINFO.  The SMP CCB is
intended for SMP requests and responses.  The ADVINFO is currently used to
fetch cached VPD page 0x83 data from the transport layer, but is intended
to be extensible to fetch other types of device-specific data.

SMP-only devices are not currently represented in the CAM topology, and so
the current semantics are that the SIM will route SMP CCBs to either the
addressed device, if it contains an SMP target, or its parent, if it
contains an SMP target.  (This is noted in cam_ccb.h, since it will change
later once we have the ability to have SMP-only devices in CAM's topology.)

smp_all.c,
smp_all.h:		New helper routines for SMP.  This includes
			SMP request building routines, response parsing
			routines, error decoding routines, and structure
			definitions for a number of SMP commands.

libcam/Makefile:	Add smp_all.c to libcam, so that SMP functionality
			is available to userland applications.

camcontrol.8,
camcontrol.c:		Add smp passthrough support to camcontrol.  Several
			new subcommands are now available:

			'smpcmd' functions much like 'cmd', except that it
			allows the user to send generic SMP commands.

			'smprg' sends the SMP report general command, and
			displays the decoded output.  It will automatically
			fetch extended output if it is available.

			'smppc' sends the SMP phy control command, with any
			number of potential options.  Among other things,
			this allows the user to reset a phy on a SAS
			expander, or disable a phy on an expander.

			'smpmaninfo' sends the SMP report manufacturer
			information and displays the decoded output.

			'smpphylist' displays a list of phys on an
			expander, and the CAM devices attached to those
			phys, if any.

cam.h,
cam.c:			Add a status value for SMP errors
			(CAM_SMP_STATUS_ERROR).

			Add a missing description for CAM_SCSI_IT_NEXUS_LOST.

			Add support for SMP commands to cam_error_string().

cam_ccb.h:		Rename the CAM_DIR_RESV flag to CAM_DIR_BOTH.  SMP
			commands are by nature bi-directional, and we may
			need to support bi-directional SCSI commands later.

			Add the XPT_SMP_IO CCB.  Since SMP commands are
			bi-directional, there are pointers for both the
			request and response.

			Add a fill routine for SMP CCBs.

			Add the XPT_GDEV_ADVINFO CCB.  This is currently
			used to fetch cached page 0x83 data from the
			transport later, but is extensible to fetch many
			other types of data.

cam_periph.c:		Add support in cam_periph_mapmem() for XPT_SMP_IO
			and XPT_GDEV_ADVINFO CCBs.

cam_xpt.c:		Add support for executing XPT_SMP_IO CCBs.

cam_xpt_internal.h:	Add fields for VPD pages 0x00 and 0x83 in struct
			cam_ed.

scsi_all.c:		Add scsi_get_sas_addr(), a function that parses
			VPD page 0x83 data and pulls out a SAS address.

scsi_all.h:		Add VPD page 0x00 and 0x83 structures, and a
			prototype for scsi_get_sas_addr().

scsi_pass.c:		Add support for mapping buffers in XPT_SMP_IO and
			XPT_GDEV_ADVINFO CCBs.

scsi_xpt.c:		In the SCSI probe code, first ask the device for
			VPD page 0x00.  If any VPD pages are supported,
			that page is required to be implemented.  Based on
			the response, we may probe for the serial number
			(page 0x80) or device id (page 0x83).

			Add support for the XPT_GDEV_ADVINFO CCB.

sys/conf/files:		Add smp_all.c.

mps.c:			Add support for passing in a uio in mps_map_command(),
			so we can map a S/G list at once.

			Add support for SMP passthrough commands in
			mps_data_cb().  SMP is a special case, because the
			first buffer in the S/G list is outbound and the
			second buffer is inbound.

			Add support for warning the user if the busdma code
			comes back with more buffers than will work for the
			command.  This will, for example, help the user
			determine why an SMP command failed if busdma comes
			back with three buffers.

mps_pci.c:		Add sys/uio.h.

mps_sas.c:		Add the SAS address and the parent handle to the
			list of fields we pull from device page 0 and cache
			in struct mpssas_target.  These are needed for SMP
			passthrough.

			Add support for the XPT_SMP_IO CCB.  For now, this
			CCB is routed to the addressed device if it supports
			SMP, or to its parent if it does not and the parent
			does.  This is necessary because CAM does not
			currently support SMP-only nodes in the topology.

			Make SMP passthrough support conditional on
			__FreeBSD_version >= 900026.  This will make it
			easier to MFC this change to the driver without
			MFCing the CAM changes as well.

mps_user.c:		Un-staticize mpi_init_sge() so we can use it for
			the SMP passthrough code.

mpsvar.h:		Add a uio and iovecs into struct mps_command for
			SMP passthrough commands.

			Add a cm_max_segs field to struct mps_command so
			that we can warn the user if busdma comes back with
			too many segments.

			Clear the cm_reply when a command gets freed.  If
			it is not cleared, reply frames will eventually get
			freed into the pool multiple times and corrupt the
			pool.  (This fix is from scottl.)

			Add a prototype for mpi_init_sge().

sys/param.h:		Bump __FreeBSD_version to 900026 for the for the
			inclusion of the XPT_GDEV_ADVINFO and XPT_SMP_IO
			CAM CCBs.
2010-11-30 22:39:46 +00:00
..
defines
files Add Serial Management Protocol (SMP) passthrough support to CAM. 2010-11-30 22:39:46 +00:00
files.amd64 Refactor acpi_machdep.c for amd64 and i386, move APM emulation into a new 2010-11-10 01:29:56 +00:00
files.arm Move MRVL FDT fixups and PIC decode routine to a platform specific area. 2010-07-19 18:41:50 +00:00
files.i386 MFamd64: (based on) r209957 2010-11-12 20:55:14 +00:00
files.ia64 Provide groundwork for 32-bit binary compatibility on non-x86 platforms, 2010-03-11 14:49:06 +00:00
files.mips - Add minidump support for FreeBSD/mips 2010-11-07 03:09:02 +00:00
files.pc98 Merge nexus.c from amd64 and i386 to x86 subtree. 2010-10-28 16:31:39 +00:00
files.powerpc Remove use of a separate ofw_pmap on 32-bit CPUs. Many Open Firmware 2010-11-12 05:12:38 +00:00
files.sparc64 Adapt sparc64 and sun4v timer code for the new event timers infrastructure. 2010-07-29 12:08:46 +00:00
files.sun4v Adapt sparc64 and sun4v timer code for the new event timers infrastructure. 2010-07-29 12:08:46 +00:00
kern.mk Prefer MACHINE_CPUARCH over MACHINE_ARCH 2010-09-13 07:27:03 +00:00
kern.post.mk Add an x86/include directory to the kernel to hold headers that are common 2010-11-01 17:34:04 +00:00
kern.pre.mk Bump up MIPS limits once again; the new Cavium Octeon SDK requires even higher 2010-11-28 08:09:20 +00:00
kmod_syms.awk
kmod.mk Add an x86/include directory to the kernel to hold headers that are common 2010-11-01 17:34:04 +00:00
ldscript.amd64
ldscript.arm
ldscript.i386
ldscript.ia64
ldscript.mips Let the linker pick the right output format automatically 2010-11-13 18:38:35 +00:00
ldscript.mips.64 64 bit ld script for mips, and configuration file for 64 bit compilation 2010-07-08 16:06:58 +00:00
ldscript.mips.64.cfe Add 64-bit SWARM board kernel configs. 2010-09-15 05:32:10 +00:00
ldscript.mips.cfe Use KERNLOADADDR instead of hardcoded address. This is required to be able to 2010-02-22 01:48:38 +00:00
ldscript.mips.mips64 Put back KERNLOADADDR. 2009-09-09 00:46:11 +00:00
ldscript.mips.n32 Add linker script and configuration file for n32 kernel. 2010-06-24 10:14:31 +00:00
ldscript.mips.octeon1.32 Harmonize Octeon ldscripts, reducing gratuitous diffs and using KERNLOADADDR in 2010-03-05 23:03:20 +00:00
ldscript.mips.octeon1.64 Use a single program header to fix loading 64-bit kernels on old versions of 2010-09-27 19:45:34 +00:00
ldscript.mips.octeon1.n32 Harmonize Octeon ldscripts, reducing gratuitous diffs and using KERNLOADADDR in 2010-03-05 23:03:20 +00:00
ldscript.powerpc Avoid hardcoding the kernel link address in the linker script. 2008-02-27 00:03:23 +00:00
ldscript.powerpc64 Add powerpc64 kernel ldscript. 2010-07-13 05:43:43 +00:00
ldscript.sparc64
Makefile.amd64 Add a kernel option for amd64 to compile with the frame on the stack 2008-05-23 03:52:55 +00:00
Makefile.arm Convert Marvell ARM platforms to FDT convention. 2010-06-13 13:28:53 +00:00
Makefile.i386
Makefile.ia64
Makefile.mips Complete the integration of tbemd branch into head. 2010-11-10 06:39:49 +00:00
Makefile.pc98
Makefile.powerpc MFppc64: 2010-07-13 05:32:19 +00:00
Makefile.sparc64
Makefile.sun4v
makeLINT.mk Unbreak the LINT kernel on powerpc64. Note that the LINT kernel 2010-08-19 03:19:26 +00:00
makeLINT.sed
newvers.sh Clean up stray line in 213077 2010-09-23 17:29:59 +00:00
NOTES Add ISP_INTERNAL_TARGET as an option for isp(4). 2010-11-27 20:38:26 +00:00
options Add ISP_INTERNAL_TARGET as an option for isp(4). 2010-11-27 20:38:26 +00:00
options.amd64 Merging mptable under x86 left this option undefined for amd64 case. 2010-10-29 18:38:36 +00:00
options.arm Add options I missed in the additionnal AT91 support commits. 2010-10-07 09:30:35 +00:00
options.i386 Make NKPT a kernel option on i386 so that it can be set to a non-default 2010-03-10 19:50:52 +00:00
options.ia64 Provide groundwork for 32-bit binary compatibility on non-x86 platforms, 2010-03-11 14:49:06 +00:00
options.mips Nothing uses TARGET_EMULATOR, so gc it. 2010-08-15 19:07:44 +00:00
options.pc98 Unbreak the build for pc98. Specify the newly introduced, for ia32, 2010-01-16 12:24:12 +00:00
options.powerpc Add a driver for the Apple Uninorth AGP host bridge found in all PowerPC 2010-10-31 18:27:05 +00:00
options.sparc64 Add a driver for the `Fire' JBus to PCIe bridges found in at least 2009-12-27 16:55:44 +00:00
options.sun4v
systags.sh