From owner-svn-src-stable-8@FreeBSD.ORG Sun Sep 16 00:34:04 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CBE4D1065670; Sun, 16 Sep 2012 00:34:04 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD3C48FC0A; Sun, 16 Sep 2012 00:34:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8G0Y4TH067323; Sun, 16 Sep 2012 00:34:04 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8G0Y47w067318; Sun, 16 Sep 2012 00:34:04 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201209160034.q8G0Y47w067318@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 16 Sep 2012 00:34:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240543 - in stable/8: include/rpc sys/rpc X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Sep 2012 00:34:04 -0000 Author: pfg Date: Sun Sep 16 00:34:04 2012 New Revision: 240543 URL: http://svn.freebsd.org/changeset/base/240543 Log: MFC r240060, r240062: Rename __rpc_xdr with XDR. This fixes at least one C++ application and matches what upstream (Solaris) has done on their xdr.h header. PR: 137443 Modified: stable/8/include/rpc/xdr.h stable/8/sys/rpc/rpc_com.h stable/8/sys/rpc/xdr.h Directory Properties: stable/8/include/rpc/ (props changed) stable/8/sys/rpc/ (props changed) Modified: stable/8/include/rpc/xdr.h ============================================================================== --- stable/8/include/rpc/xdr.h Sun Sep 16 00:32:25 2012 (r240542) +++ stable/8/include/rpc/xdr.h Sun Sep 16 00:34:04 2012 (r240543) @@ -97,26 +97,26 @@ enum xdr_op { * an operations vector for the particular implementation (e.g. see xdr_mem.c), * and two private fields for the use of the particular implementation. */ -typedef struct __rpc_xdr { +typedef struct XDR { enum xdr_op x_op; /* operation; fast additional param */ const struct xdr_ops { /* get a long from underlying stream */ - bool_t (*x_getlong)(struct __rpc_xdr *, long *); + bool_t (*x_getlong)(struct XDR *, long *); /* put a long to " */ - bool_t (*x_putlong)(struct __rpc_xdr *, const long *); + bool_t (*x_putlong)(struct XDR *, const long *); /* get some bytes from " */ - bool_t (*x_getbytes)(struct __rpc_xdr *, char *, u_int); + bool_t (*x_getbytes)(struct XDR *, char *, u_int); /* put some bytes to " */ - bool_t (*x_putbytes)(struct __rpc_xdr *, const char *, u_int); + bool_t (*x_putbytes)(struct XDR *, const char *, u_int); /* returns bytes off from beginning */ - u_int (*x_getpostn)(struct __rpc_xdr *); + u_int (*x_getpostn)(struct XDR *); /* lets you reposition the stream */ - bool_t (*x_setpostn)(struct __rpc_xdr *, u_int); + bool_t (*x_setpostn)(struct XDR *, u_int); /* buf quick ptr to buffered data */ - int32_t *(*x_inline)(struct __rpc_xdr *, u_int); + int32_t *(*x_inline)(struct XDR *, u_int); /* free privates of this xdr_stream */ - void (*x_destroy)(struct __rpc_xdr *); - bool_t (*x_control)(struct __rpc_xdr *, int, void *); + void (*x_destroy)(struct XDR *); + bool_t (*x_control)(struct XDR *, int, void *); } *x_ops; char * x_public; /* users' data */ void * x_private; /* pointer to private data */ Modified: stable/8/sys/rpc/rpc_com.h ============================================================================== --- stable/8/sys/rpc/rpc_com.h Sun Sep 16 00:32:25 2012 (r240542) +++ stable/8/sys/rpc/rpc_com.h Sun Sep 16 00:34:04 2012 (r240543) @@ -114,8 +114,8 @@ extern int __rpc_sockisbound(struct sock extern int bindresvport(struct socket *so, struct sockaddr *sa); struct xucred; -struct __rpc_xdr; -bool_t xdr_authunix_parms(struct __rpc_xdr *xdrs, uint32_t *time, struct xucred *cred); +struct XDR; +bool_t xdr_authunix_parms(struct XDR *xdrs, uint32_t *time, struct xucred *cred); #endif __END_DECLS Modified: stable/8/sys/rpc/xdr.h ============================================================================== --- stable/8/sys/rpc/xdr.h Sun Sep 16 00:32:25 2012 (r240542) +++ stable/8/sys/rpc/xdr.h Sun Sep 16 00:34:04 2012 (r240543) @@ -97,26 +97,26 @@ enum xdr_op { * an operations vector for the particular implementation (e.g. see xdr_mem.c), * and two private fields for the use of the particular implementation. */ -typedef struct __rpc_xdr { +typedef struct XDR { enum xdr_op x_op; /* operation; fast additional param */ const struct xdr_ops { /* get a long from underlying stream */ - bool_t (*x_getlong)(struct __rpc_xdr *, long *); + bool_t (*x_getlong)(struct XDR *, long *); /* put a long to " */ - bool_t (*x_putlong)(struct __rpc_xdr *, const long *); + bool_t (*x_putlong)(struct XDR *, const long *); /* get some bytes from " */ - bool_t (*x_getbytes)(struct __rpc_xdr *, char *, u_int); + bool_t (*x_getbytes)(struct XDR *, char *, u_int); /* put some bytes to " */ - bool_t (*x_putbytes)(struct __rpc_xdr *, const char *, u_int); + bool_t (*x_putbytes)(struct XDR *, const char *, u_int); /* returns bytes off from beginning */ - u_int (*x_getpostn)(struct __rpc_xdr *); + u_int (*x_getpostn)(struct XDR *); /* lets you reposition the stream */ - bool_t (*x_setpostn)(struct __rpc_xdr *, u_int); + bool_t (*x_setpostn)(struct XDR *, u_int); /* buf quick ptr to buffered data */ - int32_t *(*x_inline)(struct __rpc_xdr *, u_int); + int32_t *(*x_inline)(struct XDR *, u_int); /* free privates of this xdr_stream */ - void (*x_destroy)(struct __rpc_xdr *); - bool_t (*x_control)(struct __rpc_xdr *, int, void *); + void (*x_destroy)(struct XDR *); + bool_t (*x_control)(struct XDR *, int, void *); } *x_ops; char * x_public; /* users' data */ void * x_private; /* pointer to private data */ From owner-svn-src-stable-8@FreeBSD.ORG Sun Sep 16 00:35:10 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08D95106566C; Sun, 16 Sep 2012 00:35:10 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C933B8FC0C; Sun, 16 Sep 2012 00:35:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8G0Z9sC067521; Sun, 16 Sep 2012 00:35:09 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8G0Z9iL067507; Sun, 16 Sep 2012 00:35:09 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209160035.q8G0Z9iL067507@svn.freebsd.org> From: Eitan Adler Date: Sun, 16 Sep 2012 00:35:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240544 - in stable/8/share/examples: . cvsup X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Sep 2012 00:35:10 -0000 Author: eadler Date: Sun Sep 16 00:35:09 2012 New Revision: 240544 URL: http://svn.freebsd.org/changeset/base/240544 Log: MFC r240252,r240253: Remove documentation and www cvsup files as they are no longer useful with the switch to subversion. Specifically document that an incomplete ports tree is not supported. Remove useless comment about sendmail. Approved by: cperciva (implicit) Deleted: stable/8/share/examples/cvsup/doc-supfile stable/8/share/examples/cvsup/www-supfile Modified: stable/8/share/examples/Makefile stable/8/share/examples/cvsup/cvs-supfile stable/8/share/examples/cvsup/refuse stable/8/share/examples/cvsup/refuse.README stable/8/share/examples/cvsup/stable-supfile Directory Properties: stable/8/share/examples/ (props changed) stable/8/share/examples/cvsup/ (props changed) stable/8/share/man/man5/ (props changed) Modified: stable/8/share/examples/Makefile ============================================================================== --- stable/8/share/examples/Makefile Sun Sep 16 00:34:04 2012 (r240543) +++ stable/8/share/examples/Makefile Sun Sep 16 00:35:09 2012 (r240544) @@ -52,14 +52,12 @@ XFILES= BSD_daemon/FreeBSD.pfa \ csh/dot.cshrc \ cvsup/README \ cvsup/cvs-supfile \ - cvsup/doc-supfile \ cvsup/gnats-supfile \ cvsup/ports-supfile \ cvsup/refuse \ cvsup/refuse.README \ cvsup/stable-supfile \ cvsup/standard-supfile \ - cvsup/www-supfile \ diskless/ME \ diskless/README.BOOTP \ diskless/README.TEMPLATING \ Modified: stable/8/share/examples/cvsup/cvs-supfile ============================================================================== --- stable/8/share/examples/cvsup/cvs-supfile Sun Sep 16 00:34:04 2012 (r240543) +++ stable/8/share/examples/cvsup/cvs-supfile Sun Sep 16 00:35:09 2012 (r240544) @@ -169,19 +169,6 @@ ports-all #ports-x11-toolkits #ports-x11-wm -## Documentation -# -# The easiest way to get the doc tree is to use the "doc-all" -# mega-collection. It includes all of the individual "doc-*" -# collections, -doc-all - -## Website -# -# This collection retrieves the www tree of the FreeBSD -# repository -www - ## Projects # # This collection retrieves the projects tree of the FreeBSD @@ -200,4 +187,3 @@ cvsroot-all #cvsroot-common #cvsroot-src #cvsroot-ports -#cvsroot-doc Modified: stable/8/share/examples/cvsup/refuse ============================================================================== --- stable/8/share/examples/cvsup/refuse Sun Sep 16 00:34:04 2012 (r240543) +++ stable/8/share/examples/cvsup/refuse Sun Sep 16 00:35:09 2012 (r240544) @@ -1,23 +1,3 @@ -doc/bn_* -doc/da_* -doc/de_* -doc/el_* -doc/es_* -doc/fr_* -doc/hu_* -doc/id_* -doc/it_* -doc/ja_* -doc/mn_* -doc/nl_* -doc/no_* -doc/pl_* -doc/pt_* -doc/ro_* -doc/ru_* -doc/sr_* -doc/tr_* -doc/zh_* ports/arabic ports/chinese ports/french Modified: stable/8/share/examples/cvsup/refuse.README ============================================================================== --- stable/8/share/examples/cvsup/refuse.README Sun Sep 16 00:34:04 2012 (r240543) +++ stable/8/share/examples/cvsup/refuse.README Sun Sep 16 00:35:09 2012 (r240544) @@ -16,33 +16,9 @@ CVSup's base directory to "/var/db". Th directory; i.e., it is "/var/db/sup". If you have changed your base directory, your sup directory is /path/to/base/sup. -This file used to contain /usr/src/etc/sendmail/freebsd.mc in case -you modified that file. However, this was removed as it can break -buildworld. Modify /etc/mail/`hostname`.mc instead. - If you are an English speaker and don't wish to receive the -foreign-language documentation or ports, use the following patterns: +non-English ports, use the following patterns: - doc/bn_* - doc/da_* - doc/de_* - doc/el_* - doc/es_* - doc/fr_* - doc/hu_* - doc/id_* - doc/it_* - doc/ja_* - doc/mn_* - doc/nl_* - doc/no_* - doc/pl_* - doc/pt_* - doc/ro_* - doc/ru_* - doc/sr_* - doc/tr_* - doc/zh_* ports/arabic ports/chinese ports/french @@ -57,6 +33,9 @@ foreign-language documentation or ports, ports/ukrainian ports/vietnamese +Note that this is *not* a supported configuration and may result +in ports builds breaking. + Use refuse files with care. Some parts of the src distribution depend on files in completely different parts. Modified: stable/8/share/examples/cvsup/stable-supfile ============================================================================== --- stable/8/share/examples/cvsup/stable-supfile Sun Sep 16 00:34:04 2012 (r240543) +++ stable/8/share/examples/cvsup/stable-supfile Sun Sep 16 00:35:09 2012 (r240544) @@ -43,14 +43,13 @@ # # DANGER! WARNING! LOOK OUT! VORSICHT! # -# If you add any of the ports or doc collections to this file, be sure to +# If you add any of the ports collections to this file, be sure to # specify them with a "tag" value set to ".", like this: # # ports-all tag=. -# doc-all tag=. # # If you leave out the "tag=." portion, CVSup will delete all of -# the files in your ports or doc tree. That is because the ports and doc +# the files in your ports. That is because the ports # collections do not use the same tags as the main part of the FreeBSD # source tree. # From owner-svn-src-stable-8@FreeBSD.ORG Sun Sep 16 08:44:56 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1856D106566B; Sun, 16 Sep 2012 08:44:56 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DDAC98FC08; Sun, 16 Sep 2012 08:44:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8G8itMQ043781; Sun, 16 Sep 2012 08:44:55 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8G8itGJ043780; Sun, 16 Sep 2012 08:44:55 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201209160844.q8G8itGJ043780@svn.freebsd.org> From: Alexander Motin Date: Sun, 16 Sep 2012 08:44:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240553 - stable/8/share/man/man4 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Sep 2012 08:44:56 -0000 Author: mav Date: Sun Sep 16 08:44:55 2012 New Revision: 240553 URL: http://svn.freebsd.org/changeset/base/240553 Log: MFC r240465: Add global and per-module sysctls/tunables to enable/disable metadata taste. That should help to handle some cases when disk has some RAID metadata that should be ignored, especially during boot. Modified: Directory Properties: stable/8/share/man/man4/ (props changed) From owner-svn-src-stable-8@FreeBSD.ORG Sun Sep 16 08:58:35 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 197B81065675; Sun, 16 Sep 2012 08:58:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EED6F8FC16; Sun, 16 Sep 2012 08:58:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8G8wYk2045858; Sun, 16 Sep 2012 08:58:34 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8G8wYQT045844; Sun, 16 Sep 2012 08:58:34 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201209160858.q8G8wYQT045844@svn.freebsd.org> From: Alexander Motin Date: Sun, 16 Sep 2012 08:58:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240554 - stable/8/sys/geom/raid X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Sep 2012 08:58:35 -0000 Author: mav Date: Sun Sep 16 08:58:34 2012 New Revision: 240554 URL: http://svn.freebsd.org/changeset/base/240554 Log: MFC r240465: Add global and per-module sysctls/tunables to enable/disable metadata taste. That should help to handle some cases when disk has some RAID metadata that should be ignored, especially during boot. pR: Modified: stable/8/sys/geom/raid/g_raid.c stable/8/sys/geom/raid/g_raid.h stable/8/sys/geom/raid/md_ddf.c stable/8/sys/geom/raid/md_intel.c stable/8/sys/geom/raid/md_jmicron.c stable/8/sys/geom/raid/md_nvidia.c stable/8/sys/geom/raid/md_promise.c stable/8/sys/geom/raid/md_sii.c stable/8/sys/geom/raid/tr_concat.c stable/8/sys/geom/raid/tr_raid0.c stable/8/sys/geom/raid/tr_raid1.c stable/8/sys/geom/raid/tr_raid1e.c stable/8/sys/geom/raid/tr_raid5.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/geom/ (props changed) Modified: stable/8/sys/geom/raid/g_raid.c ============================================================================== --- stable/8/sys/geom/raid/g_raid.c Sun Sep 16 08:44:55 2012 (r240553) +++ stable/8/sys/geom/raid/g_raid.c Sun Sep 16 08:58:34 2012 (r240554) @@ -51,6 +51,10 @@ static MALLOC_DEFINE(M_RAID, "raid_data" SYSCTL_DECL(_kern_geom); SYSCTL_NODE(_kern_geom, OID_AUTO, raid, CTLFLAG_RW, 0, "GEOM_RAID stuff"); +int g_raid_enable = 1; +TUNABLE_INT("kern.geom.raid.enable", &g_raid_enable); +SYSCTL_INT(_kern_geom_raid, OID_AUTO, enable, CTLFLAG_RW, + &g_raid_enable, 0, "Enable on-disk metadata taste"); u_int g_raid_aggressive_spare = 0; TUNABLE_INT("kern.geom.raid.aggressive_spare", &g_raid_aggressive_spare); SYSCTL_UINT(_kern_geom_raid, OID_AUTO, aggressive_spare, CTLFLAG_RW, @@ -1919,6 +1923,8 @@ int g_raid_start_volume(struct g_raid_vo G_RAID_DEBUG1(2, vol->v_softc, "Starting volume %s.", vol->v_name); LIST_FOREACH(class, &g_raid_tr_classes, trc_list) { + if (!class->trc_enable) + continue; G_RAID_DEBUG1(2, vol->v_softc, "Tasting volume %s for %s transformation.", vol->v_name, class->name); @@ -2141,6 +2147,8 @@ g_raid_taste(struct g_class *mp, struct g_topology_assert(); g_trace(G_T_TOPOLOGY, "%s(%s, %s)", __func__, mp->name, pp->name); + if (!g_raid_enable) + return (NULL); G_RAID_DEBUG(2, "Tasting provider %s.", pp->name); gp = g_new_geomf(mp, "raid:taste"); @@ -2153,6 +2161,8 @@ g_raid_taste(struct g_class *mp, struct geom = NULL; LIST_FOREACH(class, &g_raid_md_classes, mdc_list) { + if (!class->mdc_enable) + continue; G_RAID_DEBUG(2, "Tasting provider %s for %s metadata.", pp->name, class->name); obj = (void *)kobj_create((kobj_class_t)class, M_RAID, Modified: stable/8/sys/geom/raid/g_raid.h ============================================================================== --- stable/8/sys/geom/raid/g_raid.h Sun Sep 16 08:44:55 2012 (r240553) +++ stable/8/sys/geom/raid/g_raid.h Sun Sep 16 08:58:34 2012 (r240554) @@ -33,6 +33,9 @@ #include #include #include +#ifdef _KERNEL +#include +#endif #define G_RAID_CLASS_NAME "RAID" @@ -51,6 +54,7 @@ struct g_raid_tr_object; #ifdef _KERNEL extern u_int g_raid_aggressive_spare; extern u_int g_raid_debug; +extern int g_raid_enable; extern int g_raid_read_err_thresh; extern u_int g_raid_start_timeout; extern struct g_class g_raid_class; @@ -322,11 +326,14 @@ struct g_raid_softc { }; #define sc_name sc_geom->name +SYSCTL_DECL(_kern_geom_raid); + /* * KOBJ parent class of metadata processing modules. */ struct g_raid_md_class { KOBJ_CLASS_FIELDS; + int mdc_enable; int mdc_priority; LIST_ENTRY(g_raid_md_class) mdc_list; }; @@ -342,20 +349,29 @@ struct g_raid_md_object { int g_raid_md_modevent(module_t, int, void *); -#define G_RAID_MD_DECLARE(name) \ - static moduledata_t name##_mod = { \ - #name, \ +#define G_RAID_MD_DECLARE(name, label) \ + static moduledata_t g_raid_md_##name##_mod = { \ + "g_raid_md_" __XSTRING(name), \ g_raid_md_modevent, \ - &name##_class \ + &g_raid_md_##name##_class \ }; \ - DECLARE_MODULE(name, name##_mod, SI_SUB_DRIVERS, SI_ORDER_SECOND); \ - MODULE_DEPEND(name, geom_raid, 0, 0, 0) + DECLARE_MODULE(g_raid_md_##name, g_raid_md_##name##_mod, \ + SI_SUB_DRIVERS, SI_ORDER_SECOND); \ + MODULE_DEPEND(g_raid_md_##name, geom_raid, 0, 0, 0); \ + SYSCTL_NODE(_kern_geom_raid, OID_AUTO, name, CTLFLAG_RD, \ + NULL, label " metadata module"); \ + SYSCTL_INT(_kern_geom_raid_##name, OID_AUTO, enable, \ + CTLFLAG_RW, &g_raid_md_##name##_class.mdc_enable, 0, \ + "Enable " label " metadata format taste"); \ + TUNABLE_INT("kern.geom.raid." __XSTRING(name) ".enable", \ + &g_raid_md_##name##_class.mdc_enable) /* * KOBJ parent class of data transformation modules. */ struct g_raid_tr_class { KOBJ_CLASS_FIELDS; + int trc_enable; int trc_priority; LIST_ENTRY(g_raid_tr_class) trc_list; }; @@ -371,14 +387,22 @@ struct g_raid_tr_object { int g_raid_tr_modevent(module_t, int, void *); -#define G_RAID_TR_DECLARE(name) \ - static moduledata_t name##_mod = { \ - #name, \ +#define G_RAID_TR_DECLARE(name, label) \ + static moduledata_t g_raid_tr_##name##_mod = { \ + "g_raid_tr_" __XSTRING(name), \ g_raid_tr_modevent, \ - &name##_class \ + &g_raid_tr_##name##_class \ }; \ - DECLARE_MODULE(name, name##_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST); \ - MODULE_DEPEND(name, geom_raid, 0, 0, 0) + DECLARE_MODULE(g_raid_tr_##name, g_raid_tr_##name##_mod, \ + SI_SUB_DRIVERS, SI_ORDER_FIRST); \ + MODULE_DEPEND(g_raid_tr_##name, geom_raid, 0, 0, 0); \ + SYSCTL_NODE(_kern_geom_raid, OID_AUTO, name, CTLFLAG_RD, \ + NULL, label " transformation module"); \ + SYSCTL_INT(_kern_geom_raid_##name, OID_AUTO, enable, \ + CTLFLAG_RW, &g_raid_tr_##name##_class.trc_enable, 0, \ + "Enable " label " transformation module taste"); \ + TUNABLE_INT("kern.geom.raid." __XSTRING(name) ".enable", \ + &g_raid_tr_##name##_class.trc_enable) const char * g_raid_volume_level2str(int level, int qual); int g_raid_volume_str2level(const char *str, int *level, int *qual); Modified: stable/8/sys/geom/raid/md_ddf.c ============================================================================== --- stable/8/sys/geom/raid/md_ddf.c Sun Sep 16 08:44:55 2012 (r240553) +++ stable/8/sys/geom/raid/md_ddf.c Sun Sep 16 08:58:34 2012 (r240554) @@ -125,6 +125,7 @@ static struct g_raid_md_class g_raid_md_ "DDF", g_raid_md_ddf_methods, sizeof(struct g_raid_md_ddf_object), + .mdc_enable = 1, .mdc_priority = 100 }; @@ -3065,4 +3066,4 @@ g_raid_md_free_ddf(struct g_raid_md_obje return (0); } -G_RAID_MD_DECLARE(g_raid_md_ddf); +G_RAID_MD_DECLARE(ddf, "DDF"); Modified: stable/8/sys/geom/raid/md_intel.c ============================================================================== --- stable/8/sys/geom/raid/md_intel.c Sun Sep 16 08:44:55 2012 (r240553) +++ stable/8/sys/geom/raid/md_intel.c Sun Sep 16 08:58:34 2012 (r240554) @@ -224,6 +224,7 @@ static struct g_raid_md_class g_raid_md_ "Intel", g_raid_md_intel_methods, sizeof(struct g_raid_md_intel_object), + .mdc_enable = 1, .mdc_priority = 100 }; @@ -2432,4 +2433,4 @@ g_raid_md_free_intel(struct g_raid_md_ob return (0); } -G_RAID_MD_DECLARE(g_raid_md_intel); +G_RAID_MD_DECLARE(intel, "Intel"); Modified: stable/8/sys/geom/raid/md_jmicron.c ============================================================================== --- stable/8/sys/geom/raid/md_jmicron.c Sun Sep 16 08:44:55 2012 (r240553) +++ stable/8/sys/geom/raid/md_jmicron.c Sun Sep 16 08:58:34 2012 (r240554) @@ -132,6 +132,7 @@ static struct g_raid_md_class g_raid_md_ "JMicron", g_raid_md_jmicron_methods, sizeof(struct g_raid_md_jmicron_object), + .mdc_enable = 1, .mdc_priority = 100 }; @@ -1581,4 +1582,4 @@ g_raid_md_free_jmicron(struct g_raid_md_ return (0); } -G_RAID_MD_DECLARE(g_raid_md_jmicron); +G_RAID_MD_DECLARE(jmicron, "JMicron"); Modified: stable/8/sys/geom/raid/md_nvidia.c ============================================================================== --- stable/8/sys/geom/raid/md_nvidia.c Sun Sep 16 08:44:55 2012 (r240553) +++ stable/8/sys/geom/raid/md_nvidia.c Sun Sep 16 08:58:34 2012 (r240554) @@ -143,6 +143,7 @@ static struct g_raid_md_class g_raid_md_ "NVIDIA", g_raid_md_nvidia_methods, sizeof(struct g_raid_md_nvidia_object), + .mdc_enable = 1, .mdc_priority = 100 }; @@ -1600,4 +1601,4 @@ g_raid_md_free_nvidia(struct g_raid_md_o return (0); } -G_RAID_MD_DECLARE(g_raid_md_nvidia); +G_RAID_MD_DECLARE(nvidia, "NVIDIA"); Modified: stable/8/sys/geom/raid/md_promise.c ============================================================================== --- stable/8/sys/geom/raid/md_promise.c Sun Sep 16 08:44:55 2012 (r240553) +++ stable/8/sys/geom/raid/md_promise.c Sun Sep 16 08:58:34 2012 (r240554) @@ -171,6 +171,7 @@ static struct g_raid_md_class g_raid_md_ "Promise", g_raid_md_promise_methods, sizeof(struct g_raid_md_object), + .mdc_enable = 1, .mdc_priority = 100 }; @@ -1967,4 +1968,4 @@ g_raid_md_free_promise(struct g_raid_md_ return (0); } -G_RAID_MD_DECLARE(g_raid_md_promise); +G_RAID_MD_DECLARE(promise, "Promise"); Modified: stable/8/sys/geom/raid/md_sii.c ============================================================================== --- stable/8/sys/geom/raid/md_sii.c Sun Sep 16 08:44:55 2012 (r240553) +++ stable/8/sys/geom/raid/md_sii.c Sun Sep 16 08:58:34 2012 (r240554) @@ -140,6 +140,7 @@ static struct g_raid_md_class g_raid_md_ "SiI", g_raid_md_sii_methods, sizeof(struct g_raid_md_sii_object), + .mdc_enable = 1, .mdc_priority = 100 }; @@ -1688,4 +1689,4 @@ g_raid_md_free_sii(struct g_raid_md_obje return (0); } -G_RAID_MD_DECLARE(g_raid_md_sii); +G_RAID_MD_DECLARE(sii, "SiI"); Modified: stable/8/sys/geom/raid/tr_concat.c ============================================================================== --- stable/8/sys/geom/raid/tr_concat.c Sun Sep 16 08:44:55 2012 (r240553) +++ stable/8/sys/geom/raid/tr_concat.c Sun Sep 16 08:58:34 2012 (r240554) @@ -73,6 +73,7 @@ static struct g_raid_tr_class g_raid_tr_ "CONCAT", g_raid_tr_concat_methods, sizeof(struct g_raid_tr_concat_object), + .trc_enable = 1, .trc_priority = 50 }; @@ -340,4 +341,4 @@ g_raid_tr_free_concat(struct g_raid_tr_o return (0); } -G_RAID_TR_DECLARE(g_raid_tr_concat); +G_RAID_TR_DECLARE(concat, "CONCAT"); Modified: stable/8/sys/geom/raid/tr_raid0.c ============================================================================== --- stable/8/sys/geom/raid/tr_raid0.c Sun Sep 16 08:44:55 2012 (r240553) +++ stable/8/sys/geom/raid/tr_raid0.c Sun Sep 16 08:58:34 2012 (r240554) @@ -73,6 +73,7 @@ static struct g_raid_tr_class g_raid_tr_ "RAID0", g_raid_tr_raid0_methods, sizeof(struct g_raid_tr_raid0_object), + .trc_enable = 1, .trc_priority = 100 }; @@ -323,4 +324,4 @@ g_raid_tr_free_raid0(struct g_raid_tr_ob return (0); } -G_RAID_TR_DECLARE(g_raid_tr_raid0); +G_RAID_TR_DECLARE(raid0, "RAID0"); Modified: stable/8/sys/geom/raid/tr_raid1.c ============================================================================== --- stable/8/sys/geom/raid/tr_raid1.c Sun Sep 16 08:44:55 2012 (r240553) +++ stable/8/sys/geom/raid/tr_raid1.c Sun Sep 16 08:58:34 2012 (r240554) @@ -42,9 +42,7 @@ __FBSDID("$FreeBSD$"); #include "geom/raid/g_raid.h" #include "g_raid_tr_if.h" -SYSCTL_DECL(_kern_geom_raid); -SYSCTL_NODE(_kern_geom_raid, OID_AUTO, raid1, CTLFLAG_RW, 0, - "RAID1 parameters"); +SYSCTL_DECL(_kern_geom_raid_raid1); #define RAID1_REBUILD_SLAB (1 << 20) /* One transation in a rebuild */ static int g_raid1_rebuild_slab = RAID1_REBUILD_SLAB; @@ -131,6 +129,7 @@ static struct g_raid_tr_class g_raid_tr_ "RAID1", g_raid_tr_raid1_methods, sizeof(struct g_raid_tr_raid1_object), + .trc_enable = 1, .trc_priority = 100 }; @@ -996,4 +995,4 @@ g_raid_tr_free_raid1(struct g_raid_tr_ob return (0); } -G_RAID_TR_DECLARE(g_raid_tr_raid1); +G_RAID_TR_DECLARE(raid1, "RAID1"); Modified: stable/8/sys/geom/raid/tr_raid1e.c ============================================================================== --- stable/8/sys/geom/raid/tr_raid1e.c Sun Sep 16 08:44:55 2012 (r240553) +++ stable/8/sys/geom/raid/tr_raid1e.c Sun Sep 16 08:58:34 2012 (r240554) @@ -44,9 +44,7 @@ __FBSDID("$FreeBSD$"); #define N 2 -SYSCTL_DECL(_kern_geom_raid); -SYSCTL_NODE(_kern_geom_raid, OID_AUTO, raid1e, CTLFLAG_RW, 0, - "RAID1E parameters"); +SYSCTL_DECL(_kern_geom_raid_raid1e); #define RAID1E_REBUILD_SLAB (1 << 20) /* One transation in a rebuild */ static int g_raid1e_rebuild_slab = RAID1E_REBUILD_SLAB; @@ -135,6 +133,7 @@ static struct g_raid_tr_class g_raid_tr_ "RAID1E", g_raid_tr_raid1e_methods, sizeof(struct g_raid_tr_raid1e_object), + .trc_enable = 1, .trc_priority = 200 }; @@ -1236,4 +1235,4 @@ g_raid_tr_free_raid1e(struct g_raid_tr_o return (0); } -G_RAID_TR_DECLARE(g_raid_tr_raid1e); +G_RAID_TR_DECLARE(raid1e, "RAID1E"); Modified: stable/8/sys/geom/raid/tr_raid5.c ============================================================================== --- stable/8/sys/geom/raid/tr_raid5.c Sun Sep 16 08:44:55 2012 (r240553) +++ stable/8/sys/geom/raid/tr_raid5.c Sun Sep 16 08:58:34 2012 (r240554) @@ -42,8 +42,6 @@ __FBSDID("$FreeBSD$"); #include "geom/raid/g_raid.h" #include "g_raid_tr_if.h" -SYSCTL_DECL(_kern_geom_raid); - static MALLOC_DEFINE(M_TR_RAID5, "tr_raid5_data", "GEOM_RAID RAID5 data"); #define TR_RAID5_NONE 0 @@ -95,6 +93,7 @@ static struct g_raid_tr_class g_raid_tr_ "RAID5", g_raid_tr_raid5_methods, sizeof(struct g_raid_tr_raid5_object), + .trc_enable = 1, .trc_priority = 100 }; @@ -419,4 +418,4 @@ g_raid_tr_free_raid5(struct g_raid_tr_ob return (0); } -G_RAID_TR_DECLARE(g_raid_tr_raid5); +G_RAID_TR_DECLARE(raid5, "RAID5"); From owner-svn-src-stable-8@FreeBSD.ORG Sun Sep 16 09:01:40 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8F5C51065705; Sun, 16 Sep 2012 09:01:40 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7A2158FC08; Sun, 16 Sep 2012 09:01:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8G91eIq046421; Sun, 16 Sep 2012 09:01:40 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8G91ekr046419; Sun, 16 Sep 2012 09:01:40 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201209160901.q8G91ekr046419@svn.freebsd.org> From: Alexander Motin Date: Sun, 16 Sep 2012 09:01:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240556 - stable/8/sbin/geom/class/raid X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Sep 2012 09:01:40 -0000 Author: mav Date: Sun Sep 16 09:01:40 2012 New Revision: 240556 URL: http://svn.freebsd.org/changeset/base/240556 Log: MFC r240465: Add global and per-module sysctls/tunables to enable/disable metadata taste. That should help to handle some cases when disk has some RAID metadata that should be ignored, especially during boot. Modified: stable/8/sbin/geom/class/raid/graid.8 Directory Properties: stable/8/sbin/geom/class/raid/ (props changed) Modified: stable/8/sbin/geom/class/raid/graid.8 ============================================================================== --- stable/8/sbin/geom/class/raid/graid.8 Sun Sep 16 09:00:53 2012 (r240555) +++ stable/8/sbin/geom/class/raid/graid.8 Sun Sep 16 09:01:40 2012 (r240556) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 6, 2012 +.Dd September 13, 2012 .Dt GRAID 8 .Os .Sh NAME @@ -293,6 +293,8 @@ Mark volume as clean when idle for the s Debug level of the .Nm RAID GEOM class. +.It Va kern.geom.raid.enable : No 1 +Enable on-disk metadata taste. .It Va kern.geom.raid.idle_threshold : No 1000000 Time in microseconds to consider a volume idle for rebuild purposes. .It Va kern.geom.raid.name_format : No 0 @@ -302,6 +304,8 @@ Number of read errors equated to disk fa Write errors are always considered as disk failures. .It Va kern.geom.raid.start_timeout : No 30 Time to wait for missing array components on startup. +.It Va kern.geom.raid. Ns Ar X Ns Va .enable : No 1 +Enable taste for specific metadata or transformation module. .El .Sh EXIT STATUS Exit status is 0 on success, and non-zero if the command fails. From owner-svn-src-stable-8@FreeBSD.ORG Sun Sep 16 12:08:06 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 85F90106566C; Sun, 16 Sep 2012 12:08:06 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 70F008FC08; Sun, 16 Sep 2012 12:08:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8GC86ul080091; Sun, 16 Sep 2012 12:08:06 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8GC86JH080089; Sun, 16 Sep 2012 12:08:06 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201209161208.q8GC86JH080089@svn.freebsd.org> From: Alexander Motin Date: Sun, 16 Sep 2012 12:08:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240560 - stable/8/sys/dev/sound/pci/hda X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Sep 2012 12:08:06 -0000 Author: mav Date: Sun Sep 16 12:08:06 2012 New Revision: 240560 URL: http://svn.freebsd.org/changeset/base/240560 Log: MFC r239326: Fix "speaker" volume control, broken at r230451. Modified: stable/8/sys/dev/sound/pci/hda/hdaa.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/sound/ (props changed) stable/8/sys/dev/sound/pci/ (props changed) Modified: stable/8/sys/dev/sound/pci/hda/hdaa.c ============================================================================== --- stable/8/sys/dev/sound/pci/hda/hdaa.c Sun Sep 16 12:06:45 2012 (r240559) +++ stable/8/sys/dev/sound/pci/hda/hdaa.c Sun Sep 16 12:08:06 2012 (r240560) @@ -2127,11 +2127,14 @@ hdaa_audio_ctl_dev_volume(struct hdaa_pc w = hdaa_widget_get(devinfo, i); if (w == NULL || w->enable == 0) continue; - if (w->bindas < 0 && pdevinfo->index != 0) - continue; - if (w->bindas != pdevinfo->playas && - w->bindas != pdevinfo->recas) - continue; + if (w->bindas < 0) { + if (pdevinfo->index != 0) + continue; + } else { + if (w->bindas != pdevinfo->playas && + w->bindas != pdevinfo->recas) + continue; + } if (dev == SOUND_MIXER_RECLEV && w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_AUDIO_INPUT) { hdaa_audio_ctl_dest_volume(pdevinfo, dev, From owner-svn-src-stable-8@FreeBSD.ORG Sun Sep 16 18:26:33 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B2C8106566B; Sun, 16 Sep 2012 18:26:33 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 54ED08FC0A; Sun, 16 Sep 2012 18:26:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8GIQXWe050949; Sun, 16 Sep 2012 18:26:33 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8GIQXNT050947; Sun, 16 Sep 2012 18:26:33 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201209161826.q8GIQXNT050947@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 16 Sep 2012 18:26:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240569 - stable/8/usr.sbin/pciconf X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Sep 2012 18:26:33 -0000 Author: gavin Date: Sun Sep 16 18:26:32 2012 New Revision: 240569 URL: http://svn.freebsd.org/changeset/base/240569 Log: Merge r240146 from head: - If the PCIe "SLOT" flag is set, include this in the capability output - Fix printing of PCIe interrupt number, the shift was incorrect. Modified: stable/8/usr.sbin/pciconf/cap.c Directory Properties: stable/8/usr.sbin/pciconf/ (props changed) Modified: stable/8/usr.sbin/pciconf/cap.c ============================================================================== --- stable/8/usr.sbin/pciconf/cap.c Sun Sep 16 18:25:08 2012 (r240568) +++ stable/8/usr.sbin/pciconf/cap.c Sun Sep 16 18:26:32 2012 (r240569) @@ -403,8 +403,10 @@ cap_express(int fd, struct pci_conf *p, printf("type %d", (flags & PCIM_EXP_FLAGS_TYPE) >> 4); break; } + if (flags & PCIM_EXP_FLAGS_SLOT) + printf(" slot"); if (flags & PCIM_EXP_FLAGS_IRQ) - printf(" IRQ %d", (flags & PCIM_EXP_FLAGS_IRQ) >> 8); + printf(" IRQ %d", (flags & PCIM_EXP_FLAGS_IRQ) >> 9); val = read_config(fd, &p->pc_sel, ptr + PCIR_EXPRESS_DEVICE_CAP, 4); flags = read_config(fd, &p->pc_sel, ptr + PCIR_EXPRESS_DEVICE_CTL, 2); printf(" max data %d(%d)", From owner-svn-src-stable-8@FreeBSD.ORG Sun Sep 16 18:57:32 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C077D1065670; Sun, 16 Sep 2012 18:57:32 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AB3D48FC1C; Sun, 16 Sep 2012 18:57:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8GIvWel056637; Sun, 16 Sep 2012 18:57:32 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8GIvWRU056634; Sun, 16 Sep 2012 18:57:32 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201209161857.q8GIvWRU056634@svn.freebsd.org> From: Gavin Atkinson Date: Sun, 16 Sep 2012 18:57:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240570 - in stable/8/sys/dev/usb: . serial X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Sep 2012 18:57:32 -0000 Author: gavin Date: Sun Sep 16 18:57:32 2012 New Revision: 240570 URL: http://svn.freebsd.org/changeset/base/240570 Log: Merge r240118 from head: Support another uchcom(4) device. Modified: stable/8/sys/dev/usb/serial/uchcom.c stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/serial/uchcom.c ============================================================================== --- stable/8/sys/dev/usb/serial/uchcom.c Sun Sep 16 18:26:32 2012 (r240569) +++ stable/8/sys/dev/usb/serial/uchcom.c Sun Sep 16 18:57:32 2012 (r240570) @@ -207,6 +207,7 @@ static const struct uchcom_divider_recor static const STRUCT_USB_HOST_ID uchcom_devs[] = { {USB_VPI(USB_VENDOR_WCH, USB_PRODUCT_WCH_CH341SER, 0)}, {USB_VPI(USB_VENDOR_WCH2, USB_PRODUCT_WCH2_CH341SER, 0)}, + {USB_VPI(USB_VENDOR_WCH2, USB_PRODUCT_WCH2_CH341SER_2, 0)}, }; /* protypes */ Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Sun Sep 16 18:26:32 2012 (r240569) +++ stable/8/sys/dev/usb/usbdevs Sun Sep 16 18:57:32 2012 (r240570) @@ -3443,6 +3443,7 @@ product WAVESENSE JAZZ 0xaaaa Jazz bloo /* WCH products */ product WCH CH341SER 0x5523 CH341/CH340 USB-Serial Bridge +product WCH2 CH341SER_2 0x5523 CH341/CH340 USB-Serial Bridge product WCH2 CH341SER 0x7523 CH341/CH340 USB-Serial Bridge /* Western Digital products */ From owner-svn-src-stable-8@FreeBSD.ORG Mon Sep 17 00:32:36 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29848106564A; Mon, 17 Sep 2012 00:32:36 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 139938FC17; Mon, 17 Sep 2012 00:32:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8H0WZkE014164; Mon, 17 Sep 2012 00:32:35 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8H0WZR4014161; Mon, 17 Sep 2012 00:32:35 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209170032.q8H0WZR4014161@svn.freebsd.org> From: Eitan Adler Date: Mon, 17 Sep 2012 00:32:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240576 - stable/8/sys/dev/isci/scil X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2012 00:32:36 -0000 Author: eadler Date: Mon Sep 17 00:32:35 2012 New Revision: 240576 URL: http://svn.freebsd.org/changeset/base/240576 Log: MFC r240521: s/ is is / is /g s/ a a / a /g Approved by: cperciva (implicit) Modified: stable/8/sys/dev/isci/scil/scic_sds_remote_device.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cam/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/isci/ (props changed) stable/8/sys/dev/xen/ (props changed) stable/8/sys/libkern/ (props changed) stable/8/sys/net80211/ (props changed) Modified: stable/8/sys/dev/isci/scil/scic_sds_remote_device.h ============================================================================== --- stable/8/sys/dev/isci/scil/scic_sds_remote_device.h Sun Sep 16 23:25:13 2012 (r240575) +++ stable/8/sys/dev/isci/scil/scic_sds_remote_device.h Mon Sep 17 00:32:35 2012 (r240576) @@ -121,7 +121,7 @@ enum SCIC_SDS_STP_REMOTE_DEVICE_READY_SU { /** * This is the idle substate for the stp remote device. When there are no - * active IO for the device it is is in this state. + * active IO for the device it is in this state. */ SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_IDLE, From owner-svn-src-stable-8@FreeBSD.ORG Mon Sep 17 00:44:12 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70B031065670; Mon, 17 Sep 2012 00:44:12 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 41E5D8FC19; Mon, 17 Sep 2012 00:44:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8H0iCBw015853; Mon, 17 Sep 2012 00:44:12 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8H0iCDJ015850; Mon, 17 Sep 2012 00:44:12 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209170044.q8H0iCDJ015850@svn.freebsd.org> From: Eitan Adler Date: Mon, 17 Sep 2012 00:44:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240578 - in stable/8/sys: kern sparc64/sparc64 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2012 00:44:12 -0000 Author: eadler Date: Mon Sep 17 00:44:11 2012 New Revision: 240578 URL: http://svn.freebsd.org/changeset/base/240578 Log: MFC r240518: Correct double "the the" Approved by: cperciva (implicit) Modified: stable/8/sys/kern/subr_unit.c stable/8/sys/sparc64/sparc64/ata_machdep.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) stable/8/sys/sparc64/ (props changed) stable/8/sys/vm/ (props changed) stable/8/tools/kerneldoc/ (props changed) stable/8/tools/kerneldoc/subsys/ (props changed) stable/8/usr.bin/lex/ (props changed) stable/8/usr.sbin/tcpdump/ (props changed) Modified: stable/8/sys/kern/subr_unit.c ============================================================================== --- stable/8/sys/kern/subr_unit.c Mon Sep 17 00:32:36 2012 (r240577) +++ stable/8/sys/kern/subr_unit.c Mon Sep 17 00:44:11 2012 (r240578) @@ -63,7 +63,7 @@ * in the usermode test program included, the worst case usage * was 798 bytes on i386 for 5000 allocated and 5000 free units. * * The worst case is where every other unit number is allocated and - * the the rest are free. In that case 44 + N/4 bytes are used where + * the rest are free. In that case 44 + N/4 bytes are used where * N is the number of the highest unit allocated. */ Modified: stable/8/sys/sparc64/sparc64/ata_machdep.c ============================================================================== --- stable/8/sys/sparc64/sparc64/ata_machdep.c Mon Sep 17 00:32:36 2012 (r240577) +++ stable/8/sys/sparc64/sparc64/ata_machdep.c Mon Sep 17 00:44:11 2012 (r240578) @@ -40,7 +40,7 @@ sparc64_ata_disk_firmware_geom_adjust(st * and sectors so the geometry of large disks has to be adjusted. * If the disk is > 32GB at 16 heads and 63 sectors, adjust to 255 * sectors (this matches what the OpenSolaris dad(7D) driver does). - * If the the disk is even > 128GB, additionally adjust the heads to + * If the disk is even > 128GB, additionally adjust the heads to * 255. This allows disks up to the 2TB limit of the extended VTOC8. * XXX the OpenSolaris dad(7D) driver limits the mediasize to 128GB. */ From owner-svn-src-stable-8@FreeBSD.ORG Mon Sep 17 00:47:38 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02008106566C; Mon, 17 Sep 2012 00:47:38 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E0E0F8FC0C; Mon, 17 Sep 2012 00:47:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8H0lb4T016458; Mon, 17 Sep 2012 00:47:37 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8H0lboF016455; Mon, 17 Sep 2012 00:47:37 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209170047.q8H0lboF016455@svn.freebsd.org> From: Eitan Adler Date: Mon, 17 Sep 2012 00:47:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240581 - in stable/8/sys: i386/include/xen netinet X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2012 00:47:38 -0000 Author: eadler Date: Mon Sep 17 00:47:37 2012 New Revision: 240581 URL: http://svn.freebsd.org/changeset/base/240581 Log: MFC r240520: s/teh/the/g Approved by: cperciva (implicit) Modified: stable/8/sys/i386/include/xen/xen-os.h stable/8/sys/netinet/sctp_input.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/i386/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/i386/include/xen/xen-os.h ============================================================================== --- stable/8/sys/i386/include/xen/xen-os.h Mon Sep 17 00:47:35 2012 (r240580) +++ stable/8/sys/i386/include/xen/xen-os.h Mon Sep 17 00:47:37 2012 (r240581) @@ -99,7 +99,7 @@ void trap_init(void); /* * STI/CLI equivalents. These basically set and clear the virtual - * event_enable flag in teh shared_info structure. Note that when + * event_enable flag in the shared_info structure. Note that when * the enable bit is set, there may be pending events to be handled. * We may therefore call into do_hypervisor_callback() directly. */ Modified: stable/8/sys/netinet/sctp_input.c ============================================================================== --- stable/8/sys/netinet/sctp_input.c Mon Sep 17 00:47:35 2012 (r240580) +++ stable/8/sys/netinet/sctp_input.c Mon Sep 17 00:47:37 2012 (r240581) @@ -3107,7 +3107,7 @@ sctp_handle_ecn_cwr(struct sctp_cwr_chun { /* * Here we get a CWR from the peer. We must look in the outqueue and - * make sure that we have a covered ECNE in teh control chunk part. + * make sure that we have a covered ECNE in the control chunk part. * If so remove it. */ struct sctp_tmit_chunk *chk; From owner-svn-src-stable-8@FreeBSD.ORG Mon Sep 17 14:54:59 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 63C571065677; Mon, 17 Sep 2012 14:54:59 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F25A8FC14; Mon, 17 Sep 2012 14:54:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8HEsxjp039406; Mon, 17 Sep 2012 14:54:59 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8HEsxEJ039404; Mon, 17 Sep 2012 14:54:59 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201209171454.q8HEsxEJ039404@svn.freebsd.org> From: Mikolaj Golub Date: Mon, 17 Sep 2012 14:54:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240607 - stable/8/sys/kern X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2012 14:54:59 -0000 Author: trociny Date: Mon Sep 17 14:54:58 2012 New Revision: 240607 URL: http://svn.freebsd.org/changeset/base/240607 Log: MFC r240003, r240004: r240003: In soreceive_generic() when checking if the type of mbuf has changed check it for MT_CONTROL type too, otherwise the assertion "m->m_type == MT_DATA" below may be triggered by the following scenario: - the sender sends some data (MT_DATA) and then a file descriptor (MT_CONTROL); - the receiver calls recv(2) with a MSG_WAITALL asking for data larger than the receive buffer (uio_resid > hiwat). r240004: In soreceive_generic() remove the optimization for the case when MSG_WAITALL is set, and it is possible to do the entire receive operation at once if we block (resid <= hiwat). Actually it might make the recv(2) with MSG_WAITALL flag get stuck when there is enough space in the receiver buffer to satisfy the request but not enough to open the window closed previously due to the buffer being full. The issue can be reproduced using the following scenario: On the sender side do 2 send(2) requests: 1) data of size much smaller than SOBUF_SIZE (e.g. SOBUF_SIZE / 10); 2) data of size equal to SOBUF_SIZE. On the receiver side do 2 recv(2) requests with MSG_WAITALL flag set: 1) recv() data of SOBUF_SIZE / 10 size; 2) recv() data of SOBUF_SIZE size; We totally fill the receiver buffer with one SOBUF_SIZE/10 size request and partial SOBUF_SIZE request. When the first request is processed we get SOBUF_SIZE/10 free space. It is just enough to receive the rest of bytes for the second request, and soreceive_generic() blocks in the part that is a subject of this change waiting for the rest. But the window was closed when the buffer was filled and to avoid silly window syndrome it opens only when available space is larger than sb_hiwat/4 or maxseg. So it is stuck and pending data is only sent via TCP window probes. Discussed with: kib (long ago) Modified: stable/8/sys/kern/uipc_socket.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) Modified: stable/8/sys/kern/uipc_socket.c ============================================================================== --- stable/8/sys/kern/uipc_socket.c Mon Sep 17 14:53:33 2012 (r240606) +++ stable/8/sys/kern/uipc_socket.c Mon Sep 17 14:54:58 2012 (r240607) @@ -1483,17 +1483,11 @@ restart: * If we have less data than requested, block awaiting more (subject * to any timeout) if: * 1. the current count is less than the low water mark, or - * 2. MSG_WAITALL is set, and it is possible to do the entire - * receive operation at once if we block (resid <= hiwat). - * 3. MSG_DONTWAIT is not set - * If MSG_WAITALL is set but resid is larger than the receive buffer, - * we have to do the receive in sections, and thus risk returning a - * short count if a timeout or signal occurs after we start. + * 2. MSG_DONTWAIT is not set */ if (m == NULL || (((flags & MSG_DONTWAIT) == 0 && so->so_rcv.sb_cc < uio->uio_resid) && - (so->so_rcv.sb_cc < so->so_rcv.sb_lowat || - ((flags & MSG_WAITALL) && uio->uio_resid <= so->so_rcv.sb_hiwat)) && + so->so_rcv.sb_cc < so->so_rcv.sb_lowat && m->m_nextpkt == NULL && (pr->pr_flags & PR_ATOMIC) == 0)) { KASSERT(m != NULL || !so->so_rcv.sb_cc, ("receive: m == %p so->so_rcv.sb_cc == %u", @@ -1682,8 +1676,8 @@ dontblock: * examined ('type'), end the receive operation. */ SOCKBUF_LOCK_ASSERT(&so->so_rcv); - if (m->m_type == MT_OOBDATA) { - if (type != MT_OOBDATA) + if (m->m_type == MT_OOBDATA || m->m_type == MT_CONTROL) { + if (type != m->m_type) break; } else if (type == MT_OOBDATA) break; From owner-svn-src-stable-8@FreeBSD.ORG Mon Sep 17 16:11:23 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 058A11065670; Mon, 17 Sep 2012 16:11:23 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E3D528FC0A; Mon, 17 Sep 2012 16:11:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8HGBMaF049781; Mon, 17 Sep 2012 16:11:22 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8HGBMlU049778; Mon, 17 Sep 2012 16:11:22 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201209171611.q8HGBMlU049778@svn.freebsd.org> From: Jim Harris Date: Mon, 17 Sep 2012 16:11:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240612 - stable/8/sys/dev/isci/scil X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2012 16:11:23 -0000 Author: jimharris Date: Mon Sep 17 16:11:22 2012 New Revision: 240612 URL: http://svn.freebsd.org/changeset/base/240612 Log: MFC r240514: isci(4): Fix SCSI/ATA translation for SCSI_WRITE_BUFFER w/ mode==0x7 (download microcode with offsets, save, and activate). SATI translation layer was incorrectly using allocation length instead of blocks, and was constructing the ATA command incorrectly. Also change #define to specify that the 512 block size here is specific for DOWNLOAD_MICROCODE, and does not relate to the device's logical block size. Modified: stable/8/sys/dev/isci/scil/sati_util.c stable/8/sys/dev/isci/scil/sati_write_buffer.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/isci/ (props changed) Modified: stable/8/sys/dev/isci/scil/sati_util.c ============================================================================== --- stable/8/sys/dev/isci/scil/sati_util.c Mon Sep 17 16:05:03 2012 (r240611) +++ stable/8/sys/dev/isci/scil/sati_util.c Mon Sep 17 16:11:22 2012 (r240612) @@ -1976,6 +1976,8 @@ void sati_ata_download_microcode_constru ) { U8 * register_fis = sati_cb_get_h2d_register_fis_address(ata_io); + U32 allocation_blocks = allocation_length >> 9; + U32 buffer_blkoffset = buffer_offset >> 9; sati_set_ata_command(register_fis, ATA_DOWNLOAD_MICROCODE); sati_set_ata_features(register_fis, mode); @@ -1987,9 +1989,10 @@ void sati_ata_download_microcode_constru } else //mode == 0x03 { - sati_set_ata_sector_count(register_fis, (U8) (allocation_length >> 9)); - sati_set_ata_lba_low(register_fis, (U8) (allocation_length >> 17)); - sati_set_ata_lba_high(register_fis, (U8) (buffer_offset >> 9)); + sati_set_ata_sector_count(register_fis, (U8) (allocation_blocks & 0xff)); + sati_set_ata_lba_low(register_fis, (U8) ((allocation_blocks >> 8) & 0xff)); + sati_set_ata_lba_mid(register_fis, (U8) (buffer_blkoffset & 0xff)); + sati_set_ata_lba_high(register_fis, (U8) ((buffer_blkoffset >> 8) & 0xff)); } if((allocation_length == 0) && (buffer_offset == 0)) Modified: stable/8/sys/dev/isci/scil/sati_write_buffer.c ============================================================================== --- stable/8/sys/dev/isci/scil/sati_write_buffer.c Mon Sep 17 16:05:03 2012 (r240611) +++ stable/8/sys/dev/isci/scil/sati_write_buffer.c Mon Sep 17 16:11:22 2012 (r240612) @@ -66,7 +66,7 @@ __FBSDID("$FreeBSD$"); #define WRITE_BUFFER_WRITE_DATA 0x02 #define WRITE_BUFFER_DOWNLOAD_SAVE 0x05 #define WRITE_BUFFER_OFFSET_DOWNLOAD_SAVE 0x07 -#define BLOCK_SIZE 512 +#define DOWNLOAD_MICROCODE_BLOCK_SIZE 512 /** * @brief This method will translate the SCSI Write Buffer command @@ -89,6 +89,7 @@ SATI_STATUS sati_write_buffer_translate_ U8 * cdb = sati_cb_get_cdb_address(scsi_io); SATI_STATUS status = SATI_FAILURE; U32 allocation_length; + U32 allocation_blocks; U32 buffer_offset; allocation_length = ((sati_get_cdb_byte(cdb, 6) << 16) | @@ -100,11 +101,13 @@ SATI_STATUS sati_write_buffer_translate_ (sati_get_cdb_byte(cdb, 5))); sequence->allocation_length = allocation_length; + allocation_blocks = allocation_length / DOWNLOAD_MICROCODE_BLOCK_SIZE; switch(sati_get_cdb_byte(cdb, 1)) { case WRITE_BUFFER_WRITE_DATA: - if((allocation_length == BLOCK_SIZE) && (buffer_offset == 0) && + if((allocation_length == DOWNLOAD_MICROCODE_BLOCK_SIZE) && + (buffer_offset == 0) && (sati_get_cdb_byte(cdb, 2) == 0)) { sati_ata_write_buffer_construct(ata_io, sequence); @@ -146,8 +149,9 @@ SATI_STATUS sati_write_buffer_translate_ case WRITE_BUFFER_OFFSET_DOWNLOAD_SAVE: if(((allocation_length & 0x000001FF) == 0) && //Bits 08:00 need to be zero per SAT2v7 ((buffer_offset & 0x000001FF) == 0) && - (allocation_length <= sequence->device->max_blocks_per_microcode_command) && - (allocation_length >= sequence->device->min_blocks_per_microcode_command)) + (allocation_blocks <= sequence->device->max_blocks_per_microcode_command) && + ((allocation_blocks >= sequence->device->min_blocks_per_microcode_command) || + (allocation_length == 0))) { sati_ata_download_microcode_construct( ata_io, From owner-svn-src-stable-8@FreeBSD.ORG Tue Sep 18 08:28:09 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5455E1065711; Tue, 18 Sep 2012 08:28:09 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3FC978FC18; Tue, 18 Sep 2012 08:28:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8I8S9YP056545; Tue, 18 Sep 2012 08:28:09 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8I8S99Y056543; Tue, 18 Sep 2012 08:28:09 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201209180828.q8I8S99Y056543@svn.freebsd.org> From: Andriy Gapon Date: Tue, 18 Sep 2012 08:28:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240636 - stable/8/share/man/man4 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2012 08:28:09 -0000 Author: avg Date: Tue Sep 18 08:28:08 2012 New Revision: 240636 URL: http://svn.freebsd.org/changeset/base/240636 Log: MFC r240340: acpi.4: machdep.cpu_idle_hlt no longer exists Modified: stable/8/share/man/man4/acpi.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/acpi.4 ============================================================================== --- stable/8/share/man/man4/acpi.4 Tue Sep 18 08:27:01 2012 (r240635) +++ stable/8/share/man/man4/acpi.4 Tue Sep 18 08:28:08 2012 (r240636) @@ -80,8 +80,12 @@ A scheduling algorithm will select state and this setting as system load dictates. To enable ACPI CPU idling control, -.Va machdep.cpu_idle_hlt -must be set to 1. +.Va machdep.idle +should be set to +.Li acpi +if it is listed in +.Va machdep.idle_available +. .It Va hw.acpi.cpu.cx_supported List of supported CPU idle states and their transition latency in microseconds. From owner-svn-src-stable-8@FreeBSD.ORG Tue Sep 18 20:20:30 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A30D1065676; Tue, 18 Sep 2012 20:20:30 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 011048FC1C; Tue, 18 Sep 2012 20:20:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8IKKTnY055893; Tue, 18 Sep 2012 20:20:29 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8IKKT4q055880; Tue, 18 Sep 2012 20:20:29 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201209182020.q8IKKT4q055880@svn.freebsd.org> From: Baptiste Daroussin Date: Tue, 18 Sep 2012 20:20:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240674 - in stable/8/usr.sbin/pkg_install: add lib X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2012 20:20:30 -0000 Author: bapt Date: Tue Sep 18 20:20:29 2012 New Revision: 240674 URL: http://svn.freebsd.org/changeset/base/240674 Log: MFC: r236213, r236333, r236336, r240476 - Let pkg_add use the ENV variable PACKAGESUFFIX - Make sure that each va_start has one and only one matching va_end - Do not change owner, group, or mode when package database directory and its contents are created with pkg_add(1). It may happen when the packing list contains @owner, @group, or @mode. Modified: stable/8/usr.sbin/pkg_install/add/add.h stable/8/usr.sbin/pkg_install/add/extract.c stable/8/usr.sbin/pkg_install/add/futil.c stable/8/usr.sbin/pkg_install/add/main.c stable/8/usr.sbin/pkg_install/add/perform.c stable/8/usr.sbin/pkg_install/add/pkg_add.1 stable/8/usr.sbin/pkg_install/lib/exec.c stable/8/usr.sbin/pkg_install/lib/file.c stable/8/usr.sbin/pkg_install/lib/lib.h stable/8/usr.sbin/pkg_install/lib/msg.c stable/8/usr.sbin/pkg_install/lib/url.c Directory Properties: stable/8/usr.sbin/pkg_install/ (props changed) stable/8/usr.sbin/pkg_install/add/ (props changed) Modified: stable/8/usr.sbin/pkg_install/add/add.h ============================================================================== --- stable/8/usr.sbin/pkg_install/add/add.h Tue Sep 18 19:08:07 2012 (r240673) +++ stable/8/usr.sbin/pkg_install/add/add.h Tue Sep 18 20:20:29 2012 (r240674) @@ -41,7 +41,7 @@ extern char *PkgAddCmd; extern char FirstPen[]; extern add_mode_t AddMode; -int make_hierarchy(char *); +int make_hierarchy(char *, Boolean); void extract_plist(const char *, Package *); void apply_perms(const char *, const char *); Modified: stable/8/usr.sbin/pkg_install/add/extract.c ============================================================================== --- stable/8/usr.sbin/pkg_install/add/extract.c Tue Sep 18 19:08:07 2012 (r240673) +++ stable/8/usr.sbin/pkg_install/add/extract.c Tue Sep 18 20:20:29 2012 (r240674) @@ -225,7 +225,7 @@ extract_plist(const char *home, Package printf("extract: CWD to %s\n", p->name); PUSHOUT(Directory); if (strcmp(p->name, ".")) { - if (!Fake && make_hierarchy(p->name) == FAIL) { + if (!Fake && make_hierarchy(p->name, TRUE) == FAIL) { cleanup(0); errx(2, "%s: unable to cwd to '%s'", __func__, p->name); } Modified: stable/8/usr.sbin/pkg_install/add/futil.c ============================================================================== --- stable/8/usr.sbin/pkg_install/add/futil.c Tue Sep 18 19:08:07 2012 (r240673) +++ stable/8/usr.sbin/pkg_install/add/futil.c Tue Sep 18 20:20:29 2012 (r240674) @@ -31,7 +31,7 @@ __FBSDID("$FreeBSD$"); */ int -make_hierarchy(char *dir) +make_hierarchy(char *dir, Boolean set_perm) { char *cp1, *cp2; @@ -55,7 +55,8 @@ make_hierarchy(char *dir) *cp2 = '/'; return FAIL; } - apply_perms(NULL, dir); + if (set_perm) + apply_perms(NULL, dir); } /* Put it back */ if (cp2) { Modified: stable/8/usr.sbin/pkg_install/add/main.c ============================================================================== --- stable/8/usr.sbin/pkg_install/add/main.c Tue Sep 18 19:08:07 2012 (r240673) +++ stable/8/usr.sbin/pkg_install/add/main.c Tue Sep 18 20:20:29 2012 (r240674) @@ -234,10 +234,17 @@ main(int argc, char **argv) remotepkg = temppackageroot; if (!((ptr = strrchr(remotepkg, '.')) && ptr[1] == 't' && (ptr[2] == 'b' || ptr[2] == 'g' || ptr[2] == 'x') && - ptr[3] == 'z' && !ptr[4])) - if (strlcat(remotepkg, ".tbz", - sizeof(temppackageroot)) >= sizeof(temppackageroot)) - errx(1, "package name too long"); + ptr[3] == 'z' && !ptr[4])) { + if (getenv("PACKAGESUFFIX")) { + if (strlcat(remotepkg, getenv("PACKAGESUFFIX"), + sizeof(temppackageroot)) >= sizeof(temppackageroot)) + errx(1, "package name too long"); + } else { + if (strlcat(remotepkg, ".tbz", + sizeof(temppackageroot)) >= sizeof(temppackageroot)) + errx(1, "package name too long"); + } + } } if (!strcmp(*argv, "-")) /* stdin? */ pkgs[ch] = (char *)"-"; Modified: stable/8/usr.sbin/pkg_install/add/perform.c ============================================================================== --- stable/8/usr.sbin/pkg_install/add/perform.c Tue Sep 18 19:08:07 2012 (r240673) +++ stable/8/usr.sbin/pkg_install/add/perform.c Tue Sep 18 20:20:29 2012 (r240674) @@ -307,8 +307,12 @@ pkg_do(char *pkg) *sep = '\0'; strlcat(subpkg, "/All/", sizeof subpkg); strlcat(subpkg, p->name, sizeof subpkg); - if ((ext = strrchr(pkg, '.')) == NULL) - ext = ".tbz"; + if ((ext = strrchr(pkg, '.')) == NULL) { + if (getenv("PACKAGESUFFIX")) + ext = getenv("PACKAGESUFFIX"); + else + ext = ".tbz"; + } strlcat(subpkg, ext, sizeof subpkg); pkg_do(subpkg); } @@ -345,8 +349,13 @@ pkg_do(char *pkg) const char *ext; ext = strrchr(pkg_fullname, '.'); - if (ext == NULL) - ext = ".tbz"; + if (ext == NULL) { + if (getenv("PACKAGESUFFIX")) { + ext = getenv("PACKAGESUFFIX"); + } else { + ext = ".tbz"; + } + } snprintf(path, FILENAME_MAX, "%s/%s%s", getenv("_TOP"), p->name, ext); if (fexists(path)) cp = path; @@ -502,7 +511,7 @@ pkg_do(char *pkg) zapLogDir = 1; if (Verbose) printf("Attempting to record package into %s..\n", LogDir); - if (make_hierarchy(LogDir)) { + if (make_hierarchy(LogDir, FALSE)) { warnx("can't record package into '%s', you're on your own!", LogDir); bzero(LogDir, FILENAME_MAX); Modified: stable/8/usr.sbin/pkg_install/add/pkg_add.1 ============================================================================== --- stable/8/usr.sbin/pkg_install/add/pkg_add.1 Tue Sep 18 19:08:07 2012 (r240673) +++ stable/8/usr.sbin/pkg_install/add/pkg_add.1 Tue Sep 18 20:20:29 2012 (r240674) @@ -553,6 +553,11 @@ The environment variable specifies an alternative location to save downloaded packages to when .Fl K option is used. +.Pp +The environment variable +.Ev PACKAGESUFFIX +specifies an alternative file extension to use when fetching remote +packages. Default is .tbz .Sh FILES .Bl -tag -width /var/db/pkg -compact .It Pa /var/tmp Modified: stable/8/usr.sbin/pkg_install/lib/exec.c ============================================================================== --- stable/8/usr.sbin/pkg_install/lib/exec.c Tue Sep 18 19:08:07 2012 (r240673) +++ stable/8/usr.sbin/pkg_install/lib/exec.c Tue Sep 18 20:20:29 2012 (r240674) @@ -47,6 +47,7 @@ vsystem(const char *fmt, ...) va_start(args, fmt); if (vsnprintf(cmd, maxargs, fmt, args) > maxargs) { warnx("vsystem args are too long"); + va_end(args); return 1; } #ifdef DEBUG @@ -82,6 +83,7 @@ vpipe(const char *fmt, ...) va_start(args, fmt); if (vsnprintf(cmd, maxargs, fmt, args) > maxargs) { warnx("vsystem args are too long"); + va_end(args); return NULL; } #ifdef DEBUG Modified: stable/8/usr.sbin/pkg_install/lib/file.c ============================================================================== --- stable/8/usr.sbin/pkg_install/lib/file.c Tue Sep 18 19:08:07 2012 (r240673) +++ stable/8/usr.sbin/pkg_install/lib/file.c Tue Sep 18 20:20:29 2012 (r240674) @@ -140,7 +140,7 @@ fileFindByPath(const char *base, const c { static char tmp[FILENAME_MAX]; char *cp; - const char *suffixes[] = {".tbz", ".tgz", ".tar", NULL}; + const char *suffixes[] = {".tbz", ".tgz", ".tar", ".txz", NULL}; int i; if (fexists(fname) && isfile(fname)) { Modified: stable/8/usr.sbin/pkg_install/lib/lib.h ============================================================================== --- stable/8/usr.sbin/pkg_install/lib/lib.h Tue Sep 18 19:08:07 2012 (r240673) +++ stable/8/usr.sbin/pkg_install/lib/lib.h Tue Sep 18 20:20:29 2012 (r240674) @@ -99,7 +99,7 @@ * Version of the package tools - increase whenever you make a change * in the code that is not cosmetic only. */ -#define PKG_INSTALL_VERSION 20100403 +#define PKG_INSTALL_VERSION 20120913 #define PKG_WRAPCONF_FNAME "/var/db/pkg_install.conf" #define main(argc, argv) real_main(argc, argv) Modified: stable/8/usr.sbin/pkg_install/lib/msg.c ============================================================================== --- stable/8/usr.sbin/pkg_install/lib/msg.c Tue Sep 18 19:08:07 2012 (r240673) +++ stable/8/usr.sbin/pkg_install/lib/msg.c Tue Sep 18 20:20:29 2012 (r240674) @@ -71,5 +71,6 @@ y_or_n(Boolean def, const char *msg, ... ch = (def) ? 'Y' : 'N'; } fclose(tty) ; + va_end(args); return (ch == 'Y') ? TRUE : FALSE; } Modified: stable/8/usr.sbin/pkg_install/lib/url.c ============================================================================== --- stable/8/usr.sbin/pkg_install/lib/url.c Tue Sep 18 19:08:07 2012 (r240673) +++ stable/8/usr.sbin/pkg_install/lib/url.c Tue Sep 18 20:20:29 2012 (r240674) @@ -73,7 +73,10 @@ fileGetURL(const char *base, const char *(cp + 1) = '\0'; strcat(cp, "All/"); strcat(cp, spec); - strcat(cp, ".tbz"); + if (getenv("PACKAGESUFFIX")) + strcat(cp, getenv("PACKAGESUFFIX")); + else + strcat(cp, ".tbz"); } else return NULL; @@ -85,7 +88,10 @@ fileGetURL(const char *base, const char */ strcpy(fname, hint); strcat(fname, spec); - strcat(fname, ".tbz"); + if (getenv("PACKAGESUFFIX")) + strcat(fname, getenv("PACKAGESUFFIX")); + else + strcat(fname, ".tbz"); } } else From owner-svn-src-stable-8@FreeBSD.ORG Wed Sep 19 06:20:26 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DAF5106566B; Wed, 19 Sep 2012 06:20:26 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 191E48FC08; Wed, 19 Sep 2012 06:20:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8J6KPMG038610; Wed, 19 Sep 2012 06:20:25 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8J6KPVw038608; Wed, 19 Sep 2012 06:20:25 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201209190620.q8J6KPVw038608@svn.freebsd.org> From: Baptiste Daroussin Date: Wed, 19 Sep 2012 06:20:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240688 - stable/8/lib/libutil X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2012 06:20:26 -0000 Author: bapt Date: Wed Sep 19 06:20:25 2012 New Revision: 240688 URL: http://svn.freebsd.org/changeset/base/240688 Log: MFC: r240391 Fix IEC / SI binary prefixes (Ki, Mi, Gi, etc) production by humanize_number(3) PR: bin/171487 Submitted by: matthew Modified: stable/8/lib/libutil/humanize_number.c Directory Properties: stable/8/lib/libutil/ (props changed) Modified: stable/8/lib/libutil/humanize_number.c ============================================================================== --- stable/8/lib/libutil/humanize_number.c Wed Sep 19 06:18:42 2012 (r240687) +++ stable/8/lib/libutil/humanize_number.c Wed Sep 19 06:20:25 2012 (r240688) @@ -76,7 +76,7 @@ humanize_number(char *buf, size_t len, i if (flags & HN_B) prefixes = "B\0\0Ki\0Mi\0Gi\0Ti\0Pi\0Ei"; else - prefixes = "\0\0Ki\0Mi\0Gi\0Ti\0Pi\0Ei"; + prefixes = "\0\0\0Ki\0Mi\0Gi\0Ti\0Pi\0Ei"; } else { baselen = 1; if (flags & HN_DIVISOR_1000) From owner-svn-src-stable-8@FreeBSD.ORG Wed Sep 19 20:11:48 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B312106566C; Wed, 19 Sep 2012 20:11:48 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 640F08FC12; Wed, 19 Sep 2012 20:11:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8JKBmKp061531; Wed, 19 Sep 2012 20:11:48 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8JKBmt7061527; Wed, 19 Sep 2012 20:11:48 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201209192011.q8JKBmt7061527@svn.freebsd.org> From: "David E. O'Brien" Date: Wed, 19 Sep 2012 20:11:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240707 - in stable/8: share/man/man4 sys/dev/filemon sys/modules sys/modules/filemon tools/regression/filemon X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2012 20:11:48 -0000 Author: obrien Date: Wed Sep 19 20:11:47 2012 New Revision: 240707 URL: http://svn.freebsd.org/changeset/base/240707 Log: MF9: r237795 MFC: r236592 r236593 r236594 r236620 r236621 r236622 r236637 r237794: filemon(4) Added: stable/8/share/man/man4/filemon.4 - copied unchanged from r237795, stable/9/share/man/man4/filemon.4 stable/8/sys/dev/filemon/ - copied from r237795, stable/9/sys/dev/filemon/ stable/8/sys/modules/filemon/ - copied from r237795, stable/9/sys/modules/filemon/ stable/8/tools/regression/filemon/ - copied from r237795, stable/9/tools/regression/filemon/ Modified: stable/8/share/man/man4/Makefile stable/8/sys/modules/Makefile Directory Properties: stable/8/ (props changed) stable/8/share/ (props changed) stable/8/share/man/ (props changed) stable/8/share/man/man4/ (props changed) stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/modules/ (props changed) stable/8/tools/ (props changed) Modified: stable/8/share/man/man4/Makefile ============================================================================== --- stable/8/share/man/man4/Makefile Wed Sep 19 19:59:15 2012 (r240706) +++ stable/8/share/man/man4/Makefile Wed Sep 19 20:11:47 2012 (r240707) @@ -118,6 +118,7 @@ MAN= aac.4 \ fatm.4 \ fd.4 \ fdc.4 \ + filemon.4 \ firewire.4 \ fpa.4 \ fwe.4 \ Copied: stable/8/share/man/man4/filemon.4 (from r237795, stable/9/share/man/man4/filemon.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/share/man/man4/filemon.4 Wed Sep 19 20:11:47 2012 (r240707, copy of r237795, stable/9/share/man/man4/filemon.4) @@ -0,0 +1,176 @@ +.\" Copyright (c) 2012 +.\" David E. O'Brien . 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. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by David E. O'Brien and +.\" contributors. +.\" 4. Neither the name of the author nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" 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$ +.\" +.Dd May 30, 2012 +.Dt FILEMON 4 +.Os +.Sh NAME +.Nm filemon +.Nd the filemon device +.Sh SYNOPSIS +.In dev/filemon/filemon.h +.Sh DESCRIPTION +The +.Nm +device allows a process to collect file operations data of its children. +The device +.Pa /dev/filemon +responds to two +.Xr ioctl 2 +calls. +.Pp +System calls are denoted using the following single letters: +.Pp +.Bl -tag -width indent -compact +.It Ql C +.Xr chdir 2 +.It Ql D +.Xr unlink 2 +.It Ql E +.Xr exec 2 +.It Ql F +.Xr fork 2 , +.Xr vfork 2 +.It Ql L +.Xr link 2 , +.Xr linkat 2 , +.Xr symlink 2 , +.Xr symlinkat 2 +.It Ql M +.Xr rename 2 +.It Ql R +.Xr open 2 +for read +.It Ql S +.Xr stat 2 +.It Ql W +.Xr open 2 +for write +.It Ql X +.Xr _exit 2 +.El +.Pp +Note that +.Ql R +following +.Ql W +records can represent a single +.Xr open 2 +for R/W, +or two seperate +.Xr open 2 +calls, one for +.Ql R +and one for +.Ql W . +.Sh IOCTLS +User mode programs communicate with the +.Nm +driver through a number of ioctls which are described below. +Each takes a single argument. +.Bl -tag -width ".Dv FILEMON_SET_PID" +.It Dv FILEMON_SET_FD +Write the internal tracing buffer to the supplied open file descriptor. +.It Dv FILEMON_SET_PID +Child process ID to trace. +.El +.Sh RETURN VALUES +.\" .Rv -std ioctl +The +.Fn ioctl +function returns the value 0 if successful; +otherwise the value \-1 is returned and the global variable +.Va errno +is set to indicate the error. +.Sh FILES +.Bl -tag -width ".Pa /dev/filemon" +.It Pa /dev/filemon +.El +.Sh EXAMPLES +.Bd -literal +#include +#include +#include +#include +#include +#include +#include + +static void +open_filemon(void) +{ + pid_t child; + int fm_fd, fm_log; + + if ((fm_fd = open("/dev/filemon", O_RDWR)) == -1) + err(1, "open(\e"/dev/filemon\e", O_RDWR)"); + if ((fm_log = open("filemon.out", + O_CREAT | O_WRONLY | O_TRUNC, DEFFILEMODE)) == -1) + err(1, "open(filemon.out)"); + + if (ioctl(fm_fd, FILEMON_SET_FD, &fm_log) == -1) + err(1, "Cannot set filemon log file descriptor"); + /* Set up these two fd's to close on exec. */ + (void)fcntl(fm_fd, F_SETFD, FD_CLOEXEC); + (void)fcntl(fm_log, F_SETFD, FD_CLOEXEC); + + if ((child = fork()) == 0) { + child = getpid(); + if (ioctl(fm_fd, FILEMON_SET_PID, &child) == -1) + err(1, "Cannot set filemon PID"); + /* Do something here. */ + return 0; + } else { + wait(&child); + close(fm_fd); + } + return 0; +} +.Ed +.Pp +Creates a file named +.Pa filemon.out +and configures the +.Nm +device to write the +.Nm +buffer contents to it. +.Sh SEE ALSO +.Xr dtrace 1 , +.Xr ktrace 1 , +.Xr truss 1 +.Sh HISTORY +A +.Nm +device appeared in +.Fx 9.1 . Modified: stable/8/sys/modules/Makefile ============================================================================== --- stable/8/sys/modules/Makefile Wed Sep 19 19:59:15 2012 (r240706) +++ stable/8/sys/modules/Makefile Wed Sep 19 20:11:47 2012 (r240707) @@ -2,7 +2,8 @@ .include -SUBDIR= ${_3dfx} \ +SUBDIR= \ + ${_3dfx} \ ${_3dfx_linux} \ ${_aac} \ accf_data \ @@ -96,6 +97,7 @@ SUBDIR= ${_3dfx} \ fdc \ fdescfs \ ${_fe} \ + ${_filemon} \ firewire \ firmware \ fxp \ @@ -336,6 +338,10 @@ SUBDIR= ${_3dfx} \ ${_zfs} \ zlib \ +.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" +_filemon= filemon +.endif + .if ${MACHINE_ARCH} != "powerpc" && ${MACHINE_ARCH} != "arm" && \ ${MACHINE_ARCH} != "mips" _syscons= syscons From owner-svn-src-stable-8@FreeBSD.ORG Wed Sep 19 23:03:55 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40073106566C; Wed, 19 Sep 2012 23:03:55 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 287088FC14; Wed, 19 Sep 2012 23:03:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8JN3tXD090577; Wed, 19 Sep 2012 23:03:55 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8JN3slm090573; Wed, 19 Sep 2012 23:03:54 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201209192303.q8JN3slm090573@svn.freebsd.org> From: Xin LI Date: Wed, 19 Sep 2012 23:03:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240715 - in stable/8: share/man/man4 sys/dev/arcmsr X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2012 23:03:55 -0000 Author: delphij Date: Wed Sep 19 23:03:54 2012 New Revision: 240715 URL: http://svn.freebsd.org/changeset/base/240715 Log: MFC r240079,215837: Update arcmsr(4) to vendor version 1.20.00.25. Many thanks to Areca for continuing to support FreeBSD. Submitted by: Ching-Lung Huang Modified: stable/8/share/man/man4/arcmsr.4 stable/8/sys/dev/arcmsr/arcmsr.c stable/8/sys/dev/arcmsr/arcmsr.h Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/arcmsr/ (props changed) Modified: stable/8/share/man/man4/arcmsr.4 ============================================================================== --- stable/8/share/man/man4/arcmsr.4 Wed Sep 19 22:26:05 2012 (r240714) +++ stable/8/share/man/man4/arcmsr.4 Wed Sep 19 23:03:54 2012 (r240715) @@ -24,12 +24,12 @@ .\" .\" $FreeBSD$ .\" -.Dd March 28, 2008 +.Dd September 3, 2012 .Dt ARCMSR 4 .Os .Sh NAME .Nm arcmsr -.Nd Areca SATA II RAID Controller driver +.Nd Areca RAID Controller driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -50,11 +50,11 @@ arcmsr_load="YES" .Sh DESCRIPTION The .Nm -driver provides support for the Areca ARC-11xx and ARC-12xx series of SATA II -RAID controllers. +driver provides support for the Areca ARC-11xx, ARC-12xx, ARC-13xx, +ARC-16xx and ARC-18xx series of SAS and SATA RAID controllers. These controllers feature RAID-0, 1, 3, 5, 6, and 10 and JBOD acceleration for up to 16 SATA drives. -Raid level and stripe level +RAID level and stripe level migration, online capacity expansion, hot insertion/removal, automatic failover and rebuild, and SMART are also supported. Access to the arrays is provided @@ -82,8 +82,6 @@ ARC-1160 .It ARC-1170 .It -ARC-1180 -.It ARC-1110ML .It ARC-1120ML @@ -92,14 +90,32 @@ ARC-1130ML .It ARC-1160ML .It +ARC-1200 +.It +ARC-1201 +.It ARC-1210 .It +ARC-1212 +.It +ARC-1213 +.It ARC-1220 .It +ARC-1222 +.It +ARC-1223 +.It ARC-1230 .It +ARC-1231 +.It ARC-1260 .It +ARC-1261 +.It +ARC-1270 +.It ARC-1280 .It ARC-1210ML @@ -111,6 +127,18 @@ ARC-1231ML ARC-1261ML .It ARC-1280ML +.It +ARC-1380 +.It +ARC-1381 +.It +ARC-1680 +.It +ARC-1681 +.It +ARC-1880 +.It +ARC-1882 .El .Sh FILES .Bl -tag -width ".Pa /dev/arcmsr?" -compact Modified: stable/8/sys/dev/arcmsr/arcmsr.c ============================================================================== --- stable/8/sys/dev/arcmsr/arcmsr.c Wed Sep 19 22:26:05 2012 (r240714) +++ stable/8/sys/dev/arcmsr/arcmsr.c Wed Sep 19 23:03:54 2012 (r240715) @@ -37,38 +37,43 @@ ************************************************************************** ** History ** -** REV# DATE NAME DESCRIPTION -** 1.00.00.00 03/31/2004 Erich Chen First release -** 1.20.00.02 11/29/2004 Erich Chen bug fix with arcmsr_bus_reset when PHY error -** 1.20.00.03 04/19/2005 Erich Chen add SATA 24 Ports adapter type support +** REV# DATE NAME DESCRIPTION +** 1.00.00.00 03/31/2004 Erich Chen First release +** 1.20.00.02 11/29/2004 Erich Chen bug fix with arcmsr_bus_reset when PHY error +** 1.20.00.03 04/19/2005 Erich Chen add SATA 24 Ports adapter type support ** clean unused function -** 1.20.00.12 09/12/2005 Erich Chen bug fix with abort command handling, +** 1.20.00.12 09/12/2005 Erich Chen bug fix with abort command handling, ** firmware version check ** and firmware update notify for hardware bug fix ** handling if none zero high part physical address ** of srb resource -** 1.20.00.13 08/18/2006 Erich Chen remove pending srb and report busy +** 1.20.00.13 08/18/2006 Erich Chen remove pending srb and report busy ** add iop message xfer ** with scsi pass-through command ** add new device id of sas raid adapters ** code fit for SPARC64 & PPC -** 1.20.00.14 02/05/2007 Erich Chen bug fix for incorrect ccb_h.status report +** 1.20.00.14 02/05/2007 Erich Chen bug fix for incorrect ccb_h.status report ** and cause g_vfs_done() read write error -** 1.20.00.15 10/10/2007 Erich Chen support new RAID adapter type ARC120x -** 1.20.00.16 10/10/2009 Erich Chen Bug fix for RAID adapter type ARC120x +** 1.20.00.15 10/10/2007 Erich Chen support new RAID adapter type ARC120x +** 1.20.00.16 10/10/2009 Erich Chen Bug fix for RAID adapter type ARC120x ** bus_dmamem_alloc() with BUS_DMA_ZERO -** 1.20.00.17 07/15/2010 Ching Huang Added support ARC1880 -** report CAM_DEV_NOT_THERE instead of CAM_SEL_TIMEOUT when device failed, -** prevent cam_periph_error removing all LUN devices of one Target id -** for any one LUN device failed -** 1.20.00.18 10/14/2010 Ching Huang Fixed "inquiry data fails comparion at DV1 step" -** 10/25/2010 Ching Huang Fixed bad range input in bus_alloc_resource for ADAPTER_TYPE_B -** 1.20.00.19 11/11/2010 Ching Huang Fixed arcmsr driver prevent arcsas support for Areca SAS HBA ARC13x0 -** 1.20.00.20 12/08/2010 Ching Huang Avoid calling atomic_set_int function -** 1.20.00.21 02/08/2011 Ching Huang Implement I/O request timeout -** 02/14/2011 Ching Huang Modified pktRequestCount -** 1.20.00.21 03/03/2011 Ching Huang if a command timeout, then wait its ccb back before free it -** 1.20.00.22 07/04/2011 Ching Huang Fixed multiple MTX panic +** 1.20.00.17 07/15/2010 Ching Huang Added support ARC1880 +** report CAM_DEV_NOT_THERE instead of CAM_SEL_TIMEOUT when device failed, +** prevent cam_periph_error removing all LUN devices of one Target id +** for any one LUN device failed +** 1.20.00.18 10/14/2010 Ching Huang Fixed "inquiry data fails comparion at DV1 step" +** 10/25/2010 Ching Huang Fixed bad range input in bus_alloc_resource for ADAPTER_TYPE_B +** 1.20.00.19 11/11/2010 Ching Huang Fixed arcmsr driver prevent arcsas support for Areca SAS HBA ARC13x0 +** 1.20.00.20 12/08/2010 Ching Huang Avoid calling atomic_set_int function +** 1.20.00.21 02/08/2011 Ching Huang Implement I/O request timeout +** 02/14/2011 Ching Huang Modified pktRequestCount +** 1.20.00.21 03/03/2011 Ching Huang if a command timeout, then wait its ccb back before free it +** 1.20.00.22 07/04/2011 Ching Huang Fixed multiple MTX panic +** 1.20.00.23 10/28/2011 Ching Huang Added TIMEOUT_DELAY in case of too many HDDs need to start +** 1.20.00.23 11/08/2011 Ching Huang Added report device transfer speed +** 1.20.00.23 01/30/2012 Ching Huang Fixed Request requeued and Retrying command +** 1.20.00.24 06/11/2012 Ching Huang Fixed return sense data condition +** 1.20.00.25 08/17/2012 Ching Huang Fixed hotplug device no function on type A adapter ****************************************************************************************** */ @@ -154,7 +159,7 @@ __FBSDID("$FreeBSD$"); #define arcmsr_callout_init(a) callout_init(a); #endif -#define ARCMSR_DRIVER_VERSION "Driver Version 1.20.00.22 2011-07-04" +#define ARCMSR_DRIVER_VERSION "Driver Version 1.20.00.25 2012-08-17" #include #define SRB_SIZE ((sizeof(struct CommandControlBlock)+0x1f) & 0xffe0) #define ARCMSR_SRBS_POOL_SIZE (SRB_SIZE * ARCMSR_MAX_FREESRB_NUM) @@ -296,7 +301,7 @@ static struct cdevsw arcmsr_cdevsw = { if(acb==NULL) { return ENXIO; } - return 0; + return (0); } /* ************************************************************************** @@ -347,7 +352,7 @@ static struct cdevsw arcmsr_cdevsw = { if(acb==NULL) { return ENXIO; } - return(arcmsr_iop_ioctlcmd(acb, ioctl_cmd, arg)); + return (arcmsr_iop_ioctlcmd(acb, ioctl_cmd, arg)); } /* ********************************************************************** @@ -378,7 +383,7 @@ static u_int32_t arcmsr_disable_allintr( } break; } - return(intmask_org); + return (intmask_org); } /* ********************************************************************** @@ -411,7 +416,6 @@ static void arcmsr_enable_allintr( struc } break; } - return; } /* ********************************************************************** @@ -431,7 +435,7 @@ static u_int8_t arcmsr_hba_wait_msgint_r UDELAY(10000); }/*max 1 seconds*/ }while(Retries++ < 20);/*max 20 sec*/ - return FALSE; + return (FALSE); } /* ********************************************************************** @@ -452,7 +456,7 @@ static u_int8_t arcmsr_hbb_wait_msgint_r UDELAY(10000); }/*max 1 seconds*/ }while(Retries++ < 20);/*max 20 sec*/ - return FALSE; + return (FALSE); } /* ********************************************************************** @@ -472,7 +476,7 @@ static u_int8_t arcmsr_hbc_wait_msgint_r UDELAY(10000); }/*max 1 seconds*/ }while(Retries++ < 20);/*max 20 sec*/ - return FALSE; + return (FALSE); } /* ************************************************************************ @@ -490,7 +494,6 @@ static void arcmsr_flush_hba_cache(struc retry_count--; } }while(retry_count!=0); - return; } /* ************************************************************************ @@ -509,7 +512,6 @@ static void arcmsr_flush_hbb_cache(struc retry_count--; } }while(retry_count!=0); - return; } /* ************************************************************************ @@ -528,7 +530,6 @@ static void arcmsr_flush_hbc_cache(struc retry_count--; } }while(retry_count!=0); - return; } /* ************************************************************************ @@ -550,7 +551,6 @@ static void arcmsr_flush_adapter_cache(s } break; } - return; } /* ******************************************************************************* @@ -596,7 +596,7 @@ static void arcmsr_async(void *cb_arg, u if((target_id > ARCMSR_MAX_TARGETID) || (target_lun > ARCMSR_MAX_TARGETLUN)) { break; } - printf("%s:scsi id=%d lun=%d device lost \n", device_get_name(acb->pci_dev), target_id, target_lun); + // printf("%s:scsi id=%d lun=%d device lost \n", device_get_name(acb->pci_dev), target_id, target_lun); break; default: break; @@ -612,14 +612,13 @@ static void arcmsr_report_sense_info(str pccb->ccb_h.status |= CAM_SCSI_STATUS_ERROR; pccb->csio.scsi_status = SCSI_STATUS_CHECK_COND; - if(&pccb->csio.sense_data) { + if(pccb->csio.sense_len) { memset(&pccb->csio.sense_data, 0, sizeof(pccb->csio.sense_data)); memcpy(&pccb->csio.sense_data, srb->arcmsr_cdb.SenseData, get_min(sizeof(struct SENSE_DATA), sizeof(pccb->csio.sense_data))); ((u_int8_t *)&pccb->csio.sense_data)[0] = (0x1 << 7 | 0x70); /* Valid,ErrorCode */ pccb->ccb_h.status |= CAM_AUTOSNS_VALID; } - return; } /* ********************************************************************* @@ -631,7 +630,6 @@ static void arcmsr_abort_hba_allcmd(stru if(!arcmsr_hba_wait_msgint_ready(acb)) { printf("arcmsr%d: wait 'abort all outstanding command' timeout \n", acb->pci_unit); } - return; } /* ********************************************************************* @@ -643,7 +641,6 @@ static void arcmsr_abort_hbb_allcmd(stru if(!arcmsr_hbb_wait_msgint_ready(acb)) { printf("arcmsr%d: wait 'abort all outstanding command' timeout \n", acb->pci_unit); } - return; } /* ********************************************************************* @@ -656,7 +653,6 @@ static void arcmsr_abort_hbc_allcmd(stru if(!arcmsr_hbc_wait_msgint_ready(acb)) { printf("arcmsr%d: wait 'abort all outstanding command' timeout \n", acb->pci_unit); } - return; } /* ********************************************************************* @@ -678,7 +674,6 @@ static void arcmsr_abort_allcmd(struct A } break; } - return; } /* ********************************************************************** @@ -716,7 +711,6 @@ static void arcmsr_srb_complete(struct C acb->pktReturnCount++; #endif xpt_done(pccb); - return; } /* ************************************************************************** @@ -768,7 +762,6 @@ static void arcmsr_report_srb_state(stru break; } } - return; } /* ************************************************************************** @@ -801,7 +794,6 @@ static void arcmsr_drain_donequeue(struc return; } arcmsr_report_srb_state(acb, srb, error); - return; } /* ************************************************************************** @@ -883,7 +875,6 @@ static void arcmsr_done4abort_postqueue( } break; } - return; } /* **************************************************************************** @@ -923,7 +914,6 @@ static void arcmsr_iop_reset(struct Adap acb->pktRequestCount = 0; acb->pktReturnCount = 0; #endif - return; } /* ********************************************************************** @@ -1011,7 +1001,6 @@ static void arcmsr_build_srb(struct Comm arcmsr_cdb->DataLength = 0; } srb->arc_cdb_size=arccdbsize; - return; } /* ************************************************************************** @@ -1072,7 +1061,6 @@ static void arcmsr_post_srb(struct Adapt } break; } - return; } /* ************************************************************************ @@ -1156,7 +1144,6 @@ static void arcmsr_iop_message_read(stru CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_doorbell, ARCMSR_HBCMU_DRV2IOP_DATA_READ_OK); } } - return; } /* ************************************************************************** @@ -1221,7 +1208,6 @@ static void arcmsr_post_ioctldata2iop(st */ arcmsr_iop_message_wrote(acb); } - return; } /* ************************************************************************ @@ -1236,7 +1222,6 @@ static void arcmsr_stop_hba_bgrb(struct printf("arcmsr%d: wait 'stop adapter background rebulid' timeout \n" , acb->pci_unit); } - return; } /* ************************************************************************ @@ -1251,7 +1236,6 @@ static void arcmsr_stop_hbb_bgrb(struct printf( "arcmsr%d: wait 'stop adapter background rebulid' timeout \n" , acb->pci_unit); } - return; } /* ************************************************************************ @@ -1265,7 +1249,6 @@ static void arcmsr_stop_hbc_bgrb(struct if(!arcmsr_hbc_wait_msgint_ready(acb)) { printf("arcmsr%d: wait 'stop adapter background rebulid' timeout \n", acb->pci_unit); } - return; } /* ************************************************************************ @@ -1287,7 +1270,6 @@ static void arcmsr_stop_adapter_bgrb(str } break; } - return; } /* ************************************************************************ @@ -1305,7 +1287,6 @@ static void arcmsr_poll(struct cam_sim * arcmsr_interrupt(acb); if( mutex == 0 ) ARCMSR_LOCK_RELEASE(&acb->qbuffer_lock); - return; } /* ************************************************************************** @@ -1340,7 +1321,6 @@ static void arcmsr_iop2drv_data_wrote_ha } else { acb->acb_flags|=ACB_F_IOPDATA_OVERFLOW; } - return; } /* ************************************************************************** @@ -1383,7 +1363,6 @@ static void arcmsr_iop2drv_data_read_han if(acb->wqbuf_firstindex==acb->wqbuf_lastindex) { acb->acb_flags |= ACB_F_MESSAGE_WQBUFFER_CLEARED; } - return; } static void arcmsr_rescanLun_cb(struct cam_periph *periph, union ccb *ccb) @@ -1417,7 +1396,6 @@ static void arcmsr_rescan_lun(struct Ada ccb->ccb_h.cbfcnp = arcmsr_rescanLun_cb; ccb->crcn.flags = CAM_FLAG_NONE; xpt_action(ccb); - return; } @@ -1488,6 +1466,7 @@ static void arcmsr_dr_handle(struct Adap } break; } + if(acb->acb_flags & ACB_F_BUS_HANG_ON) { acb->acb_flags &= ~ACB_F_BUS_HANG_ON; @@ -1592,7 +1571,6 @@ static void arcmsr_hba_doorbell_isr(stru if(outbound_doorbell & ARCMSR_OUTBOUND_IOP331_DATA_READ_OK) { arcmsr_iop2drv_data_read_handle(acb); } - return; } /* ************************************************************************** @@ -1620,7 +1598,6 @@ static void arcmsr_hbc_doorbell_isr(stru if(outbound_doorbell & ARCMSR_HBCMU_IOP2DRV_MESSAGE_CMD_DONE) { arcmsr_hbc_message_isr(acb); /* messenger of "driver to iop commands" */ } - return; } /* ************************************************************************** @@ -1644,7 +1621,6 @@ static void arcmsr_hba_postqueue_isr(str error=(flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE0)?TRUE:FALSE; arcmsr_drain_donequeue(acb, flag_srb, error); } /*drain reply FIFO*/ - return; } /* ************************************************************************** @@ -1674,7 +1650,6 @@ static void arcmsr_hbb_postqueue_isr(str error=(flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE0)?TRUE:FALSE; arcmsr_drain_donequeue(acb, flag_srb, error); } /*drain reply FIFO*/ - return; } /* ************************************************************************** @@ -1704,7 +1679,6 @@ static void arcmsr_hbc_postqueue_isr(str } throttling++; } /*drain reply FIFO*/ - return; } /* ********************************************************************** @@ -1712,30 +1686,29 @@ static void arcmsr_hbc_postqueue_isr(str */ static void arcmsr_handle_hba_isr( struct AdapterControlBlock *acb) { - u_int32_t outbound_intstatus; + u_int32_t outbound_intStatus; /* ********************************************* ** check outbound intstatus ********************************************* */ - outbound_intstatus=CHIP_REG_READ32(HBA_MessageUnit, 0, outbound_intstatus) & acb->outbound_int_enable; - if(!outbound_intstatus) { + outbound_intStatus=CHIP_REG_READ32(HBA_MessageUnit, 0, outbound_intstatus) & acb->outbound_int_enable; + if(!outbound_intStatus) { /*it must be share irq*/ return; } - CHIP_REG_WRITE32(HBA_MessageUnit, 0, outbound_intstatus, outbound_intstatus);/*clear interrupt*/ + CHIP_REG_WRITE32(HBA_MessageUnit, 0, outbound_intstatus, outbound_intStatus);/*clear interrupt*/ /* MU doorbell interrupts*/ - if(outbound_intstatus & ARCMSR_MU_OUTBOUND_DOORBELL_INT) { + if(outbound_intStatus & ARCMSR_MU_OUTBOUND_DOORBELL_INT) { arcmsr_hba_doorbell_isr(acb); } /* MU post queue interrupts*/ - if(outbound_intstatus & ARCMSR_MU_OUTBOUND_POSTQUEUE_INT) { + if(outbound_intStatus & ARCMSR_MU_OUTBOUND_POSTQUEUE_INT) { arcmsr_hba_postqueue_isr(acb); } - if(outbound_intstatus & ARCMSR_MU_OUTBOUND_MESSAGE0_INT) { + if(outbound_intStatus & ARCMSR_MU_OUTBOUND_MESSAGE0_INT) { arcmsr_hba_message_isr(acb); } - return; } /* ********************************************************************** @@ -1771,7 +1744,6 @@ static void arcmsr_handle_hbb_isr( struc if(outbound_doorbell & ARCMSR_IOP2DRV_MESSAGE_CMD_DONE) { arcmsr_hbb_message_isr(acb); } - return; } /* ********************************************************************** @@ -1798,7 +1770,6 @@ static void arcmsr_handle_hbc_isr( struc if(host_interrupt_status & ARCMSR_HBCMU_OUTBOUND_POSTQUEUE_ISR) { arcmsr_hbc_postqueue_isr(acb); } - return; } /* ****************************************************************************** @@ -1821,7 +1792,6 @@ static void arcmsr_interrupt(struct Adap " unknow adapter type =%d\n", acb->pci_unit, acb->adapter_type); break; } - return; } /* ********************************************************************** @@ -1844,7 +1814,7 @@ static void arcmsr_polling_devmap(void* struct AdapterControlBlock *acb = (struct AdapterControlBlock *)arg; switch (acb->adapter_type) { case ACB_ADAPTER_TYPE_A: - CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_GET_CONFIG); + CHIP_REG_WRITE32(HBA_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_GET_CONFIG); break; case ACB_ADAPTER_TYPE_B: @@ -2065,7 +2035,7 @@ u_int32_t arcmsr_iop_ioctlcmd(struct Ada break; } ARCMSR_LOCK_RELEASE(&acb->qbuffer_lock); - return retvalue; + return (retvalue); } /* ************************************************************************** @@ -2191,7 +2161,7 @@ static int arcmsr_iop_message_xfer(struc if (wqbuf_lastindex != wqbuf_firstindex) { arcmsr_post_ioctldata2iop(acb); /* has error report sensedata */ - if(&pccb->csio.sense_data) { + if(pccb->csio.sense_len) { ((u_int8_t *)&pccb->csio.sense_data)[0] = (0x1 << 7 | 0x70); /* Valid,ErrorCode */ ((u_int8_t *)&pccb->csio.sense_data)[2] = 0x05; @@ -2221,7 +2191,7 @@ static int arcmsr_iop_message_xfer(struc } } else { /* has error report sensedata */ - if(&pccb->csio.sense_data) { + if(pccb->csio.sense_len) { ((u_int8_t *)&pccb->csio.sense_data)[0] = (0x1 << 7 | 0x70); /* Valid,ErrorCode */ ((u_int8_t *)&pccb->csio.sense_data)[2] = 0x05; @@ -2312,7 +2282,7 @@ static int arcmsr_iop_message_xfer(struc retvalue = ARCMSR_MESSAGE_FAIL; } message_out: - return retvalue; + return (retvalue); } /* ********************************************************************* @@ -2375,7 +2345,7 @@ static void arcmsr_execute_srb(void *arg arcmsr_srb_complete(srb, 0); return; } - if(acb->srboutstandingcount >= ARCMSR_MAX_OUTSTANDING_CMD) { + if(acb->srboutstandingcount > ARCMSR_MAX_OUTSTANDING_CMD) { xpt_freeze_simq(acb->psim, 1); pccb->ccb_h.status = CAM_REQUEUE_REQ; acb->acb_flags |= ACB_F_CAM_DEV_QFRZN; @@ -2388,10 +2358,9 @@ static void arcmsr_execute_srb(void *arg if (pccb->ccb_h.timeout != CAM_TIME_INFINITY) { arcmsr_callout_init(&srb->ccb_callout); - callout_reset(&srb->ccb_callout, (pccb->ccb_h.timeout * hz ) / 1000, arcmsr_srb_timeout, srb); + callout_reset(&srb->ccb_callout, ((pccb->ccb_h.timeout + (ARCMSR_TIMEOUT_DELAY * 1000)) * hz) / 1000, arcmsr_srb_timeout, srb); srb->srb_flags |= SRB_FLAG_TIMER_START; } - return; } /* ***************************************************************************************** @@ -2455,7 +2424,6 @@ static void arcmsr_bus_reset(struct Adap } arcmsr_iop_reset(acb); acb->acb_flags &= ~ACB_F_BUS_RESET; - return; } /* ************************************************************************** @@ -2607,10 +2575,24 @@ static void arcmsr_action(struct cam_sim strncpy(cpi->dev_name, cam_sim_name(psim), DEV_IDLEN); cpi->unit_number=cam_sim_unit(psim); #ifdef CAM_NEW_TRAN_CODE - cpi->transport = XPORT_SPI; - cpi->transport_version = 2; + if(acb->adapter_bus_speed == ACB_BUS_SPEED_6G) + cpi->base_transfer_speed = 600000; + else + cpi->base_transfer_speed = 300000; + if((acb->vendor_device_id == PCIDevVenIDARC1880) || + (acb->vendor_device_id == PCIDevVenIDARC1680)) + { + cpi->transport = XPORT_SAS; + cpi->transport_version = 0; + cpi->protocol_version = SCSI_REV_SPC2; + } + else + { + cpi->transport = XPORT_SPI; + cpi->transport_version = 2; + cpi->protocol_version = SCSI_REV_2; + } cpi->protocol = PROTO_SCSI; - cpi->protocol_version = SCSI_REV_2; #endif cpi->ccb_h.status |= CAM_REQ_CMP; xpt_done(pccb); @@ -2674,28 +2656,46 @@ static void arcmsr_action(struct cam_sim { struct ccb_trans_settings_scsi *scsi; struct ccb_trans_settings_spi *spi; + struct ccb_trans_settings_sas *sas; scsi = &cts->proto_specific.scsi; - spi = &cts->xport_specific.spi; - cts->protocol = PROTO_SCSI; - cts->protocol_version = SCSI_REV_2; - cts->transport = XPORT_SPI; - cts->transport_version = 2; - spi->flags = CTS_SPI_FLAGS_DISC_ENB; - spi->sync_period=3; - spi->sync_offset=32; - spi->bus_width=MSG_EXT_WDTR_BUS_16_BIT; scsi->flags = CTS_SCSI_FLAGS_TAG_ENB; - spi->valid = CTS_SPI_VALID_DISC - | CTS_SPI_VALID_SYNC_RATE - | CTS_SPI_VALID_SYNC_OFFSET - | CTS_SPI_VALID_BUS_WIDTH; scsi->valid = CTS_SCSI_VALID_TQ; + cts->protocol = PROTO_SCSI; + + if((acb->vendor_device_id == PCIDevVenIDARC1880) || + (acb->vendor_device_id == PCIDevVenIDARC1680)) + { + cts->protocol_version = SCSI_REV_SPC2; + cts->transport_version = 0; + cts->transport = XPORT_SAS; + sas = &cts->xport_specific.sas; + sas->valid = CTS_SAS_VALID_SPEED; + if(acb->vendor_device_id == PCIDevVenIDARC1880) + sas->bitrate = 600000; + else if(acb->vendor_device_id == PCIDevVenIDARC1680) + sas->bitrate = 300000; + } + else + { + cts->protocol_version = SCSI_REV_2; + cts->transport_version = 2; + cts->transport = XPORT_SPI; + spi = &cts->xport_specific.spi; + spi->flags = CTS_SPI_FLAGS_DISC_ENB; + spi->sync_period=2; + spi->sync_offset=32; + spi->bus_width=MSG_EXT_WDTR_BUS_16_BIT; + spi->valid = CTS_SPI_VALID_DISC + | CTS_SPI_VALID_SYNC_RATE + | CTS_SPI_VALID_SYNC_OFFSET + | CTS_SPI_VALID_BUS_WIDTH; + } } #else { cts->flags=(CCB_TRANS_DISC_ENB | CCB_TRANS_TAG_ENB); - cts->sync_period=3; + cts->sync_period=2; cts->sync_offset=32; cts->bus_width=MSG_EXT_WDTR_BUS_16_BIT; cts->valid=CCB_TRANS_SYNC_RATE_VALID | @@ -2759,7 +2759,6 @@ static void arcmsr_action(struct cam_sim xpt_done(pccb); break; } - return; } /* ********************************************************************** @@ -2772,7 +2771,6 @@ static void arcmsr_start_hba_bgrb(struct if(!arcmsr_hba_wait_msgint_ready(acb)) { printf("arcmsr%d: wait 'start adapter background rebulid' timeout \n", acb->pci_unit); } - return; } /* ********************************************************************** @@ -2785,7 +2783,6 @@ static void arcmsr_start_hbb_bgrb(struct if(!arcmsr_hbb_wait_msgint_ready(acb)) { printf( "arcmsr%d: wait 'start adapter background rebulid' timeout \n", acb->pci_unit); } - return; } /* ********************************************************************** @@ -2799,7 +2796,6 @@ static void arcmsr_start_hbc_bgrb(struct if(!arcmsr_hbc_wait_msgint_ready(acb)) { printf("arcmsr%d: wait 'start adapter background rebulid' timeout \n", acb->pci_unit); } - return; } /* ********************************************************************** @@ -2818,7 +2814,6 @@ static void arcmsr_start_adapter_bgrb(st arcmsr_start_hbc_bgrb(acb); break; } - return; } /* ********************************************************************** @@ -2873,7 +2868,6 @@ polling_ccb_retry: } arcmsr_report_srb_state(acb, srb, error); } /*drain reply FIFO*/ - return; } /* ********************************************************************** @@ -2934,7 +2928,6 @@ polling_ccb_retry: } arcmsr_report_srb_state(acb, srb, error); } /*drain reply FIFO*/ - return; } /* ********************************************************************** @@ -2985,7 +2978,6 @@ polling_ccb_retry: } arcmsr_report_srb_state(acb, srb, error); } /*drain reply FIFO*/ - return; } /* ********************************************************************** @@ -3053,7 +3045,6 @@ static void arcmsr_get_hba_config(struct acb->firm_sdram_size=CHIP_REG_READ32(HBA_MessageUnit, 0, msgcode_rwbuffer[3]); /*firm_sdram_size, 3, 12-15*/ acb->firm_ide_channels=CHIP_REG_READ32(HBA_MessageUnit, 0, msgcode_rwbuffer[4]); /*firm_ide_channels, 4, 16-19*/ acb->firm_cfg_version=CHIP_REG_READ32(HBA_MessageUnit, 0, msgcode_rwbuffer[ARCMSR_FW_CFGVER_OFFSET]); /*firm_cfg_version, 25, */ - return; } /* ********************************************************************** @@ -3100,7 +3091,6 @@ static void arcmsr_get_hbb_config(struct acb->firm_sdram_size=CHIP_REG_READ32(HBB_RWBUFFER, 1, msgcode_rwbuffer[3]); /*firm_sdram_size, 3, 12-15*/ acb->firm_ide_channels=CHIP_REG_READ32(HBB_RWBUFFER, 1, msgcode_rwbuffer[4]); /*firm_ide_channels, 4, 16-19*/ acb->firm_cfg_version=CHIP_REG_READ32(HBB_RWBUFFER, 1, msgcode_rwbuffer[ARCMSR_FW_CFGVER_OFFSET]); /*firm_cfg_version, 25, */ - return; } /* ********************************************************************** @@ -3148,7 +3138,6 @@ static void arcmsr_get_hbc_config(struct acb->firm_sdram_size =CHIP_REG_READ32(HBC_MessageUnit, 0, msgcode_rwbuffer[3]); /*firm_sdram_size, 3, 12-15*/ acb->firm_ide_channels =CHIP_REG_READ32(HBC_MessageUnit, 0, msgcode_rwbuffer[4]); /*firm_ide_channels, 4, 16-19*/ acb->firm_cfg_version =CHIP_REG_READ32(HBC_MessageUnit, 0, msgcode_rwbuffer[ARCMSR_FW_CFGVER_OFFSET]); /*firm_cfg_version, 25, */ - return; } /* ********************************************************************** @@ -3170,7 +3159,6 @@ static void arcmsr_get_firmware_spec(str } break; } - return; } /* ********************************************************************** @@ -3219,7 +3207,6 @@ static void arcmsr_wait_firmware_ready( } break; } - return; } /* ********************************************************************** @@ -3253,7 +3240,6 @@ static void arcmsr_clear_doorbell_queue_ } break; } - return; } /* ************************************************************************ @@ -3336,7 +3322,7 @@ static u_int32_t arcmsr_iop_confirm(stru } break; } - return TRUE; + return (TRUE); } /* ************************************************************************ @@ -3359,7 +3345,6 @@ static void arcmsr_enable_eoi_mode(struc } break; } - return; } /* ********************************************************************** @@ -3382,7 +3367,6 @@ static void arcmsr_iop_init(struct Adapt /* enable outbound Post Queue, outbound doorbell Interrupt */ arcmsr_enable_allintr(acb, intmask_org); acb->acb_flags |=ACB_F_IOP_INITED; - return; } /* ********************************************************************** @@ -3414,7 +3398,6 @@ static void arcmsr_map_free_srb(void *ar srb_tmp = (struct CommandControlBlock *)((unsigned long)srb_tmp+SRB_SIZE); } acb->vir2phy_offset=(unsigned long)srb_tmp-(unsigned long)srb_phyaddr; - return; } /* ************************************************************************ @@ -3433,7 +3416,6 @@ static void arcmsr_free_resource(struct bus_dma_tag_destroy(acb->srb_dmat); bus_dma_tag_destroy(acb->dm_segs_dmat); bus_dma_tag_destroy(acb->parent_dmat); - return; } /* ************************************************************************ @@ -3444,16 +3426,24 @@ static u_int32_t arcmsr_initialize(devic struct AdapterControlBlock *acb=device_get_softc(dev); u_int16_t pci_command; int i, j,max_coherent_size; - - switch (pci_get_devid(dev)) { - case PCIDevVenIDARC1880: { + u_int32_t vendor_dev_id; + + vendor_dev_id = pci_get_devid(dev); + acb->vendor_device_id = vendor_dev_id; + switch (vendor_dev_id) { + case PCIDevVenIDARC1880: + case PCIDevVenIDARC1882: + case PCIDevVenIDARC1213: + case PCIDevVenIDARC1223: { acb->adapter_type=ACB_ADAPTER_TYPE_C; + acb->adapter_bus_speed = ACB_BUS_SPEED_6G; max_coherent_size=ARCMSR_SRBS_POOL_SIZE; } break; case PCIDevVenIDARC1200: case PCIDevVenIDARC1201: { acb->adapter_type=ACB_ADAPTER_TYPE_B; + acb->adapter_bus_speed = ACB_BUS_SPEED_3G; max_coherent_size=ARCMSR_SRBS_POOL_SIZE+(sizeof(struct HBB_MessageUnit)); } break; @@ -3477,6 +3467,7 @@ static u_int32_t arcmsr_initialize(devic case PCIDevVenIDARC1680: case PCIDevVenIDARC1681: { acb->adapter_type=ACB_ADAPTER_TYPE_A; + acb->adapter_bus_speed = ACB_BUS_SPEED_3G; max_coherent_size=ARCMSR_SRBS_POOL_SIZE; } break; @@ -3804,7 +3795,7 @@ static int arcmsr_attach(device_t dev) #endif arcmsr_callout_init(&acb->devmap_callout); callout_reset(&acb->devmap_callout, 60 * hz, arcmsr_polling_devmap, acb); - return 0; + return (0); } /* @@ -3851,6 +3842,9 @@ static int arcmsr_probe(device_t dev) type = "SAS 3G"; break; case PCIDevVenIDARC1880: + case PCIDevVenIDARC1882: + case PCIDevVenIDARC1213: + case PCIDevVenIDARC1223: type = "SAS 6G"; break; default: Modified: stable/8/sys/dev/arcmsr/arcmsr.h ============================================================================== --- stable/8/sys/dev/arcmsr/arcmsr.h Wed Sep 19 22:26:05 2012 (r240714) +++ stable/8/sys/dev/arcmsr/arcmsr.h Wed Sep 19 23:03:54 2012 (r240715) @@ -52,6 +52,7 @@ #define ARCMSR_MAX_ADAPTER 4 #define ARCMSR_RELEASE_SIMQ_LEVEL 230 #define ARCMSR_MAX_HBB_POSTQUEUE 264 /* (ARCMSR_MAX_OUTSTANDING_CMD+8) */ +#define ARCMSR_TIMEOUT_DELAY 60 /* in sec */ /* ********************************************************************* */ @@ -97,6 +98,13 @@ #define PCI_DEVICE_ID_ARECA_1681 0x1681 /* Device ID */ #define PCI_DEVICE_ID_ARECA_1880 0x1880 /* Device ID */ +#define ARECA_SUB_DEV_ID_1880 0x1880 /* Subsystem Device ID */ +#define ARECA_SUB_DEV_ID_1882 0x1882 /* Subsystem Device ID */ +#define ARECA_SUB_DEV_ID_1212 0x1212 /* Subsystem Device ID */ +#define ARECA_SUB_DEV_ID_1213 0x1213 /* Subsystem Device ID */ +#define ARECA_SUB_DEV_ID_1222 0x1222 /* Subsystem Device ID */ +#define ARECA_SUB_DEV_ID_1223 0x1223 /* Subsystem Device ID */ + #define PCIDevVenIDARC1110 0x111017D3 /* Vendor Device ID */ #define PCIDevVenIDARC1120 0x112017D3 /* Vendor Device ID */ #define PCIDevVenIDARC1130 0x113017D3 /* Vendor Device ID */ @@ -106,8 +114,10 @@ #define PCIDevVenIDARC1201 0x120117D3 /* Vendor Device ID */ #define PCIDevVenIDARC1210 0x121017D3 /* Vendor Device ID */ #define PCIDevVenIDARC1212 0x121217D3 /* Vendor Device ID */ +#define PCIDevVenIDARC1213 0x121317D3 /* Vendor Device ID */ #define PCIDevVenIDARC1220 0x122017D3 /* Vendor Device ID */ #define PCIDevVenIDARC1222 0x122217D3 /* Vendor Device ID */ +#define PCIDevVenIDARC1223 0x122317D3 /* Vendor Device ID */ #define PCIDevVenIDARC1230 0x123017D3 /* Vendor Device ID */ #define PCIDevVenIDARC1231 0x123117D3 /* Vendor Device ID */ #define PCIDevVenIDARC1260 0x126017D3 /* Vendor Device ID */ @@ -119,6 +129,7 @@ #define PCIDevVenIDARC1680 0x168017D3 /* Vendor Device ID */ #define PCIDevVenIDARC1681 0x168117D3 /* Vendor Device ID */ #define PCIDevVenIDARC1880 0x188017D3 /* Vendor Device ID */ +#define PCIDevVenIDARC1882 0x188217D3 /* Vendor Device ID */ #ifndef PCIR_BARS #define PCIR_BARS 0x10 @@ -830,6 +841,8 @@ struct AdapterControlBlock { u_int32_t pktRequestCount; u_int32_t pktReturnCount; #endif + u_int32_t vendor_device_id; + u_int32_t adapter_bus_speed; };/* HW_DEVICE_EXTENSION */ /* acb_flags */ #define ACB_F_SCSISTOPADAPTER 0x0001 @@ -848,6 +861,10 @@ struct AdapterControlBlock { /* devstate */ #define ARECA_RAID_GONE 0x55 #define ARECA_RAID_GOOD 0xaa +/* adapter_bus_speed */ +#define ACB_BUS_SPEED_3G 0 +#define ACB_BUS_SPEED_6G 1 +#define ACB_BUS_SPEED_12G 2 /* ********************************************************************* ** Message Unit structure *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-8@FreeBSD.ORG Thu Sep 20 04:35:21 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E532106564A; Thu, 20 Sep 2012 04:35:21 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 878F08FC08; Thu, 20 Sep 2012 04:35:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8K4ZLfC041316; Thu, 20 Sep 2012 04:35:21 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8K4ZLRI041307; Thu, 20 Sep 2012 04:35:21 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201209200435.q8K4ZLRI041307@svn.freebsd.org> From: Doug Barton Date: Thu, 20 Sep 2012 04:35:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240732 - in stable/8/contrib/bind9: . bin/named bin/nsupdate lib/dns lib/dns/include/dns X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2012 04:35:21 -0000 Author: dougb Date: Thu Sep 20 04:35:20 2012 New Revision: 240732 URL: http://svn.freebsd.org/changeset/base/240732 Log: Upgrade to 9.6-ESV-R7-P3: Prevents a crash when queried for a record whose RDATA exceeds 65535 bytes. Prevents a crash when validating caused by using "Bad cache" data before it has been initialized. ISC_QUEUE handling for recursive clients was updated to address a race condition that could cause a memory leak. This rarely occurred with UDP clients, but could be a significant problem for a server handling a steady rate of TCP queries. A condition has been corrected where improper handling of zero-length RDATA could cause undesirable behavior, including termination of the named process. For more information: https://kb.isc.org/article/AA-00788 Modified: stable/8/contrib/bind9/CHANGES stable/8/contrib/bind9/bin/named/server.c stable/8/contrib/bind9/bin/nsupdate/nsupdate.c stable/8/contrib/bind9/lib/dns/include/dns/rdata.h stable/8/contrib/bind9/lib/dns/master.c stable/8/contrib/bind9/lib/dns/rdata.c stable/8/contrib/bind9/lib/dns/rdataslab.c stable/8/contrib/bind9/version Directory Properties: stable/8/contrib/bind9/ (props changed) Modified: stable/8/contrib/bind9/CHANGES ============================================================================== --- stable/8/contrib/bind9/CHANGES Thu Sep 20 04:21:29 2012 (r240731) +++ stable/8/contrib/bind9/CHANGES Thu Sep 20 04:35:20 2012 (r240732) @@ -1,3 +1,11 @@ + --- 9.6-ESV-R7-P3 released --- + +3364. [security] Named could die on specially crafted record. + [RT #30416] + +3358 [bug] Fix declaration of fatal in bin/named/server.c + and bin/nsupdate/main.c. [RT #30522] + --- 9.6-ESV-R7-P2 released --- 3346. [security] Bad-cache data could be used before it was Modified: stable/8/contrib/bind9/bin/named/server.c ============================================================================== --- stable/8/contrib/bind9/bin/named/server.c Thu Sep 20 04:21:29 2012 (r240731) +++ stable/8/contrib/bind9/bin/named/server.c Thu Sep 20 04:35:20 2012 (r240732) @@ -228,7 +228,7 @@ static const struct { { NULL, ISC_FALSE } }; -ISC_PLATFORM_NORETURN_POST static void +ISC_PLATFORM_NORETURN_PRE static void fatal(const char *msg, isc_result_t result) ISC_PLATFORM_NORETURN_POST; static void Modified: stable/8/contrib/bind9/bin/nsupdate/nsupdate.c ============================================================================== --- stable/8/contrib/bind9/bin/nsupdate/nsupdate.c Thu Sep 20 04:21:29 2012 (r240731) +++ stable/8/contrib/bind9/bin/nsupdate/nsupdate.c Thu Sep 20 04:35:20 2012 (r240732) @@ -174,7 +174,7 @@ typedef struct nsu_requestinfo { static void sendrequest(isc_sockaddr_t *srcaddr, isc_sockaddr_t *destaddr, dns_message_t *msg, dns_request_t **request); -ISC_PLATFORM_NORETURN_POST static void +ISC_PLATFORM_NORETURN_PRE static void fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2) ISC_PLATFORM_NORETURN_POST; Modified: stable/8/contrib/bind9/lib/dns/include/dns/rdata.h ============================================================================== --- stable/8/contrib/bind9/lib/dns/include/dns/rdata.h Thu Sep 20 04:21:29 2012 (r240731) +++ stable/8/contrib/bind9/lib/dns/include/dns/rdata.h Thu Sep 20 04:35:20 2012 (r240732) @@ -128,6 +128,17 @@ struct dns_rdata { #define DNS_RDATA_OFFLINE 0x0002 /*%< RRSIG has a offline key. */ /* + * The maximum length of a RDATA that can be sent on the wire. + * Max packet size (65535) less header (12), less name (1), type (2), + * class (2), ttl(4), length (2). + * + * None of the defined types that support name compression can exceed + * this and all new types are to be sent uncompressed. + */ + +#define DNS_RDATA_MAXLENGTH 65512U + +/* * Flags affecting rdata formatting style. Flags 0xFFFF0000 * are used by masterfile-level formatting and defined elsewhere. * See additional comments at dns_rdata_tofmttext(). Modified: stable/8/contrib/bind9/lib/dns/master.c ============================================================================== --- stable/8/contrib/bind9/lib/dns/master.c Thu Sep 20 04:21:29 2012 (r240731) +++ stable/8/contrib/bind9/lib/dns/master.c Thu Sep 20 04:35:20 2012 (r240732) @@ -75,7 +75,7 @@ /*% * max message size - header - root - type - class - ttl - rdlen */ -#define MINTSIZ (65535 - 12 - 1 - 2 - 2 - 4 - 2) +#define MINTSIZ DNS_RDATA_MAXLENGTH /*% * Size for tokens in the presentation format, * The largest tokens are the base64 blocks in KEY and CERT records, Modified: stable/8/contrib/bind9/lib/dns/rdata.c ============================================================================== --- stable/8/contrib/bind9/lib/dns/rdata.c Thu Sep 20 04:21:29 2012 (r240731) +++ stable/8/contrib/bind9/lib/dns/rdata.c Thu Sep 20 04:35:20 2012 (r240732) @@ -414,6 +414,7 @@ dns_rdata_fromwire(dns_rdata_t *rdata, d isc_buffer_t st; isc_boolean_t use_default = ISC_FALSE; isc_uint32_t activelength; + size_t length; REQUIRE(dctx != NULL); if (rdata != NULL) { @@ -444,6 +445,14 @@ dns_rdata_fromwire(dns_rdata_t *rdata, d } /* + * Reject any rdata that expands out to more than DNS_RDATA_MAXLENGTH + * as we cannot transmit it. + */ + length = isc_buffer_usedlength(target) - isc_buffer_usedlength(&st); + if (result == ISC_R_SUCCESS && length > DNS_RDATA_MAXLENGTH) + result = DNS_R_FORMERR; + + /* * We should have consumed all of our buffer. */ if (result == ISC_R_SUCCESS && !buffer_empty(source)) @@ -451,8 +460,7 @@ dns_rdata_fromwire(dns_rdata_t *rdata, d if (rdata != NULL && result == ISC_R_SUCCESS) { region.base = isc_buffer_used(&st); - region.length = isc_buffer_usedlength(target) - - isc_buffer_usedlength(&st); + region.length = length; dns_rdata_fromregion(rdata, rdclass, type, ®ion); } @@ -587,6 +595,7 @@ dns_rdata_fromtext(dns_rdata_t *rdata, d unsigned long line; void (*callback)(dns_rdatacallbacks_t *, const char *, ...); isc_result_t tresult; + size_t length; REQUIRE(origin == NULL || dns_name_isabsolute(origin) == ISC_TRUE); if (rdata != NULL) { @@ -658,10 +667,13 @@ dns_rdata_fromtext(dns_rdata_t *rdata, d } } while (1); + length = isc_buffer_usedlength(target) - isc_buffer_usedlength(&st); + if (result == ISC_R_SUCCESS && length > DNS_RDATA_MAXLENGTH) + result = ISC_R_NOSPACE; + if (rdata != NULL && result == ISC_R_SUCCESS) { region.base = isc_buffer_used(&st); - region.length = isc_buffer_usedlength(target) - - isc_buffer_usedlength(&st); + region.length = length; dns_rdata_fromregion(rdata, rdclass, type, ®ion); } if (result != ISC_R_SUCCESS) { @@ -789,6 +801,7 @@ dns_rdata_fromstruct(dns_rdata_t *rdata, isc_buffer_t st; isc_region_t region; isc_boolean_t use_default = ISC_FALSE; + size_t length; REQUIRE(source != NULL); if (rdata != NULL) { @@ -803,10 +816,13 @@ dns_rdata_fromstruct(dns_rdata_t *rdata, if (use_default) (void)NULL; + length = isc_buffer_usedlength(target) - isc_buffer_usedlength(&st); + if (result == ISC_R_SUCCESS && length > DNS_RDATA_MAXLENGTH) + result = ISC_R_NOSPACE; + if (rdata != NULL && result == ISC_R_SUCCESS) { region.base = isc_buffer_used(&st); - region.length = isc_buffer_usedlength(target) - - isc_buffer_usedlength(&st); + region.length = length; dns_rdata_fromregion(rdata, rdclass, type, ®ion); } if (result != ISC_R_SUCCESS) Modified: stable/8/contrib/bind9/lib/dns/rdataslab.c ============================================================================== --- stable/8/contrib/bind9/lib/dns/rdataslab.c Thu Sep 20 04:21:29 2012 (r240731) +++ stable/8/contrib/bind9/lib/dns/rdataslab.c Thu Sep 20 04:35:20 2012 (r240732) @@ -298,6 +298,7 @@ dns_rdataslab_fromrdataset(dns_rdataset_ length = x[i].rdata.length; if (rdataset->type == dns_rdatatype_rrsig) length++; + INSIST(length <= 0xffff); *rawbuf++ = (length & 0xff00) >> 8; *rawbuf++ = (length & 0x00ff); #if DNS_RDATASET_FIXED Modified: stable/8/contrib/bind9/version ============================================================================== --- stable/8/contrib/bind9/version Thu Sep 20 04:21:29 2012 (r240731) +++ stable/8/contrib/bind9/version Thu Sep 20 04:35:20 2012 (r240732) @@ -7,4 +7,4 @@ MAJORVER=9 MINORVER=6 PATCHVER= RELEASETYPE=-ESV -RELEASEVER=-R7-P2 +RELEASEVER=-R7-P3 From owner-svn-src-stable-8@FreeBSD.ORG Thu Sep 20 10:28:44 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B323F106566C; Thu, 20 Sep 2012 10:28:44 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 83F848FC08; Thu, 20 Sep 2012 10:28:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8KASieA000545; Thu, 20 Sep 2012 10:28:44 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8KASiN3000543; Thu, 20 Sep 2012 10:28:44 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201209201028.q8KASiN3000543@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 20 Sep 2012 10:28:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240745 - stable/8/sys/fs/deadfs X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2012 10:28:44 -0000 Author: kib Date: Thu Sep 20 10:28:44 2012 New Revision: 240745 URL: http://svn.freebsd.org/changeset/base/240745 Log: MFC r240464: The deadfs VOPs for vop_ioctl and vop_bmap call itself recursively, which is an elaborate way to cause kernel panic. Change the VOPs implementation to return EBADF for a reclaimed vnode. Modified: stable/8/sys/fs/deadfs/dead_vnops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/fs/ (props changed) Modified: stable/8/sys/fs/deadfs/dead_vnops.c ============================================================================== --- stable/8/sys/fs/deadfs/dead_vnops.c Thu Sep 20 10:13:14 2012 (r240744) +++ stable/8/sys/fs/deadfs/dead_vnops.c Thu Sep 20 10:28:44 2012 (r240745) @@ -41,8 +41,6 @@ /* * Prototypes for dead operations on vnodes. */ -static vop_bmap_t dead_bmap; -static vop_ioctl_t dead_ioctl; static vop_lookup_t dead_lookup; static vop_open_t dead_open; static vop_poll_t dead_poll; @@ -56,12 +54,12 @@ struct vop_vector dead_vnodeops = { .vop_access = VOP_EBADF, .vop_advlock = VOP_EBADF, - .vop_bmap = dead_bmap, + .vop_bmap = VOP_EBADF, .vop_create = VOP_PANIC, .vop_getattr = VOP_EBADF, .vop_getwritemount = dead_getwritemount, .vop_inactive = VOP_NULL, - .vop_ioctl = dead_ioctl, + .vop_ioctl = VOP_EBADF, .vop_link = VOP_PANIC, .vop_lookup = dead_lookup, .vop_mkdir = VOP_PANIC, @@ -166,43 +164,6 @@ dead_write(ap) } /* - * Device ioctl operation. - */ -/* ARGSUSED */ -static int -dead_ioctl(ap) - struct vop_ioctl_args /* { - struct vnode *a_vp; - u_long a_command; - caddr_t a_data; - int a_fflag; - struct ucred *a_cred; - struct proc *a_p; - } */ *ap; -{ - /* XXX: Doesn't this just recurse back here ? */ - return (VOP_IOCTL_AP(ap)); -} - -/* - * Wait until the vnode has finished changing state. - */ -static int -dead_bmap(ap) - struct vop_bmap_args /* { - struct vnode *a_vp; - daddr_t a_bn; - struct bufobj **a_bop; - daddr_t *a_bnp; - int *a_runp; - int *a_runb; - } */ *ap; -{ - - return (VOP_BMAP(ap->a_vp, ap->a_bn, ap->a_bop, ap->a_bnp, ap->a_runp, ap->a_runb)); -} - -/* * Trivial poll routine that always returns POLLHUP. * This is necessary so that a process which is polling a file * gets notified when that file is revoke()d. From owner-svn-src-stable-8@FreeBSD.ORG Thu Sep 20 17:39:07 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9036A106566C; Thu, 20 Sep 2012 17:39:07 +0000 (UTC) (envelope-from issyl0@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7A0C28FC17; Thu, 20 Sep 2012 17:39:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8KHd7Rq062674; Thu, 20 Sep 2012 17:39:07 GMT (envelope-from issyl0@svn.freebsd.org) Received: (from issyl0@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8KHd7Rv062672; Thu, 20 Sep 2012 17:39:07 GMT (envelope-from issyl0@svn.freebsd.org) Message-Id: <201209201739.q8KHd7Rv062672@svn.freebsd.org> From: Isabell Long Date: Thu, 20 Sep 2012 17:39:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240759 - stable/8/usr.sbin/adduser X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2012 17:39:07 -0000 Author: issyl0 (doc committer) Date: Thu Sep 20 17:39:07 2012 New Revision: 240759 URL: http://svn.freebsd.org/changeset/base/240759 Log: MFC r240530 from HEAD: - Remove a reference to CVS and freefall from a user-facing man page. PR: docs/171658 Approved by: gabor (mentor) Modified: stable/8/usr.sbin/adduser/adduser.8 Directory Properties: stable/8/usr.sbin/adduser/ (props changed) Modified: stable/8/usr.sbin/adduser/adduser.8 ============================================================================== --- stable/8/usr.sbin/adduser/adduser.8 Thu Sep 20 17:30:26 2012 (r240758) +++ stable/8/usr.sbin/adduser/adduser.8 Thu Sep 20 17:39:07 2012 (r240759) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 16, 2008 +.Dd September 15, 2012 .Dt ADDUSER 8 .Os .Sh NAME @@ -129,9 +129,8 @@ they can safely run with a umask of 002 and create files in their home directory without worrying about others being able to change them. .Pp -For a shared area you create a separate UID/GID (like cvs or ncvs on freefall), -you place each person that should be able to access this area into that new -group. +For a shared area you create a separate UID/GID, you place each person +that should be able to access this area into that new group. .Pp This model of UID/GID administration allows far greater flexibility than lumping users into groups and having to muck with the umask when working in a shared From owner-svn-src-stable-8@FreeBSD.ORG Thu Sep 20 19:05:24 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3516106566B; Thu, 20 Sep 2012 19:05:24 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BDD9F8FC08; Thu, 20 Sep 2012 19:05:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8KJ5OpH076964; Thu, 20 Sep 2012 19:05:24 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8KJ5Ori076961; Thu, 20 Sep 2012 19:05:24 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201209201905.q8KJ5Ori076961@svn.freebsd.org> From: Alexander Motin Date: Thu, 20 Sep 2012 19:05:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240764 - stable/8/sys/dev/ahci X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2012 19:05:25 -0000 Author: mav Date: Thu Sep 20 19:05:24 2012 New Revision: 240764 URL: http://svn.freebsd.org/changeset/base/240764 Log: MFC r240383: Fix AHCI 1.2 version checks. This should be mostly cosmetic. Modified: stable/8/sys/dev/ahci/ahci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/ahci/ (props changed) Modified: stable/8/sys/dev/ahci/ahci.c ============================================================================== --- stable/8/sys/dev/ahci/ahci.c Thu Sep 20 18:59:50 2012 (r240763) +++ stable/8/sys/dev/ahci/ahci.c Thu Sep 20 19:05:24 2012 (r240764) @@ -408,7 +408,7 @@ ahci_attach(device_t dev) /* Get the HW capabilities */ version = ATA_INL(ctlr->r_mem, AHCI_VS); ctlr->caps = ATA_INL(ctlr->r_mem, AHCI_CAP); - if (version >= 0x00010020) + if (version >= 0x00010200) ctlr->caps2 = ATA_INL(ctlr->r_mem, AHCI_CAP2); if (ctlr->caps & AHCI_CAP_EMS) ctlr->capsem = ATA_INL(ctlr->r_mem, AHCI_EM_CTL); @@ -489,7 +489,7 @@ ahci_attach(device_t dev) (ctlr->caps & AHCI_CAP_SXS) ? " eSATA":"", (ctlr->caps & AHCI_CAP_NPMASK) + 1); } - if (bootverbose && version >= 0x00010020) { + if (bootverbose && version >= 0x00010200) { device_printf(dev, "Caps2:%s%s%s\n", (ctlr->caps2 & AHCI_CAP2_APST) ? " APST":"", (ctlr->caps2 & AHCI_CAP2_NVMP) ? " NVMP":"", @@ -972,7 +972,7 @@ ahci_ch_attach(device_t dev) } ch->chcaps = ATA_INL(ch->r_mem, AHCI_P_CMD); version = ATA_INL(ctlr->r_mem, AHCI_VS); - if (version < 0x00010020 && (ctlr->caps & AHCI_CAP_FBSS)) + if (version < 0x00010200 && (ctlr->caps & AHCI_CAP_FBSS)) ch->chcaps |= AHCI_P_CMD_FBSCP; if (bootverbose) { device_printf(dev, "Caps:%s%s%s%s%s\n", From owner-svn-src-stable-8@FreeBSD.ORG Fri Sep 21 12:38:52 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BAA16106566B; Fri, 21 Sep 2012 12:38:52 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8AD1F8FC0C; Fri, 21 Sep 2012 12:38:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8LCcqZe034924; Fri, 21 Sep 2012 12:38:52 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8LCcqFt034922; Fri, 21 Sep 2012 12:38:52 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201209211238.q8LCcqFt034922@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 21 Sep 2012 12:38:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240778 - stable/8/share/man/man3 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Sep 2012 12:38:52 -0000 Author: jilles Date: Fri Sep 21 12:38:52 2012 New Revision: 240778 URL: http://svn.freebsd.org/changeset/base/240778 Log: siginfo(3): Document SI_USER and SI_KERNEL signal codes. Different from stable/9 and head, do not mention pthread_kill(3), which generates a different code (SI_USER) in stable/8. Modified: stable/8/share/man/man3/siginfo.3 Directory Properties: stable/8/share/man/man3/ (props changed) Modified: stable/8/share/man/man3/siginfo.3 ============================================================================== --- stable/8/share/man/man3/siginfo.3 Fri Sep 21 12:33:25 2012 (r240777) +++ stable/8/share/man/man3/siginfo.3 Fri Sep 21 12:38:52 2012 (r240778) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 8, 2005 +.Dd September 14, 2012 .Dt SIGINFO 3 .Os .Sh NAME @@ -195,6 +195,8 @@ signal generated by expiration of a time signal generated by completion of an asynchronous I/O request .It Ta Dv SI_MESGQ Ta signal generated by arrival of a message on an empty message queue +.It Ta Dv SI_KERNEL Ta +signal generated by miscellaneous parts of the kernel .El .Pp In addition, the following signal-specific information is available: @@ -235,6 +237,10 @@ or Finally, the following code-specific information is available: .Bl -column ".Dv SI_QUEUE" ".Va si_overrun" .It Sy "Code Member Value" +.It Dv SI_USER Ta Va si_pid Ta +the process ID that sent the signal +.It Ta Va si_uid Ta +real user ID of the process that sent the signal .It Dv SI_QUEUE Ta Va si_value Ta the value passed to .Xr sigqueue 2 @@ -281,6 +287,14 @@ signal is queued when a process changed .Tn POSIX Realtime Extensions like aio, timer, and message queue also queue signals. +Signals with code +.Dv SI_USER +or +.Dv SI_KERNEL +are only queued if there are sufficient resources; +otherwise, +.Dv SI_NOINFO +results. For some hardware architectures, the exact value of .Va si_addr might not be available. @@ -304,6 +318,12 @@ Full support for .Tn POSIX signal information first appeared in .Fx 7.0 . +The codes +.Dv SI_USER +and +.Dv SI_KERNEL +can be generated as of +.Fx 8.1 . .Sh AUTHORS This manual page was written by .An "David Xu" Aq davidxu@FreeBSD.org . From owner-svn-src-stable-8@FreeBSD.ORG Fri Sep 21 12:40:32 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6341A1065670; Fri, 21 Sep 2012 12:40:32 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4DF9B8FC15; Fri, 21 Sep 2012 12:40:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8LCeW71035142; Fri, 21 Sep 2012 12:40:32 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8LCeW2N035140; Fri, 21 Sep 2012 12:40:32 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201209211240.q8LCeW2N035140@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 21 Sep 2012 12:40:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240779 - stable/8/share/man/man3 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Sep 2012 12:40:32 -0000 Author: jilles Date: Fri Sep 21 12:40:31 2012 New Revision: 240779 URL: http://svn.freebsd.org/changeset/base/240779 Log: MFC r240524: siginfo(3): Document TRAP_DTRACE signal code. Modified: stable/8/share/man/man3/siginfo.3 Directory Properties: stable/8/share/man/man3/ (props changed) Modified: stable/8/share/man/man3/siginfo.3 ============================================================================== --- stable/8/share/man/man3/siginfo.3 Fri Sep 21 12:38:52 2012 (r240778) +++ stable/8/share/man/man3/siginfo.3 Fri Sep 21 12:40:31 2012 (r240779) @@ -154,6 +154,8 @@ object-specific hardware error process breakpoint .It Ta Dv TRAP_TRACE Ta process trace trap +.It Ta Dv TRAP_DTRACE Ta +DTrace induced trap .It Dv SIGCHLD Ta Dv CLD_EXITED Ta child has exited .It Ta Dv CLD_KILLED Ta From owner-svn-src-stable-8@FreeBSD.ORG Sat Sep 22 04:22:18 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A5EEB106564A; Sat, 22 Sep 2012 04:22:18 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8EC088FC0A; Sat, 22 Sep 2012 04:22:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8M4MI5v083730; Sat, 22 Sep 2012 04:22:18 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8M4MIUH083715; Sat, 22 Sep 2012 04:22:18 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201209220422.q8M4MIUH083715@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sat, 22 Sep 2012 04:22:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240800 - in stable/8: include/rpc lib/libc/rpc sys/rpc X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Sep 2012 04:22:19 -0000 Author: pfg Date: Sat Sep 22 04:22:17 2012 New Revision: 240800 URL: http://svn.freebsd.org/changeset/base/240800 Log: MFC r239963: Bring some changes from Bull's NFSv4 libtirpc implementation. ____ Fixed infinite loop in svc_run() ____ __rpc_taddr2uaddr_af() assumes the netbuf to always have a non-zero data. This is a bad assumption and can lead to a seg-fault. This patch adds a check for zero length and returns NULL when found. ____ Changed clnt_spcreateerror() to return clearer and more concise error messages. ____ Converted all uid and gid variables of the type uid_t and gid_t. ____ libtirpc: set r_netid and r_owner in __rpcb_findaddr_timed These fields in the rpcbind GETADDR call are being passed uninitialized to CLNT_CALL. In the case of x86_64 at least, this usually leads to a segfault. On x86, it sometimes causes segfaults and other times causes garbage to be sent on the wire. rpcbind generally ignores the r_owner field for calls that come in over the wire, so it really doesn't matter what we send in that slot. We just need to send something. The reference implementation from Sun seems to send a blank string. Have ours follow suit. ____ libtirpc: be sure to free cl_netid and cl_tp When creating a client with clnt_tli_create, it uses strdup to copy strings for these fields if nconf is passed in. clnt_dg_destroy frees these strings already. Make sure clnt_vc_destroy frees them in the same way. ____ Obtained from: Bull GNU/Linux NFSv4 Project Modified: stable/8/include/rpc/auth.h stable/8/include/rpc/auth_unix.h stable/8/lib/libc/rpc/auth_unix.c stable/8/lib/libc/rpc/authunix_prot.c stable/8/lib/libc/rpc/clnt_perror.c stable/8/lib/libc/rpc/clnt_vc.c stable/8/lib/libc/rpc/rpc_generic.c stable/8/lib/libc/rpc/rpc_soc.3 stable/8/lib/libc/rpc/rpcb_clnt.c stable/8/lib/libc/rpc/svc_auth_unix.c stable/8/lib/libc/rpc/svc_run.c stable/8/sys/rpc/auth.h stable/8/sys/rpc/clnt_vc.c stable/8/sys/rpc/rpcb_clnt.c Directory Properties: stable/8/include/ (props changed) stable/8/include/rpc/ (props changed) stable/8/lib/ (props changed) stable/8/lib/libc/ (props changed) stable/8/lib/libc/rpc/ (props changed) stable/8/sys/ (props changed) stable/8/sys/rpc/ (props changed) Modified: stable/8/include/rpc/auth.h ============================================================================== --- stable/8/include/rpc/auth.h Sat Sep 22 04:18:42 2012 (r240799) +++ stable/8/include/rpc/auth.h Sat Sep 22 04:22:17 2012 (r240800) @@ -243,14 +243,13 @@ __END_DECLS * System style authentication * AUTH *authunix_create(machname, uid, gid, len, aup_gids) * char *machname; - * int uid; - * int gid; + * uid_t uid; + * gid_t gid; * int len; - * int *aup_gids; + * gid_t *aup_gids; */ __BEGIN_DECLS -extern AUTH *authunix_create(char *, int, int, int, - int *); +extern AUTH *authunix_create(char *, uid_t, gid_t, int, gid_t *); extern AUTH *authunix_create_default(void); /* takes no parameters */ extern AUTH *authnone_create(void); /* takes no parameters */ __END_DECLS Modified: stable/8/include/rpc/auth_unix.h ============================================================================== --- stable/8/include/rpc/auth_unix.h Sat Sep 22 04:18:42 2012 (r240799) +++ stable/8/include/rpc/auth_unix.h Sat Sep 22 04:22:17 2012 (r240800) @@ -60,10 +60,10 @@ struct authunix_parms { u_long aup_time; char *aup_machname; - int aup_uid; - int aup_gid; + uid_t aup_uid; + gid_t aup_gid; u_int aup_len; - int *aup_gids; + gid_t *aup_gids; }; #define authsys_parms authunix_parms Modified: stable/8/lib/libc/rpc/auth_unix.c ============================================================================== --- stable/8/lib/libc/rpc/auth_unix.c Sat Sep 22 04:18:42 2012 (r240799) +++ stable/8/lib/libc/rpc/auth_unix.c Sat Sep 22 04:22:17 2012 (r240800) @@ -94,10 +94,10 @@ struct audata { AUTH * authunix_create(machname, uid, gid, len, aup_gids) char *machname; - int uid; - int gid; + uid_t uid; + gid_t gid; int len; - int *aup_gids; + gid_t *aup_gids; { struct authunix_parms aup; char mymem[MAX_AUTH_BYTES]; @@ -207,9 +207,7 @@ authunix_create_default() abort(); if (ngids > NGRPS) ngids = NGRPS; - /* XXX: interface problem; those should all have been unsigned */ - auth = authunix_create(machname, (int)uid, (int)gid, ngids, - (int *)gids); + auth = authunix_create(machname, uid, gid, ngids, gids); free(gids); return (auth); } Modified: stable/8/lib/libc/rpc/authunix_prot.c ============================================================================== --- stable/8/lib/libc/rpc/authunix_prot.c Sat Sep 22 04:18:42 2012 (r240799) +++ stable/8/lib/libc/rpc/authunix_prot.c Sat Sep 22 04:22:17 2012 (r240800) @@ -60,7 +60,7 @@ xdr_authunix_parms(xdrs, p) XDR *xdrs; struct authunix_parms *p; { - int **paup_gids; + gid_t **paup_gids; assert(xdrs != NULL); assert(p != NULL); @@ -69,8 +69,8 @@ xdr_authunix_parms(xdrs, p) if (xdr_u_long(xdrs, &(p->aup_time)) && xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME) - && xdr_int(xdrs, &(p->aup_uid)) - && xdr_int(xdrs, &(p->aup_gid)) + && xdr_u_int(xdrs, &(p->aup_uid)) + && xdr_u_int(xdrs, &(p->aup_gid)) && xdr_array(xdrs, (char **) paup_gids, &(p->aup_len), NGRPS, sizeof(int), (xdrproc_t)xdr_int) ) { return (TRUE); Modified: stable/8/lib/libc/rpc/clnt_perror.c ============================================================================== --- stable/8/lib/libc/rpc/clnt_perror.c Sat Sep 22 04:18:42 2012 (r240799) +++ stable/8/lib/libc/rpc/clnt_perror.c Sat Sep 22 04:22:17 2012 (r240800) @@ -242,7 +242,7 @@ char * clnt_spcreateerror(s) const char *s; { - char *str; + char *str, *err; size_t len, i; assert(s != NULL); @@ -258,8 +258,21 @@ clnt_spcreateerror(s) switch (rpc_createerr.cf_stat) { case RPC_PMAPFAILURE: (void) strncat(str, " - ", len - 1); - (void) strncat(str, - clnt_sperrno(rpc_createerr.cf_error.re_status), len - 4); + err = clnt_sperrno(rpc_createerr.cf_error.re_status); + if (err) + (void) strncat(str, err+5, len-5); + switch(rpc_createerr.cf_error.re_status) { + case RPC_CANTSEND: + case RPC_CANTRECV: + i = strlen(str); + len -= i; + snprintf(str+i, len, ": errno %d (%s)", + rpc_createerr.cf_error.re_errno, + strerror(rpc_createerr.cf_error.re_errno)); + break; + default: + break; + } break; case RPC_SYSTEMERROR: Modified: stable/8/lib/libc/rpc/clnt_vc.c ============================================================================== --- stable/8/lib/libc/rpc/clnt_vc.c Sat Sep 22 04:18:42 2012 (r240799) +++ stable/8/lib/libc/rpc/clnt_vc.c Sat Sep 22 04:22:17 2012 (r240800) @@ -672,6 +672,10 @@ clnt_vc_destroy(cl) if (ct->ct_addr.buf) free(ct->ct_addr.buf); mem_free(ct, sizeof(struct ct_data)); + if (cl->cl_netid && cl->cl_netid[0]) + mem_free(cl->cl_netid, strlen(cl->cl_netid) +1); + if (cl->cl_tp && cl->cl_tp[0]) + mem_free(cl->cl_tp, strlen(cl->cl_tp) +1); mem_free(cl, sizeof(CLIENT)); mutex_unlock(&clnt_fd_lock); thr_sigsetmask(SIG_SETMASK, &(mask), NULL); Modified: stable/8/lib/libc/rpc/rpc_generic.c ============================================================================== --- stable/8/lib/libc/rpc/rpc_generic.c Sat Sep 22 04:18:42 2012 (r240799) +++ stable/8/lib/libc/rpc/rpc_generic.c Sat Sep 22 04:22:17 2012 (r240800) @@ -269,7 +269,8 @@ __rpc_getconfip(nettype) } while ((nconf = getnetconfig(confighandle)) != NULL) { if (strcmp(nconf->nc_protofmly, NC_INET) == 0) { - if (strcmp(nconf->nc_proto, NC_TCP) == 0) { + if (strcmp(nconf->nc_proto, NC_TCP) == 0 && + netid_tcp == NULL) { netid_tcp = strdup(nconf->nc_netid); if (main_thread) netid_tcp_main = netid_tcp; @@ -277,7 +278,8 @@ __rpc_getconfip(nettype) thr_setspecific(tcp_key, (void *) netid_tcp); } else - if (strcmp(nconf->nc_proto, NC_UDP) == 0) { + if (strcmp(nconf->nc_proto, NC_UDP) == 0 && + netid_udp == NULL) { netid_udp = strdup(nconf->nc_netid); if (main_thread) netid_udp_main = netid_udp; @@ -616,6 +618,9 @@ __rpc_taddr2uaddr_af(int af, const struc #endif u_int16_t port; + if (nbuf->len <= 0) + return NULL; + switch (af) { case AF_INET: sin = nbuf->buf; Modified: stable/8/lib/libc/rpc/rpc_soc.3 ============================================================================== --- stable/8/lib/libc/rpc/rpc_soc.3 Sat Sep 22 04:18:42 2012 (r240799) +++ stable/8/lib/libc/rpc/rpc_soc.3 Sat Sep 22 04:22:17 2012 (r240800) @@ -148,7 +148,7 @@ default authentication used by .Ft "AUTH *" .Xc .It Xo -.Fn authunix_create "char *host" "int uid" "int gid" "int len" "int *aup_gids" +.Fn authunix_create "char *host" "uid_t uid" "gid_t gid" "int len" "gid_t *aup_gids" .Xc .Pp Create and return an Modified: stable/8/lib/libc/rpc/rpcb_clnt.c ============================================================================== --- stable/8/lib/libc/rpc/rpcb_clnt.c Sat Sep 22 04:18:42 2012 (r240799) +++ stable/8/lib/libc/rpc/rpcb_clnt.c Sat Sep 22 04:22:17 2012 (r240800) @@ -770,6 +770,13 @@ __rpcb_findaddr_timed(program, version, } parms.r_addr = NULL; + parms.r_netid = nconf->nc_netid; + + /* + * According to wire captures, the reference implementation + * (OpenSolaris) sends a blank string here too. + */ + parms.r_owner = ""; /* * Use default total timeout if no timeout is specified. Modified: stable/8/lib/libc/rpc/svc_auth_unix.c ============================================================================== --- stable/8/lib/libc/rpc/svc_auth_unix.c Sat Sep 22 04:18:42 2012 (r240799) +++ stable/8/lib/libc/rpc/svc_auth_unix.c Sat Sep 22 04:22:17 2012 (r240800) @@ -68,7 +68,7 @@ _svcauth_unix(rqst, msg) struct area { struct authunix_parms area_aup; char area_machname[MAX_MACHINE_NAME+1]; - int area_gids[NGRPS]; + gid_t area_gids[NGRPS]; } *area; u_int auth_len; size_t str_len, gid_len; Modified: stable/8/lib/libc/rpc/svc_run.c ============================================================================== --- stable/8/lib/libc/rpc/svc_run.c Sat Sep 22 04:18:42 2012 (r240799) +++ stable/8/lib/libc/rpc/svc_run.c Sat Sep 22 04:22:17 2012 (r240800) @@ -60,14 +60,13 @@ svc_run() fd_set readfds, cleanfds; struct timeval timeout; - timeout.tv_sec = 30; - timeout.tv_usec = 0; - for (;;) { rwlock_rdlock(&svc_fd_lock); readfds = svc_fdset; cleanfds = svc_fdset; rwlock_unlock(&svc_fd_lock); + timeout.tv_sec = 30; + timeout.tv_usec = 0; switch (_select(svc_maxfd+1, &readfds, NULL, NULL, &timeout)) { case -1: FD_ZERO(&readfds); Modified: stable/8/sys/rpc/auth.h ============================================================================== --- stable/8/sys/rpc/auth.h Sat Sep 22 04:18:42 2012 (r240799) +++ stable/8/sys/rpc/auth.h Sat Sep 22 04:22:17 2012 (r240800) @@ -234,18 +234,17 @@ __END_DECLS * System style authentication * AUTH *authunix_create(machname, uid, gid, len, aup_gids) * char *machname; - * int uid; - * int gid; + * uid_t uid; + * gid_t gid; * int len; - * int *aup_gids; + * gid_t *aup_gids; */ __BEGIN_DECLS #ifdef _KERNEL struct ucred; extern AUTH *authunix_create(struct ucred *); #else -extern AUTH *authunix_create(char *, int, int, int, - int *); +extern AUTH *authunix_create(char *, uid_t, gid_t, int, gid_t *); extern AUTH *authunix_create_default(void); /* takes no parameters */ #endif extern AUTH *authnone_create(void); /* takes no parameters */ Modified: stable/8/sys/rpc/clnt_vc.c ============================================================================== --- stable/8/sys/rpc/clnt_vc.c Sat Sep 22 04:18:42 2012 (r240799) +++ stable/8/sys/rpc/clnt_vc.c Sat Sep 22 04:22:17 2012 (r240800) @@ -836,6 +836,10 @@ clnt_vc_destroy(CLIENT *cl) soclose(so); } mem_free(ct, sizeof(struct ct_data)); + if (cl->cl_netid && cl->cl_netid[0]) + mem_free(cl->cl_netid, strlen(cl->cl_netid) +1); + if (cl->cl_tp && cl->cl_tp[0]) + mem_free(cl->cl_tp, strlen(cl->cl_tp) +1); mem_free(cl, sizeof(CLIENT)); } Modified: stable/8/sys/rpc/rpcb_clnt.c ============================================================================== --- stable/8/sys/rpc/rpcb_clnt.c Sat Sep 22 04:18:42 2012 (r240799) +++ stable/8/sys/rpc/rpcb_clnt.c Sat Sep 22 04:22:17 2012 (r240800) @@ -780,6 +780,13 @@ __rpcb_findaddr_timed(program, version, } parms.r_addr = NULL; + parms.r_netid = nconf->nc_netid; + + /* + * According to wire captures, the reference implementation + * (OpenSolaris) sends a blank string here too. + */ + parms.r_owner = ""; /* * Use default total timeout if no timeout is specified. From owner-svn-src-stable-8@FreeBSD.ORG Sat Sep 22 21:14:54 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6422D1065672; Sat, 22 Sep 2012 21:14:54 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 452A88FC0A; Sat, 22 Sep 2012 21:14:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8MLEssq043222; Sat, 22 Sep 2012 21:14:54 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8MLEsVp043218; Sat, 22 Sep 2012 21:14:54 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201209222114.q8MLEsVp043218@svn.freebsd.org> From: Andriy Gapon Date: Sat, 22 Sep 2012 21:14:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240838 - in stable/8/sys: boot/zfs cddl/boot/zfs X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Sep 2012 21:14:54 -0000 Author: avg Date: Sat Sep 22 21:14:53 2012 New Revision: 240838 URL: http://svn.freebsd.org/changeset/base/240838 Log: MFC r240346,240356: zfs boot: bring zap_leaf_chunk field names in sync with kernel code Modified: stable/8/sys/boot/zfs/zfs.c stable/8/sys/boot/zfs/zfsimpl.c stable/8/sys/cddl/boot/zfs/zfsimpl.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/ (props changed) Modified: stable/8/sys/boot/zfs/zfs.c ============================================================================== --- stable/8/sys/boot/zfs/zfs.c Sat Sep 22 21:13:34 2012 (r240837) +++ stable/8/sys/boot/zfs/zfs.c Sat Sep 22 21:14:53 2012 (r240838) @@ -317,7 +317,7 @@ zfs_readdir(struct open_file *f, struct if (zc->l_entry.le_type != ZAP_CHUNK_ENTRY) goto fzap_next; - namelen = zc->l_entry.le_name_length; + namelen = zc->l_entry.le_name_numints; if (namelen > sizeof(d->d_name)) namelen = sizeof(d->d_name); Modified: stable/8/sys/boot/zfs/zfsimpl.c ============================================================================== --- stable/8/sys/boot/zfs/zfsimpl.c Sat Sep 22 21:13:34 2012 (r240837) +++ stable/8/sys/boot/zfs/zfsimpl.c Sat Sep 22 21:14:53 2012 (r240838) @@ -1179,7 +1179,7 @@ fzap_name_equal(const zap_leaf_t *zl, co const zap_leaf_chunk_t *nc; const char *p; - namelen = zc->l_entry.le_name_length; + namelen = zc->l_entry.le_name_numints; nc = &ZAP_LEAF_CHUNK(zl, zc->l_entry.le_name_chunk); p = name; @@ -1392,7 +1392,7 @@ fzap_list(const spa_t *spa, const dnode_ zc = &ZAP_LEAF_CHUNK(&zl, j); if (zc->l_entry.le_type != ZAP_CHUNK_ENTRY) continue; - namelen = zc->l_entry.le_name_length; + namelen = zc->l_entry.le_name_numints; if (namelen > sizeof(name)) namelen = sizeof(name); @@ -1491,7 +1491,7 @@ fzap_name_copy(const zap_leaf_t *zl, con const zap_leaf_chunk_t *nc; char *p; - namelen = zc->l_entry.le_name_length; + namelen = zc->l_entry.le_name_numints; nc = &ZAP_LEAF_CHUNK(zl, zc->l_entry.le_name_chunk); p = name; Modified: stable/8/sys/cddl/boot/zfs/zfsimpl.h ============================================================================== --- stable/8/sys/cddl/boot/zfs/zfsimpl.h Sat Sep 22 21:13:34 2012 (r240837) +++ stable/8/sys/cddl/boot/zfs/zfsimpl.h Sat Sep 22 21:14:53 2012 (r240838) @@ -1171,12 +1171,12 @@ typedef struct zap_leaf_phys { typedef union zap_leaf_chunk { struct zap_leaf_entry { uint8_t le_type; /* always ZAP_CHUNK_ENTRY */ - uint8_t le_int_size; /* size of ints */ + uint8_t le_value_intlen; /* size of ints */ uint16_t le_next; /* next entry in hash chain */ uint16_t le_name_chunk; /* first chunk of the name */ - uint16_t le_name_length; /* bytes in name, incl null */ + uint16_t le_name_numints; /* bytes in name, incl null */ uint16_t le_value_chunk; /* first chunk of the value */ - uint16_t le_value_length; /* value length in ints */ + uint16_t le_value_numints; /* value length in ints */ uint32_t le_cd; /* collision differentiator */ uint64_t le_hash; /* hash value of the name */ } l_entry; From owner-svn-src-stable-8@FreeBSD.ORG Sat Sep 22 21:19:50 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4F336106566C; Sat, 22 Sep 2012 21:19:50 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3AB9C8FC14; Sat, 22 Sep 2012 21:19:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8MLJoQ5044758; Sat, 22 Sep 2012 21:19:50 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8MLJoGN044756; Sat, 22 Sep 2012 21:19:50 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201209222119.q8MLJoGN044756@svn.freebsd.org> From: Andriy Gapon Date: Sat, 22 Sep 2012 21:19:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240840 - stable/8/sys/kern X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Sep 2012 21:19:50 -0000 Author: avg Date: Sat Sep 22 21:19:49 2012 New Revision: 240840 URL: http://svn.freebsd.org/changeset/base/240840 Log: MFC r240513: sched_ule: fix inverted condition in reporting of priority lending via ktr Modified: stable/8/sys/kern/sched_ule.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) Modified: stable/8/sys/kern/sched_ule.c ============================================================================== --- stable/8/sys/kern/sched_ule.c Sat Sep 22 21:18:30 2012 (r240839) +++ stable/8/sys/kern/sched_ule.c Sat Sep 22 21:19:49 2012 (r240840) @@ -1599,7 +1599,7 @@ sched_thread_priority(struct thread *td, "prio:%d", td->td_priority, "new prio:%d", prio, KTR_ATTR_LINKED, sched_tdname(curthread)); SDT_PROBE3(sched, , , change_pri, td, td->td_proc, prio); - if (td != curthread && prio > td->td_priority) { + if (td != curthread && prio < td->td_priority) { KTR_POINT3(KTR_SCHED, "thread", sched_tdname(curthread), "lend prio", "prio:%d", td->td_priority, "new prio:%d", prio, KTR_ATTR_LINKED, sched_tdname(td));