head	1.27;
access;
symbols
	RELENG_8_4:1.25.0.2
	RELENG_9_1_0_RELEASE:1.21.2.2.2.2
	RELENG_9_1:1.21.2.2.0.2
	RELENG_9_1_BP:1.21.2.2
	RELENG_8_3_0_RELEASE:1.16.2.5.2.1
	RELENG_8_3:1.16.2.5.0.2
	RELENG_8_3_BP:1.16.2.5
	RELENG_9_0_0_RELEASE:1.21.2.1.2.1
	RELENG_9_0:1.21.2.1.0.2
	RELENG_9_0_BP:1.21.2.1
	RELENG_9:1.21.0.2
	RELENG_9_BP:1.21
	RELENG_7_4_0_RELEASE:1.15.12.1
	RELENG_8_2_0_RELEASE:1.16.2.3.4.1
	RELENG_7_4:1.15.0.12
	RELENG_7_4_BP:1.15
	RELENG_8_2:1.16.2.3.0.4
	RELENG_8_2_BP:1.16.2.3
	RELENG_8_1_0_RELEASE:1.16.2.3.2.1
	RELENG_8_1:1.16.2.3.0.2
	RELENG_8_1_BP:1.16.2.3
	RELENG_7_3_0_RELEASE:1.15.10.1
	RELENG_7_3:1.15.0.10
	RELENG_7_3_BP:1.15
	RELENG_8_0_0_RELEASE:1.16.2.1.2.1
	RELENG_8_0:1.16.2.1.0.2
	RELENG_8_0_BP:1.16.2.1
	RELENG_8:1.16.0.2
	RELENG_8_BP:1.16
	RELENG_7_2_0_RELEASE:1.15.8.1
	RELENG_7_2:1.15.0.8
	RELENG_7_2_BP:1.15
	RELENG_7_1_0_RELEASE:1.15.6.1
	RELENG_6_4_0_RELEASE:1.13.2.2.4.1
	RELENG_7_1:1.15.0.6
	RELENG_7_1_BP:1.15
	RELENG_6_4:1.13.2.2.0.4
	RELENG_6_4_BP:1.13.2.2
	RELENG_7_0_0_RELEASE:1.15
	RELENG_6_3_0_RELEASE:1.13.2.2
	RELENG_7_0:1.15.0.4
	RELENG_7_0_BP:1.15
	RELENG_6_3:1.13.2.2.0.2
	RELENG_6_3_BP:1.13.2.2
	RELENG_7:1.15.0.2
	RELENG_7_BP:1.15
	RELENG_6_2_0_RELEASE:1.13.2.1
	RELENG_6_2:1.13.2.1.0.4
	RELENG_6_2_BP:1.13.2.1
	RELENG_5_5_0_RELEASE:1.11
	RELENG_5_5:1.11.0.8
	RELENG_5_5_BP:1.11
	RELENG_6_1_0_RELEASE:1.13.2.1
	RELENG_6_1:1.13.2.1.0.2
	RELENG_6_1_BP:1.13.2.1
	RELENG_6_0_0_RELEASE:1.13
	RELENG_6_0:1.13.0.4
	RELENG_6_0_BP:1.13
	RELENG_6:1.13.0.2
	RELENG_6_BP:1.13
	RELENG_5_4_0_RELEASE:1.11
	RELENG_5_4:1.11.0.6
	RELENG_5_4_BP:1.11
	RELENG_4_11_0_RELEASE:1.10.2.2
	RELENG_4_11:1.10.2.2.0.4
	RELENG_4_11_BP:1.10.2.2
	RELENG_5_3_0_RELEASE:1.11
	RELENG_5_3:1.11.0.4
	RELENG_5_3_BP:1.11
	RELENG_5:1.11.0.2
	RELENG_5_BP:1.11
	RELENG_4_10_0_RELEASE:1.10.2.2
	RELENG_4_10:1.10.2.2.0.2
	RELENG_4_10_BP:1.10.2.2
	RELENG_5_2_1_RELEASE:1.9
	RELENG_4:1.10.0.2
	RELENG_5_2_0_RELEASE:1.9
	RELENG_5_2:1.9.0.2
	RELENG_5_2_BP:1.9
	RELENG_5_1_0_RELEASE:1.8
	RELENG_5_1:1.8.0.4
	RELENG_5_1_BP:1.8
	RELENG_5_0_0_RELEASE:1.8
	RELENG_5_0:1.8.0.2
	RELENG_5_0_BP:1.8
	KSE_MILESTONE_2:1.3
	KSE_PRE_MILESTONE_2:1.3
	PRE_SMPNG:1.1;
locks; strict;
comment	@# @;


1.27
date	2013.06.18.00.32.19;	author svnexp;	state Exp;
branches;
next	1.26;

1.26
date	2013.04.07.00.47.09;	author svnexp;	state Exp;
branches;
next	1.25;

1.25
date	2012.11.17.01.52.53;	author svnexp;	state Exp;
branches
	1.25.2.1;
next	1.24;

1.24
date	2012.07.30.03.00.58;	author bz;	state Exp;
branches;
next	1.23;

1.23
date	2012.05.24.14.07.44;	author mav;	state Exp;
branches;
next	1.22;

1.22
date	2011.11.27.16.17.17;	author marius;	state Exp;
branches;
next	1.21;

1.21
date	2011.04.26.17.01.49;	author mav;	state Exp;
branches
	1.21.2.1;
next	1.20;

1.20
date	2011.04.19.07.30.22;	author uqs;	state Exp;
branches;
next	1.19;

1.19
date	2010.12.01.05.39.02;	author ken;	state Exp;
branches;
next	1.18;

1.18
date	2010.05.23.20.24.03;	author marius;	state Exp;
branches;
next	1.17;

1.17
date	2009.10.23.12.36.42;	author mav;	state Exp;
branches;
next	1.16;

1.16
date	2009.07.10.08.18.08;	author scottl;	state Exp;
branches
	1.16.2.1;
next	1.15;

1.15
date	2007.04.07.19.40.57;	author scottl;	state Exp;
branches
	1.15.2.1
	1.15.6.1
	1.15.8.1
	1.15.10.1
	1.15.12.1;
next	1.14;

1.14
date	2005.10.14.23.30.08;	author yar;	state Exp;
branches;
next	1.13;

1.13
date	2005.06.04.10.58.37;	author schweikh;	state Exp;
branches
	1.13.2.1;
next	1.12;

1.12
date	2004.08.29.11.10.09;	author des;	state Exp;
branches;
next	1.11;

1.11
date	2004.04.19.17.26.46;	author njl;	state Exp;
branches
	1.11.2.1;
next	1.10;

1.10
date	2003.12.29.09.15.48;	author bde;	state Exp;
branches
	1.10.2.1;
next	1.9;

1.9
date	2003.07.29.18.08.16;	author njl;	state Exp;
branches;
next	1.8;

1.8
date	2002.11.22.22.55.51;	author njl;	state Exp;
branches;
next	1.7;

1.7
date	2002.11.06.13.46.58;	author nyan;	state Exp;
branches;
next	1.6;

1.6
date	2002.08.15.21.41.59;	author alfred;	state Exp;
branches;
next	1.5;

1.5
date	2002.01.11.15.48.36;	author ru;	state Exp;
branches;
next	1.4;

1.4
date	2002.01.11.01.19.22;	author msmith;	state Exp;
branches;
next	1.3;

1.3
date	2001.02.10.12.52.56;	author nyan;	state Exp;
branches;
next	1.2;

1.2
date	2001.01.06.13.59.41;	author obrien;	state Exp;
branches;
next	1.1;

1.1
date	2000.08.13.18.49.40;	author n_hibma;	state Exp;
branches;
next	;

1.25.2.1
date	2012.11.17.01.52.53;	author svnexp;	state dead;
branches;
next	1.25.2.2;

1.25.2.2
date	2013.03.28.13.05.18;	author svnexp;	state Exp;
branches;
next	;

1.21.2.1
date	2011.09.23.00.51.37;	author kensmith;	state Exp;
branches
	1.21.2.1.2.1;
next	1.21.2.2;

1.21.2.2
date	2012.01.28.23.12.55;	author marius;	state Exp;
branches
	1.21.2.2.2.1;
next	1.21.2.3;

1.21.2.3
date	2012.11.17.11.37.16;	author svnexp;	state Exp;
branches;
next	1.21.2.4;

1.21.2.4
date	2013.02.07.00.14.06;	author svnexp;	state Exp;
branches;
next	1.21.2.5;

1.21.2.5
date	2013.06.18.01.02.06;	author svnexp;	state Exp;
branches;
next	1.21.2.6;

1.21.2.6
date	2013.09.22.21.02.30;	author svnexp;	state Exp;
branches;
next	;

1.21.2.1.2.1
date	2011.11.11.04.20.22;	author kensmith;	state Exp;
branches;
next	1.21.2.1.2.2;

1.21.2.1.2.2
date	2012.11.17.08.37.13;	author svnexp;	state Exp;
branches;
next	;

1.21.2.2.2.1
date	2012.08.05.23.54.33;	author kensmith;	state Exp;
branches;
next	1.21.2.2.2.2;

1.21.2.2.2.2
date	2012.11.17.08.48.03;	author svnexp;	state Exp;
branches;
next	;

1.16.2.1
date	2009.08.03.08.13.06;	author kensmith;	state Exp;
branches
	1.16.2.1.2.1;
next	1.16.2.2;

1.16.2.2
date	2009.11.17.20.17.48;	author mav;	state Exp;
branches;
next	1.16.2.3;

1.16.2.3
date	2010.05.26.17.30.14;	author marius;	state Exp;
branches
	1.16.2.3.2.1
	1.16.2.3.4.1;
next	1.16.2.4;

1.16.2.4
date	2011.04.19.16.23.07;	author mav;	state Exp;
branches;
next	1.16.2.5;

1.16.2.5
date	2012.01.28.23.13.00;	author marius;	state Exp;
branches
	1.16.2.5.2.1;
next	1.16.2.6;

1.16.2.6
date	2012.05.02.06.52.00;	author mav;	state Exp;
branches;
next	1.16.2.7;

1.16.2.7
date	2012.11.17.10.36.55;	author svnexp;	state Exp;
branches;
next	;

1.16.2.1.2.1
date	2009.10.25.01.10.29;	author kensmith;	state Exp;
branches;
next	;

1.16.2.3.2.1
date	2010.06.14.02.09.06;	author kensmith;	state Exp;
branches;
next	;

1.16.2.3.4.1
date	2010.12.21.17.09.25;	author kensmith;	state Exp;
branches;
next	;

1.16.2.5.2.1
date	2012.03.03.06.15.13;	author kensmith;	state Exp;
branches;
next	1.16.2.5.2.2;

1.16.2.5.2.2
date	2012.11.17.08.25.32;	author svnexp;	state Exp;
branches;
next	;

1.15.2.1
date	2012.11.17.08.06.45;	author svnexp;	state Exp;
branches;
next	;

1.15.6.1
date	2008.11.25.02.59.29;	author kensmith;	state Exp;
branches;
next	;

1.15.8.1
date	2009.04.15.03.14.26;	author kensmith;	state Exp;
branches;
next	;

1.15.10.1
date	2010.02.10.00.26.20;	author kensmith;	state Exp;
branches;
next	;

1.15.12.1
date	2010.12.21.17.10.29;	author kensmith;	state Exp;
branches;
next	1.15.12.2;

1.15.12.2
date	2012.11.17.08.17.26;	author svnexp;	state Exp;
branches;
next	;

1.13.2.1
date	2006.02.10.00.37.59;	author yar;	state Exp;
branches;
next	1.13.2.2;

1.13.2.2
date	2007.04.10.21.44.17;	author scottl;	state Exp;
branches
	1.13.2.2.4.1;
next	1.13.2.3;

1.13.2.3
date	2012.11.17.07.44.16;	author svnexp;	state Exp;
branches;
next	;

1.13.2.2.4.1
date	2008.10.02.02.57.24;	author kensmith;	state Exp;
branches;
next	;

1.11.2.1
date	2006.07.09.19.49.25;	author markm;	state Exp;
branches;
next	;

1.10.2.1
date	2004.01.26.07.18.46;	author simokawa;	state Exp;
branches;
next	1.10.2.2;

1.10.2.2
date	2004.04.19.17.32.16;	author njl;	state Exp;
branches;
next	1.10.2.3;

1.10.2.3
date	2012.11.17.07.26.30;	author svnexp;	state Exp;
branches;
next	;


desc
@@


1.27
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/251842
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@# $FreeBSD: head/sys/modules/cam/Makefile 251842 2013-06-17 10:21:38Z scottl $

S=	${.CURDIR}/../..

.PATH: $S/cam $S/cam/scsi $S/cam/ata $S/${MACHINE}/${MACHINE}

KMOD=	cam

# See sys/conf/options for the flags that go into the different opt_*.h files.
SRCS=	opt_cam.h
SRCS+=	opt_ada.h
SRCS+=	opt_scsi.h
SRCS+=	opt_cd.h
SRCS+=	opt_pt.h
SRCS+=	opt_sa.h
SRCS+=	device_if.h bus_if.h vnode_if.h
SRCS+=	cam.c
SRCS+=	cam_compat.c
.if exists($S/${MACHINE}/${MACHINE}/cam_machdep.c)
SRCS+=	cam_machdep.c
.endif
SRCS+=	cam_periph.c cam_queue.c cam_sim.c cam_xpt.c
SRCS+=	scsi_all.c scsi_cd.c scsi_ch.c
SRCS+=	scsi_da.c
SRCS+=	scsi_pass.c
SRCS+=	scsi_pt.c
SRCS+=	scsi_sa.c
SRCS+=	scsi_enc.c
SRCS+=	scsi_enc_ses.c
SRCS+=	scsi_enc_safte.c
SRCS+=	scsi_sg.c
SRCS+=	scsi_targ_bh.c scsi_target.c
SRCS+=	scsi_xpt.c
SRCS+=	smp_all.c
SRCS+=	ata_all.c
SRCS+=	ata_xpt.c
SRCS+=	ata_da.c
.if exists($S/${MACHINE}/${MACHINE}/ata_machdep.c)
SRCS+=	ata_machdep.c
.endif
SRCS+=	ata_pmp.c

EXPORT_SYMS=	YES	# XXX evaluate

.if !defined(KERNBUILDDIR)
opt_scsi.h:
	echo "#define SCSI_DELAY 15000" > ${.TARGET}
.endif

.include <bsd.kmod.mk>
@


1.26
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/249213
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d1 1
a1 1
# $FreeBSD: head/sys/modules/cam/Makefile 249213 2013-04-06 19:12:49Z marius $
d18 1
@


1.25
log
@Switching exporter and resync
@
text
@d1 1
a1 1
# $FreeBSD: head/sys/modules/cam/Makefile 238894 2012-07-30 03:00:58Z bz $
a11 1
SRCS+=	opt_ata.h
@


1.25.2.1
log
@file Makefile was added on branch RELENG_8_4 on 2013-03-28 13:05:18 +0000
@
text
@d1 50
@


1.25.2.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 48
# $FreeBSD: releng/8.4/sys/modules/cam/Makefile 234912 2012-05-02 06:52:00Z mav $

S=	${.CURDIR}/../..

.PATH: $S/cam $S/cam/scsi $S/cam/ata $S/${MACHINE}/${MACHINE}

KMOD=	cam

# See sys/conf/options for the flags that go into the different opt_*.h files.
SRCS=	opt_cam.h
SRCS+=	opt_ada.h
SRCS+=	opt_ata.h
SRCS+=	opt_scsi.h
SRCS+=	opt_cd.h
SRCS+=	opt_pt.h
SRCS+=	opt_sa.h
SRCS+=	opt_ses.h
SRCS+=	device_if.h bus_if.h vnode_if.h
SRCS+=	cam.c
.if exists($S/${MACHINE}/${MACHINE}/cam_machdep.c)
SRCS+=	cam_machdep.c
.endif
SRCS+=	cam_periph.c cam_queue.c cam_sim.c cam_xpt.c
SRCS+=	scsi_all.c scsi_cd.c scsi_ch.c
SRCS+=	scsi_da.c
SRCS+=	scsi_pass.c
SRCS+=	scsi_pt.c
SRCS+=	scsi_sa.c
SRCS+=	scsi_ses.c
SRCS+=	scsi_sg.c
SRCS+=	scsi_targ_bh.c scsi_target.c
SRCS+=	scsi_xpt.c
SRCS+=	ata_all.c
SRCS+=	ata_xpt.c
SRCS+=	ata_da.c
.if exists($S/${MACHINE}/${MACHINE}/ata_machdep.c)
SRCS+=	ata_machdep.c
.endif
SRCS+=	ata_pmp.c

EXPORT_SYMS=	YES	# XXX evaluate

.if !defined(KERNBUILDDIR)
opt_scsi.h:
	echo "#define SCSI_DELAY 15000" > ${.TARGET}
.endif

.include <bsd.kmod.mk>
@


1.24
log
@SVN rev 238894 on 2012-07-30 03:00:58Z by bz

Remove opt_enc.h from files committed with r235911.  enc(4) is the
'encapsulating interface' used with IPsec and has nothing to do with
storage 'enclosure' services.

MFC after:	3 days
Noticed while:	debugging why enc(4) is no longer automatically created
@
text
@d1 1
a1 1
# $FreeBSD$
@


1.23
log
@SVN rev 235911 on 2012-05-24 14:07:44Z by mav

MFprojects/zfsd:
Revamp the CAM enclosure services driver.
This updated driver uses an in-kernel daemon to track state changes and
publishes physical path location information\for disk elements into the
CAM device database.

Sponsored by:   Spectra Logic Corporation
Sponsored by:   iXsystems, Inc.
Submitted by:   gibbs, will, mav
@
text
@a16 1
SRCS+=	opt_enc.h
@


1.22
log
@SVN rev 228026 on 2011-11-27 16:17:17Z by marius

Compile cam_machdep.c if it exists, missed in r228022.
@
text
@d17 1
a17 1
SRCS+=	opt_ses.h
d29 3
a31 1
SRCS+=	scsi_ses.c
@


1.21
log
@SVN rev 221071 on 2011-04-26 17:01:49Z by mav

 - Add shim to simplify migration to the CAM-based ATA. For each new adaX
device in /dev/ create symbolic link with adY name, trying to mimic old ATA
numbering. Imitation is not complete, but should be enough in most cases to
mount file systems without touching /etc/fstab.
 - To know what behavior to mimic, restore ATA_STATIC_ID option in cases
where it was present before.
 - Add some more details to UPDATING.
@
text
@d19 5
a23 2
SRCS+=	cam.c cam_periph.c cam_queue.c
SRCS+=	cam_sim.c cam_xpt.c
d38 1
a38 1
SRCS+=  ata_machdep.c
@


1.21.2.1
log
@SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.21.2.2
log
@SVN rev 230665 on 2012-01-28 23:12:55Z by marius

MFC: r228022, r228026

For sparc64 also adjust the geometry of da(4) driven disks to not overflow
the 16-bit cylinders field of the VTOC8 disk label (at around 502GB). The
geometry chosen for disks above that limit allows to use disks up to 2TB,
which is the limit of the extended VTOC8 format. The geometry used for
disks smaller than the 16-bit cylinders limit stays the same as used by
cam_calc_geometry(9) for extended translation.
Thanks to Hans-Joerg Sirtl for providing hardware for testing this change.
@
text
@d19 2
a20 5
SRCS+=	cam.c
.if exists($S/${MACHINE}/${MACHINE}/cam_machdep.c)
SRCS+=	cam_machdep.c
.endif
SRCS+=	cam_periph.c cam_queue.c cam_sim.c cam_xpt.c
d35 1
a35 1
SRCS+=	ata_machdep.c
@


1.21.2.3
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242902
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242902 | dteske | 2012-11-11 23:29:45 +0000 (Sun, 11 Nov 2012) | 10 lines
## SVN ##
## SVN ## Fix a regression introduced by SVN r211417 that saw the breakage of a feature
## SVN ## documented in usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below):
## SVN ##
## SVN ## If /usr/sbin/sysinstall is linked to another filename, say
## SVN ## `/usr/local/bin/configPackages', then the basename will be used
## SVN ## as an implicit command name.
## SVN ##
## SVN ## Reviewed by:	adrian (co-mentor)
## SVN ## Approved by:	adrian (co-mentor)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/9/sys/modules/cam/Makefile 230665 2012-01-28 23:12:55Z marius $
@


1.21.2.4
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/246437
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d1 1
a1 1
# $FreeBSD: stable/9/sys/modules/cam/Makefile 246437 2013-02-06 22:07:38Z mav $
d17 1
d29 1
a29 3
SRCS+=	scsi_enc.c
SRCS+=	scsi_enc_ses.c
SRCS+=	scsi_enc_safte.c
@


1.21.2.5
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/251874
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d1 1
a1 1
# $FreeBSD: stable/9/sys/modules/cam/Makefile 251874 2013-06-18 00:36:53Z scottl $
a18 1
SRCS+=	cam_compat.c
@


1.21.2.6
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/255799
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d1 1
a1 1
# $FreeBSD: stable/9/sys/modules/cam/Makefile 255799 2013-09-22 20:22:08Z mav $
a16 1
SRCS+=	opt_ses.h
@


1.21.2.2.2.1
log
@SVN rev 239080 on 2012-08-05 23:54:33Z by kensmith

Copy stable/9 to releng/9.1 as part of the 9.1-RELEASE release process.

Approved by:	re (implicit)
@
text
@@


1.21.2.2.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.1/sys/modules/cam/Makefile 230665 2012-01-28 23:12:55Z marius $
@


1.21.2.1.2.1
log
@SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)
@
text
@@


1.21.2.1.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.0/sys/modules/cam/Makefile 221071 2011-04-26 17:01:49Z mav $
@


1.20
log
@SVN rev 220814 on 2011-04-19 07:30:22Z by uqs

Fix make buildworld -DMODULES_WITH_WORLD after r220454.
@
text
@d12 1
@


1.19
log
@SVN rev 216093 on 2010-12-01 05:39:02Z by ken

Add smp_all.c to the cam module build to un-break it.

Reported by:	jkim
@
text
@d11 1
@


1.18
log
@SVN rev 208468 on 2010-05-23 20:24:03Z by marius

At least on sparc64 these modules require ata_machdep.c.

MFC after:	3 days
@
text
@d28 1
@


1.17
log
@SVN rev 198389 on 2009-10-23 12:36:42Z by mav

MFp4:
Move Port Multiplier support code out of ATA XPT into pmp periph driver.
This is convinient, as PMP itself is a bus target and has own state.
@
text
@d5 1
a5 1
.PATH: $S/cam $S/cam/scsi $S/cam/ata
d31 3
@


1.16
log
@SVN rev 195534 on 2009-07-10 08:18:08Z by scottl

Separate the parallel scsi knowledge out of the core of the XPT, and
modularize it so that new transports can be created.

Add a transport for SATA

Add a periph+protocol layer for ATA

Add a driver for AHCI-compliant hardware.

Add a maxio field to CAM so that drivers can advertise their max
I/O capability.  Modify various drivers so that they are insulated
from the value of MAXPHYS.

The new ATA/SATA code supports AHCI-compliant hardware, and will override
the classic ATA driver if it is loaded as a module at boot time or compiled
into the kernel.  The stack now support NCQ (tagged queueing) for increased
performance on modern SATA drives.  It also supports port multipliers.

ATA drives are accessed via 'ada' device nodes.  ATAPI drives are
accessed via 'cd' device nodes.  They can all be enumerated and manipulated
via camcontrol, just like SCSI drives.  SCSI commands are not translated to
their ATA equivalents; ATA native commands are used throughout the entire
stack, including camcontrol.  See the camcontrol manpage for further
details.  Testing this code may require that you update your fstab, and
possibly modify your BIOS to enable AHCI functionality, if available.

This code is very experimental at the moment.  The userland ABI/API has
changed, so applications will need to be recompiled.  It may change
further in the near future.  The 'ada' device name may also change as
more infrastructure is completed in this project.  The goal is to
eventually put all CAM busses and devices until newbus, allowing for
interesting topology and management options.

Few functional changes will be seen with existing SCSI/SAS/FC drivers,
though the userland ABI has still changed.  In the future, transports
specific modules for SAS and FC may appear in order to better support
the topologies and capabilities of these technologies.

The modularization of CAM and the addition of the ATA/SATA modules is
meant to break CAM out of the mold of being specific to SCSI, letting it
grow to be a framework for arbitrary transports and protocols.  It also
allows drivers to be written to support discrete hardware without
jeopardizing the stability of non-related hardware.  While only an AHCI
driver is provided now, a Silicon Image driver is also in the works.
Drivers for ICH1-4, ICH5-6, PIIX, classic IDE, and any other hardware
is possible and encouraged.  Help with new transports is also encouraged.

Submitted by:	scottl, mav
Approved by:	re
@
text
@d31 1
@


1.16.2.1
log
@SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)
@
text
@@


1.16.2.2
log
@SVN rev 199426 on 2009-11-17 20:17:48Z by mav

MFC r198389:
Move Port Multiplier support code out of ATA XPT into pmp periph driver.
This is convinient, as PMP itself is a bus target and has own state.
@
text
@a30 1
SRCS+=	ata_pmp.c
@


1.16.2.3
log
@SVN rev 208572 on 2010-05-26 17:30:14Z by marius

MFC: r208468

At least on sparc64 these modules require ata_machdep.c.

Approved by:	re (kib)
@
text
@d5 1
a5 1
.PATH: $S/cam $S/cam/scsi $S/cam/ata $S/${MACHINE}/${MACHINE}
a30 3
.if exists($S/${MACHINE}/${MACHINE}/ata_machdep.c)
SRCS+=  ata_machdep.c
.endif
@


1.16.2.4
log
@SVN rev 220841 on 2011-04-19 16:23:07Z by mav

MFC r220412, r220414, r220454, r220618, r220814:
- Make ada(4) driver to control device write cache, same as ata(4) does.
Add kern.cam.ada.write_cache sysctl/tunable to control it alike hw.ata.wc.
- Add kern.cam.ada.X.write_cache tunables/sysctls to control write caching
on per-device basis.
- While adding support for per-device sysctls, merge from graid branch
support for ADA_TEST_FAILURE kernel option, which opens few more sysctl,
allowing to simulate read and write errors for testing purposes.
@
text
@a10 1
SRCS+=	opt_ada.h
@


1.16.2.5
log
@SVN rev 230666 on 2012-01-28 23:13:00Z by marius

MFC: r228022, r228026

For sparc64 also adjust the geometry of da(4) driven disks to not overflow
the 16-bit cylinders field of the VTOC8 disk label (at around 502GB). The
geometry chosen for disks above that limit allows to use disks up to 2TB,
which is the limit of the extended VTOC8 format. The geometry used for
disks smaller than the 16-bit cylinders limit stays the same as used by
cam_calc_geometry(9) for extended translation.
Thanks to Hans-Joerg Sirtl for providing hardware for testing this change.
@
text
@d18 2
a19 5
SRCS+=	cam.c
.if exists($S/${MACHINE}/${MACHINE}/cam_machdep.c)
SRCS+=	cam_machdep.c
.endif
SRCS+=	cam_periph.c cam_queue.c cam_sim.c cam_xpt.c
d33 1
a33 1
SRCS+=	ata_machdep.c
@


1.16.2.6
log
@SVN rev 234912 on 2012-05-02 06:52:00Z by mav

Merge ATA_CAM compatibility shims. While 8-STABLE doesn't have ATA_CAM
enabled by default, this should make migration easier for users enabling
it manually.

r221071:
Add shim to simplify migration to the CAM-based ATA. For each new adaX
device in /dev/ create symbolic link with adY name, trying to mimic old ATA
numbering. Imitation is not complete, but should be enough in most cases to
mount file systems without touching /etc/fstab.

r221384:
Do not report legacy unit numbers (do not create legacy aliases) for disks
on port multiplier ports above first two. They don't fit into ATA_STATIC_ID
scheme and so can't be mapped properly. No need to pollute dev.
@
text
@a11 1
SRCS+=	opt_ata.h
@


1.16.2.7
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242909
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242909 | dim | 2012-11-12 07:47:19 +0000 (Mon, 12 Nov 2012) | 20 lines
## SVN ##
## SVN ## MFC r242625:
## SVN ##
## SVN ## Remove duplicate const specifiers in many drivers (I hope I got all of
## SVN ## them, please let me know if not).  Most of these are of the form:
## SVN ##
## SVN ## static const struct bzzt_type {
## SVN ##       [...list of members...]
## SVN ## } const bzzt_devs[] = {
## SVN ##       [...list of initializers...]
## SVN ## };
## SVN ##
## SVN ## The second const is unnecessary, as arrays cannot be modified anyway,
## SVN ## and if the elements are const, the whole thing is const automatically
## SVN ## (e.g. it is placed in .rodata).
## SVN ##
## SVN ## I have verified this does not change the binary output of a full kernel
## SVN ## build (except for build timestamps embedded in the object files).
## SVN ##
## SVN ## Reviewed by:	yongari, marius
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/8/sys/modules/cam/Makefile 234912 2012-05-02 06:52:00Z mav $
@


1.16.2.5.2.1
log
@SVN rev 232438 on 2012-03-03 06:15:13Z by kensmith

Copy stable/8 to releng/8.3 as part of 8.3-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.16.2.5.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/8.3/sys/modules/cam/Makefile 230666 2012-01-28 23:13:00Z marius $
@


1.16.2.3.4.1
log
@SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)
@
text
@@


1.16.2.3.2.1
log
@SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)
@
text
@@


1.16.2.1.2.1
log
@SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)
@
text
@@


1.15
log
@Add the CAM 'SG' peripheral device.  This device implements a subset of the
Linux SCSI SG passthrough device API.  The intention is to allow for both
running of Linux apps that want to talk to /dev/sg* nodes, and to facilitate
porting of apps from Linux to FreeBSD.  As such, both native and linuxolator
entry points and definitions are provided.

Caveats:
 - This does not support the procfs and sysfs nodes that the Linux SG
   driver provides.  Some Linux apps may rely on these for operation,
   others may only use them for informational purposes.
 - More ioctls need to be implemented.
 - Linux uses a naming scheme of "sg[a-z]" for devices, while FreeBSD uses a
   scheme of "sg[0-9]".  Devfs aliasis (symlinks) are automatically created
   to link the two together.  However, tools like camcontrol only see the
   native names.
 - Some operations were originally designed to return byte counts or other
   data directly as the syscall return value.  The linuxolator doesn't appear
   to support this well, so this driver just punts for these cases.

Now that the driver is in place, others are welcome to add missing
functionality.  Thanks to Roman Divacky for pushing this work along.
@
text
@d5 1
a5 1
.PATH: $S/cam $S/cam/scsi
d27 4
@


1.15.2.1
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: stable/7/sys/modules/cam/Makefile 168477 2007-04-07 19:40:58Z scottl $
@


1.15.12.1
log
@SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith

Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release.

Approved by:	re (implicit)
@
text
@@


1.15.12.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/7.4/sys/modules/cam/Makefile 168477 2007-04-07 19:40:58Z scottl $
@


1.15.10.1
log
@SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith

Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process.

Approved by:	re (implicit)
@
text
@@


1.15.8.1
log
@SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith

Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.

Approved by:	re (implicit)
@
text
@@


1.15.6.1
log
@SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith

Create releng/7.1 in preparation for moving into RC phase of 7.1 release
cycle.

Approved by:	re (implicit)
@
text
@@


1.14
log
@Let modules use the kernel's opt_*.h files if built along with
the kernel by wrapping all targets for fake opt_*.h files in
.if defined(KERNBUILDDIR).  Thus, such fake files won't be
created at all if modules are built with the kernel.

Some modules undergo cleanup like removing unused or unneeded
options or .h files, without which they wouldn't build this way
or the other.

Reviewed by:	ru
Tested by:	no binary changes in modules built alone
Tested on:	i386 sparc64 amd64
@
text
@d25 1
@


1.13
log
@Release n_hibma's maintainership due to his ENOTIME.

Discussed with, okayed, authorized, requested by, on behalf of:	n_hibma (MAINTAINER)
@
text
@d29 1
d32 1
@


1.13.2.1
log
@MFC:
Avoid creating (and subsequently using) fake opt_*.h files
when the modules are built with the kernel and hence actual
opt_*.h files are available in ${KERNBUILDDIR}.  Fix a few
small bugs that would prevent this from working.

At last the build options of the modules become consistent
with those of the kernel unless the MODULES_WITH_WORLD way
still is used.

Approved by:	re (kensmith, scottl)
Requested by:	ru
Tested on:	amd64 i386 sparc64
Tested by:	md5
@
text
@a28 1
.if !defined(KERNBUILDDIR)
a30 1
.endif
@


1.13.2.2
log
@MFC the scsi_sg driver.
@
text
@a24 1
SRCS+=	scsi_sg.c
@


1.13.2.3
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: stable/6/sys/modules/cam/Makefile 168605 2007-04-10 21:44:17Z scottl $
@


1.13.2.2.4.1
log
@SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith

Create releng/6.4 from stable/6 in preparation for 6.4-RC1.

Approved by:	re (implicit)
@
text
@@


1.12
log
@Remove the HW_WDOG option; it serves no purpose.

MFC after:	3 days
@
text
@d1 1
a1 1
# $FreeBSD$ 
a2 1
MAINTAINER=	n_hibma@@freebsd.org
@


1.11
log
@Remove opt_da.h from the Makefile as well.  Duplication of the option in
both the Makefile and sys/conf/options is what led to this oversight.
Apologies for breaking the build.
@
text
@a13 1
SRCS+=	opt_hw_wdog.h
@


1.11.2.1
log
@MFC: keep the maintainers consistent with HEAD.
@
text
@d3 1
@


1.10
log
@Use double quotes instead of single quotes for echos to build options
headers as in most other modules Makefiles (5 yesterday, none now).
Fixed any simple nearby style bugs (not many).
@
text
@a13 1
SRCS+=	opt_da.h
@


1.10.2.1
log
@MFC: cam_xpt.c rev 1.91

Build CAM module.

OK'ed by: ken
@
text
@a21 1
SRCS+=	cam_extend.c
@


1.10.2.2
log
@Remove opt_da.h from 4-stable Makefile also.

Approved by:	re (future-tense, "unbreaking build good")
@
text
@d14 1
@


1.10.2.3
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: stable/4/sys/modules/cam/Makefile 128434 2004-04-19 17:32:16Z njl $ 
@


1.9
log
@Fix the new DA_OLD_QUIRKS option for normal and module compiles.

Pointed out by: 	bde
@
text
@d33 1
a33 1
	echo '#define SCSI_DELAY 15000' > opt_scsi.h
@


1.8
log
@New SCSI target emulator code

This code allows a user program to enable target mode on a SIM and
then emulate any number of devices (disks, tape drives, etc.)  All
decisions about device behavior (UA, CA, inquiry response) are left
to the usermode program and the kernel driver is merely a conduit
for CCBs.  This enables multiple concurrent target emulators, each
using its own backing store and IO model.

Also included is a user program that emulates a disk (RBC) using a
file as a backing store.  This provides functionality similar to
md(4) at the CAM layer.

Code has been tested on ahc(4) and should also work on isp(4) (and
other SIMs that gain target mode support).  It is a complete rewrite
of /sys/cam/scsi_target* and /usr/share/examples/scsi_target.

Design, comments from:	gibbs
Supported by:		Cryptography Research
Approved by:		re
@
text
@d14 1
@


1.7
log
@Move adding -DPC98 to CFLAGS from each modules to sys/modules/Makefile.inc.
@
text
@d18 1
a18 1
SRCS+=	device_if.h bus_if.h
@


1.6
log
@Remove cam_extend.c from sources to unbreak modules.

Missed by: kern/39809,njl
@
text
@a9 4
.if ${MACHINE} == "pc98"
CFLAGS+= -DPC98
.endif

@


1.5
log
@Drop <bsd.man.mk> support from <bsd.kmod.mk>.

Not objected to by:	-current
@
text
@d23 1
a23 1
SRCS+=	cam.c cam_extend.c cam_periph.c cam_queue.c
@


1.4
log
@Turn on unconditional symbol export for modules whose API is
not clear enough, will require additional analysis, or will
require some input from their maintainers.
@
text
@a32 2
NOMAN=

@


1.3
log
@Add pc98 support.
@
text
@d1 1
a1 1
# $FreeBSD: src/sys/modules/cam/Makefile,v 1.2 2001/01/06 13:59:41 obrien Exp $ 
d34 2
@


1.2
log
@Use a consistent style and one much closer to the rest of /usr/src
@
text
@d1 1
a1 1
# $FreeBSD: src/sys/modules/cam/Makefile,v 1.1 2000/08/13 18:49:40 n_hibma Exp $ 
d9 4
@


1.1
log
@CAM, the module: scbus, da, cd, and st wrapped in one module.

Make the umass driver depend on this module.

Makes it possible to compile the kernel without SCSI support and load it
when for example a USB floppy is conencted.
@
text
@d1 1
a1 1
#       $FreeBSD$ 
d3 2
a4 2
MAINTAINER	 = n_hibma@@freebsd.org
S		 = ${.CURDIR}/../..
d6 3
a8 2
.PATH:		 $S/cam $S/cam/scsi
KMOD		 = cam
d11 17
a27 17
SRCS		 = opt_cam.h
SRCS		+= opt_scsi.h
SRCS		+= opt_cd.h
SRCS		+= opt_hw_wdog.h
SRCS		+= opt_pt.h
SRCS		+= opt_sa.h
SRCS		+= opt_ses.h
SRCS		+= device_if.h bus_if.h
SRCS		+= cam.c cam_extend.c cam_periph.c cam_queue.c
SRCS		+= cam_sim.c cam_xpt.c
SRCS		+= scsi_all.c scsi_cd.c scsi_ch.c
SRCS		+= scsi_da.c
SRCS		+= scsi_pass.c
SRCS		+= scsi_pt.c
SRCS		+= scsi_sa.c
SRCS		+= scsi_ses.c
SRCS		+= scsi_targ_bh.c scsi_target.c
d29 1
a29 1
NOMAN		 =
d32 1
a32 1
		echo '#define SCSI_DELAY 15000' > opt_scsi.h
@

