From owner-svn-src-stable@freebsd.org Thu Jul 23 05:26:13 2015 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C4A09A8E6A; Thu, 23 Jul 2015 05:26:13 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D5821CA4; Thu, 23 Jul 2015 05:26:13 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6N5QD5h048905; Thu, 23 Jul 2015 05:26:13 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6N5QACJ048890; Thu, 23 Jul 2015 05:26:10 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201507230526.t6N5QACJ048890@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Thu, 23 Jul 2015 05:26:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r285809 - in stable/10/sys: amd64/conf conf dev/pms dev/pms/RefTisa/discovery/api dev/pms/RefTisa/discovery/dm dev/pms/RefTisa/sallsdk/api dev/pms/RefTisa/sallsdk/hda/64k dev/pms/RefTis... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jul 2015 05:26:13 -0000 Author: scottl Date: Thu Jul 23 05:26:09 2015 New Revision: 285809 URL: https://svnweb.freebsd.org/changeset/base/285809 Log: Merge driver for PMC Sierra's range of SAS/SATA HBAs. Submitted by: Achim Leubner Approved by: re Added: stable/10/sys/dev/pms/RefTisa/discovery/api/dm.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/discovery/api/dmapi.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/discovery/api/tddmapi.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/discovery/dm/dmdefs.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/discovery/dm/dmdisc.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/discovery/dm/dminit.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/discovery/dm/dmlist.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/discovery/dm/dmmisc.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/discovery/dm/dmport.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/discovery/dm/dmproto.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/discovery/dm/dmsmp.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/discovery/dm/dmtimer.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/discovery/dm/dmtypes.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/api/sa.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/api/sa_err.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/api/sa_spec.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/api/saapi.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/api/saosapi.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/hda/64k/aap18008.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/hda/64k/aap1img.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/hda/64k/ila8008.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/hda/64k/ila8070.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/hda/64k/ilaimg.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/hda/64k/iop8008.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/hda/64k/iop8070.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/hda/64k/iopimg.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/hda/64k/istrimg.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/hda/64k/raae8070.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/spc/mpi.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/spc/mpi.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/spc/mpidebug.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/spc/mpidebug.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/spc/sadefs.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/spc/sadisc.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/spc/saframe.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/spc/saglobal.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/spc/sahw.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/spc/sahwreg.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/spc/sainit.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/spc/saint.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/spc/saioctlcmd.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/spc/sallist.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/spc/samacro.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/spc/sampicmd.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/spc/sampidefs.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/spc/sampirsp.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/spc/saphy.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/spc/saport.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/spc/saproto.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/spc/sasata.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/spc/sasmp.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/spc/sassp.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/spc/satimer.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/spc/satypes.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/spc/sautil.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/spc/spcdefs.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/sat/api/sm.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/sat/api/smapi.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/sat/api/tdsmapi.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/sat/src/smdefs.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/sat/src/sminit.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/sat/src/smlist.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/sat/src/smmisc.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/sat/src/smproto.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/sat/src/smsat.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/sat/src/smsatcb.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/sat/src/smsathw.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/sat/src/smtimer.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/sat/src/smtypes.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/api/ostiapi.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/api/tiapi.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/api/tidefs.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/api/tiglobal.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/api/tiscsi.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/api/titypes.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/common/ossa.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/common/ossacmnapi.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/common/tddefs.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/common/tddmcmnapi.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/common/tdesgl.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/common/tdhw.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/common/tdinit.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/common/tdint.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/common/tdioctl.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/common/tdioctl.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/common/tdlist.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/common/tdmisc.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/common/tdport.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/common/tdproto.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/common/tdsatypes.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/common/tdsmcmnapi.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/common/tdtimers.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/common/tdutil.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/common/wcs.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/sas/common/tdtypes.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdcb.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itddefs.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itddisc.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdglobl.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdinit.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/itdtypes.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/sas/tgt/ttdcb.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/sas/tgt/ttdglobl.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/sas/tgt/ttdinit.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/sas/tgt/ttdio.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/sas/tgt/ttdreset.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/sas/tgt/ttdsmp.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/sas/tgt/ttdtimer.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/sas/tgt/ttdtxchg.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/sas/tgt/ttdtypes.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/sata/host/ossasat.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/sata/host/sat.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/sata/host/sat.h (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/sata/host/sathw.c (contents, props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/sata/host/satproto.h (contents, props changed) stable/10/sys/dev/pms/config.h (contents, props changed) stable/10/sys/dev/pms/freebsd/driver/common/encrypt_ioctl.h (contents, props changed) stable/10/sys/dev/pms/freebsd/driver/common/lxcommon.h (contents, props changed) stable/10/sys/dev/pms/freebsd/driver/common/lxencrypt.c (contents, props changed) stable/10/sys/dev/pms/freebsd/driver/common/lxencrypt.h (contents, props changed) stable/10/sys/dev/pms/freebsd/driver/common/lxosapi.c (contents, props changed) stable/10/sys/dev/pms/freebsd/driver/common/lxproto.h (contents, props changed) stable/10/sys/dev/pms/freebsd/driver/common/lxutil.c (contents, props changed) stable/10/sys/dev/pms/freebsd/driver/common/osdebug.h (contents, props changed) stable/10/sys/dev/pms/freebsd/driver/common/osenv.h (contents, props changed) stable/10/sys/dev/pms/freebsd/driver/common/osstring.h (contents, props changed) stable/10/sys/dev/pms/freebsd/driver/common/ostypes.h (contents, props changed) stable/10/sys/dev/pms/freebsd/driver/ini/src/Readme.freebsd.txt (contents, props changed) stable/10/sys/dev/pms/freebsd/driver/ini/src/agdef.h (contents, props changed) stable/10/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c (contents, props changed) stable/10/sys/dev/pms/freebsd/driver/ini/src/agtiapi.h (contents, props changed) stable/10/sys/dev/pms/freebsd/driver/ini/src/agtiproto.h (contents, props changed) stable/10/sys/dev/pms/freebsd/driver/ini/src/osapi.c (contents, props changed) stable/10/sys/modules/pms/ stable/10/sys/modules/pms/Makefile (contents, props changed) stable/10/sys/modules/pms/Makefile.inc (contents, props changed) Directory Properties: stable/10/sys/dev/pms/ (props changed) stable/10/sys/dev/pms/RefTisa/ (props changed) stable/10/sys/dev/pms/RefTisa/discovery/ (props changed) stable/10/sys/dev/pms/RefTisa/discovery/api/ (props changed) stable/10/sys/dev/pms/RefTisa/discovery/dm/ (props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/ (props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/api/ (props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/hda/ (props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/hda/64k/ (props changed) stable/10/sys/dev/pms/RefTisa/sallsdk/spc/ (props changed) stable/10/sys/dev/pms/RefTisa/sat/ (props changed) stable/10/sys/dev/pms/RefTisa/sat/api/ (props changed) stable/10/sys/dev/pms/RefTisa/sat/src/ (props changed) stable/10/sys/dev/pms/RefTisa/tisa/ (props changed) stable/10/sys/dev/pms/RefTisa/tisa/api/ (props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/ (props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/common/ (props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/sas/ (props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/sas/common/ (props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/sas/ini/ (props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/sas/tgt/ (props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/sata/ (props changed) stable/10/sys/dev/pms/RefTisa/tisa/sassata/sata/host/ (props changed) stable/10/sys/dev/pms/freebsd/ (props changed) stable/10/sys/dev/pms/freebsd/driver/ (props changed) stable/10/sys/dev/pms/freebsd/driver/common/ (props changed) stable/10/sys/dev/pms/freebsd/driver/ini/ (props changed) stable/10/sys/dev/pms/freebsd/driver/ini/src/ (props changed) Modified: stable/10/sys/amd64/conf/GENERIC stable/10/sys/amd64/conf/NOTES stable/10/sys/conf/files stable/10/sys/i386/conf/GENERIC stable/10/sys/i386/conf/NOTES stable/10/sys/modules/Makefile Modified: stable/10/sys/amd64/conf/GENERIC ============================================================================== --- stable/10/sys/amd64/conf/GENERIC Thu Jul 23 02:20:41 2015 (r285808) +++ stable/10/sys/amd64/conf/GENERIC Thu Jul 23 05:26:09 2015 (r285809) @@ -160,6 +160,7 @@ device ida # Compaq Smart RAID device mfi # LSI MegaRAID SAS device mlx # Mylex DAC960 family device mrsas # LSI/Avago MegaRAID SAS/SATA, 6Gb/s and 12Gb/s +device pmspcv # PMC-Sierra SAS/SATA Controller driver #XXX pointer/int warnings #device pst # Promise Supertrak SX6000 device twe # 3ware ATA RAID Modified: stable/10/sys/amd64/conf/NOTES ============================================================================== --- stable/10/sys/amd64/conf/NOTES Thu Jul 23 02:20:41 2015 (r285808) +++ stable/10/sys/amd64/conf/NOTES Thu Jul 23 05:26:09 2015 (r285809) @@ -454,6 +454,10 @@ device nvme # base NVMe drive device nvd # expose NVMe namespaces as disks, depends on nvme # +# PMC-Sierra SAS/SATA controller +device pmspcv + +# # SafeNet crypto driver: can be moved to the MI NOTES as soon as # it's tested on a big-endian machine # Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Thu Jul 23 02:20:41 2015 (r285808) +++ stable/10/sys/conf/files Thu Jul 23 05:26:09 2015 (r285809) @@ -2015,6 +2015,102 @@ dev/pdq/if_fea.c optional fea eisa dev/pdq/if_fpa.c optional fpa pci dev/pdq/pdq.c optional nowerror fea eisa | fpa pci dev/pdq/pdq_ifsubr.c optional nowerror fea eisa | fpa pci +dev/pms/freebsd/driver/ini/src/agtiapi.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/sallsdk/spc/sadisc.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/sallsdk/spc/mpi.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/sallsdk/spc/saframe.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/sallsdk/spc/sahw.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/sallsdk/spc/sainit.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/sallsdk/spc/saint.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/sallsdk/spc/sampicmd.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/sallsdk/spc/sampirsp.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/sallsdk/spc/saphy.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/sallsdk/spc/saport.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/sallsdk/spc/sasata.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/sallsdk/spc/sasmp.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/sallsdk/spc/sassp.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/sallsdk/spc/satimer.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/sallsdk/spc/sautil.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/sallsdk/spc/saioctlcmd.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/sallsdk/spc/mpidebug.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/discovery/dm/dminit.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/discovery/dm/dmsmp.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/discovery/dm/dmdisc.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/discovery/dm/dmport.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/discovery/dm/dmtimer.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/discovery/dm/dmmisc.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/sat/src/sminit.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/sat/src/smmisc.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/sat/src/smsat.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/sat/src/smsatcb.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/sat/src/smsathw.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/sat/src/smtimer.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/tisa/sassata/common/tdinit.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/tisa/sassata/common/tdmisc.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/tisa/sassata/common/tdesgl.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/tisa/sassata/common/tdport.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/tisa/sassata/common/tdint.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/tisa/sassata/common/tdioctl.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/tisa/sassata/common/tdhw.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/tisa/sassata/common/ossacmnapi.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/tisa/sassata/common/tddmcmnapi.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/tisa/sassata/common/tdsmcmnapi.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/tisa/sassata/common/tdtimers.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/tisa/sassata/sas/ini/itdcb.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/tisa/sassata/sas/ini/itdinit.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/tisa/sassata/sas/ini/itddisc.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/tisa/sassata/sata/host/sat.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/tisa/sassata/sata/host/ossasat.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" +dev/pms/RefTisa/tisa/sassata/sata/host/sathw.c optional pmspcv \ + compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/ppbus/if_plip.c optional plip dev/ppbus/immio.c optional vpo dev/ppbus/lpbb.c optional lpbb Added: stable/10/sys/dev/pms/RefTisa/discovery/api/dm.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/dev/pms/RefTisa/discovery/api/dm.h Thu Jul 23 05:26:09 2015 (r285809) @@ -0,0 +1,163 @@ +/******************************************************************************* +** +*Copyright (c) 2014 PMC-Sierra, Inc. All rights reserved. +* +*Redistribution and use in source and binary forms, with or without modification, are permitted provided +*that the following conditions are met: +*1. Redistributions of source code must retain the above copyright notice, this list of conditions and the +*following disclaimer. +*2. Redistributions in binary form must reproduce the above copyright notice, +*this list of conditions and the following disclaimer in the documentation and/or other materials provided +*with the distribution. +* +*THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED +*WARRANTIES,INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +*FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +*FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +*NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +*BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +*LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +*SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE +* +* $FreeBSD$ +* +********************************************************************************/ +/******************************************************************************** +** +* dm.h +* +* Abstract: This module defines the contants, enum and #define definition used +* by Discovery Moduled (DM). +* +********************************************************************************/ + +#ifndef DM_H + +#define DM_H + +/************************************************* + * constants for type field in agsaMem_t + *************************************************/ +#define DM_CACHED_MEM 0x00 /**< CACHED memory type */ +#define DM_DMA_MEM 0x01 /**< DMA memory type */ +#define DM_CACHED_DMA_MEM 0x02 /**< CACHED DMA memory type */ + +/************************************************* + * constants for API return values + *************************************************/ +#define DM_RC_SUCCESS 0x00 /**< Successful function return value */ +#define DM_RC_FAILURE 0x01 /**< Failed function return value */ +#define DM_RC_BUSY 0x02 /**< Busy function return value */ +#define DM_RC_VERSION_INCOMPATIBLE 0x03 /**< Version miss match */ +#define DM_RC_VERSION_UNTESTED 0x04 /**< Version not tested */ + + + +/************************************************* + * Discovery option + *************************************************/ +#define DM_DISCOVERY_OPTION_FULL_START 0x00 /**< Full discovery */ +#define DM_DISCOVERY_OPTION_INCREMENTAL_START 0x01 /**< Incremental discovery */ +#define DM_DISCOVERY_OPTION_ABORT 0x02 /**< Discovery abort */ + + +/************************************************* + * Discovery status + *************************************************/ +enum dmDiscoveryState_e +{ + dmDiscCompleted = 0, + dmDiscFailed, + dmDiscAborted, + dmDiscAbortFailed, + dmDiscInProgress, + dmDiscAbortInvalid, /* no discovery to abort */ + dmDiscAbortInProgress, /* abort in progress */ + +}; + +/************************************************* + * Device status + *************************************************/ +enum dmDeviceState_e +{ + dmDeviceNoChange = 0, + dmDeviceArrival, + dmDeviceRemoval, + dmDeviceMCNChange, + dmDeviceRateChange, +}; + +typedef struct dmContext_s { + void *tdData; + void *dmData; +} dmContext_t; + +typedef struct{ + bit16 smpTimeout; + bit16 it_NexusTimeout; + bit16 firstBurstSize; + bit8 flag; + bit8 devType_S_Rate; + bit8 sasAddressHi[4]; + bit8 sasAddressLo[4]; + bit8 initiator_ssp_stp_smp; + bit8 target_ssp_stp_smp; + /* bit8 - bit14 are set by the user of DM such as TDM for directly attached expander + 0 - 7; PhyID + 8: non SMP or not + 9 - 10: types of expander, valid only when bit8 is set + 10b (2): edge expander + 11b (3): fanout expander + 11 - 14: MCN + */ + bit16 ext; + bit8 sataDeviceType; + bit8 reserved; +} dmDeviceInfo_t; + + +typedef struct{ + void *virtPtr; + void *osHandle; + bit32 physAddrUpper; + bit32 physAddrLower; + bit32 totalLength; + bit32 numElements; + bit32 singleElementLength; + bit32 alignment; + bit32 type; + bit32 reserved; +} dmMem_t; + +#define DM_NUM_MEM_CHUNKS 8 + +typedef struct{ + bit32 count; + dmMem_t dmMemory[DM_NUM_MEM_CHUNKS]; +} dmMemoryRequirement_t; + +typedef dmContext_t dmPortContext_t; + +typedef dmContext_t dmRoot_t; + +typedef struct{ + bit32 numDevHandles; + bit32 tbd1; + bit32 tbd2; +#ifdef DM_DEBUG + bit32 DMDebugLevel; +#endif + bit32 itNexusTimeout; +} dmSwConfig_t; + +typedef struct{ + bit8 sasRemoteAddressHi[4]; + bit8 sasRemoteAddressLo[4]; + bit8 sasLocalAddressHi[4]; + bit8 sasLocalAddressLo[4]; + bit32 flag; +} dmPortInfo_t; + + +#endif /* DM_H */ Added: stable/10/sys/dev/pms/RefTisa/discovery/api/dmapi.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/dev/pms/RefTisa/discovery/api/dmapi.h Thu Jul 23 05:26:09 2015 (r285809) @@ -0,0 +1,89 @@ +/******************************************************************************* +** +*Copyright (c) 2014 PMC-Sierra, Inc. All rights reserved. +* +*Redistribution and use in source and binary forms, with or without modification, are permitted provided +*that the following conditions are met: +*1. Redistributions of source code must retain the above copyright notice, this list of conditions and the +*following disclaimer. +*2. Redistributions in binary form must reproduce the above copyright notice, +*this list of conditions and the following disclaimer in the documentation and/or other materials provided +*with the distribution. +* +*THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED +*WARRANTIES,INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +*FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +*FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +*NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +*BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +*LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +*SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE +** +* $FreeBSD$ +* +********************************************************************************/ +/******************************************************************************** +* dmapi.h +* +* Abstract: This module contains function prototype of the Discovery +* Module (DM) API for initiator. +*******************************************************************************/ + +#ifndef DMAPI_H +#define DMAPI_H + +#include +#include + +osGLOBAL bit32 dmCreatePort( + dmRoot_t *dmRoot, + dmPortContext_t *dmPortContext, + dmPortInfo_t *dmPortInfo); + +osGLOBAL bit32 dmDestroyPort( + dmRoot_t *dmRoot, + dmPortContext_t *dmPortContext, + dmPortInfo_t *dmPortInfo); + +osGLOBAL bit32 dmRegisterDevice( + dmRoot_t *dmRoot, + dmPortContext_t *dmPortContext, + dmDeviceInfo_t *dmDeviceInfo, + agsaDevHandle_t *agDevHandle); + +osGLOBAL bit32 dmDiscover( + dmRoot_t *dmRoot, + dmPortContext_t *dmPortContext, + bit32 option); + +osGLOBAL void dmGetRequirements( + dmRoot_t *dmRoot, + dmSwConfig_t *swConfig, + dmMemoryRequirement_t *memoryRequirement, + bit32 *usecsPerTick, + bit32 *maxNumLocks); + +osGLOBAL void dmNotifyBC( + dmRoot_t *dmRoot, + dmPortContext_t *dmPortContext, + bit32 type); + +osGLOBAL bit32 dmQueryDiscovery( + dmRoot_t *dmRoot, + dmPortContext_t *dmPortContext); + +osGLOBAL bit32 +dmResetFailedDiscovery( + dmRoot_t *dmRoot, + dmPortContext_t *dmPortContext); + +osGLOBAL bit32 dmInitialize( + dmRoot_t *dmRoot, + agsaRoot_t *agRoot, + dmMemoryRequirement_t *memoryAllocated, + dmSwConfig_t *swConfig, + bit32 usecsPerTick ); + +osGLOBAL void dmTimerTick ( dmRoot_t *dmRoot ); + +#endif /* DMAPI_H */ Added: stable/10/sys/dev/pms/RefTisa/discovery/api/tddmapi.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/dev/pms/RefTisa/discovery/api/tddmapi.h Thu Jul 23 05:26:09 2015 (r285809) @@ -0,0 +1,119 @@ +/******************************************************************************* +*Copyright (c) 2014 PMC-Sierra, Inc. All rights reserved. +* +*Redistribution and use in source and binary forms, with or without modification, are permitted provided +*that the following conditions are met: +*1. Redistributions of source code must retain the above copyright notice, this list of conditions and the +*following disclaimer. +*2. Redistributions in binary form must reproduce the above copyright notice, +*this list of conditions and the following disclaimer in the documentation and/or other materials provided +*with the distribution. +* +*THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED +*WARRANTIES,INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +*FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +*FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +*NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +*BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +*LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +*SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE +* +* $FreeBSD$ +* +********************************************************************************/ +/******************************************************************************** +* tmdmapi.h +* +* Abstract: This module contains function prototype of the Discovery +* Module (DM) API callback for initiator. +*******************************************************************************/ + +#ifndef TDDMAPI_H + +#define TDDMAPI_H + +osGLOBAL void tddmCacheFlush( + dmRoot_t *dmRoot, + void *tdMemHandle, + void *virtPtr, + bit32 length + ); + +osGLOBAL void tddmCacheInvalidate( + dmRoot_t *dmRoot, + void *tdMemHandle, + void *virtPtr, + bit32 length + ); + +osGLOBAL void tddmCachePreFlush( + dmRoot_t *dmRoot, + void *tdMemHandle, + void *virtPtr, + bit32 length + ); + +osGLOBAL void tddmDiscoverCB( + dmRoot_t *dmRoot, + dmPortContext_t *dmPortContext, + bit32 eventStatus + ); + +osGLOBAL void tddmQueryDiscoveryCB( + dmRoot_t *dmRoot, + dmPortContext_t *dmPortContext, + bit32 discType, + bit32 discState + ); + +osGLOBAL void tddmReportDevice( + dmRoot_t *dmRoot, + dmPortContext_t *dmPortContext, + dmDeviceInfo_t *dmDeviceInfo, + dmDeviceInfo_t *dmExpDeviceInfo, + bit32 flag + ); + +osGLOBAL bit8 tddmSATADeviceTypeDecode(bit8 * pSignature); + +osGLOBAL void tddmSingleThreadedEnter( + dmRoot_t *dmRoot, + bit32 syncLockId + ); + +osGLOBAL void tddmSingleThreadedLeave( + dmRoot_t *dmRoot, + bit32 syncLockId + ); +osGLOBAL bit32 tddmGetTransportParam( + dmRoot_t *dmRoot, + char *key, + char *subkey1, + char *subkey2, + char *subkey3, + char *subkey4, + char *subkey5, + char *valueName, + char *buffer, + bit32 bufferLen, + bit32 *lenReceived + ); +osGLOBAL bit32 +tddmRotateQnumber( + dmRoot_t *dmRoot, + agsaDevHandle_t *agDevHandle + ); +#ifndef tddmLogDebugString +GLOBAL void tddmLogDebugString( + dmRoot_t *dmRoot, + bit32 level, + char *string, + void *ptr1, + void *ptr2, + bit32 value1, + bit32 value2 + ); +#endif + + +#endif /* TDDMAPI_H */ Added: stable/10/sys/dev/pms/RefTisa/discovery/dm/dmdefs.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/dev/pms/RefTisa/discovery/dm/dmdefs.h Thu Jul 23 05:26:09 2015 (r285809) @@ -0,0 +1,1229 @@ +/******************************************************************************* +** +* Copyright (c) 2014 PMC-Sierra, Inc. All rights reserved. +* +*Redistribution and use in source and binary forms, with or without modification, are permitted provided +*that the following conditions are met: +*1. Redistributions of source code must retain the above copyright notice, this list of conditions and the +*following disclaimer. +*2. Redistributions in binary form must reproduce the above copyright notice, +*this list of conditions and the following disclaimer in the documentation and/or other materials provided +*with the distribution. +* +*THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED +*WARRANTIES,INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +*FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +*FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +*NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +*BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +*LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +*SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE +** +* $FreeBSD$ +* +********************************************************************************/ +#ifndef __DMDEFS_H__ +#define __DMDEFS_H__ + +#include + +#define DIRECT_SMP +//#undef DIRECT_SMP + +/* the index for memory requirement, must be continious */ +#define DM_ROOT_MEM_INDEX 0 /**< the index of dm root memory */ +#define DM_PORT_MEM_INDEX 1 /**< the index of port context memory */ +#define DM_DEVICE_MEM_INDEX 2 /**< the index of Device descriptors memory */ +#define DM_EXPANDER_MEM_INDEX 3 /**< the index of Expander device descriptors memory */ +#define DM_SMP_MEM_INDEX 4 /**< the index of SMP command descriptors memory */ +#define DM_INDIRECT_SMP_MEM_INDEX 5 /**< the index of Indirect SMP command descriptors memory */ + + + +#define DM_MAX_NUM_PHYS 16 +#define DM_MAX_EXPANDER_PHYS 256 +#define DM_MAX_DEV 2048 +#define DM_MAX_EXPANDER_DEV 32 +#define DM_MAX_PORT_CONTEXT 16 +#define DM_MAX_SMP 32 +#define DM_MAX_INDIRECT_SMP DM_MAX_SMP + +#define DM_USECS_PER_TICK 1000000 /**< defines the heart beat of the LL layer 10ms */ + +/* +* FIS type +*/ +#define PIO_SETUP_DEV_TO_HOST_FIS 0x5F +#define REG_DEV_TO_HOST_FIS 0x34 +#define SET_DEV_BITS_FIS 0xA1 + +#define DEFAULT_KEY_BUFFER_SIZE 64 + +enum dm_locks_e +{ + DM_PORT_LOCK = 0, + DM_DEVICE_LOCK, + DM_EXPANDER_LOCK, + DM_TIMER_LOCK, + DM_SMP_LOCK, + DM_MAX_LOCKS +}; +/* default SMP timeout: 0xFFFF is the Maximum Allowed */ +#define DEFAULT_SMP_TIMEOUT 0xFFFF + +/* SMP direct payload size limit: IOMB direct payload size = 48 */ +#define SMP_DIRECT_PAYLOAD_LIMIT 44 + +#define SMP_INDIRECT_PAYLOAD 512 + +/* SMP maximum payload size allowed by SAS spec withtout CRC 4 bytes */ +#define SMP_MAXIMUM_PAYLOAD 1024 + +/*! \def MIN(a,b) +* \brief MIN macro +* +* use to find MIN of two values +*/ +#ifndef MIN +#define MIN(a,b) ((a) < (b) ? (a) : (b)) +#endif + +/*! \def MAX(a,b) +* \brief MAX macro +* +* use to find MAX of two values +*/ +#ifndef MAX +#define MAX(a,b) ((a) < (b) ? (b) : (a)) +#endif + +#ifndef agNULL +#define agNULL ((void *)0) +#endif + +/* for debugging print */ +#if defined(DM_DEBUG) + +/* +* for debugging purposes. +*/ +extern bit32 gDMDebugLevel; + +#define DM_DBG0(format) tddmLogDebugString(gDMDebugLevel, 0, format) +#define DM_DBG1(format) tddmLogDebugString(gDMDebugLevel, 1, format) +#define DM_DBG2(format) tddmLogDebugString(gDMDebugLevel, 2, format) +#define DM_DBG3(format) tddmLogDebugString(gDMDebugLevel, 3, format) +#define DM_DBG4(format) tddmLogDebugString(gDMDebugLevel, 4, format) +#define DM_DBG5(format) tddmLogDebugString(gDMDebugLevel, 5, format) +#define DM_DBG6(format) tddmLogDebugString(gDMDebugLevel, 6, format) + + +#else + +#define DM_DBG0(format) +#define DM_DBG1(format) +#define DM_DBG2(format) +#define DM_DBG3(format) +#define DM_DBG4(format) +#define DM_DBG5(format) +#define DM_DBG6(format) + +#endif /* DM_DEBUG */ + +//#define DM_ASSERT OS_ASSERT +//#define tddmLogDebugString TIDEBUG_MSG + +/* discovery related state */ +#define DM_DSTATE_NOT_STARTED 0 +#define DM_DSTATE_STARTED 1 +#define DM_DSTATE_COMPLETED 2 +#define DM_DSTATE_COMPLETED_WITH_FAILURE 3 + +/* SAS/SATA discovery status */ +#define DISCOVERY_NOT_START 0 /**< status indicates discovery not started */ +#define DISCOVERY_UP_STREAM 1 /**< status indicates discover upstream */ +#define DISCOVERY_DOWN_STREAM 2 /**< status indicates discover downstream */ +#define DISCOVERY_CONFIG_ROUTING 3 /**< status indicates discovery config routing table */ +#define DISCOVERY_SAS_DONE 4 /**< status indicates discovery done */ +#define DISCOVERY_REPORT_PHY_SATA 5 /**< status indicates discovery report phy sata */ + +/* SMP function */ +#define SMP_REPORT_GENERAL 0x00 +#define SMP_REPORT_MANUFACTURE_INFORMATION 0x01 +#define SMP_READ_GPIO_REGISTER 0x02 +#define SMP_DISCOVER 0x10 +#define SMP_REPORT_PHY_ERROR_LOG 0x11 +#define SMP_REPORT_PHY_SATA 0x12 +#define SMP_REPORT_ROUTING_INFORMATION 0x13 +#define SMP_WRITE_GPIO_REGISTER 0x82 +#define SMP_CONFIGURE_ROUTING_INFORMATION 0x90 +#define SMP_PHY_CONTROL 0x91 +#define SMP_PHY_TEST_FUNCTION 0x92 +#define SMP_PMC_SPECIFIC 0xC0 +#define SMP_DISCOVER_LIST 0x20 + + +/* SMP function results */ +#define SMP_FUNCTION_ACCEPTED 0x00 +#define UNKNOWN_SMP_FUNCTION 0x01 +#define SMP_FUNCTION_FAILED 0x02 +#define INVALID_REQUEST_FRAME_LENGTH 0x03 +#define INVALID_EXPANDER_CHANGE_COUNT 0x04 +#define SMP_FN_BUSY 0x05 +#define INCOMPLETE_DESCRIPTOR_LIST 0x06 +#define PHY_DOES_NOT_EXIST 0x10 +#define INDEX_DOES_NOT_EXIST 0x11 +#define PHY_DOES_NOT_SUPPORT_SATA 0x12 +#define UNKNOWN_PHY_OPERATION 0x13 +#define UNKNOWN_PHY_TEST_FUNCTION 0x14 +#define PHY_TEST_FUNCTION_IN_PROGRESS 0x15 +#define PHY_VACANT 0x16 +#define UNKNOWN_PHY_EVENT_SOURCE 0x17 +#define UNKNOWN_DESCRIPTOT_TYPE 0x18 +#define UNKNOWN_PHY_FILETER 0x19 +#define AFFILIATION_VIOLATION 0x1A +#define SMP_ZONE_VIOLATION 0x20 +#define NO_MANAGEMENT_ACCESS_RIGHTS 0x21 +#define UNKNOWN_ENABLE_DISABLE_ZONING_VALUE 0x22 +#define ZONE_LOCK_VIOLATION 0x23 +#define NOT_ACTIVATED 0x24 +#define ZONE_GROUP_OUT_OF_RANGE 0x25 +#define NO_PHYSICAL_PRESENCE 0x26 +#define SAVING_NOT_SUPPORTED 0x27 +#define SOURCE_ZONE_GROUP_DOES_NOT_EXIST 0x28 +#define DISABLED_PASSWORD_NOT_SUPPORTED 0x29 + +/* SMP PHY CONTROL OPERATION */ +#define SMP_PHY_CONTROL_NOP 0x00 +#define SMP_PHY_CONTROL_LINK_RESET 0x01 +#define SMP_PHY_CONTROL_HARD_RESET 0x02 +#define SMP_PHY_CONTROL_DISABLE 0x03 +#define SMP_PHY_CONTROL_CLEAR_ERROR_LOG 0x05 +#define SMP_PHY_CONTROL_CLEAR_AFFILIATION 0x06 +#define SMP_PHY_CONTROL_XMIT_SATA_PS_SIGNAL 0x07 + +#define DM_VEN_DEV_SPC 0x80010000 +#define DM_VEN_DEV_ADAPSPC 0x80810000 +#define DM_VEN_DEV_SPCv 0x80080000 +#define DM_VEN_DEV_SPCve 0x80090000 +#define DM_VEN_DEV_SPCvplus 0x80180000 +#define DM_VEN_DEV_SPCveplus 0x80190000 +#define DM_VEN_DEV_ADAPvplus 0x80880000 +#define DM_VEN_DEV_ADAPveplus 0x80890000 + +#define DMIsSPC(agr) (DM_VEN_DEV_SPC == (ossaHwRegReadConfig32(agr,0 ) & 0xFFFF0000) ? 1 : 0) /* returns true config space read is SPC */ +#define DMIsSPCADAP(agr) (DM_VEN_DEV_SPC == (ossaHwRegReadConfig32(agr,0 ) & 0xFFFF0000) ? 1 : 0) /* returns true config space read is SPC */ +#define DMIsSPCv(agr) (DM_VEN_DEV_SPCv == (ossaHwRegReadConfig32(agr,0 ) & 0xFFFF0000) ? 1 : 0) /* returns true config space read is SPCv */ +#define DMIsSPCve(agr) (DM_VEN_DEV_SPCve == (ossaHwRegReadConfig32(agr,0 ) & 0xFFFF0000) ? 1 : 0) /* returns true config space read is SPCve */ +#define DMIsSPCvplus(agr) (DM_VEN_DEV_SPCvplus == (ossaHwRegReadConfig32(agr,0 ) & 0xFFFF0000) ? 1 : 0) /* returns true config space read is SPCv+ */ +#define DMIsSPCveplus(agr) (DM_VEN_DEV_SPCveplus == (ossaHwRegReadConfig32(agr,0 ) & 0xFFFF0000) ? 1 : 0) /* returns true config space read is SPCve+ */ +#define DMIsSPCADAPvplus(agr) (DM_VEN_DEV_ADAPvplus == (ossaHwRegReadConfig32(agr,0 ) & 0xFFFF0000) ? 1 : 0) /* returns true config space read is SPCv+ */ +#define DMIsSPCADAPveplus(agr) (DM_VEN_DEV_ADAPveplus == (ossaHwRegReadConfig32(agr,0 ) & 0xFFFF0000) ? 1 : 0) /* returns true config space read is SPCve+ */ + +/**************************************************************** + * SAS 1.1 Spec + ****************************************************************/ +/* SMP header definition */ +typedef struct dmSMPFrameHeader_s +{ + bit8 smpFrameType; /* The first byte of SMP frame represents the SMP FRAME TYPE */ + bit8 smpFunction; /* The second byte of the SMP frame represents the SMP FUNCTION */ + bit8 smpFunctionResult; /* The third byte of SMP frame represents FUNCTION RESULT of the SMP response. */ + bit8 smpReserved; /* reserved */ +} dmSMPFrameHeader_t; + +/**************************************************************** + * report general request + ****************************************************************/ +#ifdef FOR_COMPLETENESS +typedef struct smpReqReportGeneral_s +{ + /* nothing. some compiler disallowed structure with no member */ +} smpReqReportGeneral_t; +#endif + +/**************************************************************** + * report general response + ****************************************************************/ +#define REPORT_GENERAL_CONFIGURING_BIT 0x2 +#define REPORT_GENERAL_CONFIGURABLE_BIT 0x1 +#define REPORT_GENERAL_LONG_RESPONSE_BIT 0x80 + +typedef struct smpRespReportGeneral_s +{ + bit8 expanderChangeCount16[2]; + bit8 expanderRouteIndexes16[2]; + bit8 reserved1; /* byte 9; has LONG Response for SAS 2 at bit 8 */ + bit8 numOfPhys; + bit8 configuring_configurable; + /* B7-2 : reserved */ + /* B1 : configuring */ + /* B0 : configurable */ + bit8 reserved4[17]; +} smpRespReportGeneral_t; + +#define REPORT_GENERAL_IS_CONFIGURING(pResp) \ + (((pResp)->configuring_configurable & REPORT_GENERAL_CONFIGURING_BIT) == \ + REPORT_GENERAL_CONFIGURING_BIT) + +#define REPORT_GENERAL_IS_CONFIGURABLE(pResp) \ + (((pResp)->configuring_configurable & REPORT_GENERAL_CONFIGURABLE_BIT) == \ + REPORT_GENERAL_CONFIGURABLE_BIT) + +#define REPORT_GENERAL_GET_ROUTEINDEXES(pResp) \ + DMA_BEBIT16_TO_BIT16(*(bit16 *)((pResp)->expanderRouteIndexes16)) + +#define REPORT_GENERAL_IS_LONG_RESPONSE(pResp) \ + (((pResp)->reserved1 & REPORT_GENERAL_LONG_RESPONSE_BIT) == \ + REPORT_GENERAL_LONG_RESPONSE_BIT) + +/**************************************************************** + * report manufacturer info response + ****************************************************************/ +typedef struct smpRespReportManufactureInfo_s +{ + bit8 reserved1[8]; + bit8 vendorIdentification[8]; + bit8 productIdentification[16]; + bit8 productRevisionLevel[4]; + bit8 vendorSpecific[20]; +} smpRespReportManufactureInfo_t; + +/**************************************************************** + * discover request + ****************************************************************/ +typedef struct smpReqDiscover_s +{ + bit32 reserved1; + bit8 reserved2; + bit8 phyIdentifier; + bit8 ignored; + bit8 reserved3; +} smpReqDiscover_t; + +/**************************************************************** + * discover response + ****************************************************************/ +typedef struct smpRespDiscover_s +{ + bit8 reserved1[4]; + bit8 reserved2; + bit8 phyIdentifier; + bit8 reserved3[2]; + bit8 attachedDeviceType; /* byte 12 */ + /* B7 : reserved */ + /* B6-4 : attachedDeviceType */ + /* B3-0 : reserved */ + bit8 negotiatedPhyLinkRate; /* byte 11 */ + /* B7-4 : reserved */ + /* B3-0 : negotiatedPhyLinkRate */ + bit8 attached_Ssp_Stp_Smp_Sata_Initiator; /* byte 14 */ + /* B7-4 : reserved */ + /* B3 : attachedSspInitiator */ + /* B2 : attachedStpInitiator */ + /* B1 : attachedSmpInitiator */ + /* B0 : attachedSataHost */ + bit8 attached_SataPS_Ssp_Stp_Smp_Sata_Target; /* byte 15 */ + /* B7 : attachedSataPortSelector */ + /* B6-4 : reserved */ + /* B3 : attachedSspTarget */ + /* B2 : attachedStpTarget */ + /* B1 : attachedSmpTarget */ + /* B0 : attachedSatadevice */ + bit8 sasAddressHi[4]; + bit8 sasAddressLo[4]; + bit8 attachedSasAddressHi[4]; + bit8 attachedSasAddressLo[4]; + bit8 attachedPhyIdentifier; + bit8 reserved9[7]; + bit8 programmedAndHardware_MinPhyLinkRate; + /* B7-4 : programmedMinPhyLinkRate */ + /* B3-0 : hardwareMinPhyLinkRate */ + bit8 programmedAndHardware_MaxPhyLinkRate; + /* B7-4 : programmedMaxPhyLinkRate */ + /* B3-0 : hardwareMaxPhyLinkRate */ + bit8 phyChangeCount; + bit8 virtualPhy_partialPathwayTimeout; /* byte 43 */ + /* B7 : virtualPhy*/ + /* B6-4 : reserved */ + /* B3-0 : partialPathwayTimeout */ + bit8 routingAttribute; + /* B7-4 : reserved */ + /* B3-0 : routingAttribute */ + bit8 reserved13[5]; + bit8 vendorSpecific[2]; +} smpRespDiscover_t; + +#define DISCRSP_SSP_BIT 0x08 +#define DISCRSP_STP_BIT 0x04 +#define DISCRSP_SMP_BIT 0x02 +#define DISCRSP_SATA_BIT 0x01 + +#define DISCRSP_SATA_PS_BIT 0x80 + +#define DISCRSP_GET_ATTACHED_DEVTYPE(pResp) \ + (((pResp)->attachedDeviceType & 0x70) >> 4) +#define DISCRSP_GET_LINKRATE(pResp) \ + ((pResp)->negotiatedPhyLinkRate & 0x0F) + +#define DISCRSP_IS_SSP_INITIATOR(pResp) \ + (((pResp)->attached_Ssp_Stp_Smp_Sata_Initiator & DISCRSP_SSP_BIT) == DISCRSP_SSP_BIT) +#define DISCRSP_IS_STP_INITIATOR(pResp) \ + (((pResp)->attached_Ssp_Stp_Smp_Sata_Initiator & DISCRSP_STP_BIT) == DISCRSP_STP_BIT) +#define DISCRSP_IS_SMP_INITIATOR(pResp) \ + (((pResp)->attached_Ssp_Stp_Smp_Sata_Initiator & DISCRSP_SMP_BIT) == DISCRSP_SMP_BIT) +#define DISCRSP_IS_SATA_HOST(pResp) \ + (((pResp)->attached_Ssp_Stp_Smp_Sata_Initiator & DISCRSP_SATA_BIT) == DISCRSP_SATA_BIT) + +#define DISCRSP_IS_SSP_TARGET(pResp) \ + (((pResp)->attached_SataPS_Ssp_Stp_Smp_Sata_Target & DISCRSP_SSP_BIT) == DISCRSP_SSP_BIT) +#define DISCRSP_IS_STP_TARGET(pResp) \ + (((pResp)->attached_SataPS_Ssp_Stp_Smp_Sata_Target & DISCRSP_STP_BIT) == DISCRSP_STP_BIT) +#define DISCRSP_IS_SMP_TARGET(pResp) \ + (((pResp)->attached_SataPS_Ssp_Stp_Smp_Sata_Target & DISCRSP_SMP_BIT) == DISCRSP_SMP_BIT) +#define DISCRSP_IS_SATA_DEVICE(pResp) \ + (((pResp)->attached_SataPS_Ssp_Stp_Smp_Sata_Target & DISCRSP_SATA_BIT) == DISCRSP_SATA_BIT) +#define DISCRSP_IS_SATA_PORTSELECTOR(pResp) \ + (((pResp)->attached_SataPS_Ssp_Stp_Smp_Sata_Target & DISCRSP_SATA_PS_BIT) == DISCRSP_SATA_PS_BIT) + +/* bit8 array[4] -> bit32 */ +#define DISCRSP_GET_SAS_ADDRESSHI(pResp) \ + DMA_BEBIT32_TO_BIT32(*(bit32 *)(pResp)->sasAddressHi) +#define DISCRSP_GET_SAS_ADDRESSLO(pResp) \ + DMA_BEBIT32_TO_BIT32(*(bit32 *)(pResp)->sasAddressLo) + +/* bit8 array[4] -> bit32 */ +#define DISCRSP_GET_ATTACHED_SAS_ADDRESSHI(pResp) \ + DMA_BEBIT32_TO_BIT32(*(bit32 *)(pResp)->attachedSasAddressHi) +#define DISCRSP_GET_ATTACHED_SAS_ADDRESSLO(pResp) \ + DMA_BEBIT32_TO_BIT32(*(bit32 *)(pResp)->attachedSasAddressLo) + +#define DISCRSP_VIRTUALPHY_BIT 0x80 +#define DISCRSP_IS_VIRTUALPHY(pResp) \ + (((pResp)->virtualPhy_partialPathwayTimeout & DISCRSP_VIRTUALPHY_BIT) == DISCRSP_VIRTUALPHY_BIT) + +#define DISCRSP_GET_ROUTINGATTRIB(pResp) \ + ((pResp)->routingAttribute & 0x0F) + +/**************************************************************** + * report route table request + ****************************************************************/ +typedef struct smpReqReportRouteTable_s +{ + bit8 reserved1[2]; + bit8 expanderRouteIndex16[20]; + bit8 reserved2; + bit8 phyIdentifier; + bit8 reserved3[2]; +} smpReqReportRouteTable_t; + +/**************************************************************** + * report route response + ****************************************************************/ +typedef struct smpRespReportRouteTable_s +{ + bit8 reserved1[2]; + bit8 expanderRouteIndex16[2]; + bit8 reserved2; + bit8 phyIdentifier; + bit8 reserved3[2]; + bit8 disabled; + /* B7 : expander route entry disabled */ + /* B6-0 : reserved */ + bit8 reserved5[3]; + bit8 routedSasAddressHi32[4]; + bit8 routedSasAddressLo32[4]; + bit8 reserved6[16]; +} smpRespReportRouteTable_t; + +/**************************************************************** + * configure route information request + ****************************************************************/ +typedef struct smpReqConfigureRouteInformation_s +{ + bit8 reserved1[2]; + bit8 expanderRouteIndex[2]; + bit8 reserved2; + bit8 phyIdentifier; + bit8 reserved3[2]; + bit8 disabledBit_reserved4; + bit8 reserved5[3]; + bit8 routedSasAddressHi[4]; + bit8 routedSasAddressLo[4]; + bit8 reserved6[16]; +} smpReqConfigureRouteInformation_t; + +/**************************************************************** + * configure route response + ****************************************************************/ +#ifdef FOR_COMPLETENESS +typedef struct smpRespConfigureRouteInformation_s +{ + /* nothing. some compiler disallowed structure with no member */ +} smpRespConfigureRouteInformation_t; +#endif + +/**************************************************************** + * report Phy Sata request + ****************************************************************/ +typedef struct smpReqReportPhySata_s +{ + bit8 reserved1[4]; + bit8 reserved2; + bit8 phyIdentifier; + bit8 reserved3[2]; +} smpReqReportPhySata_t; + +/**************************************************************** + * report Phy Sata response + ****************************************************************/ +typedef struct smpRespReportPhySata_s +{ + bit8 reserved1[4]; + bit8 reserved2; + bit8 phyIdentifier; + bit8 reserved3; + bit8 affiliations_sup_valid; + /* b7-2 : reserved */ + /* b1 : Affiliations supported */ + /* b0 : Affiliation valid */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***