Date: Tue, 1 Nov 2011 04:01:39 +0000 (UTC) From: Attilio Rao <attilio@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r226982 - in user/attilio/vmcontention: bin/cat bin/ln bin/mkdir bin/mv bin/ps bin/rm bin/test cddl/lib/libzfs cddl/sbin/zfs cddl/sbin/zpool cddl/usr.bin/zinject cddl/usr.bin/ztest cddl... Message-ID: <201111010401.pA141dTS047827@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: attilio Date: Tue Nov 1 04:01:39 2011 New Revision: 226982 URL: http://svn.freebsd.org/changeset/base/226982 Log: MFC Modified: user/attilio/vmcontention/bin/cat/cat.c user/attilio/vmcontention/bin/ln/ln.c user/attilio/vmcontention/bin/mkdir/mkdir.c user/attilio/vmcontention/bin/mv/mv.c user/attilio/vmcontention/bin/ps/print.c user/attilio/vmcontention/bin/ps/ps.1 user/attilio/vmcontention/bin/rm/rm.c user/attilio/vmcontention/bin/test/test.c user/attilio/vmcontention/cddl/lib/libzfs/Makefile user/attilio/vmcontention/cddl/sbin/zfs/Makefile user/attilio/vmcontention/cddl/sbin/zpool/Makefile user/attilio/vmcontention/cddl/usr.bin/zinject/Makefile user/attilio/vmcontention/cddl/usr.bin/ztest/Makefile user/attilio/vmcontention/cddl/usr.sbin/zdb/Makefile user/attilio/vmcontention/contrib/llvm/tools/clang/lib/Basic/Targets.cpp user/attilio/vmcontention/contrib/tzdata/australasia user/attilio/vmcontention/contrib/tzdata/backward user/attilio/vmcontention/contrib/tzdata/europe user/attilio/vmcontention/contrib/tzdata/northamerica user/attilio/vmcontention/contrib/tzdata/zone.tab user/attilio/vmcontention/libexec/rshd/rshd.c user/attilio/vmcontention/sys/contrib/pf/net/pf.c user/attilio/vmcontention/sys/dev/esp/esp_sbus.c user/attilio/vmcontention/sys/dev/esp/ncr53c9x.c user/attilio/vmcontention/sys/dev/esp/ncr53c9xreg.h user/attilio/vmcontention/sys/dev/esp/ncr53c9xvar.h user/attilio/vmcontention/sys/dev/md/md.c user/attilio/vmcontention/sys/sparc64/sbus/dma_sbus.c user/attilio/vmcontention/sys/sparc64/sbus/lsi64854.c user/attilio/vmcontention/sys/sparc64/sbus/lsi64854var.h user/attilio/vmcontention/sys/ufs/ufs/ufs_vnops.c user/attilio/vmcontention/usr.bin/calendar/calendars/calendar.birthday Directory Properties: user/attilio/vmcontention/ (props changed) user/attilio/vmcontention/cddl/contrib/opensolaris/ (props changed) user/attilio/vmcontention/contrib/bind9/ (props changed) user/attilio/vmcontention/contrib/binutils/ (props changed) user/attilio/vmcontention/contrib/bzip2/ (props changed) user/attilio/vmcontention/contrib/com_err/ (props changed) user/attilio/vmcontention/contrib/compiler-rt/ (props changed) user/attilio/vmcontention/contrib/dialog/ (props changed) user/attilio/vmcontention/contrib/ee/ (props changed) user/attilio/vmcontention/contrib/expat/ (props changed) user/attilio/vmcontention/contrib/file/ (props changed) user/attilio/vmcontention/contrib/gcc/ (props changed) user/attilio/vmcontention/contrib/gdb/ (props changed) user/attilio/vmcontention/contrib/gdtoa/ (props changed) user/attilio/vmcontention/contrib/gnu-sort/ (props changed) user/attilio/vmcontention/contrib/groff/ (props changed) user/attilio/vmcontention/contrib/less/ (props changed) user/attilio/vmcontention/contrib/libpcap/ (props changed) user/attilio/vmcontention/contrib/libstdc++/ (props changed) user/attilio/vmcontention/contrib/llvm/ (props changed) user/attilio/vmcontention/contrib/llvm/tools/clang/ (props changed) user/attilio/vmcontention/contrib/ncurses/ (props changed) user/attilio/vmcontention/contrib/netcat/ (props changed) user/attilio/vmcontention/contrib/ntp/ (props changed) user/attilio/vmcontention/contrib/one-true-awk/ (props changed) user/attilio/vmcontention/contrib/openbsm/ (props changed) user/attilio/vmcontention/contrib/openpam/ (props changed) user/attilio/vmcontention/contrib/openresolv/ (props changed) user/attilio/vmcontention/contrib/pf/ (props changed) user/attilio/vmcontention/contrib/sendmail/ (props changed) user/attilio/vmcontention/contrib/tcpdump/ (props changed) user/attilio/vmcontention/contrib/tcsh/ (props changed) user/attilio/vmcontention/contrib/tnftp/ (props changed) user/attilio/vmcontention/contrib/top/ (props changed) user/attilio/vmcontention/contrib/top/install-sh (props changed) user/attilio/vmcontention/contrib/tzcode/stdtime/ (props changed) user/attilio/vmcontention/contrib/tzcode/zic/ (props changed) user/attilio/vmcontention/contrib/tzdata/ (props changed) user/attilio/vmcontention/contrib/wpa/ (props changed) user/attilio/vmcontention/contrib/xz/ (props changed) user/attilio/vmcontention/crypto/heimdal/ (props changed) user/attilio/vmcontention/crypto/openssh/ (props changed) user/attilio/vmcontention/crypto/openssl/ (props changed) user/attilio/vmcontention/gnu/lib/ (props changed) user/attilio/vmcontention/gnu/usr.bin/binutils/ (props changed) user/attilio/vmcontention/gnu/usr.bin/cc/cc_tools/ (props changed) user/attilio/vmcontention/gnu/usr.bin/gdb/ (props changed) user/attilio/vmcontention/lib/libc/ (props changed) user/attilio/vmcontention/lib/libc/stdtime/ (props changed) user/attilio/vmcontention/lib/libutil/ (props changed) user/attilio/vmcontention/lib/libz/ (props changed) user/attilio/vmcontention/sbin/ (props changed) user/attilio/vmcontention/sbin/ipfw/ (props changed) user/attilio/vmcontention/share/mk/bsd.arch.inc.mk (props changed) user/attilio/vmcontention/share/zoneinfo/ (props changed) user/attilio/vmcontention/sys/ (props changed) user/attilio/vmcontention/sys/amd64/include/xen/ (props changed) user/attilio/vmcontention/sys/boot/ (props changed) user/attilio/vmcontention/sys/boot/i386/efi/ (props changed) user/attilio/vmcontention/sys/boot/ia64/efi/ (props changed) user/attilio/vmcontention/sys/boot/ia64/ski/ (props changed) user/attilio/vmcontention/sys/boot/powerpc/boot1.chrp/ (props changed) user/attilio/vmcontention/sys/boot/powerpc/ofw/ (props changed) user/attilio/vmcontention/sys/cddl/contrib/opensolaris/ (props changed) user/attilio/vmcontention/sys/conf/ (props changed) user/attilio/vmcontention/sys/contrib/dev/acpica/ (props changed) user/attilio/vmcontention/sys/contrib/octeon-sdk/ (props changed) user/attilio/vmcontention/sys/contrib/pf/ (props changed) user/attilio/vmcontention/sys/contrib/x86emu/ (props changed) user/attilio/vmcontention/usr.bin/calendar/ (props changed) user/attilio/vmcontention/usr.bin/csup/ (props changed) user/attilio/vmcontention/usr.bin/procstat/ (props changed) user/attilio/vmcontention/usr.sbin/ndiscvt/ (props changed) user/attilio/vmcontention/usr.sbin/rtadvctl/ (props changed) user/attilio/vmcontention/usr.sbin/rtadvd/ (props changed) user/attilio/vmcontention/usr.sbin/rtsold/ (props changed) user/attilio/vmcontention/usr.sbin/zic/ (props changed) Modified: user/attilio/vmcontention/bin/cat/cat.c ============================================================================== --- user/attilio/vmcontention/bin/cat/cat.c Tue Nov 1 03:53:10 2011 (r226981) +++ user/attilio/vmcontention/bin/cat/cat.c Tue Nov 1 04:01:39 2011 (r226982) @@ -64,9 +64,9 @@ __FBSDID("$FreeBSD$"); #include <unistd.h> #include <stddef.h> -int bflag, eflag, nflag, sflag, tflag, vflag; -int rval; -const char *filename; +static int bflag, eflag, nflag, sflag, tflag, vflag; +static int rval; +static const char *filename; static void usage(void); static void scanfiles(char *argv[], int cooked); Modified: user/attilio/vmcontention/bin/ln/ln.c ============================================================================== --- user/attilio/vmcontention/bin/ln/ln.c Tue Nov 1 03:53:10 2011 (r226981) +++ user/attilio/vmcontention/bin/ln/ln.c Tue Nov 1 04:01:39 2011 (r226982) @@ -54,16 +54,16 @@ __FBSDID("$FreeBSD$"); #include <string.h> #include <unistd.h> -int fflag; /* Unlink existing files. */ -int Fflag; /* Remove empty directories also. */ -int hflag; /* Check new name for symlink first. */ -int iflag; /* Interactive mode. */ -int Pflag; /* Create hard links to symlinks. */ -int sflag; /* Symbolic, not hard, link. */ -int vflag; /* Verbose output. */ -int wflag; /* Warn if symlink target does not +static int fflag; /* Unlink existing files. */ +static int Fflag; /* Remove empty directories also. */ +static int hflag; /* Check new name for symlink first. */ +static int iflag; /* Interactive mode. */ +static int Pflag; /* Create hard links to symlinks. */ +static int sflag; /* Symbolic, not hard, link. */ +static int vflag; /* Verbose output. */ +static int wflag; /* Warn if symlink target does not * exist, and -f is not enabled. */ -char linkch; +static char linkch; int linkit(const char *, const char *, int); void usage(void); Modified: user/attilio/vmcontention/bin/mkdir/mkdir.c ============================================================================== --- user/attilio/vmcontention/bin/mkdir/mkdir.c Tue Nov 1 03:53:10 2011 (r226981) +++ user/attilio/vmcontention/bin/mkdir/mkdir.c Tue Nov 1 04:01:39 2011 (r226982) @@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$"); static int build(char *, mode_t); static void usage(void); -int vflag; +static int vflag; int main(int argc, char *argv[]) Modified: user/attilio/vmcontention/bin/mv/mv.c ============================================================================== --- user/attilio/vmcontention/bin/mv/mv.c Tue Nov 1 03:53:10 2011 (r226981) +++ user/attilio/vmcontention/bin/mv/mv.c Tue Nov 1 04:01:39 2011 (r226982) @@ -68,7 +68,7 @@ __FBSDID("$FreeBSD$"); /* Exit code for a failed exec. */ #define EXEC_FAILED 127 -int fflg, iflg, nflg, vflg; +static int fflg, iflg, nflg, vflg; static int copy(const char *, const char *); static int do_move(const char *, const char *); Modified: user/attilio/vmcontention/bin/ps/print.c ============================================================================== --- user/attilio/vmcontention/bin/ps/print.c Tue Nov 1 03:53:10 2011 (r226981) +++ user/attilio/vmcontention/bin/ps/print.c Tue Nov 1 04:01:39 2011 (r226982) @@ -362,7 +362,7 @@ tdev(KINFO *k, VARENT *ve) v = ve->var; dev = k->ki_p->ki_tdev; if (dev == NODEV) - str = strdup("??"); + str = strdup("-"); else asprintf(&str, "%#jx", (uintmax_t)dev); @@ -379,7 +379,7 @@ tname(KINFO *k, VARENT *ve) v = ve->var; dev = k->ki_p->ki_tdev; if (dev == NODEV || (ttname = devname(dev, S_IFCHR)) == NULL) - str = strdup("?? "); + str = strdup("- "); else { if (strncmp(ttname, "tty", 3) == 0 || strncmp(ttname, "cua", 3) == 0) @@ -403,7 +403,7 @@ longtname(KINFO *k, VARENT *ve) v = ve->var; dev = k->ki_p->ki_tdev; if (dev == NODEV || (ttname = devname(dev, S_IFCHR)) == NULL) - ttname = "??"; + ttname = "-"; return (strdup(ttname)); } Modified: user/attilio/vmcontention/bin/ps/ps.1 ============================================================================== --- user/attilio/vmcontention/bin/ps/ps.1 Tue Nov 1 03:53:10 2011 (r226981) +++ user/attilio/vmcontention/bin/ps/ps.1 Tue Nov 1 04:01:39 2011 (r226982) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd October 1, 2011 +.Dd October 30, 2011 .Dt PS 1 .Os .Sh NAME @@ -437,6 +437,10 @@ This is followed by a .Ql - if the process can no longer reach that controlling terminal (i.e., it has been revoked). +A +.Ql - +without a preceding two letter abbreviation or pseudo-terminal device number +indicates a process which never had a controlling terminal. The full pathname of the controlling terminal is available via the .Cm tty keyword. Modified: user/attilio/vmcontention/bin/rm/rm.c ============================================================================== --- user/attilio/vmcontention/bin/rm/rm.c Tue Nov 1 03:53:10 2011 (r226981) +++ user/attilio/vmcontention/bin/rm/rm.c Tue Nov 1 04:01:39 2011 (r226982) @@ -57,10 +57,10 @@ __FBSDID("$FreeBSD$"); #include <sysexits.h> #include <unistd.h> -int dflag, eval, fflag, iflag, Pflag, vflag, Wflag, stdin_ok; -int rflag, Iflag; -uid_t uid; -volatile sig_atomic_t info; +static int dflag, eval, fflag, iflag, Pflag, vflag, Wflag, stdin_ok; +static int rflag, Iflag; +static uid_t uid; +static volatile sig_atomic_t info; int check(char *, char *, struct stat *); int check2(char **); Modified: user/attilio/vmcontention/bin/test/test.c ============================================================================== --- user/attilio/vmcontention/bin/test/test.c Tue Nov 1 03:53:10 2011 (r226981) +++ user/attilio/vmcontention/bin/test/test.c Tue Nov 1 04:01:39 2011 (r226982) @@ -118,7 +118,7 @@ enum token_types { PAREN }; -struct t_op { +static struct t_op { const char *op_text; short op_num, op_type; } const ops [] = { @@ -165,10 +165,10 @@ struct t_op { {0, 0, 0} }; -struct t_op const *t_wp_op; -int nargc; -char **t_wp; -int parenlevel; +static struct t_op const *t_wp_op; +static int nargc; +static char **t_wp; +static int parenlevel; static int aexpr(enum token); static int binop(void); Modified: user/attilio/vmcontention/cddl/lib/libzfs/Makefile ============================================================================== --- user/attilio/vmcontention/cddl/lib/libzfs/Makefile Tue Nov 1 03:53:10 2011 (r226981) +++ user/attilio/vmcontention/cddl/lib/libzfs/Makefile Tue Nov 1 04:01:39 2011 (r226982) @@ -6,8 +6,8 @@ .PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs/common LIB= zfs -DPADD= ${LIBMD} ${LIBPTHREAD} ${LIBUMEM} ${LIBUTIL} -LDADD= -lmd -lpthread -lumem -lutil +DPADD= ${LIBMD} ${LIBPTHREAD} ${LIBUMEM} ${LIBUTIL} ${LIBM} +LDADD= -lmd -lpthread -lumem -lutil -lm SRCS= deviceid.c \ fsshare.c \ Modified: user/attilio/vmcontention/cddl/sbin/zfs/Makefile ============================================================================== --- user/attilio/vmcontention/cddl/sbin/zfs/Makefile Tue Nov 1 03:53:10 2011 (r226981) +++ user/attilio/vmcontention/cddl/sbin/zfs/Makefile Tue Nov 1 04:01:39 2011 (r226982) @@ -21,8 +21,8 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs -DPADD= ${LIBBSDXML} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBSBUF} ${LIBUMEM} \ +DPADD= ${LIBGEOM} ${LIBNVPAIR} ${LIBUMEM} \ ${LIBUTIL} ${LIBUUTIL} ${LIBZFS} -LDADD= -lbsdxml -lgeom -lm -lnvpair -lsbuf -lumem -lutil -luutil -lzfs +LDADD= -lgeom -lnvpair -lumem -lutil -luutil -lzfs .include <bsd.prog.mk> Modified: user/attilio/vmcontention/cddl/sbin/zpool/Makefile ============================================================================== --- user/attilio/vmcontention/cddl/sbin/zpool/Makefile Tue Nov 1 03:53:10 2011 (r226981) +++ user/attilio/vmcontention/cddl/sbin/zpool/Makefile Tue Nov 1 04:01:39 2011 (r226982) @@ -26,8 +26,8 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/stat/common -DPADD= ${LIBAVL} ${LIBBSDXML} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBSBUF} \ +DPADD= ${LIBAVL} ${LIBGEOM} ${LIBNVPAIR} \ ${LIBUMEM} ${LIBUTIL} ${LIBUUTIL} ${LIBZFS} -LDADD= -lavl -lbsdxml -lgeom -lm -lnvpair -lsbuf -lumem -lutil -luutil -lzfs +LDADD= -lavl -lgeom -lnvpair -lumem -lutil -luutil -lzfs .include <bsd.prog.mk> Modified: user/attilio/vmcontention/cddl/usr.bin/zinject/Makefile ============================================================================== --- user/attilio/vmcontention/cddl/usr.bin/zinject/Makefile Tue Nov 1 03:53:10 2011 (r226981) +++ user/attilio/vmcontention/cddl/usr.bin/zinject/Makefile Tue Nov 1 04:01:39 2011 (r226982) @@ -19,8 +19,8 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/head CFLAGS+= -I${.CURDIR}/../../lib/libumem -DPADD= ${LIBAVL} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBUMEM} ${LIBUUTIL} \ +DPADD= ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBUMEM} ${LIBUUTIL} \ ${LIBZFS} ${LIBZPOOL} -LDADD= -lavl -lgeom -lm -lnvpair -lumem -luutil -lzfs -lzpool +LDADD= -lgeom -lm -lnvpair -lumem -luutil -lzfs -lzpool .include <bsd.prog.mk> Modified: user/attilio/vmcontention/cddl/usr.bin/ztest/Makefile ============================================================================== --- user/attilio/vmcontention/cddl/usr.bin/ztest/Makefile Tue Nov 1 03:53:10 2011 (r226981) +++ user/attilio/vmcontention/cddl/usr.bin/ztest/Makefile Tue Nov 1 04:01:39 2011 (r226982) @@ -18,8 +18,8 @@ CFLAGS+= -I${.CURDIR}/../../contrib/open CFLAGS+= -I${.CURDIR}/../../lib/libumem DPADD= ${LIBM} ${LIBNVPAIR} ${LIBUMEM} ${LIBZPOOL} \ - ${LIBPTHREAD} ${LIBZ} ${LIBAVL} -LDADD= -lm -lnvpair -lumem -lzpool -lpthread -lz -lavl + ${LIBPTHREAD} ${LIBAVL} +LDADD= -lm -lnvpair -lumem -lzpool -lpthread -lavl CSTD= c99 Modified: user/attilio/vmcontention/cddl/usr.sbin/zdb/Makefile ============================================================================== --- user/attilio/vmcontention/cddl/usr.sbin/zdb/Makefile Tue Nov 1 03:53:10 2011 (r226981) +++ user/attilio/vmcontention/cddl/usr.sbin/zdb/Makefile Tue Nov 1 04:01:39 2011 (r226982) @@ -23,9 +23,9 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/head CFLAGS+= -I${.CURDIR}/../../lib/libumem -DPADD= ${LIBAVL} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBPTHREAD} ${LIBUMEM} \ - ${LIBUUTIL} ${LIBZ} ${LIBZFS} ${LIBZPOOL} -LDADD= -lavl -lgeom -lm -lnvpair -lpthread -lumem -luutil -lz -lzfs -lzpool +DPADD= ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBPTHREAD} ${LIBUMEM} \ + ${LIBUUTIL} ${LIBZFS} ${LIBZPOOL} +LDADD= -lgeom -lm -lnvpair -lpthread -lumem -luutil -lzfs -lzpool .include <bsd.prog.mk> Modified: user/attilio/vmcontention/contrib/llvm/tools/clang/lib/Basic/Targets.cpp ============================================================================== --- user/attilio/vmcontention/contrib/llvm/tools/clang/lib/Basic/Targets.cpp Tue Nov 1 03:53:10 2011 (r226981) +++ user/attilio/vmcontention/contrib/llvm/tools/clang/lib/Basic/Targets.cpp Tue Nov 1 04:01:39 2011 (r226982) @@ -1282,6 +1282,7 @@ class X86TargetInfo : public TargetInfo CK_K8SSE3, CK_Opteron, CK_OpteronSSE3, + CK_AMDFAM10, /// This specification is deprecated and will be removed in the future. /// Users should prefer \see CK_K8. @@ -1381,6 +1382,7 @@ public: .Case("k8-sse3", CK_K8SSE3) .Case("opteron", CK_Opteron) .Case("opteron-sse3", CK_OpteronSSE3) + .Case("amdfam10", CK_AMDFAM10) .Case("x86-64", CK_x86_64) .Case("geode", CK_Geode) .Default(CK_Generic); @@ -1441,6 +1443,7 @@ public: case CK_K8SSE3: case CK_Opteron: case CK_OpteronSSE3: + case CK_AMDFAM10: case CK_x86_64: return true; } @@ -1459,12 +1462,10 @@ void X86TargetInfo::getDefaultFeatures(l Features["ssse3"] = false; Features["sse41"] = false; Features["sse42"] = false; + Features["sse4a"] = false; Features["aes"] = false; Features["avx"] = false; - // LLVM does not currently recognize this. - // Features["sse4a"] = false; - // FIXME: This *really* should not be here. // X86_64 always has SSE2. @@ -1561,6 +1562,11 @@ void X86TargetInfo::getDefaultFeatures(l setFeatureEnabled(Features, "sse3", true); setFeatureEnabled(Features, "3dnowa", true); break; + case CK_AMDFAM10: + setFeatureEnabled(Features, "sse3", true); + setFeatureEnabled(Features, "sse4a", true); + setFeatureEnabled(Features, "3dnowa", true); + break; case CK_C3_2: setFeatureEnabled(Features, "mmx", true); setFeatureEnabled(Features, "sse", true); @@ -1604,6 +1610,8 @@ bool X86TargetInfo::setFeatureEnabled(ll else if (Name == "avx") Features["avx"] = Features["sse"] = Features["sse2"] = Features["sse3"] = Features["ssse3"] = Features["sse41"] = Features["sse42"] = true; + else if (Name == "sse4a") + Features["sse4a"] = true; } else { if (Name == "mmx") Features["mmx"] = Features["3dnow"] = Features["3dnowa"] = false; @@ -1630,6 +1638,8 @@ bool X86TargetInfo::setFeatureEnabled(ll Features["aes"] = false; else if (Name == "avx") Features["avx"] = false; + else if (Name == "sse4a") + Features["sse4a"] = false; } return true; @@ -1826,6 +1836,11 @@ void X86TargetInfo::getTargetDefines(con Builder.defineMacro("__k8__"); Builder.defineMacro("__tune_k8__"); break; + case CK_AMDFAM10: + Builder.defineMacro("__amdfam10"); + Builder.defineMacro("__amdfam10__"); + Builder.defineMacro("__tune_amdfam10__"); + break; case CK_Geode: Builder.defineMacro("__geode"); Builder.defineMacro("__geode__"); Modified: user/attilio/vmcontention/contrib/tzdata/australasia ============================================================================== --- user/attilio/vmcontention/contrib/tzdata/australasia Tue Nov 1 03:53:10 2011 (r226981) +++ user/attilio/vmcontention/contrib/tzdata/australasia Tue Nov 1 04:01:39 2011 (r226982) @@ -1,5 +1,5 @@ # <pre> -# @(#)australasia 8.28 +# @(#)australasia 8.29 # This file is in the public domain, so clarified as of # 2009-05-17 by Arthur David Olson. @@ -308,6 +308,20 @@ Zone Indian/Cocos 6:27:40 - LMT 1900 # advance at 2am to 3am on October 23, 2011 and one hour back at 3am to # 2am on February 26 next year. +# From Ken Rylander (2011-10-24) +# Another change to the Fiji DST end date. In the TZ database the end date for +# Fiji DST 2012, is currently Feb 26. This has been changed to Jan 22. +# +# <a href="http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=5017:amendments-to-daylight-savings&catid=71:press-releases&Itemid=155"> +# http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=5017:amendments-to-daylight-savings&catid=71:press-releases&Itemid=155 +# </a> +# states: +# +# The end of daylight saving scheduled initially for the 26th of February 2012 +# has been brought forward to the 22nd of January 2012. +# The commencement of daylight saving will remain unchanged and start +# on the 23rd of October, 2011. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Fiji 1998 1999 - Nov Sun>=1 2:00 1:00 S Rule Fiji 1999 2000 - Feb lastSun 3:00 0 - @@ -316,7 +330,7 @@ Rule Fiji 2010 only - Mar lastSun 3:00 0 Rule Fiji 2010 only - Oct 24 2:00 1:00 S Rule Fiji 2011 only - Mar Sun>=1 3:00 0 - Rule Fiji 2011 only - Oct 23 2:00 1:00 S -Rule Fiji 2012 only - Feb 26 3:00 0 - +Rule Fiji 2012 only - Jan 22 3:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Fiji 11:53:40 - LMT 1915 Oct 26 # Suva 12:00 Fiji FJ%sT # Fiji Time Modified: user/attilio/vmcontention/contrib/tzdata/backward ============================================================================== --- user/attilio/vmcontention/contrib/tzdata/backward Tue Nov 1 03:53:10 2011 (r226981) +++ user/attilio/vmcontention/contrib/tzdata/backward Tue Nov 1 04:01:39 2011 (r226982) @@ -1,5 +1,5 @@ # <pre> -# @(#)backward 8.10 +# @(#)backward 8.11 # This file is in the public domain, so clarified as of # 2009-05-17 by Arthur David Olson. @@ -67,6 +67,7 @@ Link America/Havana Cuba Link Africa/Cairo Egypt Link Europe/Dublin Eire Link Europe/London Europe/Belfast +Link Europe/Chisinau Europe/Tiraspol Link Europe/London GB Link Europe/London GB-Eire Link Etc/GMT GMT+0 Modified: user/attilio/vmcontention/contrib/tzdata/europe ============================================================================== --- user/attilio/vmcontention/contrib/tzdata/europe Tue Nov 1 03:53:10 2011 (r226981) +++ user/attilio/vmcontention/contrib/tzdata/europe Tue Nov 1 04:01:39 2011 (r226982) @@ -1,5 +1,5 @@ # <pre> -# @(#)europe 8.39 +# @(#)europe 8.40 # This file is in the public domain, so clarified as of # 2009-05-17 by Arthur David Olson. @@ -1678,6 +1678,18 @@ Zone Europe/Malta 0:58:04 - LMT 1893 Nov # a pre-1880 LMT offset of 1:58:32. # # (which agrees with the earlier entry that had been removed) +# +# From Alexander Krivenyshev (2011-10-26) +# NO need to divide Moldova into two timezones at this point. +# As of today, Transnistria (Pridnestrovie)- Tiraspol reversed its own +# decision to abolish DST this winter. +# Following Moldova and neighboring Ukraine- Transnistria (Pridnestrovie)- +# Tiraspol will go back to winter time on October 30, 2011. +# News from Moldova (in russian): +# <a href="http://ru.publika.md/link_317061.html"> +# http://ru.publika.md/link_317061.html +# </a> + # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Europe/Chisinau 1:55:20 - LMT 1880 @@ -1694,21 +1706,6 @@ Zone Europe/Chisinau 1:55:20 - LMT 1880 # See Romania commentary for the guessed 1997 transition to EU rules. 2:00 EU EE%sT -Zone Europe/Tiraspol 1:58:32 - LMT 1880 - 1:55 - CMT 1918 Feb 15 # Chisinau MT - 1:44:24 - BMT 1931 Jul 24 # Bucharest MT - 2:00 Romania EE%sT 1940 Aug 15 - 2:00 1:00 EEST 1941 Jul 17 - 1:00 C-Eur CE%sT 1944 Aug 24 - 3:00 Russia MSK/MSD 1990 - 3:00 - MSK 1990 May 6 - 2:00 - EET 1991 - 2:00 Russia EE%sT 1992 - 2:00 E-Eur EE%sT 1997 -# See Romania commentary for the guessed 1997 transition to EU rules. - 2:00 EU EE%sT 2011 Mar lastSun 1:00u - 3:00 - FET # Further-eastern European Time - # Monaco # Shanks & Pottenger give 0:09:20 for Paris Mean Time; go with Howse's # more precise 0:09:21. Modified: user/attilio/vmcontention/contrib/tzdata/northamerica ============================================================================== --- user/attilio/vmcontention/contrib/tzdata/northamerica Tue Nov 1 03:53:10 2011 (r226981) +++ user/attilio/vmcontention/contrib/tzdata/northamerica Tue Nov 1 04:01:39 2011 (r226982) @@ -1,5 +1,5 @@ # <pre> -# @(#)northamerica 8.50 +# @(#)northamerica 8.51 # This file is in the public domain, so clarified as of # 2009-05-17 by Arthur David Olson. @@ -2690,6 +2690,20 @@ Zone America/Costa_Rica -5:36:20 - LMT 1 # <a href="http://www.timeanddate.com/news/time/cuba-starts-dst-2011.html"> # http://www.timeanddate.com/news/time/cuba-starts-dst-2011.html # </a> +# +# From Steffen Thorsen (2011-10-30) +# Cuba will end DST two weeks later this year. Instead of going back +# tonight, it has been delayed to 2011-11-13 at 01:00. +# +# One source (Spanish) +# <a href="http://www.radioangulo.cu/noticias/cuba/17105-cuba-restablecera-el-horario-del-meridiano-de-greenwich.html"> +# http://www.radioangulo.cu/noticias/cuba/17105-cuba-restablecera-el-horario-del-meridiano-de-greenwich.html +# </a> +# +# Our page: +# <a href="http://www.timeanddate.com/news/time/cuba-time-changes-2011.html"> +# http://www.timeanddate.com/news/time/cuba-time-changes-2011.html +# </a> # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Cuba 1928 only - Jun 10 0:00 1:00 D @@ -2721,12 +2735,14 @@ Rule Cuba 1997 only - Oct 12 0:00s 0 S Rule Cuba 1998 1999 - Mar lastSun 0:00s 1:00 D Rule Cuba 1998 2003 - Oct lastSun 0:00s 0 S Rule Cuba 2000 2004 - Apr Sun>=1 0:00s 1:00 D -Rule Cuba 2006 max - Oct lastSun 0:00s 0 S +Rule Cuba 2006 2010 - Oct lastSun 0:00s 0 S Rule Cuba 2007 only - Mar Sun>=8 0:00s 1:00 D Rule Cuba 2008 only - Mar Sun>=15 0:00s 1:00 D Rule Cuba 2009 2010 - Mar Sun>=8 0:00s 1:00 D Rule Cuba 2011 only - Mar Sun>=15 0:00s 1:00 D +Rule Cuba 2011 only - Nov 13 0:00s 0 S Rule Cuba 2012 max - Mar Sun>=8 0:00s 1:00 D +Rule Cuba 2012 max - Oct lastSun 0:00s 0 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Havana -5:29:28 - LMT 1890 Modified: user/attilio/vmcontention/contrib/tzdata/zone.tab ============================================================================== --- user/attilio/vmcontention/contrib/tzdata/zone.tab Tue Nov 1 03:53:10 2011 (r226981) +++ user/attilio/vmcontention/contrib/tzdata/zone.tab Tue Nov 1 04:01:39 2011 (r226982) @@ -1,5 +1,5 @@ # <pre> -# @(#)zone.tab 8.50 +# @(#)zone.tab 8.52 # This file is in the public domain, so clarified as of # 2009-05-17 by Arthur David Olson. # @@ -257,8 +257,7 @@ LV +5657+02406 Europe/Riga LY +3254+01311 Africa/Tripoli MA +3339-00735 Africa/Casablanca MC +4342+00723 Europe/Monaco -MD +4700+02850 Europe/Chisinau most locations -MD +4651+02938 Europe/Tiraspol Pridnestrovie +MD +4700+02850 Europe/Chisinau ME +4226+01916 Europe/Podgorica MF +1804-06305 America/Marigot MG -1855+04731 Indian/Antananarivo Modified: user/attilio/vmcontention/libexec/rshd/rshd.c ============================================================================== --- user/attilio/vmcontention/libexec/rshd/rshd.c Tue Nov 1 03:53:10 2011 (r226981) +++ user/attilio/vmcontention/libexec/rshd/rshd.c Tue Nov 1 04:01:39 2011 (r226982) @@ -317,7 +317,7 @@ doit(struct sockaddr *fromp) } if ((pam_err = pam_set_item(pamh, PAM_RUSER, ruser)) != PAM_SUCCESS || - (pam_err = pam_set_item(pamh, PAM_RHOST, rhost) != PAM_SUCCESS)) { + (pam_err = pam_set_item(pamh, PAM_RHOST, rhost)) != PAM_SUCCESS) { syslog(LOG_ERR|LOG_AUTH, "pam_set_item(): %s", pam_strerror(pamh, pam_err)); rshd_errx(1, "Login incorrect."); Modified: user/attilio/vmcontention/sys/contrib/pf/net/pf.c ============================================================================== --- user/attilio/vmcontention/sys/contrib/pf/net/pf.c Tue Nov 1 03:53:10 2011 (r226981) +++ user/attilio/vmcontention/sys/contrib/pf/net/pf.c Tue Nov 1 04:01:39 2011 (r226982) @@ -7176,11 +7176,15 @@ pf_test6(int dir, struct ifnet *ifp, str } #ifdef __FreeBSD__ - if (pd.pf_mtag->flags & PF_TAG_GENERATED) + if (pd.pf_mtag->flags & PF_TAG_GENERATED) { + PF_UNLOCK(); #else if (m->m_pkthdr.pf.flags & PF_TAG_GENERATED) #endif return (PF_PASS); +#ifdef __FreeBSD__ + } +#endif /* We do IP header normalization and packet reassembly here */ if (pf_normalize_ip6(m0, dir, kif, &reason, &pd) != PF_PASS) { Modified: user/attilio/vmcontention/sys/dev/esp/esp_sbus.c ============================================================================== --- user/attilio/vmcontention/sys/dev/esp/esp_sbus.c Tue Nov 1 03:53:10 2011 (r226981) +++ user/attilio/vmcontention/sys/dev/esp/esp_sbus.c Tue Nov 1 04:01:39 2011 (r226982) @@ -68,13 +68,13 @@ __FBSDID("$FreeBSD$"); #include <sys/lock.h> #include <sys/module.h> #include <sys/mutex.h> +#include <sys/rman.h> #include <dev/ofw/ofw_bus.h> #include <dev/ofw/openfirm.h> #include <machine/bus.h> #include <machine/ofw_machdep.h> #include <machine/resource.h> -#include <sys/rman.h> #include <cam/cam.h> #include <cam/cam_ccb.h> @@ -92,7 +92,7 @@ __FBSDID("$FreeBSD$"); struct esp_softc { struct ncr53c9x_softc sc_ncr53c9x; /* glue to MI code */ - struct device *sc_dev; + device_t sc_dev; struct resource *sc_res; @@ -102,8 +102,6 @@ struct esp_softc { struct lsi64854_softc *sc_dma; /* pointer to my DMA */ }; -static devclass_t esp_devclass; - static int esp_probe(device_t); static int esp_dma_attach(device_t); static int esp_dma_detach(device_t); @@ -118,7 +116,8 @@ static device_method_t esp_dma_methods[] DEVMETHOD(device_detach, esp_dma_detach), DEVMETHOD(device_suspend, esp_suspend), DEVMETHOD(device_resume, esp_resume), - {0, 0} + + KOBJMETHOD_END }; static driver_t esp_dma_driver = { @@ -136,7 +135,8 @@ static device_method_t esp_sbus_methods[ DEVMETHOD(device_detach, esp_sbus_detach), DEVMETHOD(device_suspend, esp_suspend), DEVMETHOD(device_resume, esp_resume), - {0, 0} + + KOBJMETHOD_END }; static driver_t esp_sbus_driver = { @@ -175,7 +175,6 @@ static const struct ncr53c9x_glue const esp_dma_go, esp_dma_stop, esp_dma_isactive, - NULL, /* gl_clear_latched_intr */ }; static int @@ -245,9 +244,9 @@ esp_sbus_attach(device_t dev) BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - BUS_SPACE_MAXSIZE_32BIT, /* maxsize */ - 0, /* nsegments */ - BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ + BUS_SPACE_MAXSIZE, /* maxsize */ + BUS_SPACE_UNRESTRICTED, /* nsegments */ + BUS_SPACE_MAXSIZE, /* maxsegsize */ 0, /* flags */ NULL, NULL, /* no locking */ &lsc->sc_parent_dmat); @@ -292,8 +291,10 @@ esp_sbus_attach(device_t dev) } for (i = 0; i < nchildren; i++) { if (device_is_attached(children[i]) && - sbus_get_slot(children[i]) == sbus_get_slot(dev) && - strcmp(ofw_bus_get_name(children[i]), "dma") == 0) { + sbus_get_slot(children[i]) == + sbus_get_slot(dev) && + strcmp(ofw_bus_get_name(children[i]), + "dma") == 0) { /* XXX hackery */ esc->sc_dma = (struct lsi64854_softc *) device_get_softc(children[i]); @@ -453,13 +454,6 @@ espattach(struct esp_softc *esc, const s NCR_LOCK_INIT(sc); - /* Attach the DMA engine. */ - error = lsi64854_attach(esc->sc_dma); - if (error != 0) { - device_printf(esc->sc_dev, "lsi64854_attach failed\n"); - goto fail_lock; - } - sc->sc_id = OF_getscsinitid(esc->sc_dev); #ifdef ESP_SBUS_DEBUG @@ -516,9 +510,9 @@ espattach(struct esp_softc *esc, const s NCR_WRITE_REG(sc, NCR_CFG2, sc->sc_cfg2); if ((NCR_READ_REG(sc, NCR_CFG2) & ~NCRCFG2_RSVD) != - (NCRCFG2_SCSI2 | NCRCFG2_RPE)) { + (NCRCFG2_SCSI2 | NCRCFG2_RPE)) sc->sc_rev = NCR_VARIANT_ESP100; - } else { + else { sc->sc_cfg2 = NCRCFG2_SCSI2; NCR_WRITE_REG(sc, NCR_CFG2, sc->sc_cfg2); sc->sc_cfg3 = 0; @@ -526,9 +520,9 @@ espattach(struct esp_softc *esc, const s sc->sc_cfg3 = (NCRCFG3_CDB | NCRCFG3_FCLK); NCR_WRITE_REG(sc, NCR_CFG3, sc->sc_cfg3); if (NCR_READ_REG(sc, NCR_CFG3) != - (NCRCFG3_CDB | NCRCFG3_FCLK)) { + (NCRCFG3_CDB | NCRCFG3_FCLK)) sc->sc_rev = NCR_VARIANT_ESP100A; - } else { + else { /* NCRCFG2_FE enables > 64K transfers. */ sc->sc_cfg2 |= NCRCFG2_FE; sc->sc_cfg3 = 0; @@ -543,9 +537,11 @@ espattach(struct esp_softc *esc, const s case 0x02: if ((uid & 0x07) == 0x02) - sc->sc_rev = NCR_VARIANT_FAS216; + sc->sc_rev = + NCR_VARIANT_FAS216; else - sc->sc_rev = NCR_VARIANT_FAS236; + sc->sc_rev = + NCR_VARIANT_FAS236; break; case 0x0a: @@ -560,7 +556,8 @@ espattach(struct esp_softc *esc, const s */ device_printf(esc->sc_dev, "Unknown chip\n"); - goto fail_lsi; + error = ENXIO; + goto fail_lock; } } } @@ -571,12 +568,6 @@ espattach(struct esp_softc *esc, const s #endif /* - * XXX minsync and maxxfer _should_ be set up in MI code, - * XXX but it appears to have some dependency on what sort - * XXX of DMA we're hooked up to, etc. - */ - - /* * This is the value used to start sync negotiations * Note that the NCR register "SYNCTP" is programmed * in "clocks per byte", and has a minimum value of 4. @@ -587,31 +578,27 @@ espattach(struct esp_softc *esc, const s */ sc->sc_minsync = 1000 / sc->sc_freq; + /* + * Except for some variants the maximum transfer size is 64k. + */ + sc->sc_maxxfer = 64 * 1024; sc->sc_maxoffset = 15; sc->sc_extended_geom = 1; /* * Alas, we must now modify the value a bit, because it's - * only valid when can switch on FASTCLK and FASTSCSI bits - * in config register 3... + * only valid when we can switch on FASTCLK and FASTSCSI bits + * in the config register 3... */ switch (sc->sc_rev) { case NCR_VARIANT_ESP100: sc->sc_maxwidth = MSG_EXT_WDTR_BUS_8_BIT; - sc->sc_maxxfer = 64 * 1024; sc->sc_minsync = 0; /* No synch on old chip? */ break; case NCR_VARIANT_ESP100A: - sc->sc_maxwidth = MSG_EXT_WDTR_BUS_8_BIT; - sc->sc_maxxfer = 64 * 1024; - /* Min clocks/byte is 5 */ - sc->sc_minsync = ncr53c9x_cpb2stp(sc, 5); - break; - case NCR_VARIANT_ESP200: sc->sc_maxwidth = MSG_EXT_WDTR_BUS_8_BIT; - sc->sc_maxxfer = 16 * 1024 * 1024; /* Min clocks/byte is 5 */ sc->sc_minsync = ncr53c9x_cpb2stp(sc, 5); break; @@ -642,6 +629,19 @@ espattach(struct esp_softc *esc, const s break; } + /* + * Given that we allocate resources based on sc->sc_maxxfer it doesn't + * make sense to supply a value higher than the maximum actually used. + */ + sc->sc_maxxfer = min(sc->sc_maxxfer, MAXPHYS); + + /* Attach the DMA engine. */ + error = lsi64854_attach(esc->sc_dma); + if (error != 0) { + device_printf(esc->sc_dev, "lsi64854_attach failed\n"); + goto fail_lock; + } + /* Establish interrupt channel. */ i = 0; if ((esc->sc_irqres = bus_alloc_resource_any(esc->sc_dev, SYS_RES_IRQ, Modified: user/attilio/vmcontention/sys/dev/esp/ncr53c9x.c ============================================================================== --- user/attilio/vmcontention/sys/dev/esp/ncr53c9x.c Tue Nov 1 03:53:10 2011 (r226981) +++ user/attilio/vmcontention/sys/dev/esp/ncr53c9x.c Tue Nov 1 04:01:39 2011 (r226982) @@ -123,6 +123,8 @@ __FBSDID("$FreeBSD$"); #include <dev/esp/ncr53c9xreg.h> #include <dev/esp/ncr53c9xvar.h> +devclass_t esp_devclass; + MODULE_DEPEND(esp, cam, 1, 1, 1); #ifdef NCR53C9X_DEBUG @@ -179,8 +181,7 @@ static inline int ncr53c9x_stp2cpb(struc #define NCR_SET_COUNT(sc, size) do { \ NCR_WRITE_REG((sc), NCR_TCL, (size)); \ NCR_WRITE_REG((sc), NCR_TCM, (size) >> 8); \ - if ((sc->sc_cfg2 & NCRCFG2_FE) || \ - (sc->sc_rev == NCR_VARIANT_FAS366)) \ + if ((sc->sc_features & NCR_F_LARGEXFER) != 0) \ NCR_WRITE_REG((sc), NCR_TCH, (size) >> 16); \ if (sc->sc_rev == NCR_VARIANT_FAS366) \ NCR_WRITE_REG(sc, NCR_RCH, 0); \ @@ -391,6 +392,7 @@ ncr53c9x_attach(struct ncr53c9x_softc *s ecb = &sc->ecb_array[i]; ecb->sc = sc; ecb->tag_id = i; + callout_init_mtx(&ecb->ch, &sc->sc_lock, 0); TAILQ_INSERT_HEAD(&sc->free_list, ecb, free_links); } @@ -449,10 +451,10 @@ ncr53c9x_detach(struct ncr53c9x_softc *s xpt_register_async(0, ncr53c9x_async, sc->sc_sim, sc->sc_path); xpt_free_path(sc->sc_path); xpt_bus_deregister(cam_sim_path(sc->sc_sim)); + cam_sim_free(sc->sc_sim, TRUE); NCR_UNLOCK(sc); - cam_sim_free(sc->sc_sim, TRUE); free(sc->ecb_array, M_DEVBUF); free(sc->sc_tinfo, M_DEVBUF); if (sc->sc_imess_self) @@ -504,6 +506,8 @@ ncr53c9x_reset(struct ncr53c9x_softc *sc /* FALLTHROUGH */ case NCR_VARIANT_ESP100A: sc->sc_features |= NCR_F_SELATN3; + if ((sc->sc_cfg2 & NCRCFG2_FE) != 0) + sc->sc_features |= NCR_F_LARGEXFER; NCR_WRITE_REG(sc, NCR_CFG2, sc->sc_cfg2); /* FALLTHROUGH */ case NCR_VARIANT_ESP100: @@ -514,8 +518,8 @@ ncr53c9x_reset(struct ncr53c9x_softc *sc break; case NCR_VARIANT_FAS366: - sc->sc_features |= - NCR_F_HASCFG3 | NCR_F_FASTSCSI | NCR_F_SELATN3; + sc->sc_features |= NCR_F_HASCFG3 | NCR_F_FASTSCSI | + NCR_F_SELATN3 | NCR_F_LARGEXFER; sc->sc_cfg3 = NCRFASCFG3_FASTCLK | NCRFASCFG3_OBAUTO; if (sc->sc_id > 7) sc->sc_cfg3 |= NCRFASCFG3_IDBIT3; @@ -711,9 +715,6 @@ ncr53c9x_readregs(struct ncr53c9x_softc sc->sc_espintr = NCR_READ_REG(sc, NCR_INTR); - if (sc->sc_glue->gl_clear_latched_intr != NULL) - (*sc->sc_glue->gl_clear_latched_intr)(sc); - /* * Determine the SCSI bus phase, return either a real SCSI bus phase * or some pseudo phase we use to detect certain exceptions. @@ -806,7 +807,7 @@ ncr53c9x_select(struct ncr53c9x_softc *s struct ncr53c9x_tinfo *ti; uint8_t *cmd; size_t dmasize; - int clen, selatn3, selatns; + int clen, error, selatn3, selatns; int lun = ecb->ccb->ccb_h.target_lun; int target = ecb->ccb->ccb_h.target_id; @@ -887,13 +888,19 @@ ncr53c9x_select(struct ncr53c9x_softc *s dmasize = clen; sc->sc_cmdlen = clen; sc->sc_cmdp = cmd; - NCRDMA_SETUP(sc, &sc->sc_cmdp, &sc->sc_cmdlen, 0, &dmasize); + error = NCRDMA_SETUP(sc, &sc->sc_cmdp, &sc->sc_cmdlen, 0, + &dmasize); + if (error != 0) { + sc->sc_cmdlen = 0; + sc->sc_cmdp = NULL; + goto cmd; + } + /* Program the SCSI counter. */ NCR_SET_COUNT(sc, dmasize); /* Load the count in. */ - /* if (sc->sc_rev != NCR_VARIANT_FAS366) */ - NCRCMD(sc, NCRCMD_NOP | NCRCMD_DMA); + NCRCMD(sc, NCRCMD_NOP | NCRCMD_DMA); /* And get the target's attention. */ if (selatn3) { @@ -906,6 +913,7 @@ ncr53c9x_select(struct ncr53c9x_softc *s return; } +cmd: /* * Who am I? This is where we tell the target that we are * happy for it to disconnect etc. @@ -989,13 +997,11 @@ ncr53c9x_action(struct cam_sim *sim, uni case XPT_RESET_BUS: ncr53c9x_init(sc, 1); ccb->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); - return; + break; case XPT_CALC_GEOMETRY: cam_calc_geometry(&ccb->ccg, sc->sc_extended_geom); - xpt_done(ccb); - return; + break; case XPT_PATH_INQ: cpi = &ccb->cpi; @@ -1009,19 +1015,19 @@ ncr53c9x_action(struct cam_sim *sim, uni cpi->max_target = sc->sc_ntarg - 1; cpi->max_lun = 7; cpi->initiator_id = sc->sc_id; - cpi->bus_id = 0; - cpi->base_transfer_speed = 3300; strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); - strncpy(cpi->hba_vid, "Sun", HBA_IDLEN); + strncpy(cpi->hba_vid, "NCR", HBA_IDLEN); strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); - cpi->transport = XPORT_SPI; - cpi->transport_version = 2; + cpi->bus_id = 0; + cpi->base_transfer_speed = 3300; cpi->protocol = PROTO_SCSI; cpi->protocol_version = SCSI_REV_2; + cpi->transport = XPORT_SPI; + cpi->transport_version = 2; + cpi->maxio = sc->sc_maxxfer; ccb->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); - return; + break; case XPT_GET_TRAN_SETTINGS: cts = &ccb->cts; @@ -1064,28 +1070,24 @@ ncr53c9x_action(struct cam_sim *sim, uni CTS_SPI_VALID_DISC; scsi->valid = CTS_SCSI_VALID_TQ; ccb->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); - return; + break; case XPT_ABORT: device_printf(sc->sc_dev, "XPT_ABORT called\n"); ccb->ccb_h.status = CAM_FUNC_NOTAVAIL; - xpt_done(ccb); - return; + break; case XPT_TERM_IO: device_printf(sc->sc_dev, "XPT_TERM_IO called\n"); ccb->ccb_h.status = CAM_FUNC_NOTAVAIL; - xpt_done(ccb); - return; + break; case XPT_RESET_DEV: case XPT_SCSI_IO: if (ccb->ccb_h.target_id < 0 || ccb->ccb_h.target_id >= sc->sc_ntarg) { ccb->ccb_h.status = CAM_PATH_INVALID; - xpt_done(ccb); - return; + goto done; } /* Get an ECB to use. */ ecb = ncr53c9x_get_ecb(sc); @@ -1097,8 +1099,7 @@ ncr53c9x_action(struct cam_sim *sim, uni xpt_freeze_simq(sim, 1); ccb->ccb_h.status = CAM_REQUEUE_REQ; device_printf(sc->sc_dev, "unable to allocate ecb\n"); - xpt_done(ccb); - return; + goto done; } /* Initialize ecb. */ @@ -1127,7 +1128,7 @@ ncr53c9x_action(struct cam_sim *sim, uni ecb->flags |= ECB_READY; if (sc->sc_state == NCR_IDLE) ncr53c9x_sched(sc); - break; + return; case XPT_SET_TRAN_SETTINGS: cts = &ccb->cts; @@ -1165,16 +1166,16 @@ ncr53c9x_action(struct cam_sim *sim, uni } ccb->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); - return; + break; default: device_printf(sc->sc_dev, "Unhandled function code %d\n", ccb->ccb_h.func_code); ccb->ccb_h.status = CAM_PROVIDE_FAIL; - xpt_done(ccb); - return; } + +done: + xpt_done(ccb); } /* @@ -2030,8 +2031,8 @@ gotit: default: xpt_print_path(ecb->ccb->ccb_h.path); - printf("unrecognized MESSAGE EXTENDED;" - " sending REJECT\n"); + printf("unrecognized MESSAGE EXTENDED 0x%x;" + " sending REJECT\n", sc->sc_imess[2]); goto reject; } break; @@ -2039,7 +2040,8 @@ gotit: default: NCR_MSGS(("ident ")); xpt_print_path(ecb->ccb->ccb_h.path); - printf("unrecognized MESSAGE; sending REJECT\n"); + printf("unrecognized MESSAGE 0x%x; sending REJECT\n", + sc->sc_imess[0]); /* FALLTHROUGH */ reject: ncr53c9x_sched_msgout(SEND_REJECT); @@ -2109,6 +2111,7 @@ ncr53c9x_msgout(struct ncr53c9x_softc *s struct ncr53c9x_tinfo *ti; struct ncr53c9x_ecb *ecb; size_t size; + int error; #ifdef NCR53C9X_DEBUG int i; #endif *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111010401.pA141dTS047827>