svn commit: r231118 - in head: include/rpc include/rpcsvc lib/libc/rpc lib/libc/yp lib/librpcsvc lib/libypclnt libexec/ypxfr release/picobsd/tinyware/passwd sys/conf sys/modules/kgssapi sys/modules...

2012-02-07 Thread Dimitry Andric
Author: dim
Date: Tue Feb  7 09:27:07 2012
New Revision: 231118
URL: http://svn.freebsd.org/changeset/base/231118

Log:
  Consistently set RPCGEN_CPP when running rpcgen, so the C preprocessor
  set via ${CPP} is used, instead of always using hardcoded /usr/bin/cpp.
  
  MFC after:1 week

Modified:
  head/include/rpc/Makefile
  head/include/rpcsvc/Makefile
  head/lib/libc/rpc/Makefile.inc
  head/lib/libc/yp/Makefile.inc
  head/lib/librpcsvc/Makefile
  head/lib/libypclnt/Makefile
  head/libexec/ypxfr/Makefile
  head/release/picobsd/tinyware/passwd/Makefile
  head/sys/conf/files
  head/sys/modules/kgssapi/Makefile
  head/sys/modules/kgssapi_krb5/Makefile
  head/usr.sbin/amd/Makefile.inc
  head/usr.sbin/bootparamd/bootparamd/Makefile
  head/usr.sbin/bootparamd/callbootd/Makefile
  head/usr.sbin/gssd/Makefile
  head/usr.sbin/keyserv/Makefile
  head/usr.sbin/rpc.lockd/Makefile
  head/usr.sbin/rpc.statd/Makefile
  head/usr.sbin/rpc.yppasswdd/Makefile
  head/usr.sbin/rpc.ypupdated/Makefile
  head/usr.sbin/rpc.ypxfrd/Makefile
  head/usr.sbin/yppush/Makefile
  head/usr.sbin/ypserv/Makefile

Modified: head/include/rpc/Makefile
==
--- head/include/rpc/Makefile   Tue Feb  7 07:56:00 2012(r231117)
+++ head/include/rpc/Makefile   Tue Feb  7 09:27:07 2012(r231118)
@@ -3,7 +3,7 @@
 
 .SUFFIXES: .x
 
-RPCCOM = rpcgen -C
+RPCCOM=RPCGEN_CPP=${CPP:Q} rpcgen -C
 
 HDRS=  rpcb_prot.h
 

Modified: head/include/rpcsvc/Makefile
==
--- head/include/rpcsvc/MakefileTue Feb  7 07:56:00 2012
(r231117)
+++ head/include/rpcsvc/MakefileTue Feb  7 09:27:07 2012
(r231118)
@@ -3,7 +3,7 @@
 
 .SUFFIXES: .x
 
-RPCCOM = rpcgen -C
+RPCCOM=RPCGEN_CPP=${CPP:Q} rpcgen -C
 
 HDRS= key_prot.h klm_prot.h mount.h nfs_prot.h nlm_prot.h rex.h rnusers.h \
   rquota.h rstat.h rwall.h sm_inter.h spray.h yppasswd.h yp.h \

Modified: head/lib/libc/rpc/Makefile.inc
==
--- head/lib/libc/rpc/Makefile.inc  Tue Feb  7 07:56:00 2012
(r231117)
+++ head/lib/libc/rpc/Makefile.inc  Tue Feb  7 09:27:07 2012
(r231118)
@@ -34,7 +34,7 @@ CFLAGS+= -I${.CURDIR}/rpc
 CLEANFILES+= crypt_clnt.c crypt_xdr.c crypt.h
 
 RPCDIR= ${DESTDIR}/usr/include/rpcsvc
-RPCGEN= rpcgen -C
+RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -C
 
 crypt_clnt.c: ${RPCDIR}/crypt.x crypt.h
${RPCGEN} -l -o ${.TARGET} ${RPCDIR}/crypt.x

Modified: head/lib/libc/yp/Makefile.inc
==
--- head/lib/libc/yp/Makefile.inc   Tue Feb  7 07:56:00 2012
(r231117)
+++ head/lib/libc/yp/Makefile.inc   Tue Feb  7 09:27:07 2012
(r231118)
@@ -10,7 +10,7 @@ CLEANFILES+=  yp.h yp_xdr.c
 SYM_MAPS+= ${.CURDIR}/yp/Symbol.map
 
 RPCSRC=${DESTDIR}/usr/include/rpcsvc/yp.x
-RPCGEN=rpcgen -C
+RPCGEN=RPCGEN_CPP=${CPP:Q} rpcgen -C
 
 yp_xdr.c: ${RPCSRC}
${RPCGEN} -c -o ${.TARGET} ${RPCSRC}

Modified: head/lib/librpcsvc/Makefile
==
--- head/lib/librpcsvc/Makefile Tue Feb  7 07:56:00 2012(r231117)
+++ head/lib/librpcsvc/Makefile Tue Feb  7 09:27:07 2012(r231118)
@@ -18,7 +18,7 @@ SECRPCSRCS= secretkey.c xcrypt.c
 OTHERSRCS+= yp_passwd.c yp_update.c
 .endif
 
-RPCCOM = rpcgen -C
+RPCCOM=RPCGEN_CPP=${CPP:Q} rpcgen -C
 
 INCDIRS= -I${DESTDIR}/usr/include/rpcsvc
 

Modified: head/lib/libypclnt/Makefile
==
--- head/lib/libypclnt/Makefile Tue Feb  7 07:56:00 2012(r231117)
+++ head/lib/libypclnt/Makefile Tue Feb  7 09:27:07 2012(r231118)
@@ -22,7 +22,7 @@ GENSRCS=yp.h \
yppasswd_private_clnt.c \
yppasswd_private_xdr.c
 
-RPCGEN=rpcgen -C
+RPCGEN=RPCGEN_CPP=${CPP:Q} rpcgen -C
 RPCSRC=${.CURDIR}/../../include/rpcsvc/yp.x
 RPCSRC_PW= ${.CURDIR}/../../include/rpcsvc/yppasswd.x
 RPCSRC_PRIV=   ${.CURDIR}/../../usr.sbin/rpc.yppasswdd/yppasswd_private.x

Modified: head/libexec/ypxfr/Makefile
==
--- head/libexec/ypxfr/Makefile Tue Feb  7 07:56:00 2012(r231117)
+++ head/libexec/ypxfr/Makefile Tue Feb  7 09:27:07 2012(r231118)
@@ -22,7 +22,7 @@ LDADD=-lrpcsvc
 CLEANFILES= ${GENSRCS}
 
 RPCDIR= ${.CURDIR}/../../include/rpcsvc
-RPCGEN= rpcgen -I -C
+RPCGEN=RPCGEN_CPP=${CPP:Q} rpcgen -I -C
 
 ypxfr_clnt.c: ${RPCDIR}/yp.x
rm -f ${.TARGET}

Modified: head/release/picobsd/tinyware/passwd/Makefile
==
--- head/release/picobsd/tinyware/passwd/Makefile   Tue Feb  7 07:56:00 
2012

svn commit: r231119 - stable/9/usr.sbin/boot0cfg

2012-02-07 Thread Konstantin Belousov
Author: kib
Date: Tue Feb  7 09:37:30 2012
New Revision: 231119
URL: http://svn.freebsd.org/changeset/base/231119

Log:
  MFC r230978:
  Be as explicit as possible when describing relation between the -m mask
  argument and slices. Adjust example for the same reason.

Modified:
  stable/9/usr.sbin/boot0cfg/boot0cfg.8
Directory Properties:
  stable/9/usr.sbin/boot0cfg/   (props changed)

Modified: stable/9/usr.sbin/boot0cfg/boot0cfg.8
==
--- stable/9/usr.sbin/boot0cfg/boot0cfg.8   Tue Feb  7 09:27:07 2012
(r231118)
+++ stable/9/usr.sbin/boot0cfg/boot0cfg.8   Tue Feb  7 09:37:30 2012
(r231119)
@@ -24,7 +24,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd November 7, 2011
+.Dd February 4, 2012
 .Dt BOOT0CFG 8
 .Os
 .Sh NAME
@@ -114,6 +114,9 @@ Specify slices to be enabled/disabled, w
 .Ar mask
 is an integer between 0 (no slices enabled) and 0xf (all four slices
 enabled).
+Each mask bit enables corresponding slice if set to 1.
+The least significant bit of the mask corresponds to slice 1,
+the most significant bit of the mask corresponds to slice 4.
 .It Fl o Ar options
 A comma-separated string of any of the following options may be
 specified (with
@@ -172,9 +175,9 @@ To boot slice 2 on the next boot:
 .Pp
 .Dl boot0cfg -s 2 ad0
 .Pp
-To enable just slices 1 and 2 in the menu:
+To enable just slices 1 and 3 in the menu:
 .Pp
-.Dl boot0cfg -m 0x3 ad0
+.Dl boot0cfg -m 0x5 ad0
 .Pp
 To go back to non-interactive booting, use
 .Xr fdisk 8
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231120 - head/sys/dev/cxgbe

2012-02-07 Thread Navdeep Parhar
Author: np
Date: Tue Feb  7 09:39:46 2012
New Revision: 231120
URL: http://svn.freebsd.org/changeset/base/231120

Log:
  Acquire the adapter lock before updating fields of the filter structure.
  
  Submitted by: gnn (different version)
  MFC after:3 days

Modified:
  head/sys/dev/cxgbe/t4_main.c

Modified: head/sys/dev/cxgbe/t4_main.c
==
--- head/sys/dev/cxgbe/t4_main.cTue Feb  7 09:37:30 2012
(r231119)
+++ head/sys/dev/cxgbe/t4_main.cTue Feb  7 09:39:46 2012
(r231120)
@@ -4839,22 +4839,22 @@ filter_rpl(struct sge_iq *iq, const stru
unsigned int rc = G_COOKIE(rpl-cookie);
struct filter_entry *f = sc-tids.ftid_tab[idx];
 
+   ADAPTER_LOCK(sc);
if (rc == FW_FILTER_WR_FLT_ADDED) {
f-smtidx = (be64toh(rpl-oldval)  24)  0xff;
f-pending = 0;  /* asynchronous setup completed */
f-valid = 1;
-   return (0);
-   }
+   } else {
+   if (rc != FW_FILTER_WR_FLT_DELETED) {
+   /* Add or delete failed, display an error */
+   log(LOG_ERR,
+   filter %u setup failed with error %u\n,
+   idx, rc);
+   }
 
-   if (rc != FW_FILTER_WR_FLT_DELETED) {
-   /* Add or delete failed, need to display an error */
-   device_printf(sc-dev,
-   filter %u setup failed with error %u\n, idx, rc);
+   clear_filter(f);
+   sc-tids.ftids_in_use--;
}
-
-   clear_filter(f);
-   ADAPTER_LOCK(sc);
-   sc-tids.ftids_in_use--;
ADAPTER_UNLOCK(sc);
}
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231121 - stable/8/usr.sbin/boot0cfg

2012-02-07 Thread Konstantin Belousov
Author: kib
Date: Tue Feb  7 09:40:22 2012
New Revision: 231121
URL: http://svn.freebsd.org/changeset/base/231121

Log:
  MFC r230978:
  Be as explicit as possible when describing relation between the -m mask
  argument and slices. Adjust example for the same reason.

Modified:
  stable/8/usr.sbin/boot0cfg/boot0cfg.8
Directory Properties:
  stable/8/usr.sbin/boot0cfg/   (props changed)

Modified: stable/8/usr.sbin/boot0cfg/boot0cfg.8
==
--- stable/8/usr.sbin/boot0cfg/boot0cfg.8   Tue Feb  7 09:39:46 2012
(r231120)
+++ stable/8/usr.sbin/boot0cfg/boot0cfg.8   Tue Feb  7 09:40:22 2012
(r231121)
@@ -24,7 +24,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd January 13, 2009
+.Dd February 4, 2012
 .Dt BOOT0CFG 8
 .Os
 .Sh NAME
@@ -114,6 +114,9 @@ Specify slices to be enabled/disabled, w
 .Ar mask
 is an integer between 0 (no slices enabled) and 0xf (all four slices
 enabled).
+Each mask bit enables corresponding slice if set to 1.
+The least significant bit of the mask corresponds to slice 1,
+the most significant bit of the mask corresponds to slice 4.
 .It Fl o Ar options
 A comma-separated string of any of the following options may be
 specified (with
@@ -187,9 +190,9 @@ To boot slice 2 on the next boot:
 .Pp
 .Dl boot0cfg -s 2 ad0
 .Pp
-To enable just slices 1 and 2 in the menu:
+To enable just slices 1 and 3 in the menu:
 .Pp
-.Dl boot0cfg -m 0x3 ad0
+.Dl boot0cfg -m 0x5 ad0
 .Pp
 To go back to non-interactive booting, use
 .Xr fdisk 8
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231122 - head/sys/ufs/ufs

2012-02-07 Thread Konstantin Belousov
Author: kib
Date: Tue Feb  7 09:51:41 2012
New Revision: 231122
URL: http://svn.freebsd.org/changeset/base/231122

Log:
  Sprinkle missed calls to asynchronous UFS_UPDATE() in attempt to
  guarantee that all UFS inode metadata changes results in the dirtiness
  of the inodeblock.  Due to missed inodeblock updates, syncer was
  required to fsync each mount point' vnode to guarantee periodic
  metadata flush.
  
  Reviewed by:  mckusick
  Tested by:scottl
  MFC after:2 weeks

Modified:
  head/sys/ufs/ufs/ufs_acl.c
  head/sys/ufs/ufs/ufs_vnops.c

Modified: head/sys/ufs/ufs/ufs_acl.c
==
--- head/sys/ufs/ufs/ufs_acl.c  Tue Feb  7 09:40:22 2012(r231121)
+++ head/sys/ufs/ufs/ufs_acl.c  Tue Feb  7 09:51:41 2012(r231122)
@@ -422,7 +422,8 @@ ufs_setacl_nfs4_internal(struct vnode *v
 
VN_KNOTE_UNLOCKED(vp, NOTE_ATTRIB);
 
-   return (0);
+   error = UFS_UPDATE(vp, 0);
+   return (error);
 }
 
 static int
@@ -591,10 +592,11 @@ ufs_setacl_posix1e(struct vop_setacl_arg
 */
ufs_sync_inode_from_acl(ap-a_aclp, ip);
ip-i_flag |= IN_CHANGE;
+   error = UFS_UPDATE(ap-a_vp, 0);
}
 
VN_KNOTE_UNLOCKED(ap-a_vp, NOTE_ATTRIB);
-   return (0);
+   return (error);
 }
 
 int

Modified: head/sys/ufs/ufs/ufs_vnops.c
==
--- head/sys/ufs/ufs/ufs_vnops.cTue Feb  7 09:40:22 2012
(r231121)
+++ head/sys/ufs/ufs/ufs_vnops.cTue Feb  7 09:51:41 2012
(r231122)
@@ -571,8 +571,9 @@ ufs_setattr(ap)
DIP_SET(ip, i_flags, ip-i_flags);
}
ip-i_flag |= IN_CHANGE;
+   error = UFS_UPDATE(vp, 0);
if (vap-va_flags  (IMMUTABLE | APPEND))
-   return (0);
+   return (error);
}
if (ip-i_flags  (IMMUTABLE | APPEND))
return (EPERM);
@@ -738,6 +739,9 @@ ufs_markatime(ap)
VI_LOCK(vp);
ip-i_flag |= IN_ACCESS;
VI_UNLOCK(vp);
+   /*
+* XXXKIB No UFS_UPDATE(ap-a_vp, 0) there.
+*/
return (0);
 }
 
@@ -794,6 +798,9 @@ ufs_chmod(vp, mode, cred, td)
if ((vp-v_mount-mnt_flag  MNT_NFS4ACLS) != 0)
error = ufs_update_nfs4_acl_after_mode_change(vp, mode, 
ip-i_uid, cred, td);
 #endif
+   if (error == 0  (ip-i_flag  IN_CHANGE) != 0)
+   error = UFS_UPDATE(vp, 0);
+
return (error);
 }
 
@@ -912,7 +919,8 @@ good:
DIP_SET(ip, i_mode, ip-i_mode);
}
}
-   return (0);
+   error = UFS_UPDATE(vp, 0);
+   return (error);
 }
 
 static int
@@ -2079,6 +2087,7 @@ ufs_rmdir(ap)
dp-i_nlink--;
DIP_SET(dp, i_nlink, dp-i_nlink);
dp-i_flag |= IN_CHANGE;
+   error = UFS_UPDATE(dvp, 0);
ip-i_nlink--;
DIP_SET(ip, i_nlink, ip-i_nlink);
ip-i_flag |= IN_CHANGE;
@@ -2122,6 +2131,7 @@ ufs_symlink(ap)
ip-i_size = len;
DIP_SET(ip, i_size, len);
ip-i_flag |= IN_CHANGE | IN_UPDATE;
+   error = UFS_UPDATE(vp, 0);
} else
error = vn_rdwr(UIO_WRITE, vp, ap-a_target, len, (off_t)0,
UIO_SYSSPACE, IO_NODELOCKED | IO_NOMACCHECK,
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231123 - head/release

2012-02-07 Thread Takahashi Yoshihiro
Author: nyan
Date: Tue Feb  7 10:59:19 2012
New Revision: 231123
URL: http://svn.freebsd.org/changeset/base/231123

Log:
  - Set TERM to cons25w on pc98 because we still use old cons25w terminal
to show Japanese.
  - Add cons25w to terminal lists.
  
  Reviewed by:  nwhitehorn
  MFC after:1 week

Modified:
  head/release/rc.local

Modified: head/release/rc.local
==
--- head/release/rc.local   Tue Feb  7 09:51:41 2012(r231122)
+++ head/release/rc.local   Tue Feb  7 10:59:19 2012(r231123)
@@ -8,10 +8,16 @@
 : ${DIALOG_ITEM_HELP=4}
 : ${DIALOG_ESC=255}
 
+MACHINE=`uname -m`
+
 kbdcontrol -d /dev/null 21
 if [ $? -eq 0 ]; then
# Syscons: use xterm, start interesting things on other VTYs
-   TERM=xterm
+   if [ ${MACHINE} = pc98 ]; then
+   TERM=cons25w
+   else
+   TERM=xterm
+   fi
 
if [ -z $EXTERNAL_VTY_STARTED ]; then
# Init will clean these processes up if/when the system
@@ -31,6 +37,7 @@ else
echoansi Standard ANSI terminal
echovt100VT100 or compatible terminal
echoxtermxterm terminal emulator (or compatible)
+   echocons25w  cons25w terminal
echo
echo -n Console type [vt100]: 
read TERM
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r231118 - in head: include/rpc include/rpcsvc lib/libc/rpc lib/libc/yp lib/librpcsvc lib/libypclnt libexec/ypxfr release/picobsd/tinyware/passwd sys/conf sys/modules/kgssapi sys/module

2012-02-07 Thread Konstantin Belousov
On Tue, Feb 07, 2012 at 09:27:08AM +, Dimitry Andric wrote:
 Author: dim
 Date: Tue Feb  7 09:27:07 2012
 New Revision: 231118
 URL: http://svn.freebsd.org/changeset/base/231118
 
 Log:
   Consistently set RPCGEN_CPP when running rpcgen, so the C preprocessor
   set via ${CPP} is used, instead of always using hardcoded /usr/bin/cpp.
   
   MFC after:  1 week
Shouldn't RPCGEN move to share/mk ?


pgpd4xFTRn19K.pgp
Description: PGP signature


svn commit: r231128 - head/share/misc

2012-02-07 Thread Ulrich Spoerlein
Author: uqs
Date: Tue Feb  7 11:53:08 2012
New Revision: 231128
URL: http://svn.freebsd.org/changeset/base/231128

Log:
  Record my ports mentor relationship.
  
  Approved by:  beat (mentor)

Modified:
  head/share/misc/committers-ports.dot

Modified: head/share/misc/committers-ports.dot
==
--- head/share/misc/committers-ports.dotTue Feb  7 11:40:38 2012
(r231127)
+++ head/share/misc/committers-ports.dotTue Feb  7 11:53:08 2012
(r231128)
@@ -184,6 +184,7 @@ trasz [label=Edward Tomasz Napierala\nt
 trhodes [label=Tom Rhodes\ntrho...@freebsd.org\n2004/07/06]
 thierry [label=Thierry Thomas\nthie...@freebsd.org\n2004/03/15]
 tmclaugh [label=Tom McLaughlin\ntmcla...@freebsd.org\n2005/09/15]
+uqs [label=Ulrich Spoerlein\n...@freebsd.org\n2012/01/19]
 vd [label=Vasil Dimov\n...@freebsd.org\n2006/01/19]
 wen [label=Wen Heping\n...@freebsd.org\n2010/12/13]
 wxs [label=Wesley Shields\n...@freebsd.org\n2008/01/03]
@@ -220,6 +221,7 @@ bapt - eadler
 bapt - jlaffaye
 
 beat - decke
+beat - uqs
 
 beech - glarkin
 beech - mva
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231129 - head/sbin/reboot

2012-02-07 Thread Ed Maste
Author: emaste
Date: Tue Feb  7 14:06:30 2012
New Revision: 231129
URL: http://svn.freebsd.org/changeset/base/231129

Log:
  Add BSD copyright notice.
  
  Approved by:  gordon@

Modified:
  head/sbin/reboot/nextboot.sh

Modified: head/sbin/reboot/nextboot.sh
==
--- head/sbin/reboot/nextboot.shTue Feb  7 11:53:08 2012
(r231128)
+++ head/sbin/reboot/nextboot.shTue Feb  7 14:06:30 2012
(r231129)
@@ -1,9 +1,29 @@
 #! /bin/sh
 #
-# Copyright 2002. Gordon Tetlow.
-# gor...@freebsd.org
+# Copyright (c) 2002 Gordon Tetlow. All rights reserved.
 # Copyright (c) 2012 Sandvine Incorporated. All rights reserved.
 #
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#notice, this list of conditions and the following disclaimer in the
+#documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
 # $FreeBSD$
 
 delete=NO
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231130 - head/sys/net

2012-02-07 Thread Pawel Jakub Dawidek
Author: pjd
Date: Tue Feb  7 14:50:33 2012
New Revision: 231130
URL: http://svn.freebsd.org/changeset/base/231130

Log:
  Allow to set if_bridge(4) sysctls from /boot/loader.conf.
  
  MFC after:3 days

Modified:
  head/sys/net/if_bridge.c

Modified: head/sys/net/if_bridge.c
==
--- head/sys/net/if_bridge.cTue Feb  7 14:06:30 2012(r231129)
+++ head/sys/net/if_bridge.cTue Feb  7 14:50:33 2012(r231130)
@@ -355,19 +355,26 @@ static int pfil_local_phys = 0; /* run p
locally destined packets */
 static int log_stp   = 0;   /* log STP state changes */
 static int bridge_inherit_mac = 0;   /* share MAC with first bridge member */
+TUNABLE_INT(net.link.bridge.pfil_onlyip, pfil_onlyip);
 SYSCTL_INT(_net_link_bridge, OID_AUTO, pfil_onlyip, CTLFLAG_RW,
 pfil_onlyip, 0, Only pass IP packets when pfil is enabled);
+TUNABLE_INT(net.link.bridge.ipfw_arp, pfil_ipfw_arp);
 SYSCTL_INT(_net_link_bridge, OID_AUTO, ipfw_arp, CTLFLAG_RW,
 pfil_ipfw_arp, 0, Filter ARP packets through IPFW layer2);
+TUNABLE_INT(net.link.bridge.pfil_bridge, pfil_bridge);
 SYSCTL_INT(_net_link_bridge, OID_AUTO, pfil_bridge, CTLFLAG_RW,
 pfil_bridge, 0, Packet filter on the bridge interface);
+TUNABLE_INT(net.link.bridge.pfil_member, pfil_member);
 SYSCTL_INT(_net_link_bridge, OID_AUTO, pfil_member, CTLFLAG_RW,
 pfil_member, 0, Packet filter on the member interface);
+TUNABLE_INT(net.link.bridge.pfil_local_phys, pfil_local_phys);
 SYSCTL_INT(_net_link_bridge, OID_AUTO, pfil_local_phys, CTLFLAG_RW,
 pfil_local_phys, 0,
 Packet filter on the physical interface for locally destined packets);
+TUNABLE_INT(net.link.bridge.log_stp, log_stp);
 SYSCTL_INT(_net_link_bridge, OID_AUTO, log_stp, CTLFLAG_RW,
 log_stp, 0, Log STP state changes);
+TUNABLE_INT(net.link.bridge.inherit_mac, bridge_inherit_mac);
 SYSCTL_INT(_net_link_bridge, OID_AUTO, inherit_mac, CTLFLAG_RW,
 bridge_inherit_mac, 0,
 Inherit MAC address from the first bridge member);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r231118 - in head: include/rpc include/rpcsvc lib/libc/rpc lib/libc/yp lib/librpcsvc lib/libypclnt libexec/ypxfr release/picobsd/tinyware/passwd sys/conf sys/modules/kgssapi sys/module

2012-02-07 Thread Dimitry Andric
On 2012-02-07 12:07, Konstantin Belousov wrote:
 On Tue, Feb 07, 2012 at 09:27:08AM +, Dimitry Andric wrote:
 Author: dim
 Date: Tue Feb  7 09:27:07 2012
 New Revision: 231118
 URL: http://svn.freebsd.org/changeset/base/231118

 Log:
   Consistently set RPCGEN_CPP when running rpcgen, so the C preprocessor
   set via ${CPP} is used, instead of always using hardcoded /usr/bin/cpp.
   
   MFC after: 1 week
 Shouldn't RPCGEN move to share/mk ?

Yes, it should probably go in bsd.own.mk, similar to what NetBSD does.
The only question is in which section, because unlike NetBSD, we do not
really have a separate area for general build tools.  I suggest that we
put it between the COMPRESS_CMD?= and .if !defined(_WITHOUT_SRCCONF)
lines.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231131 - in stable/8/sys/arm: arm include

2012-02-07 Thread Olivier Houchard
Author: cognet
Date: Tue Feb  7 15:50:14 2012
New Revision: 231131
URL: http://svn.freebsd.org/changeset/base/231131

Log:
  MFC r226441 and r226443
  r226441:
  Explicitely set ARM_RAS_START and ARM_RAS_END once the cacheline or the
  page has been allocated, or we could end up using random values, and bad 
things
   could happen.
  
   PR:  arm/161492
   Submitted by:Ian Lepore freebsd AT damnhippie dot dyndns DOT org
  
  r226443:
  Fix 2 bugs :
  
  - A race condition could happen if two threads were using RAS at the same time
as the code didn't reset RAS_END, the RAS code could believe we were not in
a RAS, when we were in fact.
  - Using signed value logic to compare addresses wasn't such a good idea.
Many thanks to Ian to investigate on these issues.
  
Pointy hat to:  cognet
PR: arm/161498
Submitted by:   Ian Lepore freebsd At damnhippie DOT dyndns dot org

Modified:
  stable/8/sys/arm/arm/machdep.c
  stable/8/sys/arm/include/asmacros.h
  stable/8/sys/arm/include/sysarch.h

Modified: stable/8/sys/arm/arm/machdep.c
==
--- stable/8/sys/arm/arm/machdep.c  Tue Feb  7 14:50:33 2012
(r231130)
+++ stable/8/sys/arm/arm/machdep.c  Tue Feb  7 15:50:14 2012
(r231131)
@@ -312,6 +312,8 @@ cpu_startup(void *dummy)
m = vm_page_alloc(NULL, 0, VM_ALLOC_NOOBJ | VM_ALLOC_ZERO);
pmap_kenter_user(ARM_TP_ADDRESS, VM_PAGE_TO_PHYS(m));
 #endif
+   *(uint32_t *)ARM_RAS_START = 0;
+   *(uint32_t *)ARM_RAS_END = 0x;
 }
 
 SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL);

Modified: stable/8/sys/arm/include/asmacros.h
==
--- stable/8/sys/arm/include/asmacros.h Tue Feb  7 14:50:33 2012
(r231130)
+++ stable/8/sys/arm/include/asmacros.h Tue Feb  7 15:50:14 2012
(r231131)
@@ -71,9 +71,8 @@
ldr r0, =ARM_RAS_START;\
mov r1, #0;\
str r1, [r0];  \
-   ldr r0, =ARM_RAS_END;  \
mov r1, #0x;   \
-   str r1, [r0];
+   str r1, [r0, #4];
 
 /*
  * PULLFRAME - macro to pull a trap frame from the stack in the current mode
@@ -120,20 +119,19 @@
stmia   r0, {r13-r14}^; /* Push the user mode registers */ \
 mov r0, r0; /* NOP for previous instruction */ \
ldr r5, =ARM_RAS_START; /* Check if there's any RAS */ \
-   ldr r3, [r5];  \
-   cmp r3, #0; /* Is the update needed ? */   \
-   ldrgt   lr, [r0, #16]; \
-   ldrgt   r1, =ARM_RAS_END;  \
-   ldrgt   r4, [r1];   /* Get the end of the RAS */   \
-   movgt   r2, #0; /* Reset the magic addresses */\
-   strgt   r2, [r5];  \
-   movgt   r2, #0x;   \
-   strgt   r2, [r1];  \
-   cmpgt   lr, r3; /* Were we in the RAS ? */ \
-   cmpgt   r4, lr;\
-   strgt   r3, [r0, #16];  /* Yes, update the pc */   \
-   mrs r0, spsr_all;   /* Put the SPSR on the stack */\
-   str r0, [sp, #-4]!
+   ldr r4, [r5, #4];   /* reset it to point at the */ \
+   cmp r4, #0x;/* end of memory if necessary;  */ \
+   movne   r1, #0x;/* leave value in r4 for later  */ \
+   strne   r1, [r5, #4];   /* comparision against PC.  */ \
+   ldr r3, [r5];   /* Retrieve global RAS_START*/ \
+   cmp r3, #0; /* and reset it if non-zero.*/ \
+   movne   r1, #0; /* If non-zero RAS_START and*/ \
+   strne   r1, [r5];   /* PC was lower than RAS_END,   */ \
+   ldrne   r1, [r0, #16];  /* adjust the saved PC so that  */ \
+   cmpne   r4, r1; /* execution later resumes at   */ \
+   strhi   r3, [r0, #16];  /* the RAS_START location.  */ \
+   mrs r0, spsr_all;  \
+   str r0, [sp, #-4]!
 
 /*
  * PULLFRAMEFROMSVCANDEXIT - macro to pull a trap frame from the stack

Modified: stable/8/sys/arm/include/sysarch.h
==
--- stable/8/sys/arm/include/sysarch.h  Tue 

Re: svn commit: r231118 - in head: include/rpc include/rpcsvc lib/libc/rpc lib/libc/yp lib/librpcsvc lib/libypclnt libexec/ypxfr release/picobsd/tinyware/passwd sys/conf sys/modules/kgssapi sys/module

2012-02-07 Thread Konstantin Belousov
On Tue, Feb 07, 2012 at 04:19:22PM +0100, Dimitry Andric wrote:
 On 2012-02-07 12:07, Konstantin Belousov wrote:
  On Tue, Feb 07, 2012 at 09:27:08AM +, Dimitry Andric wrote:
  Author: dim
  Date: Tue Feb  7 09:27:07 2012
  New Revision: 231118
  URL: http://svn.freebsd.org/changeset/base/231118
 
  Log:
Consistently set RPCGEN_CPP when running rpcgen, so the C preprocessor
set via ${CPP} is used, instead of always using hardcoded /usr/bin/cpp.

MFC after:   1 week
  Shouldn't RPCGEN move to share/mk ?
 
 Yes, it should probably go in bsd.own.mk, similar to what NetBSD does.
 The only question is in which section, because unlike NetBSD, we do not
 really have a separate area for general build tools.  I suggest that we
 put it between the COMPRESS_CMD?= and .if !defined(_WITHOUT_SRCCONF)
 lines.

I cannot answer your question. Does sys.mk has some restrictions on what
should be put there ?


pgpRKnXo5XVJE.pgp
Description: PGP signature


svn commit: r231132 - in stable/9/sys/arm: arm include

2012-02-07 Thread Olivier Houchard
Author: cognet
Date: Tue Feb  7 16:07:29 2012
New Revision: 231132
URL: http://svn.freebsd.org/changeset/base/231132

Log:
  MFC r226441 and r226443
  r226441:
  Explicitely set ARM_RAS_START and ARM_RAS_END once the cacheline or the
  page has been allocated, or we could end up using random values, and bad 
things
  could happen.
  
   PR:  arm/161492
   Submitted by:Ian Lepore freebsd AT damnhippie dot dyndns DOT org
  
  r226443:
  Fix 2 bugs :
  
  - A race condition could happen if two threads were using RAS at the same time
as the code didn't reset RAS_END, the RAS code could believe we were not in
 a RAS, when we were in fact.
  - Using signed value logic to compare addresses wasn't such a good idea.
  
  Many thanks to Ian to investigate on these issues.
  
Pointy hat to:  cognet
PR: arm/161498
Submitted by:   Ian Lepore freebsd At damnhippie DOT dyndns dot org

Modified:
  stable/9/sys/arm/arm/machdep.c
  stable/9/sys/arm/include/asmacros.h
  stable/9/sys/arm/include/sysarch.h

Modified: stable/9/sys/arm/arm/machdep.c
==
--- stable/9/sys/arm/arm/machdep.c  Tue Feb  7 15:50:14 2012
(r231131)
+++ stable/9/sys/arm/arm/machdep.c  Tue Feb  7 16:07:29 2012
(r231132)
@@ -312,6 +312,8 @@ cpu_startup(void *dummy)
m = vm_page_alloc(NULL, 0, VM_ALLOC_NOOBJ | VM_ALLOC_ZERO);
pmap_kenter_user(ARM_TP_ADDRESS, VM_PAGE_TO_PHYS(m));
 #endif
+   *(uint32_t *)ARM_RAS_START = 0;
+   *(uint32_t *)ARM_RAS_END = 0x;
 }
 
 SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL);

Modified: stable/9/sys/arm/include/asmacros.h
==
--- stable/9/sys/arm/include/asmacros.h Tue Feb  7 15:50:14 2012
(r231131)
+++ stable/9/sys/arm/include/asmacros.h Tue Feb  7 16:07:29 2012
(r231132)
@@ -71,9 +71,8 @@
ldr r0, =ARM_RAS_START;\
mov r1, #0;\
str r1, [r0];  \
-   ldr r0, =ARM_RAS_END;  \
mov r1, #0x;   \
-   str r1, [r0];
+   str r1, [r0, #4];
 
 /*
  * PULLFRAME - macro to pull a trap frame from the stack in the current mode
@@ -120,20 +119,19 @@
stmia   r0, {r13-r14}^; /* Push the user mode registers */ \
 mov r0, r0; /* NOP for previous instruction */ \
ldr r5, =ARM_RAS_START; /* Check if there's any RAS */ \
-   ldr r3, [r5];  \
-   cmp r3, #0; /* Is the update needed ? */   \
-   ldrgt   lr, [r0, #16]; \
-   ldrgt   r1, =ARM_RAS_END;  \
-   ldrgt   r4, [r1];   /* Get the end of the RAS */   \
-   movgt   r2, #0; /* Reset the magic addresses */\
-   strgt   r2, [r5];  \
-   movgt   r2, #0x;   \
-   strgt   r2, [r1];  \
-   cmpgt   lr, r3; /* Were we in the RAS ? */ \
-   cmpgt   r4, lr;\
-   strgt   r3, [r0, #16];  /* Yes, update the pc */   \
-   mrs r0, spsr_all;   /* Put the SPSR on the stack */\
-   str r0, [sp, #-4]!
+   ldr r4, [r5, #4];   /* reset it to point at the */ \
+   cmp r4, #0x;/* end of memory if necessary;  */ \
+   movne   r1, #0x;/* leave value in r4 for later  */ \
+   strne   r1, [r5, #4];   /* comparision against PC.  */ \
+   ldr r3, [r5];   /* Retrieve global RAS_START*/ \
+   cmp r3, #0; /* and reset it if non-zero.*/ \
+   movne   r1, #0; /* If non-zero RAS_START and*/ \
+   strne   r1, [r5];   /* PC was lower than RAS_END,   */ \
+   ldrne   r1, [r0, #16];  /* adjust the saved PC so that  */ \
+   cmpne   r4, r1; /* execution later resumes at   */ \
+   strhi   r3, [r0, #16];  /* the RAS_START location.  */ \
+   mrs r0, spsr_all;  \
+   str r0, [sp, #-4]!
 
 /*
  * PULLFRAMEFROMSVCANDEXIT - macro to pull a trap frame from the stack

Modified: stable/9/sys/arm/include/sysarch.h
==
--- stable/9/sys/arm/include/sysarch.h  

svn commit: r231133 - head/sys/fs/nfsclient

2012-02-07 Thread Rick Macklem
Author: rmacklem
Date: Tue Feb  7 16:32:43 2012
New Revision: 231133
URL: http://svn.freebsd.org/changeset/base/231133

Log:
  r228827 fixed a problem where copying of NFSv4 open credentials into
  a credential structure would corrupt it. This happened when the
  p argument was != NULL. However, I now realize that the copying of
  open credentials should only happen for p == NULL, since that indicates
  that it is a read-ahead or write-behind. This patch fixes this.
  After this commit, r228827 could be reverted, but I think the code is
  clearer and safer with the patch, so I am going to leave it in.
  Without this patch, it was possible that a NFSv4 VOP_SETATTR() could have
  changed the credentials of the caller. This would have happened if
  the process doing the VOP_SETATTR() did not have the file open, but
  some other process running as a different uid had the file open for writing
  at the same time.
  
  MFC after:5 days

Modified:
  head/sys/fs/nfsclient/nfs_clstate.c

Modified: head/sys/fs/nfsclient/nfs_clstate.c
==
--- head/sys/fs/nfsclient/nfs_clstate.c Tue Feb  7 16:07:29 2012
(r231132)
+++ head/sys/fs/nfsclient/nfs_clstate.c Tue Feb  7 16:32:43 2012
(r231133)
@@ -559,8 +559,12 @@ nfscl_getstateid(vnode_t vp, u_int8_t *n
NFSUNLOCKCLSTATE();
return (ENOENT);
}
-   /* for read aheads or write behinds, use the open cred */
-   newnfs_copycred(op-nfso_cred, cred);
+   /*
+* For read aheads or write behinds, use the open cred.
+* A read ahead or write behind is indicated by p == NULL.
+*/
+   if (p == NULL)
+   newnfs_copycred(op-nfso_cred, cred);
}
 
/*
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231134 - in head/sys: dev/isci dev/isci/scil modules/isci

2012-02-07 Thread Jim Harris
Author: jimharris
Date: Tue Feb  7 17:21:54 2012
New Revision: 231134
URL: http://svn.freebsd.org/changeset/base/231134

Log:
  Add svn:keywords for isci driver files.
  
  Sponsored by: Intel
  Approved by: scottl

Modified:
Directory Properties:
  head/sys/dev/isci/README   (props changed)
  head/sys/dev/isci/environment.h   (props changed)
  head/sys/dev/isci/isci.c   (props changed)
  head/sys/dev/isci/isci.h   (props changed)
  head/sys/dev/isci/isci_controller.c   (props changed)
  head/sys/dev/isci/isci_domain.c   (props changed)
  head/sys/dev/isci/isci_interrupt.c   (props changed)
  head/sys/dev/isci/isci_io_request.c   (props changed)
  head/sys/dev/isci/isci_logger.c   (props changed)
  head/sys/dev/isci/isci_oem_parameters.c   (props changed)
  head/sys/dev/isci/isci_remote_device.c   (props changed)
  head/sys/dev/isci/isci_sysctl.c   (props changed)
  head/sys/dev/isci/isci_task_request.c   (props changed)
  head/sys/dev/isci/isci_timer.c   (props changed)
  head/sys/dev/isci/sci_environment.h   (props changed)
  head/sys/dev/isci/scil/intel_ata.h   (props changed)
  head/sys/dev/isci/scil/intel_pci.h   (props changed)
  head/sys/dev/isci/scil/intel_sas.h   (props changed)
  head/sys/dev/isci/scil/intel_sat.h   (props changed)
  head/sys/dev/isci/scil/intel_sata.h   (props changed)
  head/sys/dev/isci/scil/intel_scsi.h   (props changed)
  head/sys/dev/isci/scil/sati.c   (props changed)
  head/sys/dev/isci/scil/sati.h   (props changed)
  head/sys/dev/isci/scil/sati_abort_task_set.c   (props changed)
  head/sys/dev/isci/scil/sati_abort_task_set.h   (props changed)
  head/sys/dev/isci/scil/sati_atapi.c   (props changed)
  head/sys/dev/isci/scil/sati_atapi.h   (props changed)
  head/sys/dev/isci/scil/sati_callbacks.h   (props changed)
  head/sys/dev/isci/scil/sati_design.h   (props changed)
  head/sys/dev/isci/scil/sati_device.c   (props changed)
  head/sys/dev/isci/scil/sati_device.h   (props changed)
  head/sys/dev/isci/scil/sati_inquiry.c   (props changed)
  head/sys/dev/isci/scil/sati_inquiry.h   (props changed)
  head/sys/dev/isci/scil/sati_log_sense.c   (props changed)
  head/sys/dev/isci/scil/sati_log_sense.h   (props changed)
  head/sys/dev/isci/scil/sati_lun_reset.c   (props changed)
  head/sys/dev/isci/scil/sati_lun_reset.h   (props changed)
  head/sys/dev/isci/scil/sati_mode_pages.c   (props changed)
  head/sys/dev/isci/scil/sati_mode_pages.h   (props changed)
  head/sys/dev/isci/scil/sati_mode_select.c   (props changed)
  head/sys/dev/isci/scil/sati_mode_select.h   (props changed)
  head/sys/dev/isci/scil/sati_mode_sense.c   (props changed)
  head/sys/dev/isci/scil/sati_mode_sense.h   (props changed)
  head/sys/dev/isci/scil/sati_mode_sense_10.c   (props changed)
  head/sys/dev/isci/scil/sati_mode_sense_10.h   (props changed)
  head/sys/dev/isci/scil/sati_mode_sense_6.c   (props changed)
  head/sys/dev/isci/scil/sati_mode_sense_6.h   (props changed)
  head/sys/dev/isci/scil/sati_move.c   (props changed)
  head/sys/dev/isci/scil/sati_move.h   (props changed)
  head/sys/dev/isci/scil/sati_passthrough.c   (props changed)
  head/sys/dev/isci/scil/sati_passthrough.h   (props changed)
  head/sys/dev/isci/scil/sati_read.c   (props changed)
  head/sys/dev/isci/scil/sati_read.h   (props changed)
  head/sys/dev/isci/scil/sati_read_buffer.c   (props changed)
  head/sys/dev/isci/scil/sati_read_buffer.h   (props changed)
  head/sys/dev/isci/scil/sati_read_capacity.c   (props changed)
  head/sys/dev/isci/scil/sati_read_capacity.h   (props changed)
  head/sys/dev/isci/scil/sati_reassign_blocks.c   (props changed)
  head/sys/dev/isci/scil/sati_reassign_blocks.h   (props changed)
  head/sys/dev/isci/scil/sati_report_luns.c   (props changed)
  head/sys/dev/isci/scil/sati_report_luns.h   (props changed)
  head/sys/dev/isci/scil/sati_request_sense.c   (props changed)
  head/sys/dev/isci/scil/sati_request_sense.h   (props changed)
  head/sys/dev/isci/scil/sati_start_stop_unit.c   (props changed)
  head/sys/dev/isci/scil/sati_start_stop_unit.h   (props changed)
  head/sys/dev/isci/scil/sati_synchronize_cache.c   (props changed)
  head/sys/dev/isci/scil/sati_synchronize_cache.h   (props changed)
  head/sys/dev/isci/scil/sati_test_unit_ready.c   (props changed)
  head/sys/dev/isci/scil/sati_test_unit_ready.h   (props changed)
  head/sys/dev/isci/scil/sati_translator_sequence.h   (props changed)
  head/sys/dev/isci/scil/sati_types.h   (props changed)
  head/sys/dev/isci/scil/sati_unmap.c   (props changed)
  head/sys/dev/isci/scil/sati_unmap.h   (props changed)
  head/sys/dev/isci/scil/sati_util.c   (props changed)
  head/sys/dev/isci/scil/sati_util.h   (props changed)
  head/sys/dev/isci/scil/sati_verify.c   (props changed)
  head/sys/dev/isci/scil/sati_verify.h   (props changed)
  head/sys/dev/isci/scil/sati_write.c   (props changed)
  head/sys/dev/isci/scil/sati_write.h   (props changed)
  head/sys/dev/isci/scil/sati_write_and_verify.c   (props changed)
  head/sys/dev/isci/scil/sati_write_and_verify.h   

svn commit: r231135 - stable/9/usr.bin/grep

2012-02-07 Thread Gabor Kovesdan
Author: gabor
Date: Tue Feb  7 17:42:10 2012
New Revision: 231135
URL: http://svn.freebsd.org/changeset/base/231135

Log:
  MFC r230141 (eadler):
  - Remove duplicate line from usage()

Modified:
  stable/9/usr.bin/grep/grep.c
Directory Properties:
  stable/9/usr.bin/grep/   (props changed)

Modified: stable/9/usr.bin/grep/grep.c
==
--- stable/9/usr.bin/grep/grep.cTue Feb  7 17:21:54 2012
(r231134)
+++ stable/9/usr.bin/grep/grep.cTue Feb  7 17:42:10 2012
(r231135)
@@ -158,7 +158,6 @@ usage(void)
 {
fprintf(stderr, getstr(4), getprogname());
fprintf(stderr, %s, getstr(5));
-   fprintf(stderr, %s, getstr(5));
fprintf(stderr, %s, getstr(6));
fprintf(stderr, %s, getstr(7));
exit(2);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231136 - in head/sys: dev/isci dev/isci/scil modules/isci

2012-02-07 Thread Jim Harris
Author: jimharris
Date: Tue Feb  7 17:43:58 2012
New Revision: 231136
URL: http://svn.freebsd.org/changeset/base/231136

Log:
  Fix r231134.  svn:keywords needs to be 'FreeBSD=%H', not 'FreeBSD:%H'.
  
  Approved by: scottl

Modified:
Directory Properties:
  head/sys/dev/isci/README   (props changed)
  head/sys/dev/isci/environment.h   (props changed)
  head/sys/dev/isci/isci.c   (props changed)
  head/sys/dev/isci/isci.h   (props changed)
  head/sys/dev/isci/isci_controller.c   (props changed)
  head/sys/dev/isci/isci_domain.c   (props changed)
  head/sys/dev/isci/isci_interrupt.c   (props changed)
  head/sys/dev/isci/isci_io_request.c   (props changed)
  head/sys/dev/isci/isci_logger.c   (props changed)
  head/sys/dev/isci/isci_oem_parameters.c   (props changed)
  head/sys/dev/isci/isci_remote_device.c   (props changed)
  head/sys/dev/isci/isci_sysctl.c   (props changed)
  head/sys/dev/isci/isci_task_request.c   (props changed)
  head/sys/dev/isci/isci_timer.c   (props changed)
  head/sys/dev/isci/sci_environment.h   (props changed)
  head/sys/dev/isci/scil/intel_ata.h   (props changed)
  head/sys/dev/isci/scil/intel_pci.h   (props changed)
  head/sys/dev/isci/scil/intel_sas.h   (props changed)
  head/sys/dev/isci/scil/intel_sat.h   (props changed)
  head/sys/dev/isci/scil/intel_sata.h   (props changed)
  head/sys/dev/isci/scil/intel_scsi.h   (props changed)
  head/sys/dev/isci/scil/sati.c   (props changed)
  head/sys/dev/isci/scil/sati.h   (props changed)
  head/sys/dev/isci/scil/sati_abort_task_set.c   (props changed)
  head/sys/dev/isci/scil/sati_abort_task_set.h   (props changed)
  head/sys/dev/isci/scil/sati_atapi.c   (props changed)
  head/sys/dev/isci/scil/sati_atapi.h   (props changed)
  head/sys/dev/isci/scil/sati_callbacks.h   (props changed)
  head/sys/dev/isci/scil/sati_design.h   (props changed)
  head/sys/dev/isci/scil/sati_device.c   (props changed)
  head/sys/dev/isci/scil/sati_device.h   (props changed)
  head/sys/dev/isci/scil/sati_inquiry.c   (props changed)
  head/sys/dev/isci/scil/sati_inquiry.h   (props changed)
  head/sys/dev/isci/scil/sati_log_sense.c   (props changed)
  head/sys/dev/isci/scil/sati_log_sense.h   (props changed)
  head/sys/dev/isci/scil/sati_lun_reset.c   (props changed)
  head/sys/dev/isci/scil/sati_lun_reset.h   (props changed)
  head/sys/dev/isci/scil/sati_mode_pages.c   (props changed)
  head/sys/dev/isci/scil/sati_mode_pages.h   (props changed)
  head/sys/dev/isci/scil/sati_mode_select.c   (props changed)
  head/sys/dev/isci/scil/sati_mode_select.h   (props changed)
  head/sys/dev/isci/scil/sati_mode_sense.c   (props changed)
  head/sys/dev/isci/scil/sati_mode_sense.h   (props changed)
  head/sys/dev/isci/scil/sati_mode_sense_10.c   (props changed)
  head/sys/dev/isci/scil/sati_mode_sense_10.h   (props changed)
  head/sys/dev/isci/scil/sati_mode_sense_6.c   (props changed)
  head/sys/dev/isci/scil/sati_mode_sense_6.h   (props changed)
  head/sys/dev/isci/scil/sati_move.c   (props changed)
  head/sys/dev/isci/scil/sati_move.h   (props changed)
  head/sys/dev/isci/scil/sati_passthrough.c   (props changed)
  head/sys/dev/isci/scil/sati_passthrough.h   (props changed)
  head/sys/dev/isci/scil/sati_read.c   (props changed)
  head/sys/dev/isci/scil/sati_read.h   (props changed)
  head/sys/dev/isci/scil/sati_read_buffer.c   (props changed)
  head/sys/dev/isci/scil/sati_read_buffer.h   (props changed)
  head/sys/dev/isci/scil/sati_read_capacity.c   (props changed)
  head/sys/dev/isci/scil/sati_read_capacity.h   (props changed)
  head/sys/dev/isci/scil/sati_reassign_blocks.c   (props changed)
  head/sys/dev/isci/scil/sati_reassign_blocks.h   (props changed)
  head/sys/dev/isci/scil/sati_report_luns.c   (props changed)
  head/sys/dev/isci/scil/sati_report_luns.h   (props changed)
  head/sys/dev/isci/scil/sati_request_sense.c   (props changed)
  head/sys/dev/isci/scil/sati_request_sense.h   (props changed)
  head/sys/dev/isci/scil/sati_start_stop_unit.c   (props changed)
  head/sys/dev/isci/scil/sati_start_stop_unit.h   (props changed)
  head/sys/dev/isci/scil/sati_synchronize_cache.c   (props changed)
  head/sys/dev/isci/scil/sati_synchronize_cache.h   (props changed)
  head/sys/dev/isci/scil/sati_test_unit_ready.c   (props changed)
  head/sys/dev/isci/scil/sati_test_unit_ready.h   (props changed)
  head/sys/dev/isci/scil/sati_translator_sequence.h   (props changed)
  head/sys/dev/isci/scil/sati_types.h   (props changed)
  head/sys/dev/isci/scil/sati_unmap.c   (props changed)
  head/sys/dev/isci/scil/sati_unmap.h   (props changed)
  head/sys/dev/isci/scil/sati_util.c   (props changed)
  head/sys/dev/isci/scil/sati_util.h   (props changed)
  head/sys/dev/isci/scil/sati_verify.c   (props changed)
  head/sys/dev/isci/scil/sati_verify.h   (props changed)
  head/sys/dev/isci/scil/sati_write.c   (props changed)
  head/sys/dev/isci/scil/sati_write.h   (props changed)
  head/sys/dev/isci/scil/sati_write_and_verify.c   (props changed)
  

svn commit: r231137 - head/sys/dev/isci/scil

2012-02-07 Thread Jim Harris
Author: jimharris
Date: Tue Feb  7 17:45:11 2012
New Revision: 231137
URL: http://svn.freebsd.org/changeset/base/231137

Log:
  Fix Coverity defects in isci(4) driver.
  
  Sponsored by: Intel
  Approved by: scottl

Modified:
  head/sys/dev/isci/scil/scic_sds_stp_request.c
  head/sys/dev/isci/scil/scif_sas_controller.c
  head/sys/dev/isci/scil/scif_sas_domain.c
  head/sys/dev/isci/scil/scif_sas_remote_device.c
  head/sys/dev/isci/scil/scif_sas_smp_io_request.c
  head/sys/dev/isci/scil/scif_sas_smp_remote_device.c

Modified: head/sys/dev/isci/scil/scic_sds_stp_request.c
==
--- head/sys/dev/isci/scil/scic_sds_stp_request.c   Tue Feb  7 17:43:58 
2012(r231136)
+++ head/sys/dev/isci/scil/scic_sds_stp_request.c   Tue Feb  7 17:45:11 
2012(r231137)
@@ -1124,9 +1124,6 @@ SCI_STATUS scic_sds_stp_request_pio_data
  if (status == SCI_SUCCESS)
  {
 this_sds_stp_request-type.pio.pio_transfer_bytes -= 
remaining_bytes_in_current_sgl;
-
-//update the current sgl, sgl_offset and save for future
-current_sgl = 
scic_sds_stp_request_pio_get_next_sgl(this_sds_stp_request);
 sgl_offset = 0;
  }
   }

Modified: head/sys/dev/isci/scil/scif_sas_controller.c
==
--- head/sys/dev/isci/scil/scif_sas_controller.cTue Feb  7 17:43:58 
2012(r231136)
+++ head/sys/dev/isci/scil/scif_sas_controller.cTue Feb  7 17:45:11 
2012(r231137)
@@ -87,6 +87,10 @@ SCI_STATUS scif_controller_construct(
SCIF_SAS_LIBRARY_T* fw_library= (SCIF_SAS_LIBRARY_T*) library;
SCIF_SAS_CONTROLLER_T * fw_controller = (SCIF_SAS_CONTROLLER_T*) controller;
 
+   // Validate the user supplied parameters.
+   if ((library == SCI_INVALID_HANDLE) || (controller == SCI_INVALID_HANDLE))
+  return SCI_FAILURE_INVALID_PARAMETER_VALUE;
+
SCIF_LOG_TRACE((
   sci_base_object_get_logger(library),
   SCIF_LOG_OBJECT_CONTROLLER | SCIF_LOG_OBJECT_INITIALIZATION,
@@ -94,10 +98,6 @@ SCI_STATUS scif_controller_construct(
   library, controller
));
 
-   // Validate the user supplied parameters.
-   if ((library == SCI_INVALID_HANDLE) || (controller == SCI_INVALID_HANDLE))
-  return SCI_FAILURE_INVALID_PARAMETER_VALUE;
-
// Construct the base controller.  As part of constructing the base
// controller we ask it to also manage the MDL iteration for the Core.
sci_base_controller_construct(
@@ -144,6 +144,10 @@ SCI_STATUS scif_controller_initialize(
 {
SCIF_SAS_CONTROLLER_T * fw_controller = (SCIF_SAS_CONTROLLER_T*) controller;
 
+   // Validate the user supplied parameters.
+   if (controller == SCI_INVALID_HANDLE)
+  return SCI_FAILURE_INVALID_PARAMETER_VALUE;
+
SCIF_LOG_TRACE((
   sci_base_object_get_logger(controller),
   SCIF_LOG_OBJECT_CONTROLLER | SCIF_LOG_OBJECT_INITIALIZATION,
@@ -151,10 +155,6 @@ SCI_STATUS scif_controller_initialize(
   controller
));
 
-   // Validate the user supplied parameters.
-   if (controller == SCI_INVALID_HANDLE)
-  return SCI_FAILURE_INVALID_PARAMETER_VALUE;
-
return fw_controller-state_handlers-initialize_handler(
  fw_controller-parent
   );
@@ -187,6 +187,10 @@ SCI_STATUS scif_controller_start(
 {
SCIF_SAS_CONTROLLER_T * fw_controller = (SCIF_SAS_CONTROLLER_T*) controller;
 
+   // Validate the user supplied parameters.
+   if (controller == SCI_INVALID_HANDLE)
+  return SCI_FAILURE_INVALID_PARAMETER_VALUE;
+
SCIF_LOG_TRACE((
   sci_base_object_get_logger(controller),
   SCIF_LOG_OBJECT_CONTROLLER | SCIF_LOG_OBJECT_INITIALIZATION,
@@ -194,10 +198,6 @@ SCI_STATUS scif_controller_start(
   controller, timeout
));
 
-   // Validate the user supplied parameters.
-   if (controller == SCI_INVALID_HANDLE)
-  return SCI_FAILURE_INVALID_PARAMETER_VALUE;
-
return fw_controller-state_handlers-
   start_handler(fw_controller-parent, timeout);
 }
@@ -211,6 +211,10 @@ SCI_STATUS scif_controller_stop(
 {
SCIF_SAS_CONTROLLER_T * fw_controller = (SCIF_SAS_CONTROLLER_T*) controller;
 
+   // Validate the user supplied parameters.
+   if (controller == SCI_INVALID_HANDLE)
+  return SCI_FAILURE_INVALID_PARAMETER_VALUE;
+
SCIF_LOG_TRACE((
   sci_base_object_get_logger(controller),
   SCIF_LOG_OBJECT_CONTROLLER | SCIF_LOG_OBJECT_SHUTDOWN,
@@ -218,10 +222,6 @@ SCI_STATUS scif_controller_stop(
   controller, timeout
));
 
-   // Validate the user supplied parameters.
-   if (controller == SCI_INVALID_HANDLE)
-  return SCI_FAILURE_INVALID_PARAMETER_VALUE;
-
return fw_controller-state_handlers-
   stop_handler(fw_controller-parent, timeout);
 
@@ -235,6 +235,10 @@ SCI_STATUS scif_controller_reset(
 {
SCIF_SAS_CONTROLLER_T * fw_controller = (SCIF_SAS_CONTROLLER_T*) controller;
 
+   // Validate 

svn commit: r231138 - stable/9/usr.sbin/jail

2012-02-07 Thread Martin Matuska
Author: mm
Date: Tue Feb  7 17:46:02 2012
New Revision: 231138
URL: http://svn.freebsd.org/changeset/base/231138

Log:
  MFC r230495:
  Try resolving jail path with realpath(3).
  
  jail(8) does a chdir(2) to the given path argument. Kernel evaluates the
  jail path from the new cwd and not from the original cwd, which leads to
  undesired behavior if given a relative path.
  
  Reviewed by:  jamie

Modified:
  stable/9/usr.sbin/jail/jail.c
Directory Properties:
  stable/9/usr.sbin/jail/   (props changed)

Modified: stable/9/usr.sbin/jail/jail.c
==
--- stable/9/usr.sbin/jail/jail.c   Tue Feb  7 17:45:11 2012
(r231137)
+++ stable/9/usr.sbin/jail/jail.c   Tue Feb  7 17:46:02 2012
(r231138)
@@ -508,6 +508,7 @@ static void
 set_param(const char *name, char *value)
 {
struct jailparam *param;
+   char path[PATH_MAX];
int i;
 
static int paramlistsize;
@@ -520,8 +521,13 @@ set_param(const char *name, char *value)
}
 
/* jail_set won't chdir along with its chroot, so do it here. */
-   if (!strcmp(name, path)  chdir(value)  0)
-   err(1, chdir: %s, value);
+   if (!strcmp(name, path)) {
+   /* resolve the path with realpath(3) */
+   if (realpath(value, path) != NULL)
+   value = path;
+   if (chdir(value)  0)
+   err(1, chdir: %s, value);
+   }
 
/* Check for repeat parameters */
for (i = 0; i  nparams; i++)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231139 - stable/8/usr.sbin/jail

2012-02-07 Thread Martin Matuska
Author: mm
Date: Tue Feb  7 17:47:04 2012
New Revision: 231139
URL: http://svn.freebsd.org/changeset/base/231139

Log:
  MFC r230495:
  Try resolving jail path with realpath(3).
  
  jail(8) does a chdir(2) to the given path argument. Kernel evaluates the
  jail path from the new cwd and not from the original cwd, which leads to
  undesired behavior if given a relative path.
  
  Reviewed by:  jamie

Modified:
  stable/8/usr.sbin/jail/jail.c
Directory Properties:
  stable/8/usr.sbin/jail/   (props changed)

Modified: stable/8/usr.sbin/jail/jail.c
==
--- stable/8/usr.sbin/jail/jail.c   Tue Feb  7 17:46:02 2012
(r231138)
+++ stable/8/usr.sbin/jail/jail.c   Tue Feb  7 17:47:04 2012
(r231139)
@@ -500,6 +500,7 @@ static void
 set_param(const char *name, char *value)
 {
struct jailparam *param;
+   char path[PATH_MAX];
int i;
 
static int paramlistsize;
@@ -512,8 +513,13 @@ set_param(const char *name, char *value)
}
 
/* jail_set won't chdir along with its chroot, so do it here. */
-   if (!strcmp(name, path)  chdir(value)  0)
-   err(1, chdir: %s, value);
+   if (!strcmp(name, path)) {
+   /* resolve the path with realpath(3) */
+   if (realpath(value, path) != NULL)
+   value = path;
+   if (chdir(value)  0)
+   err(1, chdir: %s, value);
+   }
 
/* Check for repeat parameters */
for (i = 0; i  nparams; i++)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231140 - stable/9/lib/libc/net

2012-02-07 Thread Michael Tuexen
Author: tuexen
Date: Tue Feb  7 17:52:32 2012
New Revision: 231140
URL: http://svn.freebsd.org/changeset/base/231140

Log:
  MFC r227755:
  Add support for the SCTP_REMOTE_UDP_ENCAPS_PORT socket option.
  Retire the the now unused sctp_udp_tunneling_for_client_enable
  sysctl variable.

Modified:
  stable/9/lib/libc/net/sctp_sys_calls.c
Directory Properties:
  stable/9/lib/   (props changed)
  stable/9/lib/libc/   (props changed)

Modified: stable/9/lib/libc/net/sctp_sys_calls.c
==
--- stable/9/lib/libc/net/sctp_sys_calls.c  Tue Feb  7 17:47:04 2012
(r231139)
+++ stable/9/lib/libc/net/sctp_sys_calls.c  Tue Feb  7 17:52:32 2012
(r231140)
@@ -412,6 +412,9 @@ sctp_opt_info(int sd, sctp_assoc_t id, i
case SCTP_PEER_ADDR_THLDS:
((struct sctp_paddrthlds *)arg)-spt_assoc_id = id;
break;
+   case SCTP_REMOTE_UDP_ENCAPS_PORT:
+   ((struct sctp_udpencaps *)arg)-sue_assoc_id = id;
+   break;
case SCTP_MAX_BURST:
((struct sctp_assoc_value *)arg)-assoc_id = id;
break;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231141 - in stable/9: cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys

2012-02-07 Thread Martin Matuska
Author: mm
Date: Tue Feb  7 17:57:33 2012
New Revision: 231141
URL: http://svn.freebsd.org/changeset/base/231141

Log:
  MFC r230514:
  Merge illumos revisions 13572, 13573, 13574:
  
  Rev. 13572:
  disk sync write perf regression when slog is used post oi_148 [1]
  
  Rev. 13573:
  crash during reguid causes stale config [2]
  allow and unallow missing from zpool history since removal of pyzfs [5]
  
  Rev. 13574:
  leaking a vdev when removing an l2cache device [3]
  memory leak when adding a file-based l2arc device [4]
  leak in ZFS from metaslab_group_create and zfs_ereport_checksum [6]
  
  References:
  https://www.illumos.org/issues/1909 [1]
  https://www.illumos.org/issues/1949 [2]
  https://www.illumos.org/issues/1951 [3]
  https://www.illumos.org/issues/1952 [4]
  https://www.illumos.org/issues/1953 [5]
  https://www.illumos.org/issues/1954 [6]
  
  Obtained from:illumos (issues #1909, #1949, #1951, #1952, #1953, 
#1954)

Modified:
  stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fm.c
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
Directory Properties:
  stable/9/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
==
--- stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
Tue Feb  7 17:52:32 2012(r231140)
+++ stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
Tue Feb  7 17:57:33 2012(r231141)
@@ -4197,7 +4197,7 @@ tryagain:
 
(void) strlcpy(zc.zc_name, zhp-zfs_name, ZFS_MAXNAMELEN);
 
-   if (zfs_ioctl(hdl, ZFS_IOC_GET_FSACL, zc) != 0) {
+   if (ioctl(hdl-libzfs_fd, ZFS_IOC_GET_FSACL, zc) != 0) {
(void) snprintf(errbuf, sizeof (errbuf),
dgettext(TEXT_DOMAIN, cannot get permissions on '%s'),
zc.zc_name);

Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c
==
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c  Tue Feb 
 7 17:52:32 2012(r231140)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c  Tue Feb 
 7 17:57:33 2012(r231141)
@@ -20,7 +20,7 @@
  */
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2011 by Delphix. All rights reserved.
+ * Copyright (c) 2012 by Delphix. All rights reserved.
  */
 
 #include sys/zfs_context.h
@@ -36,7 +36,7 @@
  * avoid having to load lots of space_maps in a given txg. There are,
  * however, some cases where we want to avoid fast ganging and instead
  * we want to do an exhaustive search of all metaslabs on this device.
- * Currently we don't allow any gang or dump device related allocations
+ * Currently we don't allow any gang, zil, or dump device related allocations
  * to fast gang.
  */
 #defineCAN_FASTGANG(flags) \

Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
==
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c   Tue Feb 
 7 17:52:32 2012(r231140)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c   Tue Feb 
 7 17:57:33 2012(r231141)
@@ -1073,8 +1073,10 @@ spa_unload(spa_t *spa)
}
spa-spa_spares.sav_count = 0;
 
-   for (i = 0; i  spa-spa_l2cache.sav_count; i++)
+   for (i = 0; i  spa-spa_l2cache.sav_count; i++) {
+   vdev_clear_stats(spa-spa_l2cache.sav_vdevs[i]);
vdev_free(spa-spa_l2cache.sav_vdevs[i]);
+   }
if (spa-spa_l2cache.sav_vdevs) {
kmem_free(spa-spa_l2cache.sav_vdevs,
spa-spa_l2cache.sav_count * sizeof (void *));
@@ -1302,11 +1304,13 @@ spa_load_l2cache(spa_t *spa)
 
vd = oldvdevs[i];
if (vd != NULL) {
+   ASSERT(vd-vdev_isl2cache);
+
if (spa_l2cache_exists(vd-vdev_guid, pool) 
pool != 0ULL  l2arc_vdev_present(vd))
l2arc_remove_vdev(vd);
-   (void) vdev_close(vd);
-   spa_l2cache_remove(vd);
+   vdev_clear_stats(vd);
+   vdev_free(vd);
}
}
 
@@ -1949,7 

svn commit: r231142 - in stable/8: cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys

2012-02-07 Thread Martin Matuska
Author: mm
Date: Tue Feb  7 17:57:59 2012
New Revision: 231142
URL: http://svn.freebsd.org/changeset/base/231142

Log:
  MFC r230514:
  Merge illumos revisions 13572, 13573, 13574:
  
  Rev. 13572:
  disk sync write perf regression when slog is used post oi_148 [1]
  
  Rev. 13573:
  crash during reguid causes stale config [2]
  allow and unallow missing from zpool history since removal of pyzfs [5]
  
  Rev. 13574:
  leaking a vdev when removing an l2cache device [3]
  memory leak when adding a file-based l2arc device [4]
  leak in ZFS from metaslab_group_create and zfs_ereport_checksum [6]
  
  References:
  https://www.illumos.org/issues/1909 [1]
  https://www.illumos.org/issues/1949 [2]
  https://www.illumos.org/issues/1951 [3]
  https://www.illumos.org/issues/1952 [4]
  https://www.illumos.org/issues/1953 [5]
  https://www.illumos.org/issues/1954 [6]
  
  Obtained from:illumos (issues #1909, #1949, #1951, #1952, #1953, 
#1954)

Modified:
  stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fm.c
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
Directory Properties:
  stable/8/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
==
--- stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
Tue Feb  7 17:57:33 2012(r231141)
+++ stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
Tue Feb  7 17:57:59 2012(r231142)
@@ -4197,7 +4197,7 @@ tryagain:
 
(void) strlcpy(zc.zc_name, zhp-zfs_name, ZFS_MAXNAMELEN);
 
-   if (zfs_ioctl(hdl, ZFS_IOC_GET_FSACL, zc) != 0) {
+   if (ioctl(hdl-libzfs_fd, ZFS_IOC_GET_FSACL, zc) != 0) {
(void) snprintf(errbuf, sizeof (errbuf),
dgettext(TEXT_DOMAIN, cannot get permissions on '%s'),
zc.zc_name);

Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c
==
--- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c  Tue Feb 
 7 17:57:33 2012(r231141)
+++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c  Tue Feb 
 7 17:57:59 2012(r231142)
@@ -20,7 +20,7 @@
  */
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2011 by Delphix. All rights reserved.
+ * Copyright (c) 2012 by Delphix. All rights reserved.
  */
 
 #include sys/zfs_context.h
@@ -36,7 +36,7 @@
  * avoid having to load lots of space_maps in a given txg. There are,
  * however, some cases where we want to avoid fast ganging and instead
  * we want to do an exhaustive search of all metaslabs on this device.
- * Currently we don't allow any gang or dump device related allocations
+ * Currently we don't allow any gang, zil, or dump device related allocations
  * to fast gang.
  */
 #defineCAN_FASTGANG(flags) \

Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
==
--- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c   Tue Feb 
 7 17:57:33 2012(r231141)
+++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c   Tue Feb 
 7 17:57:59 2012(r231142)
@@ -1073,8 +1073,10 @@ spa_unload(spa_t *spa)
}
spa-spa_spares.sav_count = 0;
 
-   for (i = 0; i  spa-spa_l2cache.sav_count; i++)
+   for (i = 0; i  spa-spa_l2cache.sav_count; i++) {
+   vdev_clear_stats(spa-spa_l2cache.sav_vdevs[i]);
vdev_free(spa-spa_l2cache.sav_vdevs[i]);
+   }
if (spa-spa_l2cache.sav_vdevs) {
kmem_free(spa-spa_l2cache.sav_vdevs,
spa-spa_l2cache.sav_count * sizeof (void *));
@@ -1302,11 +1304,13 @@ spa_load_l2cache(spa_t *spa)
 
vd = oldvdevs[i];
if (vd != NULL) {
+   ASSERT(vd-vdev_isl2cache);
+
if (spa_l2cache_exists(vd-vdev_guid, pool) 
pool != 0ULL  l2arc_vdev_present(vd))
l2arc_remove_vdev(vd);
-   (void) vdev_close(vd);
-   spa_l2cache_remove(vd);
+   vdev_clear_stats(vd);
+   vdev_free(vd);
}
}
 
@@ -1949,7 

svn commit: r231143 - stable/9/sys/dev/iwn

2012-02-07 Thread Bernhard Schmidt
Author: bschmidt
Date: Tue Feb  7 18:05:10 2012
New Revision: 231143
URL: http://svn.freebsd.org/changeset/base/231143

Log:
  MFC r230620:
  On state changes from RUN to anything else the AGGR sessions are
  cleared/dropped leading to qid2tap[n] being NULL as there no longer
  is a tap. Now, if there have been lots of frames queued the firmware
  processes and returns those after the tap is gone.

Modified:
  stable/9/sys/dev/iwn/if_iwn.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/dev/iwn/if_iwn.c
==
--- stable/9/sys/dev/iwn/if_iwn.c   Tue Feb  7 17:57:59 2012
(r231142)
+++ stable/9/sys/dev/iwn/if_iwn.c   Tue Feb  7 18:05:10 2012
(r231143)
@@ -2813,11 +2813,13 @@ iwn_ampdu_tx_done(struct iwn_softc *sc, 
bitmap |= 1ULL  bit;
}
tap = sc-qid2tap[qid];
-   tid = WME_AC_TO_TID(tap-txa_ac);
-   wn = (void *)tap-txa_ni;
-   wn-agg[tid].bitmap = bitmap;
-   wn-agg[tid].startidx = start;
-   wn-agg[tid].nframes = nframes;
+   if (tap != NULL) {
+   tid = WME_AC_TO_TID(tap-txa_ac);
+   wn = (void *)tap-txa_ni;
+   wn-agg[tid].bitmap = bitmap;
+   wn-agg[tid].startidx = start;
+   wn-agg[tid].nframes = nframes;
+   }
 
seqno = le32toh(*(status + nframes))  0xfff;
for (lastidx = (seqno  0xff); ring-read != lastidx;) {
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231144 - head/cddl/contrib/opensolaris/cmd/zfs

2012-02-07 Thread Martin Matuska
Author: mm
Date: Tue Feb  7 18:35:18 2012
New Revision: 231144
URL: http://svn.freebsd.org/changeset/base/231144

Log:
  Merge illumos revision 13594:
  
  uninitialized variables in zfs(8) may make snapshots undestroyable [1]
  
  References:
  https://www.illumos.org/issues/2067 [1]
  
  Obtained from:illumos (issue #2067)
  MFC after:3 days

Modified:
  head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c

Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
==
--- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.cTue Feb  7 18:05:10 
2012(r231143)
+++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.cTue Feb  7 18:35:18 
2012(r231144)
@@ -590,7 +590,7 @@ zfs_do_clone(int argc, char **argv)
zfs_handle_t *zhp = NULL;
boolean_t parents = B_FALSE;
nvlist_t *props;
-   int ret;
+   int ret = 0;
int c;
 
if (nvlist_alloc(props, NV_UNIQUE_NAME, 0) != 0)
@@ -1052,7 +1052,7 @@ destroy_print_cb(zfs_handle_t *zhp, void
 static int
 destroy_print_snapshots(zfs_handle_t *fs_zhp, destroy_cbdata_t *cb)
 {
-   int err;
+   int err = 0;
assert(cb-cb_firstsnap == NULL);
assert(cb-cb_prevsnap == NULL);
err = zfs_iter_snapshots_sorted(fs_zhp, destroy_print_cb, cb);
@@ -1130,7 +1130,7 @@ destroy_clones(destroy_cbdata_t *cb)
ZFS_TYPE_SNAPSHOT);
if (zhp != NULL) {
boolean_t defer = cb-cb_defer_destroy;
-   int err;
+   int err = 0;
 
/*
 * We can't defer destroy non-snapshots, so set it to
@@ -1207,7 +1207,7 @@ zfs_do_destroy(int argc, char **argv)
 
at = strchr(argv[0], '@');
if (at != NULL) {
-   int err;
+   int err = 0;
 
/* Build the list of snaps to destroy in cb_nvl. */
if (nvlist_alloc(cb.cb_nvl, NV_UNIQUE_NAME, 0) != 0)
@@ -1474,7 +1474,7 @@ zfs_do_get(int argc, char **argv)
zprop_get_cbdata_t cb = { 0 };
int i, c, flags = ZFS_ITER_ARGS_CAN_BE_PATHS;
char *value, *fields;
-   int ret;
+   int ret = 0;
int limit = 0;
zprop_list_t fake_name = { 0 };
 
@@ -1711,7 +1711,7 @@ zfs_do_inherit(int argc, char **argv)
zfs_prop_t prop;
inherit_cbdata_t cb = { 0 };
char *propname;
-   int ret;
+   int ret = 0;
int flags = 0;
boolean_t received = B_FALSE;
 
@@ -1917,7 +1917,7 @@ zfs_do_upgrade(int argc, char **argv)
 {
boolean_t all = B_FALSE;
boolean_t showversions = B_FALSE;
-   int ret;
+   int ret = 0;
upgrade_cbdata_t cb = { 0 };
char c;
int flags = ZFS_ITER_ARGS_CAN_BE_PATHS;
@@ -2206,7 +2206,7 @@ userspace_cb(void *arg, const char *doma
uid_t id;
uint64_t classes;
 #ifdef sun
-   int err;
+   int err = 0;
directory_error_t e;
 #endif
 
@@ -2562,7 +2562,7 @@ zfs_do_userspace(int argc, char **argv)
boolean_t prtnum = B_FALSE;
boolean_t parseable = B_FALSE;
boolean_t sid2posix = B_FALSE;
-   int error;
+   int error = 0;
int c;
zfs_sort_column_t *default_sortcol = NULL;
zfs_sort_column_t *sortcol = NULL;
@@ -2925,7 +2925,7 @@ zfs_do_list(int argc, char **argv)
list_cbdata_t cb = { 0 };
char *value;
int limit = 0;
-   int ret;
+   int ret = 0;
zfs_sort_column_t *sortcol = NULL;
int flags = ZFS_ITER_PROP_LISTSNAPS | ZFS_ITER_ARGS_CAN_BE_PATHS;
 
@@ -3062,7 +3062,9 @@ zfs_do_rename(int argc, char **argv)
 {
zfs_handle_t *zhp;
renameflags_t flags = { 0 };
-   int c, ret, types;
+   int c;
+   int ret = 0;
+   int types;
boolean_t parents = B_FALSE;
 
/* check options */
@@ -3155,7 +3157,7 @@ static int
 zfs_do_promote(int argc, char **argv)
 {
zfs_handle_t *zhp;
-   int ret;
+   int ret = 0;
 
/* check options */
if (argc  1  argv[1][0] == '-') {
@@ -3276,7 +3278,7 @@ rollback_check(zfs_handle_t *zhp, void *
 static int
 zfs_do_rollback(int argc, char **argv)
 {
-   int ret;
+   int ret = 0;
int c;
boolean_t force = B_FALSE;
rollback_cbdata_t cb = { 0 };
@@ -3394,7 +3396,7 @@ static int
 zfs_do_set(int argc, char **argv)
 {
set_cbdata_t cb;
-   int ret;
+   int ret = 0;
 
/* check for options */
if (argc  1  argv[1][0] == '-') {
@@ -3448,7 +3450,7 @@ static int
 zfs_do_snapshot(int argc, char **argv)
 {
boolean_t recursive = B_FALSE;
-   int ret;
+   int ret = 0;
char c;
nvlist_t *props;
 
@@ -5286,7 +5288,7 @@ zfs_do_holds(int argc, char **argv)
holds_cbdata_t cb = { 0 };
 
int limit = 0;
-   int ret;
+   int ret = 

Re: svn commit: r231138 - stable/9/usr.sbin/jail

2012-02-07 Thread Andrey Chernov
On Tue, Feb 07, 2012 at 05:46:02PM +, Martin Matuska wrote:
 Author: mm
 Date: Tue Feb  7 17:46:02 2012
 New Revision: 231138
 URL: http://svn.freebsd.org/changeset/base/231138
 
 Log:
   MFC r230495:
   Try resolving jail path with realpath(3).

Please note that our realpath(3) is far from perfect, see my followup to 
http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/128933

-- 
http://ache.vniz.net/
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r231026 - head/sys/powerpc/ofw

2012-02-07 Thread John Baldwin
On Monday, February 06, 2012 12:07:17 pm Nathan Whitehorn wrote:
 On 02/06/12 10:06, John Baldwin wrote:
  On Monday, February 06, 2012 10:40:54 am Nathan Whitehorn wrote:
  On 02/06/12 06:53, John Baldwin wrote:
  On Sunday, February 05, 2012 11:54:26 am Nathan Whitehorn wrote:
  Author: nwhitehorn
  Date: Sun Feb  5 16:54:26 2012
  New Revision: 231026
  URL: http://svn.freebsd.org/changeset/base/231026
 
  Log:
  Make sure to remap adjusted resources.
  Hmm, I had considered remapping adjusted resources an invalid operation 
  (i.e.
  should fail with EINVAL).  I believe that the NEW_PCIB code should only 
  apply
  this API to resources backing the resource windows in PCI-PCI bridges and 
  that
  those resources should never have RF_ACTIVE set.  Are you seeing calls of 
  it
  for active resources?
 
  No, I was just trying to be safe here, since it wasn't clear that that
  was invalid. I'm happy to replace the contents of the if with return
  EINVAL or something.
  Yeah, I would do that, perhaps with a KASSERT() as well so it panics in 
  HEAD.
 
 
 How does this look? I've kept both the EINVAL and the KASSERT.
 -Nathan

Looks good to me, thanks!

-- 
John Baldwin
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231145 - in stable/9/sys: amd64/linux32 compat/linux i386/linux

2012-02-07 Thread John Baldwin
Author: jhb
Date: Tue Feb  7 19:11:54 2012
New Revision: 231145
URL: http://svn.freebsd.org/changeset/base/231145

Log:
  MFC 228957:
  Implement linux_fadvise64() and linux_fadvise64_64() using
  kern_posix_fadvise().

Modified:
  stable/9/sys/amd64/linux32/linux.h
  stable/9/sys/amd64/linux32/linux32_dummy.c
  stable/9/sys/amd64/linux32/syscalls.master
  stable/9/sys/compat/linux/linux_file.c
  stable/9/sys/i386/linux/linux.h
  stable/9/sys/i386/linux/linux_dummy.c
  stable/9/sys/i386/linux/syscalls.master
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)
  stable/9/sys/modules/sound/driver/emu10k1/   (props changed)
  stable/9/sys/modules/sound/driver/emu10kx/   (props changed)
  stable/9/sys/modules/sound/driver/maestro3/   (props changed)

Modified: stable/9/sys/amd64/linux32/linux.h
==
--- stable/9/sys/amd64/linux32/linux.h  Tue Feb  7 18:35:18 2012
(r231144)
+++ stable/9/sys/amd64/linux32/linux.h  Tue Feb  7 19:11:54 2012
(r231145)
@@ -597,6 +597,16 @@ intlinux_ioctl_unregister_handler(struc
 #defineLINUX_F_UNLCK   2
 
 /*
+ * posix_fadvise advice
+ */
+#defineLINUX_POSIX_FADV_NORMAL 0
+#defineLINUX_POSIX_FADV_RANDOM 1
+#defineLINUX_POSIX_FADV_SEQUENTIAL 2
+#defineLINUX_POSIX_FADV_WILLNEED   3
+#defineLINUX_POSIX_FADV_DONTNEED   4
+#defineLINUX_POSIX_FADV_NOREUSE5
+
+/*
  * mount flags
  */
 #defineLINUX_MS_RDONLY 0x0001

Modified: stable/9/sys/amd64/linux32/linux32_dummy.c
==
--- stable/9/sys/amd64/linux32/linux32_dummy.c  Tue Feb  7 18:35:18 2012
(r231144)
+++ stable/9/sys/amd64/linux32/linux32_dummy.c  Tue Feb  7 19:11:54 2012
(r231145)
@@ -59,7 +59,6 @@ DUMMY(setfsuid);
 DUMMY(setfsgid);
 DUMMY(pivot_root);
 DUMMY(mincore);
-DUMMY(fadvise64);
 DUMMY(ptrace);
 DUMMY(lookup_dcookie);
 DUMMY(epoll_create);
@@ -72,7 +71,6 @@ DUMMY(timer_gettime);
 DUMMY(timer_getoverrun);
 DUMMY(timer_delete);
 DUMMY(fstatfs64);
-DUMMY(fadvise64_64);
 DUMMY(mbind);
 DUMMY(get_mempolicy);
 DUMMY(set_mempolicy);

Modified: stable/9/sys/amd64/linux32/syscalls.master
==
--- stable/9/sys/amd64/linux32/syscalls.master  Tue Feb  7 18:35:18 2012
(r231144)
+++ stable/9/sys/amd64/linux32/syscalls.master  Tue Feb  7 19:11:54 2012
(r231145)
@@ -419,7 +419,8 @@
 247AUE_NULLUNIMPL  linux_io_getevents
 248AUE_NULLUNIMPL  linux_io_submit
 249AUE_NULLUNIMPL  linux_io_cancel
-250AUE_NULLSTD { int linux_fadvise64(void); }
+250AUE_NULLSTD { int linux_fadvise64(int fd, l_loff_t offset, \
+   l_size_t len, int advice); }
 251AUE_NULLUNIMPL
 252AUE_EXITSTD { int linux_exit_group(int error_code); }
 253AUE_NULLSTD { int linux_lookup_dcookie(void); }
@@ -443,7 +444,9 @@
 270AUE_NULLSTD { int linux_tgkill(int tgid, int pid, int sig); 
}
 271AUE_UTIMES  STD { int linux_utimes(char *fname, \
struct l_timeval *tptr); }
-272AUE_NULLSTD { int linux_fadvise64_64(void); }
+272AUE_NULLSTD { int linux_fadvise64_64(int fd, \
+   l_loff_t offset, l_loff_t len, \
+   int advice); }
 273AUE_NULLUNIMPL
 274AUE_NULLSTD { int linux_mbind(void); }
 275AUE_NULLSTD { int linux_get_mempolicy(void); }

Modified: stable/9/sys/compat/linux/linux_file.c
==
--- stable/9/sys/compat/linux/linux_file.c  Tue Feb  7 18:35:18 2012
(r231144)
+++ stable/9/sys/compat/linux/linux_file.c  Tue Feb  7 19:11:54 2012
(r231145)
@@ -1530,3 +1530,48 @@ linux_lchown(struct thread *td, struct l
LFREEPATH(path);
return (error);
 }
+
+static int
+convert_fadvice(int advice)
+{
+   switch (advice) {
+   case LINUX_POSIX_FADV_NORMAL:
+   return (POSIX_FADV_NORMAL);
+ 

svn commit: r231146 - in stable/8/sys: amd64/linux32 compat/linux i386/linux

2012-02-07 Thread John Baldwin
Author: jhb
Date: Tue Feb  7 19:12:21 2012
New Revision: 231146
URL: http://svn.freebsd.org/changeset/base/231146

Log:
  MFC 228957:
  Implement linux_fadvise64() and linux_fadvise64_64() using
  kern_posix_fadvise().

Modified:
  stable/8/sys/amd64/linux32/linux.h
  stable/8/sys/amd64/linux32/linux32_dummy.c
  stable/8/sys/amd64/linux32/syscalls.master
  stable/8/sys/compat/linux/linux_file.c
  stable/8/sys/i386/linux/linux.h
  stable/8/sys/i386/linux/linux_dummy.c
  stable/8/sys/i386/linux/syscalls.master
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)
  stable/8/sys/modules/sound/driver/emu10k1/   (props changed)
  stable/8/sys/modules/sound/driver/emu10kx/   (props changed)

Modified: stable/8/sys/amd64/linux32/linux.h
==
--- stable/8/sys/amd64/linux32/linux.h  Tue Feb  7 19:11:54 2012
(r231145)
+++ stable/8/sys/amd64/linux32/linux.h  Tue Feb  7 19:12:21 2012
(r231146)
@@ -594,6 +594,16 @@ intlinux_ioctl_unregister_handler(struc
 #defineLINUX_F_UNLCK   2
 
 /*
+ * posix_fadvise advice
+ */
+#defineLINUX_POSIX_FADV_NORMAL 0
+#defineLINUX_POSIX_FADV_RANDOM 1
+#defineLINUX_POSIX_FADV_SEQUENTIAL 2
+#defineLINUX_POSIX_FADV_WILLNEED   3
+#defineLINUX_POSIX_FADV_DONTNEED   4
+#defineLINUX_POSIX_FADV_NOREUSE5
+
+/*
  * mount flags
  */
 #defineLINUX_MS_RDONLY 0x0001

Modified: stable/8/sys/amd64/linux32/linux32_dummy.c
==
--- stable/8/sys/amd64/linux32/linux32_dummy.c  Tue Feb  7 19:11:54 2012
(r231145)
+++ stable/8/sys/amd64/linux32/linux32_dummy.c  Tue Feb  7 19:12:21 2012
(r231146)
@@ -59,7 +59,6 @@ DUMMY(setfsuid);
 DUMMY(setfsgid);
 DUMMY(pivot_root);
 DUMMY(mincore);
-DUMMY(fadvise64);
 DUMMY(ptrace);
 DUMMY(lookup_dcookie);
 DUMMY(epoll_create);
@@ -72,7 +71,6 @@ DUMMY(timer_gettime);
 DUMMY(timer_getoverrun);
 DUMMY(timer_delete);
 DUMMY(fstatfs64);
-DUMMY(fadvise64_64);
 DUMMY(mbind);
 DUMMY(get_mempolicy);
 DUMMY(set_mempolicy);

Modified: stable/8/sys/amd64/linux32/syscalls.master
==
--- stable/8/sys/amd64/linux32/syscalls.master  Tue Feb  7 19:11:54 2012
(r231145)
+++ stable/8/sys/amd64/linux32/syscalls.master  Tue Feb  7 19:12:21 2012
(r231146)
@@ -419,7 +419,8 @@
 247AUE_NULLUNIMPL  linux_io_getevents
 248AUE_NULLUNIMPL  linux_io_submit
 249AUE_NULLUNIMPL  linux_io_cancel
-250AUE_NULLSTD { int linux_fadvise64(void); }
+250AUE_NULLSTD { int linux_fadvise64(int fd, l_loff_t offset, \
+   l_size_t len, int advice); }
 251AUE_NULLUNIMPL
 252AUE_EXITSTD { int linux_exit_group(int error_code); }
 253AUE_NULLSTD { int linux_lookup_dcookie(void); }
@@ -443,7 +444,9 @@
 270AUE_NULLSTD { int linux_tgkill(int tgid, int pid, int sig); 
}
 271AUE_UTIMES  STD { int linux_utimes(char *fname, \
struct l_timeval *tptr); }
-272AUE_NULLSTD { int linux_fadvise64_64(void); }
+272AUE_NULLSTD { int linux_fadvise64_64(int fd, \
+   l_loff_t offset, l_loff_t len, \
+   int advice); }
 273AUE_NULLUNIMPL
 274AUE_NULLSTD { int linux_mbind(void); }
 275AUE_NULLSTD { int linux_get_mempolicy(void); }

Modified: stable/8/sys/compat/linux/linux_file.c
==
--- stable/8/sys/compat/linux/linux_file.c  Tue Feb  7 19:11:54 2012
(r231145)
+++ stable/8/sys/compat/linux/linux_file.c  Tue Feb  7 19:12:21 2012
(r231146)
@@ -1533,3 +1533,48 @@ linux_lchown(struct thread *td, struct l
LFREEPATH(path);
return (error);
 }
+
+static int
+convert_fadvice(int advice)
+{
+   switch (advice) {
+   case LINUX_POSIX_FADV_NORMAL:
+   return (POSIX_FADV_NORMAL);
+   case LINUX_POSIX_FADV_RANDOM:
+   return (POSIX_FADV_RANDOM);
+   case LINUX_POSIX_FADV_SEQUENTIAL:
+   return (POSIX_FADV_SEQUENTIAL);
+   case LINUX_POSIX_FADV_WILLNEED:
+   return (POSIX_FADV_WILLNEED);
+   case LINUX_POSIX_FADV_DONTNEED:
+   return (POSIX_FADV_DONTNEED);
+   case LINUX_POSIX_FADV_NOREUSE:
+   return (POSIX_FADV_NOREUSE);
+   default:
+ 

svn commit: r231147 - in stable/9/sys: amd64/linux32 i386/linux

2012-02-07 Thread John Baldwin
Author: jhb
Date: Tue Feb  7 19:13:34 2012
New Revision: 231147
URL: http://svn.freebsd.org/changeset/base/231147

Log:
  Regen.

Modified:
  stable/9/sys/amd64/linux32/linux32_proto.h
  stable/9/sys/amd64/linux32/linux32_syscall.h
  stable/9/sys/amd64/linux32/linux32_syscalls.c
  stable/9/sys/amd64/linux32/linux32_sysent.c
  stable/9/sys/amd64/linux32/linux32_systrace_args.c
  stable/9/sys/i386/linux/linux_proto.h
  stable/9/sys/i386/linux/linux_syscall.h
  stable/9/sys/i386/linux/linux_syscalls.c
  stable/9/sys/i386/linux/linux_sysent.c
  stable/9/sys/i386/linux/linux_systrace_args.c

Modified: stable/9/sys/amd64/linux32/linux32_proto.h
==
--- stable/9/sys/amd64/linux32/linux32_proto.h  Tue Feb  7 19:12:21 2012
(r231146)
+++ stable/9/sys/amd64/linux32/linux32_proto.h  Tue Feb  7 19:13:34 2012
(r231147)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 220028 
2011-03-26 10:51:56Z avg 
+ * created from FreeBSD: stable/9/sys/amd64/linux32/syscalls.master 231145 
2012-02-07 19:11:54Z jhb 
  */
 
 #ifndef _LINUX_SYSPROTO_H_
@@ -755,7 +755,10 @@ struct linux_set_thread_area_args {
char desc_l_[PADL_(struct l_user_desc *)]; struct l_user_desc * desc; 
char desc_r_[PADR_(struct l_user_desc *)];
 };
 struct linux_fadvise64_args {
-   register_t dummy;
+   char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+   char offset_l_[PADL_(l_loff_t)]; l_loff_t offset; char 
offset_r_[PADR_(l_loff_t)];
+   char len_l_[PADL_(l_size_t)]; l_size_t len; char 
len_r_[PADR_(l_size_t)];
+   char advice_l_[PADL_(int)]; int advice; char advice_r_[PADR_(int)];
 };
 struct linux_exit_group_args {
char error_code_l_[PADL_(int)]; int error_code; char 
error_code_r_[PADR_(int)];
@@ -829,7 +832,10 @@ struct linux_utimes_args {
char tptr_l_[PADL_(struct l_timeval *)]; struct l_timeval * tptr; char 
tptr_r_[PADR_(struct l_timeval *)];
 };
 struct linux_fadvise64_64_args {
-   register_t dummy;
+   char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+   char offset_l_[PADL_(l_loff_t)]; l_loff_t offset; char 
offset_r_[PADR_(l_loff_t)];
+   char len_l_[PADL_(l_loff_t)]; l_loff_t len; char 
len_r_[PADR_(l_loff_t)];
+   char advice_l_[PADL_(int)]; int advice; char advice_r_[PADR_(int)];
 };
 struct linux_mbind_args {
register_t dummy;

Modified: stable/9/sys/amd64/linux32/linux32_syscall.h
==
--- stable/9/sys/amd64/linux32/linux32_syscall.hTue Feb  7 19:12:21 
2012(r231146)
+++ stable/9/sys/amd64/linux32/linux32_syscall.hTue Feb  7 19:13:34 
2012(r231147)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 220028 
2011-03-26 10:51:56Z avg 
+ * created from FreeBSD: stable/9/sys/amd64/linux32/syscalls.master 231145 
2012-02-07 19:11:54Z jhb 
  */
 
 #defineLINUX_SYS_exit  1

Modified: stable/9/sys/amd64/linux32/linux32_syscalls.c
==
--- stable/9/sys/amd64/linux32/linux32_syscalls.c   Tue Feb  7 19:12:21 
2012(r231146)
+++ stable/9/sys/amd64/linux32/linux32_syscalls.c   Tue Feb  7 19:13:34 
2012(r231147)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 220028 
2011-03-26 10:51:56Z avg 
+ * created from FreeBSD: stable/9/sys/amd64/linux32/syscalls.master 231145 
2012-02-07 19:11:54Z jhb 
  */
 
 const char *linux_syscallnames[] = {

Modified: stable/9/sys/amd64/linux32/linux32_sysent.c
==
--- stable/9/sys/amd64/linux32/linux32_sysent.c Tue Feb  7 19:12:21 2012
(r231146)
+++ stable/9/sys/amd64/linux32/linux32_sysent.c Tue Feb  7 19:13:34 2012
(r231147)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 220028 
2011-03-26 10:51:56Z avg 
+ * created from FreeBSD: stable/9/sys/amd64/linux32/syscalls.master 231145 
2012-02-07 19:11:54Z jhb 
  */
 
 #include opt_compat.h
@@ -269,7 +269,7 @@ struct sysent linux_sysent[] = {
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT },  
/* 247 = linux_io_getevents */
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT },  
/* 248 = linux_io_submit */
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT },  
/* 249 = linux_io_cancel */
-   { 0, (sy_call_t *)linux_fadvise64, AUE_NULL, NULL, 0, 0, 0, 

svn commit: r231148 - in stable/8/sys: amd64/linux32 i386/linux

2012-02-07 Thread John Baldwin
Author: jhb
Date: Tue Feb  7 19:13:47 2012
New Revision: 231148
URL: http://svn.freebsd.org/changeset/base/231148

Log:
  Regen.

Modified:
  stable/8/sys/amd64/linux32/linux32_proto.h
  stable/8/sys/amd64/linux32/linux32_syscall.h
  stable/8/sys/amd64/linux32/linux32_syscalls.c
  stable/8/sys/amd64/linux32/linux32_sysent.c
  stable/8/sys/amd64/linux32/linux32_systrace_args.c
  stable/8/sys/i386/linux/linux_proto.h
  stable/8/sys/i386/linux/linux_syscall.h
  stable/8/sys/i386/linux/linux_syscalls.c
  stable/8/sys/i386/linux/linux_sysent.c
  stable/8/sys/i386/linux/linux_systrace_args.c

Modified: stable/8/sys/amd64/linux32/linux32_proto.h
==
--- stable/8/sys/amd64/linux32/linux32_proto.h  Tue Feb  7 19:13:34 2012
(r231147)
+++ stable/8/sys/amd64/linux32/linux32_proto.h  Tue Feb  7 19:13:47 2012
(r231148)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: stable/8/sys/amd64/linux32/syscalls.master 222555 
2011-06-01 05:50:24Z art 
+ * created from FreeBSD: stable/8/sys/amd64/linux32/syscalls.master 231146 
2012-02-07 19:12:21Z jhb 
  */
 
 #ifndef _LINUX_SYSPROTO_H_
@@ -755,7 +755,10 @@ struct linux_set_thread_area_args {
char desc_l_[PADL_(struct l_user_desc *)]; struct l_user_desc * desc; 
char desc_r_[PADR_(struct l_user_desc *)];
 };
 struct linux_fadvise64_args {
-   register_t dummy;
+   char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+   char offset_l_[PADL_(l_loff_t)]; l_loff_t offset; char 
offset_r_[PADR_(l_loff_t)];
+   char len_l_[PADL_(l_size_t)]; l_size_t len; char 
len_r_[PADR_(l_size_t)];
+   char advice_l_[PADL_(int)]; int advice; char advice_r_[PADR_(int)];
 };
 struct linux_exit_group_args {
char error_code_l_[PADL_(int)]; int error_code; char 
error_code_r_[PADR_(int)];
@@ -829,7 +832,10 @@ struct linux_utimes_args {
char tptr_l_[PADL_(struct l_timeval *)]; struct l_timeval * tptr; char 
tptr_r_[PADR_(struct l_timeval *)];
 };
 struct linux_fadvise64_64_args {
-   register_t dummy;
+   char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+   char offset_l_[PADL_(l_loff_t)]; l_loff_t offset; char 
offset_r_[PADR_(l_loff_t)];
+   char len_l_[PADL_(l_loff_t)]; l_loff_t len; char 
len_r_[PADR_(l_loff_t)];
+   char advice_l_[PADL_(int)]; int advice; char advice_r_[PADR_(int)];
 };
 struct linux_mbind_args {
register_t dummy;

Modified: stable/8/sys/amd64/linux32/linux32_syscall.h
==
--- stable/8/sys/amd64/linux32/linux32_syscall.hTue Feb  7 19:13:34 
2012(r231147)
+++ stable/8/sys/amd64/linux32/linux32_syscall.hTue Feb  7 19:13:47 
2012(r231148)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: stable/8/sys/amd64/linux32/syscalls.master 222555 
2011-06-01 05:50:24Z art 
+ * created from FreeBSD: stable/8/sys/amd64/linux32/syscalls.master 231146 
2012-02-07 19:12:21Z jhb 
  */
 
 #defineLINUX_SYS_exit  1

Modified: stable/8/sys/amd64/linux32/linux32_syscalls.c
==
--- stable/8/sys/amd64/linux32/linux32_syscalls.c   Tue Feb  7 19:13:34 
2012(r231147)
+++ stable/8/sys/amd64/linux32/linux32_syscalls.c   Tue Feb  7 19:13:47 
2012(r231148)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: stable/8/sys/amd64/linux32/syscalls.master 222555 
2011-06-01 05:50:24Z art 
+ * created from FreeBSD: stable/8/sys/amd64/linux32/syscalls.master 231146 
2012-02-07 19:12:21Z jhb 
  */
 
 const char *linux_syscallnames[] = {

Modified: stable/8/sys/amd64/linux32/linux32_sysent.c
==
--- stable/8/sys/amd64/linux32/linux32_sysent.c Tue Feb  7 19:13:34 2012
(r231147)
+++ stable/8/sys/amd64/linux32/linux32_sysent.c Tue Feb  7 19:13:47 2012
(r231148)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: stable/8/sys/amd64/linux32/syscalls.master 222555 
2011-06-01 05:50:24Z art 
+ * created from FreeBSD: stable/8/sys/amd64/linux32/syscalls.master 231146 
2012-02-07 19:12:21Z jhb 
  */
 
 #include opt_compat.h
@@ -269,7 +269,7 @@ struct sysent linux_sysent[] = {
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, 
/* 247 = linux_io_getevents */
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, 
/* 248 = linux_io_submit */
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, 
/* 249 = linux_io_cancel */
-   { 0, (sy_call_t *)linux_fadvise64, AUE_NULL, NULL, 0, 0, 0 },   /* 250 
= linux_fadvise64 */
+   

svn commit: r231149 - head/sys/powerpc/ofw

2012-02-07 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Tue Feb  7 19:14:13 2012
New Revision: 231149
URL: http://svn.freebsd.org/changeset/base/231149

Log:
  The bus resource adjustment API is not meant to work on active resources.
  Return an error if a driver attempts this, and, if INVARIANTS is on,
  panic.
  
  Reviewed by:  jhb

Modified:
  head/sys/powerpc/ofw/ofw_pci.c

Modified: head/sys/powerpc/ofw/ofw_pci.c
==
--- head/sys/powerpc/ofw/ofw_pci.c  Tue Feb  7 19:13:47 2012
(r231148)
+++ head/sys/powerpc/ofw/ofw_pci.c  Tue Feb  7 19:14:13 2012
(r231149)
@@ -431,7 +431,11 @@ ofw_pci_adjust_resource(device_t bus, de
 {
struct rman *rm = NULL;
struct ofw_pci_softc *sc = device_get_softc(bus);
-   int error;
+
+   KASSERT(!(rman_get_flags(res)  RF_ACTIVE),
+   (active resources cannot be adjusted));
+   if (rman_get_flags(res)  RF_ACTIVE)
+   return (EINVAL);
 
switch (type) {
case SYS_RES_MEMORY:
@@ -447,21 +451,7 @@ ofw_pci_adjust_resource(device_t bus, de
if (!rman_is_region_manager(res, rm))
return (EINVAL);
 
-   error = rman_adjust_resource(res, start, end);
-   if (error)
-   return (error);
-
-   if (rman_get_flags(res)  RF_ACTIVE) {
-   /* Remap memory resources */
-   error = ofw_pci_deactivate_resource(bus, child, type,
-   rman_get_rid(res), res);
-   if (error)
-   return (error);
-   error = ofw_pci_activate_resource(bus, child, type,
-   rman_get_rid(res), res);
-   }
-
-   return (error);
+   return (rman_adjust_resource(res, start, end));
 }

 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231150 - in stable/9/sys: i386/i386 mips/mips

2012-02-07 Thread John Baldwin
Author: jhb
Date: Tue Feb  7 19:23:08 2012
New Revision: 231150
URL: http://svn.freebsd.org/changeset/base/231150

Log:
  MFC 228962:
  Use curthread rather than PCPU_GET(curthread).  'curthread' uses
  special-case optimizations on several platforms and is preferred.

Modified:
  stable/9/sys/i386/i386/sys_machdep.c
  stable/9/sys/mips/mips/gdb_machdep.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)
  stable/9/sys/modules/sound/driver/emu10k1/   (props changed)
  stable/9/sys/modules/sound/driver/emu10kx/   (props changed)
  stable/9/sys/modules/sound/driver/maestro3/   (props changed)

Modified: stable/9/sys/i386/i386/sys_machdep.c
==
--- stable/9/sys/i386/i386/sys_machdep.cTue Feb  7 19:14:13 2012
(r231149)
+++ stable/9/sys/i386/i386/sys_machdep.cTue Feb  7 19:23:08 2012
(r231150)
@@ -549,7 +549,7 @@ user_ldt_free(struct thread *td)
return;
}
 
-   if (td == PCPU_GET(curthread)) {
+   if (td == curthread) {
 #ifdef XEN
i386_reset_ldt(default_proc_ldt);
PCPU_SET(currentldt, (int)default_proc_ldt);

Modified: stable/9/sys/mips/mips/gdb_machdep.c
==
--- stable/9/sys/mips/mips/gdb_machdep.cTue Feb  7 19:14:13 2012
(r231149)
+++ stable/9/sys/mips/mips/gdb_machdep.cTue Feb  7 19:23:08 2012
(r231150)
@@ -116,7 +116,7 @@ gdb_cpu_getreg(int regnum, size_t *regsz
 {
 
*regsz = gdb_cpu_regsz(regnum);
-   if (kdb_thread  == PCPU_GET(curthread)) {
+   if (kdb_thread == curthread) {
register_t *zero_ptr = kdb_frame-zero;
return zero_ptr + regnum;
}
@@ -154,7 +154,7 @@ gdb_cpu_setreg(int regnum, void *val)
switch (regnum) {
case GDB_REG_PC:
kdb_thrctx-pcb_context[10] = *(register_t *)val;
-   if (kdb_thread  == PCPU_GET(curthread))
+   if (kdb_thread == curthread)
kdb_frame-pc = *(register_t *)val;
}
 }
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231151 - in stable/8/sys: i386/i386 mips/mips

2012-02-07 Thread John Baldwin
Author: jhb
Date: Tue Feb  7 19:23:31 2012
New Revision: 231151
URL: http://svn.freebsd.org/changeset/base/231151

Log:
  MFC 228962:
  Use curthread rather than PCPU_GET(curthread).  'curthread' uses
  special-case optimizations on several platforms and is preferred.

Modified:
  stable/8/sys/i386/i386/sys_machdep.c
  stable/8/sys/mips/mips/gdb_machdep.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)
  stable/8/sys/modules/sound/driver/emu10k1/   (props changed)
  stable/8/sys/modules/sound/driver/emu10kx/   (props changed)

Modified: stable/8/sys/i386/i386/sys_machdep.c
==
--- stable/8/sys/i386/i386/sys_machdep.cTue Feb  7 19:23:08 2012
(r231150)
+++ stable/8/sys/i386/i386/sys_machdep.cTue Feb  7 19:23:31 2012
(r231151)
@@ -522,7 +522,7 @@ user_ldt_free(struct thread *td)
return;
}
 
-   if (td == PCPU_GET(curthread)) {
+   if (td == curthread) {
 #ifdef XEN
i386_reset_ldt(default_proc_ldt);
PCPU_SET(currentldt, (int)default_proc_ldt);

Modified: stable/8/sys/mips/mips/gdb_machdep.c
==
--- stable/8/sys/mips/mips/gdb_machdep.cTue Feb  7 19:23:08 2012
(r231150)
+++ stable/8/sys/mips/mips/gdb_machdep.cTue Feb  7 19:23:31 2012
(r231151)
@@ -116,7 +116,7 @@ gdb_cpu_getreg(int regnum, size_t *regsz
 {
 
*regsz = gdb_cpu_regsz(regnum);
-   if (kdb_thread  == PCPU_GET(curthread)) {
+   if (kdb_thread == curthread) {
register_t *zero_ptr = kdb_frame-zero;
return zero_ptr + regnum;
}
@@ -154,7 +154,7 @@ gdb_cpu_setreg(int regnum, void *val)
switch (regnum) {
case GDB_REG_PC:
kdb_thrctx-pcb_context[10] = *(register_t *)val;
-   if (kdb_thread  == PCPU_GET(curthread))
+   if (kdb_thread == curthread)
kdb_frame-pc = *(register_t *)val;
}
 }
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231152 - in stable/9/sys: . amd64/include/xen boot boot/i386/efi boot/ia64/efi boot/ia64/ski boot/powerpc/boot1.chrp boot/powerpc/ofw cddl/contrib/opensolaris conf contrib/dev/acpica c...

2012-02-07 Thread John Baldwin
Author: jhb
Date: Tue Feb  7 19:32:20 2012
New Revision: 231152
URL: http://svn.freebsd.org/changeset/base/231152

Log:
  Hoist mergeinfo for modules/sound/driver/* up to sys/.

Modified:
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)
  stable/9/sys/modules/sound/driver/emu10k1/   (props changed)
  stable/9/sys/modules/sound/driver/emu10kx/   (props changed)
  stable/9/sys/modules/sound/driver/maestro3/   (props changed)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231153 - stable/9/sys/dev/ichwd

2012-02-07 Thread John Baldwin
Author: jhb
Date: Tue Feb  7 19:40:52 2012
New Revision: 231153
URL: http://svn.freebsd.org/changeset/base/231153

Log:
  MFC 229598:
  Remove use of explicit bus space tags and handles and use methods that
  operate on resource objects instead.

Modified:
  stable/9/sys/dev/ichwd/ichwd.c
  stable/9/sys/dev/ichwd/ichwd.h
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/dev/ichwd/ichwd.c
==
--- stable/9/sys/dev/ichwd/ichwd.c  Tue Feb  7 19:32:20 2012
(r231152)
+++ stable/9/sys/dev/ichwd/ichwd.c  Tue Feb  7 19:40:52 2012
(r231153)
@@ -198,26 +198,26 @@ static struct ichwd_device ichwd_devices
 static devclass_t ichwd_devclass;
 
 #define ichwd_read_tco_1(sc, off) \
-   bus_space_read_1((sc)-tco_bst, (sc)-tco_bsh, (off))
+   bus_read_1((sc)-tco_res, (off))
 #define ichwd_read_tco_2(sc, off) \
-   bus_space_read_2((sc)-tco_bst, (sc)-tco_bsh, (off))
+   bus_read_2((sc)-tco_res, (off))
 #define ichwd_read_tco_4(sc, off) \
-   bus_space_read_4((sc)-tco_bst, (sc)-tco_bsh, (off))
+   bus_read_4((sc)-tco_res, (off))
 #define ichwd_read_smi_4(sc, off) \
-   bus_space_read_4((sc)-smi_bst, (sc)-smi_bsh, (off))
+   bus_read_4((sc)-smi_res, (off))
 #define ichwd_read_gcs_4(sc, off) \
-   bus_space_read_4((sc)-gcs_bst, (sc)-gcs_bsh, (off))
+   bus_read_4((sc)-gcs_res, (off))
 
 #define ichwd_write_tco_1(sc, off, val) \
-   bus_space_write_1((sc)-tco_bst, (sc)-tco_bsh, (off), (val))
+   bus_write_1((sc)-tco_res, (off), (val))
 #define ichwd_write_tco_2(sc, off, val) \
-   bus_space_write_2((sc)-tco_bst, (sc)-tco_bsh, (off), (val))
+   bus_write_2((sc)-tco_res, (off), (val))
 #define ichwd_write_tco_4(sc, off, val) \
-   bus_space_write_4((sc)-tco_bst, (sc)-tco_bsh, (off), (val))
+   bus_write_4((sc)-tco_res, (off), (val))
 #define ichwd_write_smi_4(sc, off, val) \
-   bus_space_write_4((sc)-smi_bst, (sc)-smi_bsh, (off), (val))
+   bus_write_4((sc)-smi_res, (off), (val))
 #define ichwd_write_gcs_4(sc, off, val) \
-   bus_space_write_4((sc)-gcs_bst, (sc)-gcs_bsh, (off), (val))
+   bus_write_4((sc)-gcs_res, (off), (val))
 
 #define ichwd_verbose_printf(dev, ...) \
do {\
@@ -519,8 +519,6 @@ ichwd_attach(device_t dev)
device_printf(dev, unable to reserve SMI registers\n);
goto fail;
}
-   sc-smi_bst = rman_get_bustag(sc-smi_res);
-   sc-smi_bsh = rman_get_bushandle(sc-smi_res);
 
sc-tco_rid = 1;
sc-tco_res = bus_alloc_resource(dev, SYS_RES_IOPORT, sc-tco_rid,
@@ -530,8 +528,6 @@ ichwd_attach(device_t dev)
device_printf(dev, unable to reserve TCO registers\n);
goto fail;
}
-   sc-tco_bst = rman_get_bustag(sc-tco_res);
-   sc-tco_bsh = rman_get_bushandle(sc-tco_res);
 
sc-gcs_rid = 0;
if (sc-ich_version = 6) {
@@ -541,12 +537,6 @@ ichwd_attach(device_t dev)
device_printf(dev, unable to reserve GCS registers\n);
goto fail;
}
-   sc-gcs_bst = rman_get_bustag(sc-gcs_res);
-   sc-gcs_bsh = rman_get_bushandle(sc-gcs_res);
-   } else {
-   sc-gcs_res = 0;
-   sc-gcs_bst = 0;
-   sc-gcs_bsh = 0;
}
 
if (ichwd_clear_noreboot(sc) != 0)

Modified: stable/9/sys/dev/ichwd/ichwd.h
==
--- stable/9/sys/dev/ichwd/ichwd.h  Tue Feb  7 19:32:20 2012
(r231152)
+++ stable/9/sys/dev/ichwd/ichwd.h  Tue Feb  7 19:40:52 2012
(r231153)
@@ -48,18 +48,12 @@ struct ichwd_softc {
int  smi_enabled;
int  smi_rid;
struct resource *smi_res;
-   bus_space_tag_t  smi_bst;
-   bus_space_handle_t   smi_bsh;
 
int  tco_rid;
struct resource *tco_res;
-   bus_space_tag_t  tco_bst;
-   bus_space_handle_t   tco_bsh;
 
int  gcs_rid;
struct resource *gcs_res;
-   bus_space_tag_t  gcs_bst;
-   

svn commit: r231154 - stable/8/sys/dev/ichwd

2012-02-07 Thread John Baldwin
Author: jhb
Date: Tue Feb  7 19:41:21 2012
New Revision: 231154
URL: http://svn.freebsd.org/changeset/base/231154

Log:
  MFC 229598:
  Remove use of explicit bus space tags and handles and use methods that
  operate on resource objects instead.

Modified:
  stable/8/sys/dev/ichwd/ichwd.c
  stable/8/sys/dev/ichwd/ichwd.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)
  stable/8/sys/modules/sound/driver/emu10k1/   (props changed)
  stable/8/sys/modules/sound/driver/emu10kx/   (props changed)

Modified: stable/8/sys/dev/ichwd/ichwd.c
==
--- stable/8/sys/dev/ichwd/ichwd.c  Tue Feb  7 19:40:52 2012
(r231153)
+++ stable/8/sys/dev/ichwd/ichwd.c  Tue Feb  7 19:41:21 2012
(r231154)
@@ -198,26 +198,26 @@ static struct ichwd_device ichwd_devices
 static devclass_t ichwd_devclass;
 
 #define ichwd_read_tco_1(sc, off) \
-   bus_space_read_1((sc)-tco_bst, (sc)-tco_bsh, (off))
+   bus_read_1((sc)-tco_res, (off))
 #define ichwd_read_tco_2(sc, off) \
-   bus_space_read_2((sc)-tco_bst, (sc)-tco_bsh, (off))
+   bus_read_2((sc)-tco_res, (off))
 #define ichwd_read_tco_4(sc, off) \
-   bus_space_read_4((sc)-tco_bst, (sc)-tco_bsh, (off))
+   bus_read_4((sc)-tco_res, (off))
 #define ichwd_read_smi_4(sc, off) \
-   bus_space_read_4((sc)-smi_bst, (sc)-smi_bsh, (off))
+   bus_read_4((sc)-smi_res, (off))
 #define ichwd_read_gcs_4(sc, off) \
-   bus_space_read_4((sc)-gcs_bst, (sc)-gcs_bsh, (off))
+   bus_read_4((sc)-gcs_res, (off))
 
 #define ichwd_write_tco_1(sc, off, val) \
-   bus_space_write_1((sc)-tco_bst, (sc)-tco_bsh, (off), (val))
+   bus_write_1((sc)-tco_res, (off), (val))
 #define ichwd_write_tco_2(sc, off, val) \
-   bus_space_write_2((sc)-tco_bst, (sc)-tco_bsh, (off), (val))
+   bus_write_2((sc)-tco_res, (off), (val))
 #define ichwd_write_tco_4(sc, off, val) \
-   bus_space_write_4((sc)-tco_bst, (sc)-tco_bsh, (off), (val))
+   bus_write_4((sc)-tco_res, (off), (val))
 #define ichwd_write_smi_4(sc, off, val) \
-   bus_space_write_4((sc)-smi_bst, (sc)-smi_bsh, (off), (val))
+   bus_write_4((sc)-smi_res, (off), (val))
 #define ichwd_write_gcs_4(sc, off, val) \
-   bus_space_write_4((sc)-gcs_bst, (sc)-gcs_bsh, (off), (val))
+   bus_write_4((sc)-gcs_res, (off), (val))
 
 #define ichwd_verbose_printf(dev, ...) \
do {\
@@ -519,8 +519,6 @@ ichwd_attach(device_t dev)
device_printf(dev, unable to reserve SMI registers\n);
goto fail;
}
-   sc-smi_bst = rman_get_bustag(sc-smi_res);
-   sc-smi_bsh = rman_get_bushandle(sc-smi_res);
 
sc-tco_rid = 1;
sc-tco_res = bus_alloc_resource(dev, SYS_RES_IOPORT, sc-tco_rid,
@@ -530,8 +528,6 @@ ichwd_attach(device_t dev)
device_printf(dev, unable to reserve TCO registers\n);
goto fail;
}
-   sc-tco_bst = rman_get_bustag(sc-tco_res);
-   sc-tco_bsh = rman_get_bushandle(sc-tco_res);
 
sc-gcs_rid = 0;
if (sc-ich_version = 6) {
@@ -541,12 +537,6 @@ ichwd_attach(device_t dev)
device_printf(dev, unable to reserve GCS registers\n);
goto fail;
}
-   sc-gcs_bst = rman_get_bustag(sc-gcs_res);
-   sc-gcs_bsh = rman_get_bushandle(sc-gcs_res);
-   } else {
-   sc-gcs_res = 0;
-   sc-gcs_bst = 0;
-   sc-gcs_bsh = 0;
}
 
if (ichwd_clear_noreboot(sc) != 0)

Modified: stable/8/sys/dev/ichwd/ichwd.h
==
--- stable/8/sys/dev/ichwd/ichwd.h  Tue Feb  7 19:40:52 2012
(r231153)
+++ stable/8/sys/dev/ichwd/ichwd.h  Tue Feb  7 19:41:21 2012
(r231154)
@@ -48,18 +48,12 @@ struct ichwd_softc {
int  smi_enabled;
int  smi_rid;
struct resource *smi_res;
-   bus_space_tag_t  smi_bst;
-   bus_space_handle_t   smi_bsh;
 
int  tco_rid;
struct resource *tco_res;
-   bus_space_tag_t  tco_bst;
-   bus_space_handle_t   tco_bsh;
 
int  gcs_rid;
struct resource *gcs_res;
-   bus_space_tag_t  gcs_bst;
-   bus_space_handle_t   gcs_bsh;
 
eventhandler_tag ev_tag;
 };
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to 

svn commit: r231155 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/e1000 modules/sound/driver/emu10k1 modules/sound/driver/emu10kx

2012-02-07 Thread John Baldwin
Author: jhb
Date: Tue Feb  7 19:45:15 2012
New Revision: 231155
URL: http://svn.freebsd.org/changeset/base/231155

Log:
  Hoist mergeinfo for modules/sound/driver/* up to sys/.

Modified:
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)
  stable/8/sys/modules/sound/driver/emu10k1/   (props changed)
  stable/8/sys/modules/sound/driver/emu10kx/   (props changed)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231156 - in stable/9/sys/dev: bxe qlxgb sfxge

2012-02-07 Thread John Baldwin
Author: jhb
Date: Tue Feb  7 19:53:02 2012
New Revision: 231156
URL: http://svn.freebsd.org/changeset/base/231156

Log:
  MFC 229613:
  Update recently added drivers to use the if_*addr_r*lock() wrapper
  functions instead of using the IF_ADDR_LOCK directly.  The wrapper
  functions are the supported interface for device drivers.

Modified:
  stable/9/sys/dev/bxe/if_bxe.c
  stable/9/sys/dev/qlxgb/qla_os.c
  stable/9/sys/dev/sfxge/sfxge_port.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/dev/bxe/if_bxe.c
==
--- stable/9/sys/dev/bxe/if_bxe.c   Tue Feb  7 19:45:15 2012
(r231155)
+++ stable/9/sys/dev/bxe/if_bxe.c   Tue Feb  7 19:53:02 2012
(r231156)
@@ -14115,7 +14115,7 @@ bxe_set_rx_mode(struct bxe_softc *sc)
i = 0;
config = BXE_SP(sc, mcast_config);
 
-   IF_ADDR_LOCK(ifp);
+   if_maddr_rlock(ifp);
 
TAILQ_FOREACH(ifma, ifp-if_multiaddrs, ifma_link) {
if (ifma-ifma_addr-sa_family != AF_LINK)
@@ -14144,7 +14144,7 @@ bxe_set_rx_mode(struct bxe_softc *sc)
config_table-cam_entry.lsb_mac_addr);
}
 
-   IF_ADDR_UNLOCK(ifp);
+   if_maddr_runlock(ifp);
 
old = config-hdr.length;
 
@@ -14172,7 +14172,7 @@ bxe_set_rx_mode(struct bxe_softc *sc)
/* Accept one or more multicasts */
memset(mc_filter, 0, 4 * MC_HASH_SIZE);
 
-   IF_ADDR_LOCK(ifp);
+   if_maddr_rlock(ifp);
 
TAILQ_FOREACH(ifma, ifp-if_multiaddrs, ifma_link) {
if (ifma-ifma_addr-sa_family != AF_LINK)
@@ -14184,7 +14184,7 @@ bxe_set_rx_mode(struct bxe_softc *sc)
bit = 0x1f;
mc_filter[regidx] |= (1  bit);
}
-   IF_ADDR_UNLOCK(ifp);
+   if_maddr_runlock(ifp);
 
for (i = 0; i  MC_HASH_SIZE; i++)
REG_WR(sc, MC_HASH_OFFSET(sc, i), mc_filter[i]);

Modified: stable/9/sys/dev/qlxgb/qla_os.c
==
--- stable/9/sys/dev/qlxgb/qla_os.c Tue Feb  7 19:45:15 2012
(r231155)
+++ stable/9/sys/dev/qlxgb/qla_os.c Tue Feb  7 19:53:02 2012
(r231156)
@@ -760,7 +760,7 @@ qla_set_multi(qla_host_t *ha, uint32_t a
int mcnt = 0;
struct ifnet *ifp = ha-ifp;
 
-   IF_ADDR_LOCK(ifp);
+   if_maddr_rlock(ifp);
 
TAILQ_FOREACH(ifma, ifp-if_multiaddrs, ifma_link) {
 
@@ -776,7 +776,7 @@ qla_set_multi(qla_host_t *ha, uint32_t a
mcnt++;
}
 
-   IF_ADDR_UNLOCK(ifp);
+   if_maddr_runlock(ifp);
 
qla_hw_set_multi(ha, mta, mcnt, add_multi);
 

Modified: stable/9/sys/dev/sfxge/sfxge_port.c
==
--- stable/9/sys/dev/sfxge/sfxge_port.c Tue Feb  7 19:45:15 2012
(r231155)
+++ stable/9/sys/dev/sfxge/sfxge_port.c Tue Feb  7 19:53:02 2012
(r231156)
@@ -301,7 +301,7 @@ sfxge_mac_filter_set_locked(struct sfxge
 * 0xff. */
bucket[0xff] = 1;
 
-   IF_ADDR_LOCK(ifp);
+   if_maddr_rlock(ifp);
TAILQ_FOREACH(ifma, ifp-if_multiaddrs, ifma_link) {
if (ifma-ifma_addr-sa_family == AF_LINK) {
sa = (struct sockaddr_dl *)ifma-ifma_addr;
@@ -309,7 +309,7 @@ sfxge_mac_filter_set_locked(struct sfxge
bucket[index] = 1;
}
}
-   IF_ADDR_UNLOCK(ifp);
+   if_maddr_runlock(ifp);
}
return efx_mac_hash_set(enp, bucket);
 }
@@ -391,10 +391,10 @@ sfxge_port_start(struct sfxge_softc *sc)
goto fail2;
 
/* Set the unicast address */
-   IF_ADDR_LOCK(ifp);
+   if_addr_rlock(ifp);
bcopy(LLADDR((struct sockaddr_dl *)ifp-if_addr-ifa_addr),
  mac_addr, 

svn commit: r231157 - stable/9/sys/net

2012-02-07 Thread John Baldwin
Author: jhb
Date: Tue Feb  7 19:55:58 2012
New Revision: 231157
URL: http://svn.freebsd.org/changeset/base/231157

Log:
  MFC 229614:
  Add new variants of the IF_ADDR_*LOCK*() macros used for protecting
  interface address lists that distinguish read locks from write locks.
  To preserve the KPI, the previous operations are mapped to the write
  lock macros.  The lock is still kept as a mutex for now.

Modified:
  stable/9/sys/net/if_var.h
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/net/if_var.h
==
--- stable/9/sys/net/if_var.h   Tue Feb  7 19:53:02 2012(r231156)
+++ stable/9/sys/net/if_var.h   Tue Feb  7 19:55:58 2012(r231157)
@@ -248,9 +248,15 @@ typedef void if_init_f_t(void *);
 #defineIF_ADDR_LOCK_INIT(if)   mtx_init((if)-if_addr_mtx,
\
if_addr_mtx, NULL, MTX_DEF)
 #defineIF_ADDR_LOCK_DESTROY(if)mtx_destroy((if)-if_addr_mtx)
-#defineIF_ADDR_LOCK(if)mtx_lock((if)-if_addr_mtx)
-#defineIF_ADDR_UNLOCK(if)  mtx_unlock((if)-if_addr_mtx)
+#defineIF_ADDR_WLOCK(if)   mtx_lock((if)-if_addr_mtx)
+#defineIF_ADDR_WUNLOCK(if) mtx_unlock((if)-if_addr_mtx)
+#defineIF_ADDR_RLOCK(if)   mtx_lock((if)-if_addr_mtx)
+#defineIF_ADDR_RUNLOCK(if) mtx_unlock((if)-if_addr_mtx)
 #defineIF_ADDR_LOCK_ASSERT(if) mtx_assert((if)-if_addr_mtx, MA_OWNED)
+#defineIF_ADDR_WLOCK_ASSERT(if)mtx_assert((if)-if_addr_mtx, 
MA_OWNED)
+/* XXX: Compat. */
+#defineIF_ADDR_LOCK(if)IF_ADDR_WLOCK(if)
+#defineIF_ADDR_UNLOCK(if)  IF_ADDR_WUNLOCK(if)
 
 /*
  * Function variations on locking macros intended to be used by loadable
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231158 - stable/8/sys/net

2012-02-07 Thread John Baldwin
Author: jhb
Date: Tue Feb  7 19:56:22 2012
New Revision: 231158
URL: http://svn.freebsd.org/changeset/base/231158

Log:
  MFC 229614:
  Add new variants of the IF_ADDR_*LOCK*() macros used for protecting
  interface address lists that distinguish read locks from write locks.
  To preserve the KPI, the previous operations are mapped to the write
  lock macros.  The lock is still kept as a mutex for now.

Modified:
  stable/8/sys/net/if_var.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)

Modified: stable/8/sys/net/if_var.h
==
--- stable/8/sys/net/if_var.h   Tue Feb  7 19:55:58 2012(r231157)
+++ stable/8/sys/net/if_var.h   Tue Feb  7 19:56:22 2012(r231158)
@@ -249,9 +249,15 @@ typedef void if_init_f_t(void *);
 #defineIF_ADDR_LOCK_INIT(if)   mtx_init((if)-if_addr_mtx,
\
if_addr_mtx, NULL, MTX_DEF)
 #defineIF_ADDR_LOCK_DESTROY(if)mtx_destroy((if)-if_addr_mtx)
-#defineIF_ADDR_LOCK(if)mtx_lock((if)-if_addr_mtx)
-#defineIF_ADDR_UNLOCK(if)  mtx_unlock((if)-if_addr_mtx)
+#defineIF_ADDR_WLOCK(if)   mtx_lock((if)-if_addr_mtx)
+#defineIF_ADDR_WUNLOCK(if) mtx_unlock((if)-if_addr_mtx)
+#defineIF_ADDR_RLOCK(if)   mtx_lock((if)-if_addr_mtx)
+#defineIF_ADDR_RUNLOCK(if) mtx_unlock((if)-if_addr_mtx)
 #defineIF_ADDR_LOCK_ASSERT(if) mtx_assert((if)-if_addr_mtx, MA_OWNED)
+#defineIF_ADDR_WLOCK_ASSERT(if)mtx_assert((if)-if_addr_mtx, 
MA_OWNED)
+/* XXX: Compat. */
+#defineIF_ADDR_LOCK(if)IF_ADDR_WLOCK(if)
+#defineIF_ADDR_UNLOCK(if)  IF_ADDR_WUNLOCK(if)
 
 /*
  * Function variations on locking macros intended to be used by loadable
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r231144 - head/cddl/contrib/opensolaris/cmd/zfs

2012-02-07 Thread Andriy Gapon
on 07/02/2012 20:35 Martin Matuska said the following:
 Author: mm
 Date: Tue Feb  7 18:35:18 2012
 New Revision: 231144
 URL: http://svn.freebsd.org/changeset/base/231144
 
 Log:
   Merge illumos revision 13594:
   
   uninitialized variables in zfs(8) may make snapshots undestroyable [1]
   
   References:
   https://www.illumos.org/issues/2067 [1]
   
   Obtained from:  illumos (issue #2067)
   MFC after:  3 days


PR 164802 seems to be related.  Could you please take over it?

 Modified:
   head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
 
 Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
 ==
 --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c  Tue Feb  7 18:05:10 
 2012(r231143)
 +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c  Tue Feb  7 18:35:18 
 2012(r231144)
 @@ -590,7 +590,7 @@ zfs_do_clone(int argc, char **argv)
   zfs_handle_t *zhp = NULL;
   boolean_t parents = B_FALSE;
   nvlist_t *props;
 - int ret;
 + int ret = 0;
   int c;
  
   if (nvlist_alloc(props, NV_UNIQUE_NAME, 0) != 0)
 @@ -1052,7 +1052,7 @@ destroy_print_cb(zfs_handle_t *zhp, void
  static int
  destroy_print_snapshots(zfs_handle_t *fs_zhp, destroy_cbdata_t *cb)
  {
 - int err;
 + int err = 0;
   assert(cb-cb_firstsnap == NULL);
   assert(cb-cb_prevsnap == NULL);
   err = zfs_iter_snapshots_sorted(fs_zhp, destroy_print_cb, cb);
 @@ -1130,7 +1130,7 @@ destroy_clones(destroy_cbdata_t *cb)
   ZFS_TYPE_SNAPSHOT);
   if (zhp != NULL) {
   boolean_t defer = cb-cb_defer_destroy;
 - int err;
 + int err = 0;
  
   /*
* We can't defer destroy non-snapshots, so set it to
 @@ -1207,7 +1207,7 @@ zfs_do_destroy(int argc, char **argv)
  
   at = strchr(argv[0], '@');
   if (at != NULL) {
 - int err;
 + int err = 0;
  
   /* Build the list of snaps to destroy in cb_nvl. */
   if (nvlist_alloc(cb.cb_nvl, NV_UNIQUE_NAME, 0) != 0)
 @@ -1474,7 +1474,7 @@ zfs_do_get(int argc, char **argv)
   zprop_get_cbdata_t cb = { 0 };
   int i, c, flags = ZFS_ITER_ARGS_CAN_BE_PATHS;
   char *value, *fields;
 - int ret;
 + int ret = 0;
   int limit = 0;
   zprop_list_t fake_name = { 0 };
  
 @@ -1711,7 +1711,7 @@ zfs_do_inherit(int argc, char **argv)
   zfs_prop_t prop;
   inherit_cbdata_t cb = { 0 };
   char *propname;
 - int ret;
 + int ret = 0;
   int flags = 0;
   boolean_t received = B_FALSE;
  
 @@ -1917,7 +1917,7 @@ zfs_do_upgrade(int argc, char **argv)
  {
   boolean_t all = B_FALSE;
   boolean_t showversions = B_FALSE;
 - int ret;
 + int ret = 0;
   upgrade_cbdata_t cb = { 0 };
   char c;
   int flags = ZFS_ITER_ARGS_CAN_BE_PATHS;
 @@ -2206,7 +2206,7 @@ userspace_cb(void *arg, const char *doma
   uid_t id;
   uint64_t classes;
  #ifdef sun
 - int err;
 + int err = 0;
   directory_error_t e;
  #endif
  
 @@ -2562,7 +2562,7 @@ zfs_do_userspace(int argc, char **argv)
   boolean_t prtnum = B_FALSE;
   boolean_t parseable = B_FALSE;
   boolean_t sid2posix = B_FALSE;
 - int error;
 + int error = 0;
   int c;
   zfs_sort_column_t *default_sortcol = NULL;
   zfs_sort_column_t *sortcol = NULL;
 @@ -2925,7 +2925,7 @@ zfs_do_list(int argc, char **argv)
   list_cbdata_t cb = { 0 };
   char *value;
   int limit = 0;
 - int ret;
 + int ret = 0;
   zfs_sort_column_t *sortcol = NULL;
   int flags = ZFS_ITER_PROP_LISTSNAPS | ZFS_ITER_ARGS_CAN_BE_PATHS;
  
 @@ -3062,7 +3062,9 @@ zfs_do_rename(int argc, char **argv)
  {
   zfs_handle_t *zhp;
   renameflags_t flags = { 0 };
 - int c, ret, types;
 + int c;
 + int ret = 0;
 + int types;
   boolean_t parents = B_FALSE;
  
   /* check options */
 @@ -3155,7 +3157,7 @@ static int
  zfs_do_promote(int argc, char **argv)
  {
   zfs_handle_t *zhp;
 - int ret;
 + int ret = 0;
  
   /* check options */
   if (argc  1  argv[1][0] == '-') {
 @@ -3276,7 +3278,7 @@ rollback_check(zfs_handle_t *zhp, void *
  static int
  zfs_do_rollback(int argc, char **argv)
  {
 - int ret;
 + int ret = 0;
   int c;
   boolean_t force = B_FALSE;
   rollback_cbdata_t cb = { 0 };
 @@ -3394,7 +3396,7 @@ static int
  zfs_do_set(int argc, char **argv)
  {
   set_cbdata_t cb;
 - int ret;
 + int ret = 0;
  
   /* check for options */
   if (argc  1  argv[1][0] == '-') {
 @@ -3448,7 +3450,7 @@ static int
  zfs_do_snapshot(int argc, char **argv)
  {
   boolean_t recursive = B_FALSE;
 - int ret;
 + int ret = 0;
   char c;
   nvlist_t *props;
  
 @@ -5286,7 +5288,7 @@ zfs_do_holds(int argc, char **argv)
   

svn commit: r231159 - head/sys/dev/bge

2012-02-07 Thread Marius Strobl
Author: marius
Date: Tue Feb  7 20:24:52 2012
New Revision: 231159
URL: http://svn.freebsd.org/changeset/base/231159

Log:
  Call bge_add_sysctls() early and especially before bge_can_use_msi() so
  r230337 actually has a chance of working and doesn't always unconditionally
  disable the use of MSIs.

Modified:
  head/sys/dev/bge/if_bge.c

Modified: head/sys/dev/bge/if_bge.c
==
--- head/sys/dev/bge/if_bge.c   Tue Feb  7 19:56:22 2012(r231158)
+++ head/sys/dev/bge/if_bge.c   Tue Feb  7 20:24:52 2012(r231159)
@@ -2786,6 +2786,8 @@ bge_attach(device_t dev)
sc = device_get_softc(dev);
sc-bge_dev = dev;
 
+   bge_add_sysctls(sc);
+
TASK_INIT(sc-bge_intr_task, 0, bge_intr_task, sc);
 
/*
@@ -3198,8 +3200,6 @@ bge_attach(device_t dev)
goto fail;
}
 
-   bge_add_sysctls(sc);
-
/* Set default tuneable values. */
sc-bge_stat_ticks = BGE_TICKS_PER_SEC;
sc-bge_rx_coal_ticks = 150;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231160 - head/sys/ufs/ffs

2012-02-07 Thread Kirk McKusick
Author: mckusick
Date: Tue Feb  7 20:43:28 2012
New Revision: 231160
URL: http://svn.freebsd.org/changeset/base/231160

Log:
  In the original days of BSD, a sync was issued on every filesystem
  every 30 seconds. This spike in I/O caused the system to pause every
  30 seconds which was quite annoying. So, the way that sync worked
  was changed so that when a vnode was first dirtied, it was put on
  a 30-second cleaning queue (see the syncer_workitem_pending queues
  in kern/vfs_subr.c). If the file has not been written or deleted
  after 30 seconds, the syncer pushes it out. As the syncer runs once
  per second, dirty files are trickled out slowly over the 30-second
  period instead of all at once by a call to sync(2).
  
  The one drawback to this is that it does not cover the filesystem
  metadata. To handle the metadata, vfs_allocate_syncvnode() is called
  to create a filesystem syncer vnode at mount time which cycles
  around the cleaning queue being sync'ed every 30 seconds. In the
  original design, the only things it would sync for UFS were the
  filesystem metadata: inode blocks, cylinder group bitmaps, and the
  superblock (e.g., by VOP_FSYNC'ing devvp, the device vnode from
  which the filesystem is mounted).
  
  Somewhere in its path to integration with FreeBSD the flushing of
  the filesystem syncer vnode got changed to sync every vnode associated
  with the filesystem. The result of this change is to return to the
  old filesystem-wide flush every 30-seconds behavior and makes the
  whole 30-second delay per vnode useless.
  
  This change goes back to the originally intended trickle out sync
  behavior. Key to ensuring that all the intended semantics are
  preserved (e.g., that all inode updates get flushed within a bounded
  period of time) is that all inode modifications get pushed to their
  corresponding inode blocks so that the metadata flush by the
  filesystem syncer vnode gets them to the disk in a timely way.
  Thanks to Konstantin Belousov (kib@) for doing the audit and commit
  -r231122 which ensures that all of these updates are being made.
  
  Reviewed by:kib
  Tested by:  scottl
  MFC after:  2 weeks

Modified:
  head/sys/ufs/ffs/ffs_vfsops.c

Modified: head/sys/ufs/ffs/ffs_vfsops.c
==
--- head/sys/ufs/ffs/ffs_vfsops.c   Tue Feb  7 20:24:52 2012
(r231159)
+++ head/sys/ufs/ffs/ffs_vfsops.c   Tue Feb  7 20:43:28 2012
(r231160)
@@ -1436,17 +1436,26 @@ ffs_sync(mp, waitfor)
int softdep_accdeps;
struct bufobj *bo;
 
+   wait = 0;
+   suspend = 0;
+   suspended = 0;
td = curthread;
fs = ump-um_fs;
if (fs-fs_fmod != 0  fs-fs_ronly != 0  ump-um_fsckpid == 0)
panic(%s: ffs_sync: modification on read-only filesystem,
fs-fs_fsmnt);
/*
+* For a lazy sync, we just care about the filesystem metadata.
+*/
+   if (waitfor == MNT_LAZY) {
+   secondary_accwrites = 0;
+   secondary_writes = 0;
+   lockreq = 0;
+   goto metasync;
+   }
+   /*
 * Write back each (modified) inode.
 */
-   wait = 0;
-   suspend = 0;
-   suspended = 0;
lockreq = LK_EXCLUSIVE | LK_NOWAIT;
if (waitfor == MNT_SUSPEND) {
suspend = 1;
@@ -1517,11 +1526,12 @@ loop:
 #ifdef QUOTA
qsync(mp);
 #endif
+
+metasync:
devvp = ump-um_devvp;
bo = devvp-v_bufobj;
BO_LOCK(bo);
-   if (waitfor != MNT_LAZY 
-   (bo-bo_numoutput  0 || bo-bo_dirty.bv_cnt  0)) {
+   if (bo-bo_numoutput  0 || bo-bo_dirty.bv_cnt  0) {
BO_UNLOCK(bo);
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
if ((error = VOP_FSYNC(devvp, waitfor, td)) != 0)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231161 - head/sys/dev/acpica

2012-02-07 Thread Jung-uk Kim
Author: jkim
Date: Tue Feb  7 20:54:44 2012
New Revision: 231161
URL: http://svn.freebsd.org/changeset/base/231161

Log:
  - Give all clocks and timers on acpi0 the equal probing order.
  - Increase probing order for ECDT table to match HID-based probing.
  - Decrease probing order for HPET table to match HID-based probing.
  - Decrease probing order for CPUs and system resources.
  - Fix ACPI_DEV_BASE_ORDER to reflect the reality.

Modified:
  head/sys/dev/acpica/acpi.c
  head/sys/dev/acpica/acpi_ec.c
  head/sys/dev/acpica/acpi_hpet.c
  head/sys/dev/acpica/acpi_timer.c
  head/sys/dev/acpica/acpivar.h

Modified: head/sys/dev/acpica/acpi.c
==
--- head/sys/dev/acpica/acpi.c  Tue Feb  7 20:43:28 2012(r231160)
+++ head/sys/dev/acpica/acpi.c  Tue Feb  7 20:54:44 2012(r231161)
@@ -1812,23 +1812,29 @@ acpi_probe_children(device_t bus)
 static void
 acpi_probe_order(ACPI_HANDLE handle, int *order)
 {
-ACPI_OBJECT_TYPE type;
+   ACPI_OBJECT_TYPE type;
 
-/*
- * 1. CPUs
- * 2. I/O port and memory system resource holders
- * 3. Embedded controllers (to handle early accesses)
- * 4. PCI Link Devices
- */
-AcpiGetType(handle, type);
-if (type == ACPI_TYPE_PROCESSOR)
-   *order = 1;
-else if (acpi_MatchHid(handle, PNP0C01) || acpi_MatchHid(handle, 
PNP0C02))
-   *order = 2;
-else if (acpi_MatchHid(handle, PNP0C09))
-   *order = 3;
-else if (acpi_MatchHid(handle, PNP0C0F))
-   *order = 4;
+   /*
+* 0. CPUs
+* 1. I/O port and memory system resource holders
+* 2. Clocks and timers (to handle early accesses)
+* 3. Embedded controllers (to handle early accesses)
+* 4. PCI Link Devices
+*/
+   AcpiGetType(handle, type);
+   if (type == ACPI_TYPE_PROCESSOR)
+   *order = 0;
+   else if (acpi_MatchHid(handle, PNP0C01) ||
+   acpi_MatchHid(handle, PNP0C02))
+   *order = 1;
+   else if (acpi_MatchHid(handle, PNP0100) ||
+   acpi_MatchHid(handle, PNP0103) ||
+   acpi_MatchHid(handle, PNP0B00))
+   *order = 2;
+   else if (acpi_MatchHid(handle, PNP0C09))
+   *order = 3;
+   else if (acpi_MatchHid(handle, PNP0C0F))
+   *order = 4;
 }
 
 /*
@@ -1889,7 +1895,7 @@ acpi_probe_child(ACPI_HANDLE handle, UIN
 * resources).
 */
ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, scanning '%s'\n, handle_str));
-   order = level * 10 + 100;
+   order = level * 10 + ACPI_DEV_BASE_ORDER;
acpi_probe_order(handle, order);
child = BUS_ADD_CHILD(bus, order, NULL, -1);
if (child == NULL)

Modified: head/sys/dev/acpica/acpi_ec.c
==
--- head/sys/dev/acpica/acpi_ec.c   Tue Feb  7 20:43:28 2012
(r231160)
+++ head/sys/dev/acpica/acpi_ec.c   Tue Feb  7 20:54:44 2012
(r231161)
@@ -295,7 +295,7 @@ acpi_ec_ecdt_probe(device_t parent)
 }
 
 /* Create the child device with the given unit number. */
-child = BUS_ADD_CHILD(parent, 0, acpi_ec, ecdt-Uid);
+child = BUS_ADD_CHILD(parent, 3, acpi_ec, ecdt-Uid);
 if (child == NULL) {
printf(%s: can't add child\n, __func__);
return;

Modified: head/sys/dev/acpica/acpi_hpet.c
==
--- head/sys/dev/acpica/acpi_hpet.c Tue Feb  7 20:43:28 2012
(r231160)
+++ head/sys/dev/acpica/acpi_hpet.c Tue Feb  7 20:54:44 2012
(r231161)
@@ -342,7 +342,7 @@ hpet_identify(driver_t *driver, device_t
if (found)
continue;
/* If not - create it from table info. */
-   child = BUS_ADD_CHILD(parent, ACPI_DEV_BASE_ORDER, hpet, 0);
+   child = BUS_ADD_CHILD(parent, 2, hpet, 0);
if (child == NULL) {
printf(%s: can't add child\n, __func__);
continue;

Modified: head/sys/dev/acpica/acpi_timer.c
==
--- head/sys/dev/acpica/acpi_timer.cTue Feb  7 20:43:28 2012
(r231160)
+++ head/sys/dev/acpica/acpi_timer.cTue Feb  7 20:54:44 2012
(r231161)
@@ -124,7 +124,7 @@ acpi_timer_identify(driver_t *driver, de
acpi_timer_dev)
return_VOID;
 
-if ((dev = BUS_ADD_CHILD(parent, 0, acpi_timer, 0)) == NULL) {
+if ((dev = BUS_ADD_CHILD(parent, 2, acpi_timer, 0)) == NULL) {
device_printf(parent, could not add acpi_timer0\n);
return_VOID;
 }

Modified: head/sys/dev/acpica/acpivar.h
==
--- head/sys/dev/acpica/acpivar.h   Tue Feb  7 20:43:28 2012
(r231160)
+++ head/sys/dev/acpica/acpivar.h

Re: svn commit: r231144 - head/cddl/contrib/opensolaris/cmd/zfs

2012-02-07 Thread Martin Matuska
Dňa 7.2.2012 21:02, Andriy Gapon  wrote / napísal(a):
 on 07/02/2012 20:35 Martin Matuska said the following:
 Author: mm
 Date: Tue Feb  7 18:35:18 2012
 New Revision: 231144
 URL: http://svn.freebsd.org/changeset/base/231144

 Log:
   Merge illumos revision 13594:
   
   uninitialized variables in zfs(8) may make snapshots undestroyable [1]
   
   References:
   https://www.illumos.org/issues/2067 [1]
   
   Obtained from: illumos (issue #2067)
   MFC after: 3 days

 PR 164802 seems to be related.  Could you please take over it?
PR taken over, state changed to patched.
Thanks.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231162 - in stable: 8/sbin/newfs_msdos 9/sbin/newfs_msdos

2012-02-07 Thread Xin LI
Author: delphij
Date: Tue Feb  7 21:56:58 2012
New Revision: 231162
URL: http://svn.freebsd.org/changeset/base/231162

Log:
  MFC r227454:
  
  Use __packed to prevent alignment from taking place, which otherwise may
  change the on-disk format in an incompatible way. Without this change,
  msdosfs created on FreeBSD/arm would not be mountable.
  
  PR:   bin/162486
  Submitted by: Ian Lepore freebsd damnhippie dyndns org
  Reported by:  Mattia Rossi mrossi at swin.edu.au

Modified:
  stable/9/sbin/newfs_msdos/newfs_msdos.c
Directory Properties:
  stable/9/sbin/newfs_msdos/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/8/sbin/newfs_msdos/newfs_msdos.c
Directory Properties:
  stable/8/sbin/newfs_msdos/   (props changed)

Modified: stable/9/sbin/newfs_msdos/newfs_msdos.c
==
--- stable/9/sbin/newfs_msdos/newfs_msdos.c Tue Feb  7 20:54:44 2012
(r231161)
+++ stable/9/sbin/newfs_msdos/newfs_msdos.c Tue Feb  7 21:56:58 2012
(r231162)
@@ -99,7 +99,7 @@ static const char rcsid[] =
 struct bs {
 u_int8_t bsJump[3];/* bootstrap entry point */
 u_int8_t bsOemName[8]; /* OEM name and version */
-};
+} __packed;
 
 struct bsbpb {
 u_int8_t bpbBytesPerSec[2];/* bytes per sector */
@@ -114,7 +114,7 @@ struct bsbpb {
 u_int8_t bpbHeads[2];  /* drive heads */
 u_int8_t bpbHiddenSecs[4]; /* hidden sectors */
 u_int8_t bpbHugeSectors[4];/* big total sectors */
-};
+} __packed;
 
 struct bsxbpb {
 u_int8_t bpbBigFATsecs[4]; /* big sectors per FAT */
@@ -124,7 +124,7 @@ struct bsxbpb {
 u_int8_t bpbFSInfo[2]; /* file system info sector */
 u_int8_t bpbBackup[2]; /* backup boot sector */
 u_int8_t bpbReserved[12];  /* reserved */
-};
+} __packed;
 
 struct bsx {
 u_int8_t exDriveNumber;/* drive number */
@@ -133,7 +133,7 @@ struct bsx {
 u_int8_t exVolumeID[4];/* volume ID number */
 u_int8_t exVolumeLabel[11];/* volume label */
 u_int8_t exFileSysType[8]; /* file system type */
-};
+} __packed;
 
 struct de {
 u_int8_t deName[11];   /* name and extension */
@@ -143,7 +143,7 @@ struct de {
 u_int8_t deMDate[2];   /* creation date */
 u_int8_t deStartCluster[2];/* starting cluster */
 u_int8_t deFileSize[4];/* size */
-};
+} __packed;
 
 struct bpb {
 u_int bpbBytesPerSec;  /* bytes per sector */
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231162 - in stable: 8/sbin/newfs_msdos 9/sbin/newfs_msdos

2012-02-07 Thread Xin LI
Author: delphij
Date: Tue Feb  7 21:56:58 2012
New Revision: 231162
URL: http://svn.freebsd.org/changeset/base/231162

Log:
  MFC r227454:
  
  Use __packed to prevent alignment from taking place, which otherwise may
  change the on-disk format in an incompatible way. Without this change,
  msdosfs created on FreeBSD/arm would not be mountable.
  
  PR:   bin/162486
  Submitted by: Ian Lepore freebsd damnhippie dyndns org
  Reported by:  Mattia Rossi mrossi at swin.edu.au

Modified:
  stable/8/sbin/newfs_msdos/newfs_msdos.c
Directory Properties:
  stable/8/sbin/newfs_msdos/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/9/sbin/newfs_msdos/newfs_msdos.c
Directory Properties:
  stable/9/sbin/newfs_msdos/   (props changed)

Modified: stable/8/sbin/newfs_msdos/newfs_msdos.c
==
--- stable/8/sbin/newfs_msdos/newfs_msdos.c Tue Feb  7 20:54:44 2012
(r231161)
+++ stable/8/sbin/newfs_msdos/newfs_msdos.c Tue Feb  7 21:56:58 2012
(r231162)
@@ -99,7 +99,7 @@ static const char rcsid[] =
 struct bs {
 u_int8_t bsJump[3];/* bootstrap entry point */
 u_int8_t bsOemName[8]; /* OEM name and version */
-};
+} __packed;
 
 struct bsbpb {
 u_int8_t bpbBytesPerSec[2];/* bytes per sector */
@@ -114,7 +114,7 @@ struct bsbpb {
 u_int8_t bpbHeads[2];  /* drive heads */
 u_int8_t bpbHiddenSecs[4]; /* hidden sectors */
 u_int8_t bpbHugeSectors[4];/* big total sectors */
-};
+} __packed;
 
 struct bsxbpb {
 u_int8_t bpbBigFATsecs[4]; /* big sectors per FAT */
@@ -124,7 +124,7 @@ struct bsxbpb {
 u_int8_t bpbFSInfo[2]; /* file system info sector */
 u_int8_t bpbBackup[2]; /* backup boot sector */
 u_int8_t bpbReserved[12];  /* reserved */
-};
+} __packed;
 
 struct bsx {
 u_int8_t exDriveNumber;/* drive number */
@@ -133,7 +133,7 @@ struct bsx {
 u_int8_t exVolumeID[4];/* volume ID number */
 u_int8_t exVolumeLabel[11];/* volume label */
 u_int8_t exFileSysType[8]; /* file system type */
-};
+} __packed;
 
 struct de {
 u_int8_t deName[11];   /* name and extension */
@@ -143,7 +143,7 @@ struct de {
 u_int8_t deMDate[2];   /* creation date */
 u_int8_t deStartCluster[2];/* starting cluster */
 u_int8_t deFileSize[4];/* size */
-};
+} __packed;
 
 struct bpb {
 u_int bpbBytesPerSec;  /* bytes per sector */
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231164 - in stable: 8/usr.bin/newgrp 9/usr.bin/newgrp

2012-02-07 Thread Xin LI
Author: delphij
Date: Tue Feb  7 22:13:33 2012
New Revision: 231164
URL: http://svn.freebsd.org/changeset/base/231164

Log:
  MFC r226274,r226416:
  
  Fix the error message when setgid() failed.
  
  PR:   bin/161509
  Submitted by: Jeremy Huddleston jeremyhu apple com

Modified:
  stable/9/usr.bin/newgrp/newgrp.c
Directory Properties:
  stable/9/usr.bin/newgrp/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/8/usr.bin/newgrp/newgrp.c
Directory Properties:
  stable/8/usr.bin/newgrp/   (props changed)

Modified: stable/9/usr.bin/newgrp/newgrp.c
==
--- stable/9/usr.bin/newgrp/newgrp.cTue Feb  7 22:13:24 2012
(r231163)
+++ stable/9/usr.bin/newgrp/newgrp.cTue Feb  7 22:13:33 2012
(r231164)
@@ -140,7 +140,7 @@ restoregrps(void)
if (initres  0)
warn(initgroups);
if (setres  0)
-   warn(setgroups);
+   warn(setgid);
 }
 
 static void
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231164 - in stable: 8/usr.bin/newgrp 9/usr.bin/newgrp

2012-02-07 Thread Xin LI
Author: delphij
Date: Tue Feb  7 22:13:33 2012
New Revision: 231164
URL: http://svn.freebsd.org/changeset/base/231164

Log:
  MFC r226274,r226416:
  
  Fix the error message when setgid() failed.
  
  PR:   bin/161509
  Submitted by: Jeremy Huddleston jeremyhu apple com

Modified:
  stable/8/usr.bin/newgrp/newgrp.c
Directory Properties:
  stable/8/usr.bin/newgrp/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/9/usr.bin/newgrp/newgrp.c
Directory Properties:
  stable/9/usr.bin/newgrp/   (props changed)

Modified: stable/8/usr.bin/newgrp/newgrp.c
==
--- stable/8/usr.bin/newgrp/newgrp.cTue Feb  7 22:13:24 2012
(r231163)
+++ stable/8/usr.bin/newgrp/newgrp.cTue Feb  7 22:13:33 2012
(r231164)
@@ -140,7 +140,7 @@ restoregrps(void)
if (initres  0)
warn(initgroups);
if (setres  0)
-   warn(setgroups);
+   warn(setgid);
 }
 
 static void
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231165 - stable/9/sys/netinet6

2012-02-07 Thread John Baldwin
Author: jhb
Date: Tue Feb  7 22:13:38 2012
New Revision: 231165
URL: http://svn.freebsd.org/changeset/base/231165

Log:
  MFC 229465: Use correct locking when traversing interface address list.

Modified:
  stable/9/sys/netinet6/in6.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/netinet6/in6.c
==
--- stable/9/sys/netinet6/in6.c Tue Feb  7 22:13:33 2012(r231164)
+++ stable/9/sys/netinet6/in6.c Tue Feb  7 22:13:38 2012(r231165)
@@ -2211,9 +2211,7 @@ in6_ifawithifp(struct ifnet *ifp, struct
IF_ADDR_UNLOCK(ifp);
return (besta);
}
-   IF_ADDR_UNLOCK(ifp);
 
-   IN6_IFADDR_RLOCK();
TAILQ_FOREACH(ifa, ifp-if_addrhead, ifa_link) {
if (ifa-ifa_addr-sa_family != AF_INET6)
continue;
@@ -2231,10 +2229,10 @@ in6_ifawithifp(struct ifnet *ifp, struct
 
if (ifa != NULL)
ifa_ref(ifa);
-   IN6_IFADDR_RUNLOCK();
+   IF_ADDR_UNLOCK(ifp);
return (struct in6_ifaddr *)ifa;
}
-   IN6_IFADDR_RUNLOCK();
+   IF_ADDR_UNLOCK(ifp);
 
/* use the last-resort values, that are, deprecated addresses */
if (dep[0])
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231166 - stable/8/sys/netinet6

2012-02-07 Thread John Baldwin
Author: jhb
Date: Tue Feb  7 22:13:54 2012
New Revision: 231166
URL: http://svn.freebsd.org/changeset/base/231166

Log:
  MFC 229465: Use correct locking when traversing interface address list.

Modified:
  stable/8/sys/netinet6/in6.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)

Modified: stable/8/sys/netinet6/in6.c
==
--- stable/8/sys/netinet6/in6.c Tue Feb  7 22:13:38 2012(r231165)
+++ stable/8/sys/netinet6/in6.c Tue Feb  7 22:13:54 2012(r231166)
@@ -2128,9 +2128,7 @@ in6_ifawithifp(struct ifnet *ifp, struct
IF_ADDR_UNLOCK(ifp);
return (besta);
}
-   IF_ADDR_UNLOCK(ifp);
 
-   IN6_IFADDR_RLOCK();
TAILQ_FOREACH(ifa, ifp-if_addrhead, ifa_link) {
if (ifa-ifa_addr-sa_family != AF_INET6)
continue;
@@ -2148,10 +2146,10 @@ in6_ifawithifp(struct ifnet *ifp, struct
 
if (ifa != NULL)
ifa_ref(ifa);
-   IN6_IFADDR_RUNLOCK();
+   IF_ADDR_UNLOCK(ifp);
return (struct in6_ifaddr *)ifa;
}
-   IN6_IFADDR_RUNLOCK();
+   IF_ADDR_UNLOCK(ifp);
 
/* use the last-resort values, that are, deprecated addresses */
if (dep[0])
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231167 - stable/8/contrib/smbfs/mount_smbfs

2012-02-07 Thread Xin LI
Author: delphij
Date: Tue Feb  7 22:31:16 2012
New Revision: 231167
URL: http://svn.freebsd.org/changeset/base/231167

Log:
  MFC r225643,225644:
  
  Change the example of using smbfs in fstab to a password-less one,
  which is less likely to block a remote system from boot.
  
  Submitted by: Garrett Cooper yaneg...@gmail.com
  PR:   doc/160775

Modified:
  stable/8/contrib/smbfs/mount_smbfs/mount_smbfs.8
Directory Properties:
  stable/8/contrib/smbfs/   (props changed)

Modified: stable/8/contrib/smbfs/mount_smbfs/mount_smbfs.8
==
--- stable/8/contrib/smbfs/mount_smbfs/mount_smbfs.8Tue Feb  7 22:13:54 
2012(r231166)
+++ stable/8/contrib/smbfs/mount_smbfs/mount_smbfs.8Tue Feb  7 22:31:16 
2012(r231167)
@@ -1,6 +1,6 @@
 .\ $Id: mount_smbfs.8,v 1.10 2002/04/16 02:47:41 bp Exp $
 .\ $FreeBSD$
-.Dd January 21, 2008
+.Dd September 17, 2011
 .Dt MOUNT_SMBFS 8
 .Os
 .Sh NAME
@@ -157,11 +157,11 @@ mount_smbfs -I samba.mydomain.com //gues
 mount_smbfs -I 192.168.20.3 -E koi8-r:cp866 //guest@samba/tmp /smb/tmp
 .Ed
 .Pp
-It is possible to use
+It is also possible to use
 .Xr fstab 5
-for smbfs mounts:
+for smbfs mounts (the example below doesn't prompt for a password):
 .Pp
-.Dl //guest@samba/public/smb/public smbfs  rw,noauto 0   0
+.Dl //guest@samba/public/smb/public smbfs  rw,noauto,-N 0   0
 .Sh AUTHORS
 .An Boris Popov Aq b...@butya.kz ,
 .Aq b...@freebsd.org
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231168 - head/sys/fs/ext2fs

2012-02-07 Thread Pedro F. Giffuni
Author: pfg
Date: Tue Feb  7 22:31:28 2012
New Revision: 231168
URL: http://svn.freebsd.org/changeset/base/231168

Log:
  Update the data structures with some fields reserved for
  ext4 but that can be used in ext3 mode.
  
  Also adjust the internal inode to carry the birthtime,
  like in UFS, which is starting to get some use when
  big inodes are available.
  
  Right now these are just placeholders for features
  to come.
  
  Approved by:  jhb (mentor)
  MFC after:2 weeks

Modified:
  head/sys/fs/ext2fs/ext2_dinode.h
  head/sys/fs/ext2fs/ext2fs.h
  head/sys/fs/ext2fs/inode.h

Modified: head/sys/fs/ext2fs/ext2_dinode.h
==
--- head/sys/fs/ext2fs/ext2_dinode.hTue Feb  7 22:31:16 2012
(r231167)
+++ head/sys/fs/ext2fs/ext2_dinode.hTue Feb  7 22:31:28 2012
(r231168)
@@ -70,7 +70,7 @@ struct ext2fs_dinode {
uint16_te2di_uid;   /*   2: Owner UID */
uint32_te2di_size;  /*   4: Size (in bytes) */
uint32_te2di_atime; /*   8: Access time */
-   uint32_te2di_ctime; /*  12: Create time */
+   uint32_te2di_ctime; /*  12: Change time */
uint32_te2di_mtime; /*  16: Modification time */
uint32_te2di_dtime; /*  20: Deletion time */
uint16_te2di_gid;   /*  24: Owner GID */
@@ -89,6 +89,8 @@ struct ext2fs_dinode {
uint16_te2di_uid_high;  /* 120: Owner UID top 16 bits */
uint16_te2di_gid_high;  /* 122: Owner GID top 16 bits */
uint32_te2di_linux_reserved3; /* 124 */
+   uint16_te2di_extra_isize;
+   uint16_te2di_pad1;
 };
 
 #endif /* !_FS_EXT2FS_EXT2_DINODE_H_ */

Modified: head/sys/fs/ext2fs/ext2fs.h
==
--- head/sys/fs/ext2fs/ext2fs.h Tue Feb  7 22:31:16 2012(r231167)
+++ head/sys/fs/ext2fs/ext2fs.h Tue Feb  7 22:31:28 2012(r231168)
@@ -123,7 +123,22 @@ struct ext2fs {
char  e3fs_reserved_char_pad;
uint32_t  e3fs_default_mount_opts;
uint32_t  e3fs_first_meta_bg;   /* First metablock block group */
-   uint32_t  reserved2[190];   /* Padding to the end of the block */
+   uint32_t  e3fs_mkfs_time;  /* when the fs was created */
+   uint32_t  e3fs_jnl_blks[17];   /* backup of the journal inode */
+   uint32_t  e4fs_bcount_hi;  /* block count */
+   uint32_t  e4fs_rbcount_hi; /* reserved blocks count */
+   uint32_t  e4fs_fbcount_hi; /* free blocks count */
+   uint16_t  e4fs_min_extra_isize;/* all inodes have at least some bytes */
+   uint16_t  e4fs_want_extra_isize; /* new inodes should reserve some 
bytes */
+   uint32_t  e4fs_flags; /* miscellaneous flags */
+   uint16_t  e4fs_raid_stride;/* RAID stride */
+   uint16_t  e4fs_mmpintv; /* number of seconds to wait in MMP checking */
+   uint64_t  e4fs_mmpblk;   /* block for multi-mount protection */
+   uint32_t  e4fs_raid_stripe_wid;/* blocks on all data disks (N * stride) 
*/
+   uint8_t   e4fs_log_gpf; /* FLEX_BG group size */ 
+   uint8_t   e4fs_char_pad2;
+   uint16_t  e4fs_pad;
+   uint32_t  reserved2[162];   /* Padding to the end of the block */   
 };
 
 
@@ -139,15 +154,15 @@ struct m_ext2fs {
uint32_t e2fs_bsize;  /* Block size */
uint32_t e2fs_bshift; /* calc of logical block no */
int32_t  e2fs_bmask;  /* calc of block offset */
-   int32_t  e2fs_bpg;/* Number of blocks per group */
+   int32_t  e2fs_bpg;/* Number of blocks per group */
int64_t  e2fs_qbmask; /* = s_blocksize -1 */
uint32_t e2fs_fsbtodb;/* Shift to get disk block */
-   uint32_t e2fs_ipg;/* Number of inodes per group */
-   uint32_t e2fs_ipb;/* Number of inodes per block */
+   uint32_t e2fs_ipg;/* Number of inodes per group */
+   uint32_t e2fs_ipb;/* Number of inodes per block */
uint32_t e2fs_itpg;   /* Number of inode table per group */
uint32_t e2fs_fsize;  /* Size of fragments per block */
-   uint32_t e2fs_fpb;/* Number of fragments per block */
-   uint32_t e2fs_fpg;/* Number of fragments per group */
+   uint32_t e2fs_fpb;/* Number of fragments per block */
+   uint32_t e2fs_fpg;/* Number of fragments per group */
uint32_t e2fs_dbpg;   /* Number of descriptor blocks per group */
uint32_t e2fs_descpb; /* Number of group descriptors per block */
uint32_t e2fs_gdbcount;   /* Number of group descriptors */
@@ -161,7 +176,7 @@ struct m_ext2fs {
char e2fs_wasvalid;   /* valid at mount time */
off_te2fs_maxfilesize;
struct   ext2_gd *e2fs_gd; /* Group Descriptors */
- 

svn commit: r231169 - head/sys/amd64/amd64

2012-02-07 Thread Jung-uk Kim
Author: jkim
Date: Tue Feb  7 23:24:29 2012
New Revision: 231169
URL: http://svn.freebsd.org/changeset/base/231169

Log:
  Do not EOI local APIC too early.  Just do doreti normally after resuming.

Modified:
  head/sys/amd64/amd64/apic_vector.S

Modified: head/sys/amd64/amd64/apic_vector.S
==
--- head/sys/amd64/amd64/apic_vector.S  Tue Feb  7 22:31:28 2012
(r231168)
+++ head/sys/amd64/amd64/apic_vector.S  Tue Feb  7 23:24:29 2012
(r231169)
@@ -300,13 +300,10 @@ IDTVEC(cpustop)
 IDTVEC(cpususpend)
PUSH_FRAME
 
+   callcpususpend_handler
movqlapic, %rax
movl$0, LA_EOI(%rax)/* End Of Interrupt to APIC */
-
-   callcpususpend_handler
-
-   POP_FRAME
-   jmp doreti_iret
+   jmp doreti
 
 /*
  * Executed by a CPU when it receives a RENDEZVOUS IPI from another CPU.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231170 - head/share/man/man4

2012-02-07 Thread Kenneth D. Merry
Author: ken
Date: Tue Feb  7 23:43:29 2012
New Revision: 231170
URL: http://svn.freebsd.org/changeset/base/231170

Log:
  Update the mps(4) man page for the changes in the new LSI-supported driver.
  
  This should have been included in change 230592.
  
  The supported hardware section still needs some updating to reflect
  the current reality.
  
  MFC after:3 days

Modified:
  head/share/man/man4/mps.4

Modified: head/share/man/man4/mps.4
==
--- head/share/man/man4/mps.4   Tue Feb  7 23:24:29 2012(r231169)
+++ head/share/man/man4/mps.4   Tue Feb  7 23:43:29 2012(r231170)
@@ -31,10 +31,10 @@
 .\
 .\ Author: Ken Merry k...@freebsd.org
 .\
-.\ $Id: //depot/SpectraBSD/head/share/man/man4/mps.4#4 $
+.\ $Id: //depot/SpectraBSD/head/share/man/man4/mps.4#6 $
 .\ $FreeBSD$
 .\
-.Dd September 13, 2010
+.Dd February 7, 2012
 .Dt MPS 4
 .Os
 .Sh NAME
@@ -58,7 +58,7 @@ The
 .Nm
 driver provides support for LSI Logic Fusion-MPT 2
 .Tn SAS
-controllers.
+controllers and WarpDrive solid state storage cards.
 .Sh HARDWARE
 The
 .Nm
@@ -90,6 +90,16 @@ driver instances, set the following tuna
 hw.mps.disable_msi=1
 .Ed
 .Pp
+To disable MSI interrupts for a specific
+.Nm
+driver instance, set the following tunable value in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+dev.mps.X.disable_msi=1
+.Ed
+.Pp
+where X is the adapter number.
+.Pp
 To disable MSI-X interrupts for all
 .Nm
 driver instances, set the following tunable value in
@@ -98,19 +108,51 @@ driver instances, set the following tuna
 hw.mps.disable_msix=1
 .Ed
 .Pp
-To allow the driver to send multiple task management commands (like abort,
-LUN reset, etc.), set the following variable:
+To disable MSI-X interrupts for a specific
+.Nm
+driver instance, set the following tunable value in
+.Xr loader.conf 5 :
 .Bd -literal -offset indent
-hw.mps.X.allow_multiple_tm_cmds=1
+dev.mps.X.disable_msix=1
 .Ed
 .Pp
-via
-.Xr loader.conf 5
-or
-.Xr sysctl 8 ,
-where X is the adapter number.
-By default the driver only sends one task management command at a time, to
-avoid causing a potential controller lock-up.
+To set the maximum number of DMA chains allocated for all adapters,
+set the following variable in 
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+hw.mps.max_chains=
+.Ed
+.Pp
+To set the maximum number of DMA chains allocated for a specific adapter,
+set the following variable in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+dev.mps.X.max_chains=
+.Ed
+.Pp
+This variable may also be viewed via
+.Xr sysctl 8
+to see the maximum set for a given adapter.
+.Pp
+The current number of free chain frames may be seen via the
+dev.mps.X.chain_free
+.Xr sysctl 8
+variable.
+.Pp
+The lowest number of free chain frames may be seen via the
+dev.mps.X.chain_free_lowwater
+.Xr sysctl 8
+variable.
+.Pp
+The current number of active I/O commands is shown in the
+dev.mps.X.io_cmds_active
+.Xr sysctl 8
+variable.
+.Pp
+The maximum number of active I/O command seen since boot is shown in the
+dev.mps.X.io_cmds_highwater
+.Xr sysctl 8
+variable.
 .Sh DEBUGGING
 To enable debugging prints from the
 .Nm
@@ -142,7 +184,9 @@ Enable prints for controller events.
 .Xr pci 4 ,
 .Xr sa 4 ,
 .Xr scsi 4 ,
-.Xr targ 4
+.Xr targ 4 ,
+.Xr loader.conf 5 ,
+.Xr sysctl 8
 .Sh HISTORY
 The
 .Nm
@@ -154,20 +198,19 @@ The
 .Nm
 driver was originally written by
 .An Scott Long Aq sco...@freebsd.org .
+It has been improved and tested by LSI Logic Corporation.
 This man page was written by
 .An Ken Merry Aq k...@freebsd.org .
 .Sh BUGS
-This driver is still in development, it has only been tested on the amd64
-architecture and has some known shortcomings:
+This driver has a couple of known shortcomings:
 .Bl -bullet -compact
 .It
-No IR (Integrated RAID) support.
+Not endian safe.
+It only works on little endian machines (e.g. amd64 and i386).
 .It 
-No userland utility support (e.g.
-.Xr mptutil 8).
-.It
-Sometimes the driver gets into a state where devices arrive and depart multiple
-times, without user intervention.
+No userland utility available (e.g.
+.Xr mptutil 8)
 .It
-The error recovery code isn't complete.
+The driver probes devices sequentially.
+If your system has a large number of devices, the probe will take a while.
 .El
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231172 - head/sys/dev/cxgbe

2012-02-07 Thread Navdeep Parhar
Author: np
Date: Wed Feb  8 00:36:36 2012
New Revision: 231172
URL: http://svn.freebsd.org/changeset/base/231172

Log:
  Program the MAC exact match table in batches of 7 addresses at
  a time when possible.  This is more efficient than one at a time.
  
  Submitted by: gnn
  MFC after:3 days

Modified:
  head/sys/dev/cxgbe/t4_main.c

Modified: head/sys/dev/cxgbe/t4_main.c
==
--- head/sys/dev/cxgbe/t4_main.cWed Feb  8 00:08:21 2012
(r231171)
+++ head/sys/dev/cxgbe/t4_main.cWed Feb  8 00:36:36 2012
(r231172)
@@ -2013,6 +2013,8 @@ build_medialist(struct port_info *pi)
PORT_UNLOCK(pi);
 }
 
+#define FW_MAC_EXACT_CHUNK 7
+
 /*
  * Program the port's XGMAC based on parameters in ifnet.  The caller also
  * indicates which parameters should be programmed (the rest are left alone).
@@ -2064,28 +2066,57 @@ update_mac_settings(struct port_info *pi
}
 
if (flags  XGMAC_MCADDRS) {
-   const uint8_t *mcaddr;
+   const uint8_t *mcaddr[FW_MAC_EXACT_CHUNK];
int del = 1;
uint64_t hash = 0;
struct ifmultiaddr *ifma;
+   int i = 0, j;
 
if_maddr_rlock(ifp);
TAILQ_FOREACH(ifma, ifp-if_multiaddrs, ifma_link) {
-   if (ifma-ifma_addr-sa_family != AF_LINK)
+   if (ifma-ifma_addr-sa_family == AF_LINK)
continue;
-   mcaddr = LLADDR((struct sockaddr_dl *)ifma-ifma_addr);
+   mcaddr[i++] =
+   LLADDR((struct sockaddr_dl *)ifma-ifma_addr);
 
-   rc = t4_alloc_mac_filt(sc, sc-mbox, pi-viid, del, 1,
-   mcaddr, NULL, hash, 0);
+   if (i == FW_MAC_EXACT_CHUNK) {
+   rc = t4_alloc_mac_filt(sc, sc-mbox, pi-viid,
+   del, i, mcaddr, NULL, hash, 0);
+   if (rc  0) {
+   rc = -rc;
+   for (j = 0; j  i; j++) {
+   if_printf(ifp,
+   failed to add mc address
+%02x:%02x:%02x:
+   %02x:%02x:%02x rc=%d\n,
+   mcaddr[j][0], mcaddr[j][1],
+   mcaddr[j][2], mcaddr[j][3],
+   mcaddr[j][4], mcaddr[j][5],
+   rc);
+   }
+   goto mcfail;
+   }
+   del = 0;
+   i = 0;
+   }
+   }
+   if (i  0) {
+   rc = t4_alloc_mac_filt(sc, sc-mbox, pi-viid,
+   del, i, mcaddr, NULL, hash, 0);
if (rc  0) {
rc = -rc;
-   if_printf(ifp, failed to add mc address
-%02x:%02x:%02x:%02x:%02x:%02x rc=%d\n,
-   mcaddr[0], mcaddr[1], mcaddr[2], mcaddr[3],
-   mcaddr[4], mcaddr[5], rc);
+   for (j = 0; j  i; j++) {
+   if_printf(ifp,
+   failed to add mc address
+%02x:%02x:%02x:
+   %02x:%02x:%02x rc=%d\n,
+   mcaddr[j][0], mcaddr[j][1],
+   mcaddr[j][2], mcaddr[j][3],
+   mcaddr[j][4], mcaddr[j][5],
+   rc);
+   }
goto mcfail;
}
-   del = 0;
}
 
rc = -t4_set_addr_hash(sc, sc-mbox, pi-viid, 0, hash, 0);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231175 - head/sys/dev/cxgb

2012-02-07 Thread Navdeep Parhar
Author: np
Date: Wed Feb  8 03:02:12 2012
New Revision: 231175
URL: http://svn.freebsd.org/changeset/base/231175

Log:
  Allocate the BAR for userspace doorbells after the is_offload check
  is functional.
  
  MFC after:3 days

Modified:
  head/sys/dev/cxgb/cxgb_main.c

Modified: head/sys/dev/cxgb/cxgb_main.c
==
--- head/sys/dev/cxgb/cxgb_main.c   Wed Feb  8 02:15:59 2012
(r231174)
+++ head/sys/dev/cxgb/cxgb_main.c   Wed Feb  8 03:02:12 2012
(r231175)
@@ -473,15 +473,6 @@ cxgb_controller_attach(device_t dev)
device_printf(dev, Cannot allocate BAR region 0\n);
return (ENXIO);
}
-   sc-udbs_rid = PCIR_BAR(2);
-   sc-udbs_res = NULL;
-   if (is_offload(sc) 
-   ((sc-udbs_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
-  sc-udbs_rid, RF_ACTIVE)) == NULL)) {
-   device_printf(dev, Cannot allocate BAR region 1\n);
-   error = ENXIO;
-   goto out;
-   }
 
snprintf(sc-lockbuf, ADAPTER_LOCK_NAME_LEN, cxgb controller lock %d,
device_get_unit(dev));
@@ -510,6 +501,17 @@ cxgb_controller_attach(device_t dev)
error = ENODEV;
goto out;
}
+
+   sc-udbs_rid = PCIR_BAR(2);
+   sc-udbs_res = NULL;
+   if (is_offload(sc) 
+   ((sc-udbs_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
+  sc-udbs_rid, RF_ACTIVE)) == NULL)) {
+   device_printf(dev, Cannot allocate BAR region 1\n);
+   error = ENXIO;
+   goto out;
+   }
+
 /* Allocate the BAR for doing MSI-X.  If it succeeds, try to allocate
 * enough messages for the queue sets.  If that fails, try falling
 * back to MSI.  If that fails, then try falling back to the legacy
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231177 - head/sys/ia64/ia64

2012-02-07 Thread Marcel Moolenaar
Author: marcel
Date: Wed Feb  8 04:05:38 2012
New Revision: 231177
URL: http://svn.freebsd.org/changeset/base/231177

Log:
  Rev. 228360 moved the call to cpu_set_upcall() to happen before
  td_proc gets initialized in td (=newtd). Use td0 instead.
  
  MFC after:3 days

Modified:
  head/sys/ia64/ia64/vm_machdep.c

Modified: head/sys/ia64/ia64/vm_machdep.c
==
--- head/sys/ia64/ia64/vm_machdep.c Wed Feb  8 03:16:29 2012
(r231176)
+++ head/sys/ia64/ia64/vm_machdep.c Wed Feb  8 04:05:38 2012
(r231177)
@@ -192,7 +192,7 @@ cpu_set_upcall(struct thread *td, struct
bcopy(td0-td_pcb, pcb, sizeof(*pcb));
pcb-pcb_special.bspstore = td-td_kstack;
pcb-pcb_special.pfs = 0;
-   pcb-pcb_current_pmap = vmspace_pmap(td-td_proc-p_vmspace);
+   pcb-pcb_current_pmap = vmspace_pmap(td0-td_proc-p_vmspace);
pcb-pcb_special.sp = (uintptr_t)tf - 16;
pcb-pcb_special.rp = FDESC_FUNC(fork_trampoline);
cpu_set_fork_handler(td, (void (*)(void*))fork_return, td);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231178 - stable/9/sys/ia64/ia64

2012-02-07 Thread Marcel Moolenaar
Author: marcel
Date: Wed Feb  8 04:40:14 2012
New Revision: 231178
URL: http://svn.freebsd.org/changeset/base/231178

Log:
  MFC r231177:
  Rev. 228360 moved the call to cpu_set_upcall() to happen before
  td_proc gets initialized in td (=newtd). Use td0 instead.

Modified:
  stable/9/sys/ia64/ia64/vm_machdep.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/ia64/ia64/vm_machdep.c
==
--- stable/9/sys/ia64/ia64/vm_machdep.c Wed Feb  8 04:05:38 2012
(r231177)
+++ stable/9/sys/ia64/ia64/vm_machdep.c Wed Feb  8 04:40:14 2012
(r231178)
@@ -192,7 +192,7 @@ cpu_set_upcall(struct thread *td, struct
bcopy(td0-td_pcb, pcb, sizeof(*pcb));
pcb-pcb_special.bspstore = td-td_kstack;
pcb-pcb_special.pfs = 0;
-   pcb-pcb_current_pmap = vmspace_pmap(td-td_proc-p_vmspace);
+   pcb-pcb_current_pmap = vmspace_pmap(td0-td_proc-p_vmspace);
pcb-pcb_special.sp = (uintptr_t)tf - 16;
pcb-pcb_special.rp = FDESC_FUNC(fork_trampoline);
cpu_set_fork_handler(td, (void (*)(void*))fork_return, td);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231179 - stable/8/sys/ia64/ia64

2012-02-07 Thread Marcel Moolenaar
Author: marcel
Date: Wed Feb  8 04:47:06 2012
New Revision: 231179
URL: http://svn.freebsd.org/changeset/base/231179

Log:
  MFC r231177:
  Rev. 228360 moved the call to cpu_set_upcall() to happen before
  td_proc gets initialized in td (=newtd). Use td0 instead.

Modified:
  stable/8/sys/ia64/ia64/vm_machdep.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)

Modified: stable/8/sys/ia64/ia64/vm_machdep.c
==
--- stable/8/sys/ia64/ia64/vm_machdep.c Wed Feb  8 04:40:14 2012
(r231178)
+++ stable/8/sys/ia64/ia64/vm_machdep.c Wed Feb  8 04:47:06 2012
(r231179)
@@ -192,7 +192,7 @@ cpu_set_upcall(struct thread *td, struct
bcopy(td0-td_pcb, pcb, sizeof(*pcb));
pcb-pcb_special.bspstore = td-td_kstack;
pcb-pcb_special.pfs = 0;
-   pcb-pcb_current_pmap = vmspace_pmap(td-td_proc-p_vmspace);
+   pcb-pcb_current_pmap = vmspace_pmap(td0-td_proc-p_vmspace);
pcb-pcb_special.sp = (uintptr_t)tf - 16;
pcb-pcb_special.rp = FDESC_FUNC(fork_trampoline);
cpu_set_fork_handler(td, (void (*)(void*))fork_return, td);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231181 - head/usr.sbin/tzsetup

2012-02-07 Thread Garrett Wollman
Author: wollman
Date: Wed Feb  8 05:03:04 2012
New Revision: 231181
URL: http://svn.freebsd.org/changeset/base/231181

Log:
  It's not an error if unlink(2) fails because the pathname doesn't exist.
  
  Noticed by: kevlo
  Pointy hat to: wollman

Modified:
  head/usr.sbin/tzsetup/tzsetup.c

Modified: head/usr.sbin/tzsetup/tzsetup.c
==
--- head/usr.sbin/tzsetup/tzsetup.c Wed Feb  8 04:55:00 2012
(r231180)
+++ head/usr.sbin/tzsetup/tzsetup.c Wed Feb  8 05:03:04 2012
(r231181)
@@ -723,7 +723,7 @@ install_zoneinfo_file(const char *zonein
return (DITEM_FAILURE | DITEM_RECREATE);
}
 
-   if (unlink(path_localtime)  0) {
+   if (unlink(path_localtime)  0  errno != ENOENT) {
snprintf(prompt, sizeof(prompt),
Could not unlink %s: %s,
path_localtime, strerror(errno));
@@ -780,7 +780,7 @@ install_zoneinfo_file(const char *zonein
fprintf(stderr, %s\n, prompt);
return (DITEM_FAILURE | DITEM_RECREATE);
}
-   if (unlink(path_localtime)  0) {
+   if (unlink(path_localtime)  0  errno != ENOENT) {
snprintf(prompt, sizeof(prompt),
Could not unlink %s: %s,
path_localtime, strerror(errno));
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231187 - head/sys/net80211

2012-02-07 Thread Adrian Chadd
Author: adrian
Date: Wed Feb  8 06:56:19 2012
New Revision: 231187
URL: http://svn.freebsd.org/changeset/base/231187

Log:
  Update the 802.11s IE numbers to represent the latest 802.11 amendment 
standard.
  
  Submitted by: montha...@gmail.com
  Reviewed by:  rpaulo

Modified:
  head/sys/net80211/ieee80211.h

Modified: head/sys/net80211/ieee80211.h
==
--- head/sys/net80211/ieee80211.h   Wed Feb  8 06:55:22 2012
(r231186)
+++ head/sys/net80211/ieee80211.h   Wed Feb  8 06:56:19 2012
(r231187)
@@ -709,27 +709,32 @@ enum {
IEEE80211_ELEMID_VENDOR = 221,  /* vendor private */
 
/*
-* 802.11s IEs based on D3.03 spec and were not assigned by
-* ANA. Beware changing them because some of them are being
-* kept compatible with Linux.
+* 802.11s IEs
+* NB: On vanilla Linux still IEEE80211_ELEMID_MESHPEER = 55,
+* but they defined a new with id 117 called PEER_MGMT.
+* NB: complies with open80211
 */
-   IEEE80211_ELEMID_MESHCONF   = 51,
-   IEEE80211_ELEMID_MESHID = 52,
-   IEEE80211_ELEMID_MESHLINK   = 35,
-   IEEE80211_ELEMID_MESHCNGST  = 36,
-   IEEE80211_ELEMID_MESHPEER   = 55,
-   IEEE80211_ELEMID_MESHCSA= 38,
-   IEEE80211_ELEMID_MESHTIM= 39,
-   IEEE80211_ELEMID_MESHAWAKEW = 40,
-   IEEE80211_ELEMID_MESHBEACONT= 41,
-   IEEE80211_ELEMID_MESHPANN   = 48,
-   IEEE80211_ELEMID_MESHRANN   = 49,
-   IEEE80211_ELEMID_MESHPREQ   = 68,
-   IEEE80211_ELEMID_MESHPREP   = 69,
-   IEEE80211_ELEMID_MESHPERR   = 70,
-   IEEE80211_ELEMID_MESHPXU= 53,
-   IEEE80211_ELEMID_MESHPXUC   = 54,
-   IEEE80211_ELEMID_MESHAH = 60, /* Abbreviated Handshake */
+   IEEE80211_ELEMID_MESHCONF   = 113,
+   IEEE80211_ELEMID_MESHID = 114,
+   IEEE80211_ELEMID_MESHLINK   = 115,
+   IEEE80211_ELEMID_MESHCNGST  = 116,
+   IEEE80211_ELEMID_MESHPEER   = 117,
+   IEEE80211_ELEMID_MESHCSA= 118,
+   IEEE80211_ELEMID_MESHTIM= 39, /* XXX: remove */
+   IEEE80211_ELEMID_MESHAWAKEW = 119,
+   IEEE80211_ELEMID_MESHBEACONT= 120,
+   /* 121-124 MMCAOP not implemented yet */
+   IEEE80211_ELEMID_MESHPANN   = 125, /* XXX: is GANN now, not used */
+   IEEE80211_ELEMID_MESHRANN   = 126,
+   /* 127 Extended Capabilities */
+   /* 128-129 reserved */
+   IEEE80211_ELEMID_MESHPREQ   = 130,
+   IEEE80211_ELEMID_MESHPREP   = 131,
+   IEEE80211_ELEMID_MESHPERR   = 132,
+   /* 133-136 reserved */
+   IEEE80211_ELEMID_MESHPXU= 137,
+   IEEE80211_ELEMID_MESHPXUC   = 138,
+   IEEE80211_ELEMID_MESHAH = 60, /* XXX: remove */
 };
 
 struct ieee80211_tim_ie {
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231188 - stable/9/sys/vm

2012-02-07 Thread Alexander Motin
Author: mav
Date: Wed Feb  8 07:30:48 2012
New Revision: 231188
URL: http://svn.freebsd.org/changeset/base/231188

Log:
  MFC 230877:
  Fix NULL dereference panic on attempt to turn off (on system shutdown)
  disconnected swap device.
  
  This is quick and imperfect solution, as swap device will still be opened
  and GEOM will not be able to destroy it. Proper solution would be to
  automatically turn off and close disconnected swap device, but with existing
  code it will cause panic if there is at least one page on device, even if
  it is unimportant page of the user-level process. It needs some work.

Modified:
  stable/9/sys/vm/swap_pager.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/vm/swap_pager.c
==
--- stable/9/sys/vm/swap_pager.cWed Feb  8 06:56:19 2012
(r231187)
+++ stable/9/sys/vm/swap_pager.cWed Feb  8 07:30:48 2012
(r231188)
@@ -2521,7 +2521,7 @@ swapgeom_orphan(struct g_consumer *cp)
mtx_lock(sw_dev_mtx);
TAILQ_FOREACH(sp, swtailq, sw_list)
if (sp-sw_id == cp)
-   sp-sw_id = NULL;
+   sp-sw_flags |= SW_CLOSING;
mtx_unlock(sw_dev_mtx);
 }
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231189 - stable/8/sys/vm

2012-02-07 Thread Alexander Motin
Author: mav
Date: Wed Feb  8 07:31:55 2012
New Revision: 231189
URL: http://svn.freebsd.org/changeset/base/231189

Log:
  MFC 230877:
  Fix NULL dereference panic on attempt to turn off (on system shutdown)
  disconnected swap device.
  
  This is quick and imperfect solution, as swap device will still be opened
  and GEOM will not be able to destroy it. Proper solution would be to
  automatically turn off and close disconnected swap device, but with existing
  code it will cause panic if there is at least one page on device, even if
  it is unimportant page of the user-level process. It needs some work.

Modified:
  stable/8/sys/vm/swap_pager.c
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/vm/swap_pager.c
==
--- stable/8/sys/vm/swap_pager.cWed Feb  8 07:30:48 2012
(r231188)
+++ stable/8/sys/vm/swap_pager.cWed Feb  8 07:31:55 2012
(r231189)
@@ -2484,7 +2484,7 @@ swapgeom_orphan(struct g_consumer *cp)
mtx_lock(sw_dev_mtx);
TAILQ_FOREACH(sp, swtailq, sw_list)
if (sp-sw_id == cp)
-   sp-sw_id = NULL;
+   sp-sw_flags |= SW_CLOSING;
mtx_unlock(sw_dev_mtx);
 }
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r231190 - stable/7/sys/vm

2012-02-07 Thread Alexander Motin
Author: mav
Date: Wed Feb  8 07:34:03 2012
New Revision: 231190
URL: http://svn.freebsd.org/changeset/base/231190

Log:
  MFC 230877:
  Fix NULL dereference panic on attempt to turn off (on system shutdown)
  disconnected swap device.
  
  This is quick and imperfect solution, as swap device will still be opened
  and GEOM will not be able to destroy it. Proper solution would be to
  automatically turn off and close disconnected swap device, but with existing
  code it will cause panic if there is at least one page on device, even if
  it is unimportant page of the user-level process. It needs some work.

Modified:
  stable/7/sys/vm/swap_pager.c
Directory Properties:
  stable/7/sys/   (props changed)

Modified: stable/7/sys/vm/swap_pager.c
==
--- stable/7/sys/vm/swap_pager.cWed Feb  8 07:31:55 2012
(r231189)
+++ stable/7/sys/vm/swap_pager.cWed Feb  8 07:34:03 2012
(r231190)
@@ -2368,7 +2368,7 @@ swapgeom_orphan(struct g_consumer *cp)
mtx_lock(sw_dev_mtx);
TAILQ_FOREACH(sp, swtailq, sw_list)
if (sp-sw_id == cp)
-   sp-sw_id = NULL;
+   sp-sw_flags |= SW_CLOSING;
mtx_unlock(sw_dev_mtx);
 }
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org