CVS commit: src/sys/dev/usb
Module Name:src Committed By: nonaka Date: Sun Feb 16 08:17:43 UTC 2014 Modified Files: src/sys/dev/usb: if_urtwn.c Log Message: Use INFRA not ADHOC when opmode is M_STA. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/dev/usb/if_urtwn.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/if_urtwn.c diff -u src/sys/dev/usb/if_urtwn.c:1.26 src/sys/dev/usb/if_urtwn.c:1.27 --- src/sys/dev/usb/if_urtwn.c:1.26 Fri Feb 14 04:17:41 2014 +++ src/sys/dev/usb/if_urtwn.c Sun Feb 16 08:17:43 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: if_urtwn.c,v 1.26 2014/02/14 04:17:41 christos Exp $ */ +/* $NetBSD: if_urtwn.c,v 1.27 2014/02/16 08:17:43 nonaka Exp $ */ /* $OpenBSD: if_urtwn.c,v 1.20 2011/11/26 06:39:33 ckuethe Exp $ */ /*- @@ -22,7 +22,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_urtwn.c,v 1.26 2014/02/14 04:17:41 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: if_urtwn.c,v 1.27 2014/02/16 08:17:43 nonaka Exp $); #ifdef _KERNEL_OPT #include opt_inet.h @@ -1768,7 +1768,9 @@ urtwn_newstate_cb(struct urtwn_softc *sc /* Enable TSF synchronization. */ urtwn_tsf_sync_enable(sc); - /*FALLTHROUGH*/ + +msr |= R92C_MSR_INFRA; + break; default: msr |= R92C_MSR_ADHOC; break; @@ -1786,6 +1788,7 @@ urtwn_newstate_cb(struct urtwn_softc *sc urtwn_write_4(sc, R92C_TCR, reg); reg |= 0x01; urtwn_write_4(sc, R92C_TCR, reg); + msr |= R92C_MSR_AP; break; }
CVS commit: src/sys/dev/usb
Module Name:src Committed By: nonaka Date: Sun Feb 16 08:18:28 UTC 2014 Modified Files: src/sys/dev/usb: if_urtwnreg.h Log Message: Remove duplicated comment. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/usb/if_urtwnreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/if_urtwnreg.h diff -u src/sys/dev/usb/if_urtwnreg.h:1.4 src/sys/dev/usb/if_urtwnreg.h:1.5 --- src/sys/dev/usb/if_urtwnreg.h:1.4 Fri Feb 14 04:17:41 2014 +++ src/sys/dev/usb/if_urtwnreg.h Sun Feb 16 08:18:28 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: if_urtwnreg.h,v 1.4 2014/02/14 04:17:41 christos Exp $ */ +/* $NetBSD: if_urtwnreg.h,v 1.5 2014/02/16 08:18:28 nonaka Exp $ */ /* $OpenBSD: if_urtwnreg.h,v 1.3 2010/11/16 18:02:59 damien Exp $ */ /*- @@ -391,7 +391,6 @@ #define R92C_MSR_INFRA 0x02 #define R92C_MSR_AP 0x03 - /* Bits for R92C_PBP. */ /* Bits for R92C_PBP. */ #define R92C_PBP_PSRX_M 0x0f #define R92C_PBP_PSRX_S 0
CVS commit: src/sys/fs/union
Module Name:src Committed By: hannken Date: Sun Feb 16 09:50:25 UTC 2014 Modified Files: src/sys/fs/union: union_subr.c union_vfsops.c union_vnops.c Log Message: Change union_allocvp() to take an unlocked uppervp and to return the union node unlocked. Another VI_XLOCK hack is gone. To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.63 src/sys/fs/union/union_subr.c cvs rdiff -u -r1.68 -r1.69 src/sys/fs/union/union_vfsops.c cvs rdiff -u -r1.55 -r1.56 src/sys/fs/union/union_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/fs/union/union_subr.c diff -u src/sys/fs/union/union_subr.c:1.62 src/sys/fs/union/union_subr.c:1.63 --- src/sys/fs/union/union_subr.c:1.62 Fri Feb 14 08:50:27 2014 +++ src/sys/fs/union/union_subr.c Sun Feb 16 09:50:25 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: union_subr.c,v 1.62 2014/02/14 08:50:27 hannken Exp $ */ +/* $NetBSD: union_subr.c,v 1.63 2014/02/16 09:50:25 hannken Exp $ */ /* * Copyright (c) 1994 @@ -72,7 +72,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: union_subr.c,v 1.62 2014/02/14 08:50:27 hannken Exp $); +__KERNEL_RCSID(0, $NetBSD: union_subr.c,v 1.63 2014/02/16 09:50:25 hannken Exp $); #include sys/param.h #include sys/systm.h @@ -291,7 +291,7 @@ union_newsize(struct vnode *vp, off_t up /* * allocate a union_node/vnode pair. the vnode is - * referenced and locked. the new vnode is returned + * referenced and unlocked. the new vnode is returned * via (vpp). (mp) is the mountpoint of the union filesystem, * (dvp) is the parent directory where the upper layer object * should exist (but doesn't) and (cnp) is the componentname @@ -299,7 +299,7 @@ union_newsize(struct vnode *vp, off_t up * layer object to be created at a later time. (uppervp) * and (lowervp) reference the upper and lower layer objects * being mapped. either, but not both, can be nil. - * if supplied, (uppervp) is locked. + * both, if supplied, are unlocked. * the reference is either maintained in the new union_node * object which is allocated, or they are vrele'd. * @@ -339,11 +339,11 @@ union_allocvp( voff_t uppersz, lowersz; dev_t rdev; u_long hash[3]; - int vflag, iflag, lflag; + int vflag, iflag; int try; + bool is_dotdot; - if (uppervp) - KASSERT(VOP_ISLOCKED(uppervp) == LK_EXCLUSIVE); + is_dotdot = (dvp != NULL cnp != NULL (cnp-cn_flags ISDOTDOT)); if (uppervp == NULLVP lowervp == NULLVP) panic(union: unidentifiable allocation); @@ -396,28 +396,10 @@ loop: UNIONTOV(un)-v_mount != mp) continue; - if (uppervp != NULL - (uppervp == dvp || uppervp == un-un_uppervp)) -/* . or already locked. */ -lflag = 0; - else -lflag = LK_EXCLUSIVE; vp = UNIONTOV(un); mutex_enter(vp-v_interlock); - /* - * If this node being cleaned out and our caller - * holds a lock, then ignore it and continue. To - * allow the cleaning to succeed the current thread - * must make progress. For a brief time the cache - * may contain more than one vnode referring to - * a lower node. - */ - if ((vp-v_iflag VI_XLOCK) != 0 lflag == 0) { -mutex_exit(vp-v_interlock); -continue; - } mutex_exit(uhash_lock); - if (vget(vp, lflag)) + if (vget(vp, 0)) goto loop; goto found; } @@ -427,9 +409,13 @@ loop: found: if (un) { - KASSERT(VOP_ISLOCKED(UNIONTOV(un)) == LK_EXCLUSIVE); - KASSERT(uppervp == NULL || - VOP_ISLOCKED(uppervp) == LK_EXCLUSIVE); + if (uppervp != dvp) { + if (is_dotdot) +VOP_UNLOCK(dvp); + vn_lock(UNIONTOV(un), LK_EXCLUSIVE | LK_RETRY); + if (is_dotdot) +vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY); + } /* * Save information about the upper layer. */ @@ -460,19 +446,23 @@ found: vrele(lowervp); } *vpp = UNIONTOV(un); + if (uppervp != dvp) + VOP_UNLOCK(*vpp); return (0); } uppersz = lowersz = VNOVAL; - if (uppervp != NULLVP) + if (uppervp != NULLVP) { + vn_lock(uppervp, LK_SHARED | LK_RETRY); if (VOP_GETATTR(uppervp, va, FSCRED) == 0) uppersz = va.va_size; + VOP_UNLOCK(uppervp); + } if (lowervp != NULLVP) { vn_lock(lowervp, LK_SHARED | LK_RETRY); - error = VOP_GETATTR(lowervp, va, FSCRED); - VOP_UNLOCK(lowervp); - if (error == 0) + if (VOP_GETATTR(lowervp, va, FSCRED) == 0) lowersz = va.va_size; + VOP_UNLOCK(lowervp); } /* @@ -483,12 +473,8 @@ found: error = getnewvnode(VT_UNION, mp, union_vnodeop_p, svp-v_interlock, vpp); if (error) { - if (uppervp) { - if (dvp == uppervp) -vrele(uppervp); - else -vput(uppervp); - } + if (uppervp) + vrele(uppervp); if (lowervp) vrele(lowervp); @@ -501,17 +487,6 @@ found: if (un1-un_lowervp == lowervp un1-un_uppervp == uppervp UNIONTOV(un1)-v_mount == mp) { -vp = UNIONTOV(un1); -mutex_enter(vp-v_interlock); -/* - * Ignore nodes being cleaned
CVS commit: src/tools/gcc
Module Name:src Committed By: skrll Date: Sun Feb 16 11:26:31 UTC 2014 Modified Files: src/tools/gcc: Makefile mknative-gcc Log Message: The mpfr sources moved down into a src directory - deal with this in mknative. To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 src/tools/gcc/Makefile cvs rdiff -u -r1.74 -r1.75 src/tools/gcc/mknative-gcc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/gcc/Makefile diff -u src/tools/gcc/Makefile:1.61 src/tools/gcc/Makefile:1.62 --- src/tools/gcc/Makefile:1.61 Thu Nov 28 12:08:57 2013 +++ src/tools/gcc/Makefile Sun Feb 16 11:26:31 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.61 2013/11/28 12:08:57 mrg Exp $ +# $NetBSD: Makefile,v 1.62 2014/02/16 11:26:31 skrll Exp $ .include bsd.own.mk @@ -142,7 +142,7 @@ NATIVE_CONFIGURE_ARGS+= \ --with-mpfr-lib=${MPFROBJ} \ --with-gmp-lib=${GMPOBJ} \ --with-mpc-include=${MPC}/dist/src \ - --with-mpfr-include=${MPFR}/dist \ + --with-mpfr-include=${MPFR}/dist/src \ --with-gmp-include=${GMP}/lib/libgmp/arch/${MACHINE_ARCH} . if ${MACHINE_ARCH} != vax Index: src/tools/gcc/mknative-gcc diff -u src/tools/gcc/mknative-gcc:1.74 src/tools/gcc/mknative-gcc:1.75 --- src/tools/gcc/mknative-gcc:1.74 Thu Nov 28 12:08:57 2013 +++ src/tools/gcc/mknative-gcc Sun Feb 16 11:26:31 2014 @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: mknative-gcc,v 1.74 2013/11/28 12:08:57 mrg Exp $ +# $NetBSD: mknative-gcc,v 1.75 2014/02/16 11:26:31 skrll Exp $ # # Shell script for generating all the constants needed for a native # platform build of gcc. @@ -30,7 +30,7 @@ _OUTDIRBASE=gnu sanitise_includes () { sed \ -e s,-I$_DESTDIR/usr/include,,g \ - -e s,-I$_SRC/external/lgpl3/mpfr/dist,,g \ + -e s,-I$_SRC/external/lgpl3/mpfr/dist/src,,g \ -e s,-I$_SRC/external/lgpl3/mpc/dist/src,,g \ -e s,-I$_SRC/external/lgpl3/gmp/lib/libgmp/arch/$MACHINE_ARCH,,g \ -e s,-I/usr/include/[^ ]*,,
CVS commit: src/sys/fs/tmpfs
Module Name:src Committed By: maxv Date: Sun Feb 16 12:54:07 UTC 2014 Modified Files: src/sys/fs/tmpfs: tmpfs_vnops.c Log Message: Fix tmpfs_read()'s return value; it should return EINVAL. Now consistent with tmpfs_write(). ok christos@ To generate a diff of this commit: cvs rdiff -u -r1.115 -r1.116 src/sys/fs/tmpfs/tmpfs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/fs/tmpfs/tmpfs_vnops.c diff -u src/sys/fs/tmpfs/tmpfs_vnops.c:1.115 src/sys/fs/tmpfs/tmpfs_vnops.c:1.116 --- src/sys/fs/tmpfs/tmpfs_vnops.c:1.115 Fri Feb 7 15:29:22 2014 +++ src/sys/fs/tmpfs/tmpfs_vnops.c Sun Feb 16 12:54:07 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: tmpfs_vnops.c,v 1.115 2014/02/07 15:29:22 hannken Exp $ */ +/* $NetBSD: tmpfs_vnops.c,v 1.116 2014/02/16 12:54:07 maxv Exp $ */ /* * Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tmpfs_vnops.c,v 1.115 2014/02/07 15:29:22 hannken Exp $); +__KERNEL_RCSID(0, $NetBSD: tmpfs_vnops.c,v 1.116 2014/02/16 12:54:07 maxv Exp $); #include sys/param.h #include sys/dirent.h @@ -534,10 +534,7 @@ tmpfs_read(void *v) KASSERT(VOP_ISLOCKED(vp)); - if (vp-v_type != VREG) { - return EISDIR; - } - if (uio-uio_offset 0) { + if (uio-uio_offset 0 || vp-v_type != VREG) { return EINVAL; }
CVS commit: src/sys/dev/usb
Module Name:src Committed By: christos Date: Sun Feb 16 16:10:27 UTC 2014 Modified Files: src/sys/dev/usb: if_urtwn.c Log Message: whitespace police To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/dev/usb/if_urtwn.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/if_urtwn.c diff -u src/sys/dev/usb/if_urtwn.c:1.27 src/sys/dev/usb/if_urtwn.c:1.28 --- src/sys/dev/usb/if_urtwn.c:1.27 Sun Feb 16 03:17:43 2014 +++ src/sys/dev/usb/if_urtwn.c Sun Feb 16 11:10:27 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: if_urtwn.c,v 1.27 2014/02/16 08:17:43 nonaka Exp $ */ +/* $NetBSD: if_urtwn.c,v 1.28 2014/02/16 16:10:27 christos Exp $ */ /* $OpenBSD: if_urtwn.c,v 1.20 2011/11/26 06:39:33 ckuethe Exp $ */ /*- @@ -22,7 +22,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_urtwn.c,v 1.27 2014/02/16 08:17:43 nonaka Exp $); +__KERNEL_RCSID(0, $NetBSD: if_urtwn.c,v 1.28 2014/02/16 16:10:27 christos Exp $); #ifdef _KERNEL_OPT #include opt_inet.h @@ -1757,8 +1757,8 @@ urtwn_newstate_cb(struct urtwn_softc *sc /* Set beacon interval. */ urtwn_write_2(sc, R92C_BCN_INTERVAL, ni-ni_intval); -msr = urtwn_read_1(sc, R92C_MSR); -msr = 0xfc; + msr = urtwn_read_1(sc, R92C_MSR); + msr = 0xfc; switch (ic-ic_opmode) { case IEEE80211_M_STA: /* Allow Rx from our BSSID only. */ @@ -1769,30 +1769,30 @@ urtwn_newstate_cb(struct urtwn_softc *sc /* Enable TSF synchronization. */ urtwn_tsf_sync_enable(sc); -msr |= R92C_MSR_INFRA; + msr |= R92C_MSR_INFRA; break; default: -msr |= R92C_MSR_ADHOC; + msr |= R92C_MSR_ADHOC; break; case IEEE80211_M_HOSTAP: -urtwn_write_2(sc, R92C_BCNTCFG, 0x000f); + urtwn_write_2(sc, R92C_BCNTCFG, 0x000f); -/* Allow Rx from any BSSID. */ -urtwn_write_4(sc, R92C_RCR, -urtwn_read_4(sc, R92C_RCR) -~(R92C_RCR_CBSSID_DATA | R92C_RCR_CBSSID_BCN)); - -/* Reset TSF timer to zero. */ -reg = urtwn_read_4(sc, R92C_TCR); -reg = ~0x01; -urtwn_write_4(sc, R92C_TCR, reg); -reg |= 0x01; -urtwn_write_4(sc, R92C_TCR, reg); + /* Allow Rx from any BSSID. */ + urtwn_write_4(sc, R92C_RCR, + urtwn_read_4(sc, R92C_RCR) + ~(R92C_RCR_CBSSID_DATA | R92C_RCR_CBSSID_BCN)); + + /* Reset TSF timer to zero. */ + reg = urtwn_read_4(sc, R92C_TCR); + reg = ~0x01; + urtwn_write_4(sc, R92C_TCR, reg); + reg |= 0x01; + urtwn_write_4(sc, R92C_TCR, reg); -msr |= R92C_MSR_AP; + msr |= R92C_MSR_AP; break; -} -urtwn_write_1(sc, R92C_MSR, msr); + } + urtwn_write_1(sc, R92C_MSR, msr); sifs_time = 10; urtwn_write_1(sc, R92C_SIFS_CCK + 1, sifs_time); @@ -4001,20 +4001,20 @@ urtwn_chip_stop(struct urtwn_softc *sc) reg |= ((reg 8) 0xff00) | 0x00ff; urtwn_write_4(sc, R92C_GPIO_PIN_CTRL, reg); -/* Disable GPIO[10:8] */ -urtwn_write_1(sc, R92C_GPIO_MUXCFG + 3, 0x00); + /* Disable GPIO[10:8] */ + urtwn_write_1(sc, R92C_GPIO_MUXCFG + 3, 0x00); reg = urtwn_read_2(sc, R92C_GPIO_MUXCFG + 2) ~0x00f0; -reg |= (((reg 0x000f) 4) | 0x0780); -urtwn_write_2(sc, R92C_GPIO_PIN_CTRL+2, reg); + reg |= (((reg 0x000f) 4) | 0x0780); + urtwn_write_2(sc, R92C_GPIO_PIN_CTRL+2, reg); /* Disable LED0 1 */ -urtwn_write_2(sc, R92C_LEDCFG0, 0x8080); + urtwn_write_2(sc, R92C_LEDCFG0, 0x8080); /* * Reset digital sequence */ -if (disabled) { + if (disabled) { /* Disable ELDR clock */ urtwn_write_2(sc, R92C_SYS_CLKR, 0x70A3); /* Isolated ELDR to PON */ @@ -4024,14 +4024,14 @@ urtwn_chip_stop(struct urtwn_softc *sc) /* * Disable analog sequence */ -if (disabled) { + if (disabled) { /* Disable A15 power */ -urtwn_write_1(sc, R92C_LDOA15_CTRL, 0x04); + urtwn_write_1(sc, R92C_LDOA15_CTRL, 0x04); /* Disable digital core power */ -urtwn_write_1(sc, R92C_LDOV12D_CTRL, -urtwn_read_1(sc, R92C_LDOV12D_CTRL) + urtwn_write_1(sc, R92C_LDOV12D_CTRL, + urtwn_read_1(sc, R92C_LDOV12D_CTRL) ~R92C_LDOV12D_CTRL_LDV12_EN); -} + } /* Enter PFM mode */ urtwn_write_1(sc, R92C_SPS0_CTRL, 0x23);
CVS commit: src/sys/dev/usb
Module Name:src Committed By: christos Date: Sun Feb 16 16:13:37 UTC 2014 Modified Files: src/sys/dev/usb: if_urtwn.c if_urtwnreg.h Log Message: move default last, add symbolic mask. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/dev/usb/if_urtwn.c cvs rdiff -u -r1.5 -r1.6 src/sys/dev/usb/if_urtwnreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/if_urtwn.c diff -u src/sys/dev/usb/if_urtwn.c:1.28 src/sys/dev/usb/if_urtwn.c:1.29 --- src/sys/dev/usb/if_urtwn.c:1.28 Sun Feb 16 11:10:27 2014 +++ src/sys/dev/usb/if_urtwn.c Sun Feb 16 11:13:37 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: if_urtwn.c,v 1.28 2014/02/16 16:10:27 christos Exp $ */ +/* $NetBSD: if_urtwn.c,v 1.29 2014/02/16 16:13:37 christos Exp $ */ /* $OpenBSD: if_urtwn.c,v 1.20 2011/11/26 06:39:33 ckuethe Exp $ */ /*- @@ -22,7 +22,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_urtwn.c,v 1.28 2014/02/16 16:10:27 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: if_urtwn.c,v 1.29 2014/02/16 16:13:37 christos Exp $); #ifdef _KERNEL_OPT #include opt_inet.h @@ -1758,7 +1758,7 @@ urtwn_newstate_cb(struct urtwn_softc *sc urtwn_write_2(sc, R92C_BCN_INTERVAL, ni-ni_intval); msr = urtwn_read_1(sc, R92C_MSR); - msr = 0xfc; + msr = R92C_MSR_MASK; switch (ic-ic_opmode) { case IEEE80211_M_STA: /* Allow Rx from our BSSID only. */ @@ -1771,9 +1771,6 @@ urtwn_newstate_cb(struct urtwn_softc *sc msr |= R92C_MSR_INFRA; break; - default: - msr |= R92C_MSR_ADHOC; - break; case IEEE80211_M_HOSTAP: urtwn_write_2(sc, R92C_BCNTCFG, 0x000f); @@ -1791,6 +1788,9 @@ urtwn_newstate_cb(struct urtwn_softc *sc msr |= R92C_MSR_AP; break; + default: + msr |= R92C_MSR_ADHOC; + break; } urtwn_write_1(sc, R92C_MSR, msr); Index: src/sys/dev/usb/if_urtwnreg.h diff -u src/sys/dev/usb/if_urtwnreg.h:1.5 src/sys/dev/usb/if_urtwnreg.h:1.6 --- src/sys/dev/usb/if_urtwnreg.h:1.5 Sun Feb 16 03:18:28 2014 +++ src/sys/dev/usb/if_urtwnreg.h Sun Feb 16 11:13:37 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: if_urtwnreg.h,v 1.5 2014/02/16 08:18:28 nonaka Exp $ */ +/* $NetBSD: if_urtwnreg.h,v 1.6 2014/02/16 16:13:37 christos Exp $ */ /* $OpenBSD: if_urtwnreg.h,v 1.3 2010/11/16 18:02:59 damien Exp $ */ /*- @@ -390,6 +390,7 @@ #define R92C_MSR_ADHOC 0x01 #define R92C_MSR_INFRA 0x02 #define R92C_MSR_AP 0x03 +#define R92C_MSR_MASK (~R92C_MSR_AP) /* Bits for R92C_PBP. */ #define R92C_PBP_PSRX_M 0x0f
CVS commit: src/sys/kern
Module Name:src Committed By: maxv Date: Sun Feb 16 17:46:36 UTC 2014 Modified Files: src/sys/kern: exec_elf.c Log Message: Small cleanup: - make elf_load_file() and elf_load_psection() static - make loops consistent - 'nload' is not used - see rev1.24 - 'ap' is not used in elf_load_file() ok agc@ christos@ To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/sys/kern/exec_elf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/exec_elf.c diff -u src/sys/kern/exec_elf.c:1.57 src/sys/kern/exec_elf.c:1.58 --- src/sys/kern/exec_elf.c:1.57 Sat Feb 15 17:39:03 2014 +++ src/sys/kern/exec_elf.c Sun Feb 16 17:46:36 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: exec_elf.c,v 1.57 2014/02/15 17:39:03 christos Exp $ */ +/* $NetBSD: exec_elf.c,v 1.58 2014/02/16 17:46:36 maxv Exp $ */ /*- * Copyright (c) 1994, 2000, 2005 The NetBSD Foundation, Inc. @@ -57,7 +57,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: exec_elf.c,v 1.57 2014/02/15 17:39:03 christos Exp $); +__KERNEL_RCSID(1, $NetBSD: exec_elf.c,v 1.58 2014/02/16 17:46:36 maxv Exp $); #ifdef _KERNEL_OPT #include opt_pax.h @@ -98,10 +98,12 @@ extern struct emul emul_netbsd; #define coredump ELFNAMEEND(coredump) #define elf_free_emul_arg ELFNAME(free_emul_arg) -int elf_load_file(struct lwp *, struct exec_package *, char *, - struct exec_vmcmd_set *, u_long *, struct elf_args *, Elf_Addr *); -void elf_load_psection(struct exec_vmcmd_set *, struct vnode *, - const Elf_Phdr *, Elf_Addr *, u_long *, int *, int); +static int +elf_load_file(struct lwp *, struct exec_package *, char *, +struct exec_vmcmd_set *, u_long *, Elf_Addr *); +static void +elf_load_psection(struct exec_vmcmd_set *, struct vnode *, const Elf_Phdr *, +Elf_Addr *, u_long *, int *, int); int netbsd_elf_signature(struct lwp *, struct exec_package *, Elf_Ehdr *); int netbsd_elf_probe(struct lwp *, struct exec_package *, void *, char *, @@ -312,7 +314,7 @@ elf_check_header(Elf_Ehdr *eh) * * Load a psection at the appropriate address */ -void +static void elf_load_psection(struct exec_vmcmd_set *vcset, struct vnode *vp, const Elf_Phdr *ph, Elf_Addr *addr, u_long *size, int *prot, int flags) { @@ -398,17 +400,15 @@ elf_load_psection(struct exec_vmcmd_set * [stolen from coff_load_shlib()]. Made slightly generic * so it might be used externally. */ -int +static int elf_load_file(struct lwp *l, struct exec_package *epp, char *path, -struct exec_vmcmd_set *vcset, u_long *entryoff, struct elf_args *ap, -Elf_Addr *last) +struct exec_vmcmd_set *vcset, u_long *entryoff, Elf_Addr *last) { int error, i; struct vnode *vp; struct vattr attr; Elf_Ehdr eh; Elf_Phdr *ph = NULL; - const Elf_Phdr *ph0; const Elf_Phdr *base_ph; const Elf_Phdr *last_ph; u_long phsize; @@ -524,12 +524,11 @@ elf_load_file(struct lwp *l, struct exec * Find the start and ending addresses of the psections to * be loaded. This will give us the size. */ - for (i = 0, ph0 = ph, base_ph = NULL; i eh.e_phnum; - i++, ph0++) { - if (ph0-p_type == PT_LOAD) { -u_long psize = ph0-p_vaddr + ph0-p_memsz; + for (i = 0, base_ph = NULL; i eh.e_phnum; i++) { + if (ph[i].p_type == PT_LOAD) { +u_long psize = ph[i].p_vaddr + ph[i].p_memsz; if (base_ph == NULL) - base_ph = ph0; + base_ph = ph[i]; if (psize limit) limit = psize; } @@ -552,9 +551,8 @@ elf_load_file(struct lwp *l, struct exec /* * Load all the necessary sections */ - for (i = 0, ph0 = ph, base_ph = NULL, last_ph = NULL; - i eh.e_phnum; i++, ph0++) { - switch (ph0-p_type) { + for (i = 0, base_ph = NULL, last_ph = NULL; i eh.e_phnum; i++) { + switch (ph[i].p_type) { case PT_LOAD: { u_long size; int prot = 0; @@ -567,18 +565,18 @@ elf_load_file(struct lwp *l, struct exec * properly (align down for topdown and align * upwards for not topdown). */ -base_ph = ph0; +base_ph = ph[i]; flags = VMCMD_BASE; if (addr == ELF_LINK_ADDR) - addr = ph0-p_vaddr; + addr = ph[i].p_vaddr; if (use_topdown) - addr = ELF_TRUNC(addr, ph0-p_align); + addr = ELF_TRUNC(addr, ph[i].p_align); else - addr = ELF_ROUND(addr, ph0-p_align); + addr = ELF_ROUND(addr, ph[i].p_align); } else { u_long limit = round_page(last_ph-p_vaddr + last_ph-p_memsz); -u_long base = trunc_page(ph0-p_vaddr); +u_long base = trunc_page(ph[i].p_vaddr); /* * If there is a gap in between the psections, @@ -592,10 +590,10 @@ elf_load_file(struct lwp *l, struct exec 0, VM_PROT_NONE, VMCMD_RELATIVE); } -addr = ph0-p_vaddr - base_ph-p_vaddr; +addr = ph[i].p_vaddr - base_ph-p_vaddr; flags = VMCMD_RELATIVE; } - last_ph = ph0; + last_ph = ph[i]; elf_load_psection(vcset, vp, ph[i], addr, size,
CVS import: src/external/public-domain/sqlite/dist
Module Name:src Committed By: christos Date: Sun Feb 16 18:04:40 UTC 2014 Update of /cvsroot/src/external/public-domain/sqlite/dist In directory ivanova.netbsd.org:/tmp/cvs-serv29002 Log Message: from www.sqlite.org: Changes since 3.6.9: 2014-02-11 - Release 3.8.3.1 SQLite version 3.8.3.1 fixes a bug present in versions 3.8.1, 3.8.2 and 3.8.3 that can cause queries to omit valid out rows. Upgrading from those versions is recommended. The problem only comes up if SQLite is compiled with either the SQLITE_ENABLE_STAT3 or SQLITE_ENABLE_STAT4 compile-time options. In that case, if a query has a WHERE clause that contains expressions like this: WHERE (expr1 OR expr2 OR ... OR exprN) AND column IS NOT NULL Where all of expr1 through exprN are suitable for use by indexes, then during query planning SQLite might mistakenly converted the column IS NOT NULL term into columnNULL. But the latter term is never true, and so the query would return no rows. The trouble ticket for this bug is [4c86b126f2]. It is recommended that all users upgrade to avoid this problem. 2014-02-03 - Release 3.8.3 SQLite version 3.8.3 is a regularly scheduled maintenance release. Upgrading from the previous release is optional. The most visible change in version 3.8.3 is the addition of support for common table expressions. It is now possible to write a single SELECT statement that will query a tree or graph, using either a depth-first or a breadth-first search. A single SQLite query will even solve Sudoku puzzles or compute the Mandelbrot set. As part of this change, SQLite now accepts a VALUES clause anyplace that a SELECT statement is valid. This release also includes many small performance enhancements which should give a small speed boost to legacy applications. And there are other minor enhancements such as the addition of the printf() SQL function. See the change log for details. 2013-12-06 - Release 3.8.2 SQLite version 3.8.2 is a regularly scheduled maintenance release. Upgrading from the previous release is optional. Version 3.8.2 adds support for WITHOUT ROWID tables. This is a significant extension to SQLite. Database files that contain WITHOUT ROWID tables are not readable or writable by prior versions of SQLite, however databases that do not use WITHOUT ROWID tables are fully backwards and forwards compatible. The 3.8.2 release contains a potentially incompatible change. In all prior versions of SQLite, a cast from a very large positive floating point number into an integer resulted in the most negative integer. In other words, CAST(+99.9e99 to INT) would yield -9223372036854775808. This behavior came about because it is what x86/x64 hardware does for the equivalent cast in the C language. But the behavior is bizarre. And so it has been changed effective with this release so that a cast from a floating point number into an integer returns the integer between the floating point value and zero that is closest to the floating point value. Hence, CAST(+99.9e99 to INT) now returns +9223372036854775807. Since routines like sqlite3_column_int64() do an implicit cast if the value being accessed is really a floating point number, they are also affected by this change. Besides the two changes mentioned above, the 3.8.2 release also includes a number of performance enhancements. The skip-scan optimization is now available for databases that have been processed by ANALYZE. Constant SQL functions are now factored out of inner loops, which can result in a significant speedup for queries that contain WHERE clause terms like datedatetime('now','-2 days'). And various high-runner internal routines have been refactored for reduced CPU load. 2013-10-17 - Release 3.8.1 SQLite version 3.8.1 is a regularly scheduled maintenance release. Upgrading from the previous release is optional, though you should upgrade if you are using partial indices as there was a bug related to partial indices in the previous release that could result in an incorrect answer for count(*) queries. The next generation query planner that was premiered in the previous release continues to work well. The new query planner has been tweaked slightly in the current release to help it make better decisions in some cases, but is largely unchanged. Two new SQL functions, likelihood() and unlikely(), have been added to allow developers to give hints to the query planner without forcing the query planner into a particular decision. Version 3.8.1 is the first SQLite release to take into account the estimated size of table and index rows when choosing a query plan. Row size estimates are based on the declared datatypes of columns. For example, a column of type VARCHAR(1000) is assumed to use much more space than a column of type INT. The datatype-based row size estimate can be overridden by appending a term of the form sz=NNN (where NNN is the average row size in bytes) to the end of the
CVS commit: src/external/public-domain/sqlite/dist
Module Name:src Committed By: christos Date: Sun Feb 16 18:09:44 UTC 2014 Modified Files: src/external/public-domain/sqlite/dist: sqlite3.c Log Message: merge conflicts. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/external/public-domain/sqlite/dist/sqlite3.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. diffs are larger than 1MB and have been omitted
CVS commit: src/external/public-domain/sqlite/lib
Module Name:src Committed By: christos Date: Sun Feb 16 18:16:35 UTC 2014 Modified Files: src/external/public-domain/sqlite/lib: shlib_version Log Message: bump To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/public-domain/sqlite/lib/shlib_version Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/public-domain/sqlite/lib/shlib_version diff -u src/external/public-domain/sqlite/lib/shlib_version:1.2 src/external/public-domain/sqlite/lib/shlib_version:1.3 --- src/external/public-domain/sqlite/lib/shlib_version:1.2 Sun Jan 29 18:29:01 2012 +++ src/external/public-domain/sqlite/lib/shlib_version Sun Feb 16 13:16:35 2014 @@ -1,4 +1,4 @@ -# $NetBSD: shlib_version,v 1.2 2012/01/29 23:29:01 joerg Exp $ +# $NetBSD: shlib_version,v 1.3 2014/02/16 18:16:35 christos Exp $ # major=1 -minor=1 +minor=2
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: christos Date: Sun Feb 16 18:19:10 UTC 2014 Modified Files: src/distrib/sets/lists/base: ad.arm ad.mips md.amd64 md.sparc64 shl.mi src/distrib/sets/lists/debug: ad.arm ad.mips md.amd64 md.sparc64 shl.mi Log Message: bump sqlite3 To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/distrib/sets/lists/base/ad.arm cvs rdiff -u -r1.30 -r1.31 src/distrib/sets/lists/base/ad.mips cvs rdiff -u -r1.224 -r1.225 src/distrib/sets/lists/base/md.amd64 cvs rdiff -u -r1.211 -r1.212 src/distrib/sets/lists/base/md.sparc64 cvs rdiff -u -r1.689 -r1.690 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.25 -r1.26 src/distrib/sets/lists/debug/ad.arm cvs rdiff -u -r1.21 -r1.22 src/distrib/sets/lists/debug/ad.mips cvs rdiff -u -r1.43 -r1.44 src/distrib/sets/lists/debug/md.amd64 \ src/distrib/sets/lists/debug/md.sparc64 cvs rdiff -u -r1.50 -r1.51 src/distrib/sets/lists/debug/shl.mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/ad.arm diff -u src/distrib/sets/lists/base/ad.arm:1.34 src/distrib/sets/lists/base/ad.arm:1.35 --- src/distrib/sets/lists/base/ad.arm:1.34 Sat Feb 8 14:17:42 2014 +++ src/distrib/sets/lists/base/ad.arm Sun Feb 16 13:19:10 2014 @@ -1,4 +1,4 @@ -# $NetBSD: ad.arm,v 1.34 2014/02/08 19:17:42 jmmv Exp $ +# $NetBSD: ad.arm,v 1.35 2014/02/16 18:19:10 christos Exp $ ./lib/oabi base-compat-shlib compat ./lib/oabi/npf base-npf-shlib compat ./lib/oabi/npf/ext_log.so base-npf-shlib compat,pic @@ -296,7 +296,7 @@ ./usr/lib/oabi/libsl.so.5 base-compat-shlib compat,pic,kerberos ./usr/lib/oabi/libsl.so.5.0 base-compat-shlib compat,pic,kerberos ./usr/lib/oabi/libsqlite3.so.1 base-compat-shlib compat,pic -./usr/lib/oabi/libsqlite3.so.1.1 base-compat-shlib compat,pic +./usr/lib/oabi/libsqlite3.so.1.2 base-compat-shlib compat,pic ./usr/lib/oabi/libss.so.6 base-compat-shlib obsolete ./usr/lib/oabi/libss.so.6.0 base-compat-shlib obsolete ./usr/lib/oabi/libssh.so.22 base-compat-shlib compat,pic,crypto Index: src/distrib/sets/lists/base/ad.mips diff -u src/distrib/sets/lists/base/ad.mips:1.30 src/distrib/sets/lists/base/ad.mips:1.31 --- src/distrib/sets/lists/base/ad.mips:1.30 Sat Feb 8 14:17:42 2014 +++ src/distrib/sets/lists/base/ad.mips Sun Feb 16 13:19:10 2014 @@ -1,4 +1,4 @@ -# $NetBSD: ad.mips,v 1.30 2014/02/08 19:17:42 jmmv Exp $ +# $NetBSD: ad.mips,v 1.31 2014/02/16 18:19:10 christos Exp $ ./lib/64 base-compat-shlib compat,arch64 ./lib/64/npf base-npf-shlib compat,arch64 ./lib/64/npf/ext_log.sobase-npf-shlib compat,pic,arch64 @@ -292,7 +292,7 @@ ./usr/lib/64/libsl.so.5base-compat-shlib compat,pic,kerberos,arch64 ./usr/lib/64/libsl.so.5.0 base-compat-shlib compat,pic,kerberos,arch64 ./usr/lib/64/libsqlite3.so.1 base-compat-shlib compat,pic,arch64 -./usr/lib/64/libsqlite3.so.1.1 base-compat-shlib compat,pic,arch64 +./usr/lib/64/libsqlite3.so.1.2 base-compat-shlib compat,pic,arch64 ./usr/lib/64/libss.so.6base-compat-shlib obsolete,arch64 ./usr/lib/64/libss.so.6.0 base-compat-shlib obsolete,arch64 ./usr/lib/64/libssh.so.22 base-compat-shlib compat,pic,crypto,arch64 @@ -624,7 +624,7 @@ ./usr/lib/o32/libsl.so.5 base-compat-shlib compat,pic,kerberos,arch64 ./usr/lib/o32/libsl.so.5.0 base-compat-shlib compat,pic,kerberos,arch64 ./usr/lib/o32/libsqlite3.so.1 base-compat-shlib compat,pic,arch64 -./usr/lib/o32/libsqlite3.so.1.1 base-compat-shlib compat,pic,arch64 +./usr/lib/o32/libsqlite3.so.1.2 base-compat-shlib compat,pic,arch64 ./usr/lib/o32/libss.so.6 base-compat-shlib obsolete,arch64 ./usr/lib/o32/libss.so.6.0 base-compat-shlib obsolete,arch64 ./usr/lib/o32/libssh.so.22 base-compat-shlib compat,pic,crypto,arch64 Index: src/distrib/sets/lists/base/md.amd64 diff -u src/distrib/sets/lists/base/md.amd64:1.224 src/distrib/sets/lists/base/md.amd64:1.225 --- src/distrib/sets/lists/base/md.amd64:1.224 Sat Feb 8 14:17:42 2014 +++ src/distrib/sets/lists/base/md.amd64 Sun Feb 16 13:19:10 2014 @@ -1,4 +1,4 @@ -# $NetBSD: md.amd64,v 1.224 2014/02/08 19:17:42 jmmv Exp $ +# $NetBSD: md.amd64,v 1.225 2014/02/16 18:19:10 christos Exp $ ./dev/lms0 base-obsolete obsolete ./dev/mms0 base-obsolete obsolete ./lib/i386 base-compat-shlib compat @@ -288,7 +288,7 @@ ./usr/lib/i386/libsl.so.5 base-compat-shlib compat,pic,kerberos ./usr/lib/i386/libsl.so.5.0 base-compat-shlib compat,pic,kerberos ./usr/lib/i386/libsqlite3.so.1 base-compat-shlib compat,pic -./usr/lib/i386/libsqlite3.so.1.1 base-compat-shlib compat,pic +./usr/lib/i386/libsqlite3.so.1.2 base-compat-shlib compat,pic ./usr/lib/i386/libssh.so.22 base-compat-shlib compat,pic ./usr/lib/i386/libssh.so.22.0 base-compat-shlib compat,pic ./usr/lib/i386/libssl.so.10 base-compat-shlib compat,pic Index: src/distrib/sets/lists/base/md.sparc64 diff -u
CVS commit: src/doc
Module Name:src Committed By: christos Date: Sun Feb 16 18:20:54 UTC 2014 Modified Files: src/doc: 3RDPARTY Log Message: new sqlite To generate a diff of this commit: cvs rdiff -u -r1.1091 -r1.1092 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1091 src/doc/3RDPARTY:1.1092 --- src/doc/3RDPARTY:1.1091 Tue Feb 11 11:15:06 2014 +++ src/doc/3RDPARTY Sun Feb 16 13:20:53 2014 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1091 2014/02/11 16:15:06 jmmv Exp $ +# $NetBSD: 3RDPARTY,v 1.1092 2014/02/16 18:20:53 christos Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -1168,16 +1168,15 @@ arithmetic code is unchanged, though, an original. Package: sqlite -Version: pre-3.6.9 snapshot -Current Vers: 3.8.1 +Version: 3.8.3.1 +Current Vers: 3.8.3.1 Maintainer: Richard Hipp d...@sqlite.org Home Page: http://www.sqlite.org Responsible: joerg License: Public domain Location: external/public-domain/sqlite/dist Notes: -Initial import uses a pre-release with a number of bug fixes to avoid -unnecessary local changes. +Run cleantags before inporting because sqlite3.c has an RCSID Package: tcpdump Version: 4.5.1
CVS commit: src/doc
Module Name:src Committed By: christos Date: Sun Feb 16 18:21:25 UTC 2014 Modified Files: src/doc: CHANGES Log Message: new sqlite3 To generate a diff of this commit: cvs rdiff -u -r1.1888 -r1.1889 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.1888 src/doc/CHANGES:1.1889 --- src/doc/CHANGES:1.1888 Thu Feb 13 21:07:49 2014 +++ src/doc/CHANGES Sun Feb 16 13:21:25 2014 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1888 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1889 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -351,3 +351,4 @@ Changes from NetBSD 6.0 to NetBSD 7.0: atf(7): Import atf 0.20. [jmmv 20140211] npf: Added support for IPv6-to-IPv6 Network Prefix Translation (NPTv6), as per RFC 6296. [rmind 20140213] + sqlite3: Import 3.8.3.1 [christos 20140216]
CVS commit: src/sys/net/npf
Module Name:src Committed By: rmind Date: Sun Feb 16 22:10:40 UTC 2014 Modified Files: src/sys/net/npf: npf_alg.c npf_alg_icmp.c npf_impl.h Log Message: NPF: pass ALG functions via npfa_funcs_t structure. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/net/npf/npf_alg.c cvs rdiff -u -r1.18 -r1.19 src/sys/net/npf/npf_alg_icmp.c cvs rdiff -u -r1.47 -r1.48 src/sys/net/npf/npf_impl.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/npf/npf_alg.c diff -u src/sys/net/npf/npf_alg.c:1.10 src/sys/net/npf/npf_alg.c:1.11 --- src/sys/net/npf/npf_alg.c:1.10 Fri Dec 6 01:33:37 2013 +++ src/sys/net/npf/npf_alg.c Sun Feb 16 22:10:40 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: npf_alg.c,v 1.10 2013/12/06 01:33:37 rmind Exp $ */ +/* $NetBSD: npf_alg.c,v 1.11 2014/02/16 22:10:40 rmind Exp $ */ /*- * Copyright (c) 2010-2013 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: npf_alg.c,v 1.10 2013/12/06 01:33:37 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: npf_alg.c,v 1.11 2014/02/16 22:10:40 rmind Exp $); #include sys/param.h #include sys/types.h @@ -63,10 +63,8 @@ static pserialize_t alg_psz __cachelin static npf_alg_t alg_list[NPF_MAX_ALGS] __read_mostly; static u_int alg_count __read_mostly; -/* Session, matching and translation functions. */ -static npf_alg_sfunc_t alg_sfunc[NPF_MAX_ALGS] __read_mostly; -static npf_alg_func_t alg_mfunc[NPF_MAX_ALGS] __read_mostly; -static npf_alg_func_t alg_tfunc[NPF_MAX_ALGS] __read_mostly; +/* Matching, inspection and translation functions. */ +static npfa_funcs_t alg_funcs[NPF_MAX_ALGS] __read_mostly; static const char alg_prefix[] = npf_alg_; #define NPF_EXT_PREFLEN (sizeof(alg_prefix) - 1) @@ -75,12 +73,9 @@ void npf_alg_sysinit(void) { alg_psz = pserialize_create(); - memset(alg_list, 0, sizeof(alg_list)); + memset(alg_list, 0, sizeof(alg_list)); + memset(alg_funcs, 0, sizeof(alg_funcs)); alg_count = 0; - - memset(alg_mfunc, 0, sizeof(alg_mfunc)); - memset(alg_tfunc, 0, sizeof(alg_tfunc)); - memset(alg_sfunc, 0, sizeof(alg_sfunc)); } void @@ -129,8 +124,7 @@ npf_alg_construct(const char *name) * npf_alg_register: register application-level gateway. */ npf_alg_t * -npf_alg_register(const char *name, npf_alg_func_t mfunc, npf_alg_func_t tfunc, -npf_alg_sfunc_t sfunc) +npf_alg_register(const char *name, const npfa_funcs_t *funcs) { npf_alg_t *alg; u_int i; @@ -158,12 +152,13 @@ npf_alg_register(const char *name, npf_a alg-na_slot = i; /* Assign the functions. */ - alg_mfunc[i] = mfunc; - alg_tfunc[i] = tfunc; - alg_sfunc[i] = sfunc; + alg_funcs[i].match = funcs-match; + alg_funcs[i].translate = funcs-translate; + alg_funcs[i].inspect = funcs-inspect; alg_count = MAX(alg_count, i + 1); npf_config_exit(); + return alg; } @@ -177,9 +172,9 @@ npf_alg_unregister(npf_alg_t *alg) /* Deactivate the functions first. */ npf_config_enter(); - alg_mfunc[i] = NULL; - alg_tfunc[i] = NULL; - alg_sfunc[i] = NULL; + alg_funcs[i].match = NULL; + alg_funcs[i].translate = NULL; + alg_funcs[i].inspect = NULL; pserialize_perform(alg_psz); /* Finally, unregister the ALG. */ @@ -201,9 +196,9 @@ npf_alg_match(npf_cache_t *npc, nbuf_t * s = pserialize_read_enter(); for (u_int i = 0; i alg_count; i++) { - npf_alg_func_t func = alg_mfunc[i]; + const npfa_funcs_t *f = alg_funcs[i]; - if (func func(npc, nbuf, nt, di)) { + if (f-match f-match(npc, nbuf, nt, di)) { match = true; break; } @@ -222,10 +217,10 @@ npf_alg_exec(npf_cache_t *npc, nbuf_t *n s = pserialize_read_enter(); for (u_int i = 0; i alg_count; i++) { - npf_alg_func_t func; + const npfa_funcs_t *f = alg_funcs[i]; - if ((func = alg_tfunc[i]) != NULL) { - func(npc, nbuf, nt, (int)forw); + if (f-translate) { + f-translate(npc, nbuf, nt, forw); } } pserialize_read_exit(s); @@ -239,11 +234,12 @@ npf_alg_session(npf_cache_t *npc, nbuf_t s = pserialize_read_enter(); for (u_int i = 0; i alg_count; i++) { - npf_alg_sfunc_t func = alg_sfunc[i]; + const npfa_funcs_t *f = alg_funcs[i]; - if (func (se = func(npc, nbuf, di)) != NULL) { + if (f-inspect) + continue; + if ((se = f-inspect(npc, nbuf, di)) != NULL) break; - } } pserialize_read_exit(s); return se; Index: src/sys/net/npf/npf_alg_icmp.c diff -u src/sys/net/npf/npf_alg_icmp.c:1.18 src/sys/net/npf/npf_alg_icmp.c:1.19 --- src/sys/net/npf/npf_alg_icmp.c:1.18 Fri Dec 6 01:33:37 2013 +++ src/sys/net/npf/npf_alg_icmp.c Sun Feb 16 22:10:40 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: npf_alg_icmp.c,v 1.18 2013/12/06 01:33:37 rmind Exp $ */ +/* $NetBSD: npf_alg_icmp.c,v 1.19 2014/02/16 22:10:40 rmind Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: npf_alg_icmp.c,v 1.18 2013/12/06 01:33:37 rmind Exp
CVS commit: src/usr.sbin/npf/npfctl
Module Name:src Committed By: rmind Date: Mon Feb 17 00:45:24 UTC 2014 Modified Files: src/usr.sbin/npf/npfctl: npf_parse.y Log Message: npfctl: take into account all addresses when multiple interfaces are specified in a set of elements. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/usr.sbin/npf/npfctl/npf_parse.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/npf/npfctl/npf_parse.y diff -u src/usr.sbin/npf/npfctl/npf_parse.y:1.32 src/usr.sbin/npf/npfctl/npf_parse.y:1.33 --- src/usr.sbin/npf/npfctl/npf_parse.y:1.32 Thu Feb 13 03:34:40 2014 +++ src/usr.sbin/npf/npfctl/npf_parse.y Mon Feb 17 00:45:24 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: npf_parse.y,v 1.32 2014/02/13 03:34:40 rmind Exp $ */ +/* $NetBSD: npf_parse.y,v 1.33 2014/02/17 00:45:24 rmind Exp $ */ /*- * Copyright (c) 2011-2014 The NetBSD Foundation, Inc. @@ -642,8 +642,11 @@ again: $$ = vp; break; case NPFVAR_INTERFACE: - ifna = npfvar_get_data(vp, type, 0); - $$ = ifna-ifna_addrs; + $$ = NULL; + for (u_int i = 0; i npfvar_get_count(vp); i++) { +ifna = npfvar_get_data(vp, type, i); +$$ = npfvar_add_elements($$, ifna-ifna_addrs); + } break; case -1: yyerror(undefined variable '%s', $1);
CVS commit: src/sys/net/npf
Module Name:src Committed By: rmind Date: Mon Feb 17 02:38:46 UTC 2014 Modified Files: src/sys/net/npf: npf_alg.c Log Message: npf_alg_session: fix inverted logic in the previous commit. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/net/npf/npf_alg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/npf/npf_alg.c diff -u src/sys/net/npf/npf_alg.c:1.11 src/sys/net/npf/npf_alg.c:1.12 --- src/sys/net/npf/npf_alg.c:1.11 Sun Feb 16 22:10:40 2014 +++ src/sys/net/npf/npf_alg.c Mon Feb 17 02:38:46 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: npf_alg.c,v 1.11 2014/02/16 22:10:40 rmind Exp $ */ +/* $NetBSD: npf_alg.c,v 1.12 2014/02/17 02:38:46 rmind Exp $ */ /*- * Copyright (c) 2010-2013 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: npf_alg.c,v 1.11 2014/02/16 22:10:40 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: npf_alg.c,v 1.12 2014/02/17 02:38:46 rmind Exp $); #include sys/param.h #include sys/types.h @@ -236,7 +236,7 @@ npf_alg_session(npf_cache_t *npc, nbuf_t for (u_int i = 0; i alg_count; i++) { const npfa_funcs_t *f = alg_funcs[i]; - if (f-inspect) + if (!f-inspect) continue; if ((se = f-inspect(npc, nbuf, di)) != NULL) break;
CVS commit: src/usr.bin/man
Module Name:src Committed By: uwe Date: Mon Feb 17 02:53:48 UTC 2014 Modified Files: src/usr.bin/man: manconf.c Log Message: Check _build and _crunch commands with fmtcheck(3), warn about and ignore bad ones. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/usr.bin/man/manconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/man/manconf.c diff -u src/usr.bin/man/manconf.c:1.7 src/usr.bin/man/manconf.c:1.8 --- src/usr.bin/man/manconf.c:1.7 Thu Jul 18 15:39:08 2013 +++ src/usr.bin/man/manconf.c Mon Feb 17 02:53:48 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: manconf.c,v 1.7 2013/07/18 15:39:08 christos Exp $ */ +/* $NetBSD: manconf.c,v 1.8 2014/02/17 02:53:48 uwe Exp $ */ /* * Copyright (c) 1989, 1993, 1995 @@ -45,7 +45,7 @@ #if 0 static char sccsid[] = @(#)config.c 8.8 (Berkeley) 1/31/95; #else -__RCSID($NetBSD: manconf.c,v 1.7 2013/07/18 15:39:08 christos Exp $); +__RCSID($NetBSD: manconf.c,v 1.8 2014/02/17 02:53:48 uwe Exp $); #endif #endif /* not lint */ @@ -147,6 +147,8 @@ config(const char *fname) * rest of the line as a single entry. */ if (!strcmp(p, _build) || !strcmp(p, _crunch)) { +const char *u; + /* * The reason we're not just using * strtok(3) for all of the parsing is @@ -154,6 +156,19 @@ config(const char *fname) * has only a single token on it. */ while (*++t isspace((unsigned char)*t)); +#ifndef HAVE_NBTOOL_CONFIG_H +/* pre-verify user-supplied command format */ +u = t; +while (*u !isspace((unsigned char)*u)) + ++u; +while (*u isspace((unsigned char)*u)) + ++u; +if (fmtcheck(u, %s) != u) { + warnx(%s:%d: invalid %s command ignored, + fname, lcnt, p); + continue; +} +#endif /* !HAVE_NBTOOL_CONFIG_H */ if (addentry(tp, t, 0) == -1) errx(EXIT_FAILURE, addentry: malloc failed);
CVS commit: src/usr.bin/man
Module Name:src Committed By: uwe Date: Mon Feb 17 03:10:12 UTC 2014 Modified Files: src/usr.bin/man: Makefile man.c Log Message: config() in manconf.c now verifies _build (and _crunch) command templates with fmtcheck(3) so annotate the printf that uses these commands as safe with a __format_arg wrapper and drop -Wno-format-nonliteral. XXX: Using local wrapper for now, solving this in general would be nice, but it raises namespace pollution issues. XXX^2: catman(8) also uses manconf.c and uses _build and _crunch so it can also benefit from this (but see above). To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/usr.bin/man/Makefile cvs rdiff -u -r1.60 -r1.61 src/usr.bin/man/man.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/man/Makefile diff -u src/usr.bin/man/Makefile:1.14 src/usr.bin/man/Makefile:1.15 --- src/usr.bin/man/Makefile:1.14 Fri Jul 19 04:17:02 2013 +++ src/usr.bin/man/Makefile Mon Feb 17 03:10:12 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.14 2013/07/19 04:17:02 uwe Exp $ +# $NetBSD: Makefile,v 1.15 2014/02/17 03:10:12 uwe Exp $ # @(#)Makefile 8.1 (Berkeley) 6/6/93 WARNS?= 6 @@ -7,8 +7,6 @@ PROG= man SRCS= man.c manconf.c MAN= man.1 man.conf.5 -COPTS.man.c += -Wno-format-nonliteral - DPADD+= ${LIBUTIL} LDADD+= -lutil Index: src/usr.bin/man/man.c diff -u src/usr.bin/man/man.c:1.60 src/usr.bin/man/man.c:1.61 --- src/usr.bin/man/man.c:1.60 Mon Oct 28 23:46:17 2013 +++ src/usr.bin/man/man.c Mon Feb 17 03:10:12 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: man.c,v 1.60 2013/10/28 23:46:17 christos Exp $ */ +/* $NetBSD: man.c,v 1.61 2014/02/17 03:10:12 uwe Exp $ */ /* * Copyright (c) 1987, 1993, 1994, 1995 @@ -40,7 +40,7 @@ __COPYRIGHT(@(#) Copyright (c) 1987, 19 #if 0 static char sccsid[] = @(#)man.c 8.17 (Berkeley) 1/31/95; #else -__RCSID($NetBSD: man.c,v 1.60 2013/10/28 23:46:17 christos Exp $); +__RCSID($NetBSD: man.c,v 1.61 2014/02/17 03:10:12 uwe Exp $); #endif #endif /* not lint */ @@ -714,6 +714,18 @@ next:anyfound = 1; return anyfound; } +/* + * A do-nothing counterpart to fmtcheck(3) that only supplies the + * __format_arg marker. Actual fmtcheck(3) call is done once in + * config(). + */ +__always_inline __format_arg(2) +static inline const char * +fmtcheck_ok(const char *userfmt, const char *template) +{ + return userfmt; +} + /* * build_page -- * Build a man page for display. @@ -788,7 +800,7 @@ build_page(const char *fmt, char **pathp exit(EXIT_FAILURE); } (void)snprintf(buf, sizeof(buf), %s %s, fmt, tpath); - (void)snprintf(cmd, sizeof(cmd), buf, p); + (void)snprintf(cmd, sizeof(cmd), fmtcheck_ok(buf, %s), p); (void)system(cmd); (void)close(fd); if ((*pathp = strdup(tpath)) == NULL) {
CVS commit: src/sys/arch
Module Name:src Committed By: schmonz Date: Mon Feb 17 03:28:16 UTC 2014 Modified Files: src/sys/arch/amd64/conf: XEN3_DOM0 src/sys/arch/i386/conf: XEN3_DOM0 Log Message: Add urtw (ok'd by christos). To generate a diff of this commit: cvs rdiff -u -r1.99 -r1.100 src/sys/arch/amd64/conf/XEN3_DOM0 cvs rdiff -u -r1.81 -r1.82 src/sys/arch/i386/conf/XEN3_DOM0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/conf/XEN3_DOM0 diff -u src/sys/arch/amd64/conf/XEN3_DOM0:1.99 src/sys/arch/amd64/conf/XEN3_DOM0:1.100 --- src/sys/arch/amd64/conf/XEN3_DOM0:1.99 Wed Oct 23 17:22:49 2013 +++ src/sys/arch/amd64/conf/XEN3_DOM0 Mon Feb 17 03:28:16 2014 @@ -1,4 +1,4 @@ -# $NetBSD: XEN3_DOM0,v 1.99 2013/10/23 17:22:49 matt Exp $ +# $NetBSD: XEN3_DOM0,v 1.100 2014/02/17 03:28:16 schmonz Exp $ include arch/amd64/conf/std.xen @@ -623,6 +623,7 @@ urndis* at uhub? port ? # Microsoft RND atu* at uhub? port ? # Atmel AT76C50XX based adapters ural* at uhub? port ? # Ralink Technology RT2500USB 802.11a/b/g rum* at uhub? port ? # Ralink Technology RT2501/RT2601 802.11a/b/g +urtw* at uhub? port ? # Realtek RTL8187/RTL8187B 802.11b/g # Prolific PL2301/PL2302 host-to-host adapter upl* at uhub? port ? Index: src/sys/arch/i386/conf/XEN3_DOM0 diff -u src/sys/arch/i386/conf/XEN3_DOM0:1.81 src/sys/arch/i386/conf/XEN3_DOM0:1.82 --- src/sys/arch/i386/conf/XEN3_DOM0:1.81 Sun Jan 26 19:16:16 2014 +++ src/sys/arch/i386/conf/XEN3_DOM0 Mon Feb 17 03:28:16 2014 @@ -1,4 +1,4 @@ -# $NetBSD: XEN3_DOM0,v 1.81 2014/01/26 19:16:16 dsl Exp $ +# $NetBSD: XEN3_DOM0,v 1.82 2014/02/17 03:28:16 schmonz Exp $ # # XEN3_0: Xen 3.0 domain0 kernel @@ -600,6 +600,7 @@ urndis* at uhub? port ? # Microsoft RND atu* at uhub? port ? # Atmel AT76C50XX based adapters ural* at uhub? port ? # Ralink Technology RT2500USB 802.11a/b/g rum* at uhub? port ? # Ralink Technology RT2501/RT2601 802.11a/b/g +urtw* at uhub? port ? # Realtek RTL8187/RTL8187B 802.11b/g # Prolific PL2301/PL2302 host-to-host adapter upl* at uhub? port ?
CVS commit: src/sys/dev/marvell
Module Name:src Committed By: kiyohara Date: Mon Feb 17 04:52:44 UTC 2014 Modified Files: src/sys/dev/marvell: marvellvar.h Log Message: Add MARVELL_TAG_DDR3_CS[0-3] for latest SoC. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/marvell/marvellvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/marvell/marvellvar.h diff -u src/sys/dev/marvell/marvellvar.h:1.3 src/sys/dev/marvell/marvellvar.h:1.4 --- src/sys/dev/marvell/marvellvar.h:1.3 Tue Jul 20 11:37:39 2010 +++ src/sys/dev/marvell/marvellvar.h Mon Feb 17 04:52:44 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: marvellvar.h,v 1.3 2010/07/20 11:37:39 kiyohara Exp $ */ +/* $NetBSD: marvellvar.h,v 1.4 2014/02/17 04:52:44 kiyohara Exp $ */ /* * Copyright (c) 2009 KIYOHARA Takashi * All rights reserved. @@ -34,6 +34,11 @@ enum marvell_tags { MARVELL_TAG_SDRAM_CS2, MARVELL_TAG_SDRAM_CS3, + MARVELL_TAG_DDR3_CS0, + MARVELL_TAG_DDR3_CS1, + MARVELL_TAG_DDR3_CS2, + MARVELL_TAG_DDR3_CS3, + MARVELL_TAG_MAX, MARVELL_TAG_UNDEFINED = -1,
CVS commit: src/sys/arch/arm/marvell
Module Name:src Committed By: kiyohara Date: Mon Feb 17 05:00:38 UTC 2014 Modified Files: src/sys/arch/arm/marvell: mvsoc.c Log Message: Support MARVELL_TAG_DDR3_CS[0-3]. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/marvell/mvsoc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/marvell/mvsoc.c diff -u src/sys/arch/arm/marvell/mvsoc.c:1.16 src/sys/arch/arm/marvell/mvsoc.c:1.17 --- src/sys/arch/arm/marvell/mvsoc.c:1.16 Mon Dec 23 04:12:09 2013 +++ src/sys/arch/arm/marvell/mvsoc.c Mon Feb 17 05:00:38 2014 @@ -1,6 +1,6 @@ -/* $NetBSD: mvsoc.c,v 1.16 2013/12/23 04:12:09 kiyohara Exp $ */ +/* $NetBSD: mvsoc.c,v 1.17 2014/02/17 05:00:38 kiyohara Exp $ */ /* - * Copyright (c) 2007, 2008 KIYOHARA Takashi + * Copyright (c) 2007, 2008, 2013, 2014 KIYOHARA Takashi * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mvsoc.c,v 1.16 2013/12/23 04:12:09 kiyohara Exp $); +__KERNEL_RCSID(0, $NetBSD: mvsoc.c,v 1.17 2014/02/17 05:00:38 kiyohara Exp $); #include opt_cputypes.h #include opt_mvsoc.h @@ -64,6 +64,10 @@ static void mvsoc_attach(device_t, devic static int mvsoc_print(void *, const char *); static int mvsoc_search(device_t, cfdata_t, const int *, void *); +static int mvsoc_target_ddr(uint32_t, uint32_t *, uint32_t *); +static int mvsoc_target_ddr3(uint32_t, uint32_t *, uint32_t *); +static int mvsoc_target_peripheral(uint32_t, uint32_t, uint32_t *, uint32_t *); + uint32_t mvPclk, mvSysclk, mvTclk = 0; int nwindow = 0, nremap = 0; static vaddr_t regbase = 0x, dsc_base, pex_base; @@ -135,6 +139,15 @@ static struct { { MARVELL_TAG_SDRAM_CS3, MARVELL_ATTR_SDRAM_CS3, MVSOC_UNITID_DDR }, + { MARVELL_TAG_DDR3_CS0, + MARVELL_ATTR_SDRAM_CS0, MVSOC_UNITID_DDR }, + { MARVELL_TAG_DDR3_CS1, + MARVELL_ATTR_SDRAM_CS1, MVSOC_UNITID_DDR }, + { MARVELL_TAG_DDR3_CS2, + MARVELL_ATTR_SDRAM_CS2, MVSOC_UNITID_DDR }, + { MARVELL_TAG_DDR3_CS3, + MARVELL_ATTR_SDRAM_CS3, MVSOC_UNITID_DDR }, + #if defined(ORION) { ORION_TAG_DEVICE_CS0, ORION_ATTR_DEVICE_CS0, MVSOC_UNITID_DEVBUS }, @@ -925,76 +938,150 @@ mvsoc_target(int tag, uint32_t *target, *attr = mvsoc_tags[i].attr; if (mvsoc_tags[i].target == MVSOC_UNITID_DDR) { - /* - * Read DDR SDRAM Controller Address Decode Registers - */ - uint32_t baseaddrreg, sizereg; - int cs = 0; - - switch (mvsoc_tags[i].attr) { - case MARVELL_ATTR_SDRAM_CS0: - cs = 0; - break; - case MARVELL_ATTR_SDRAM_CS1: - cs = 1; - break; - case MARVELL_ATTR_SDRAM_CS2: - cs = 2; - break; - case MARVELL_ATTR_SDRAM_CS3: - cs = 3; - break; - } - sizereg = *(volatile uint32_t *)(dsc_base + MVSOC_DSC_CSSR(cs)); - if (sizereg MVSOC_DSC_CSSR_WINEN) { - baseaddrreg = *(volatile uint32_t *)(dsc_base + - MVSOC_DSC_CSBAR(cs)); + if (tag == MARVELL_TAG_SDRAM_CS0 || + tag == MARVELL_TAG_SDRAM_CS1 || + tag == MARVELL_TAG_SDRAM_CS2 || + tag == MARVELL_TAG_SDRAM_CS3) + return mvsoc_target_ddr(mvsoc_tags[i].attr, base, size); + else + return mvsoc_target_ddr3(mvsoc_tags[i].attr, base, + size); + } else + return mvsoc_target_peripheral(mvsoc_tags[i].target, + mvsoc_tags[i].attr, base, size); +} - if (base != NULL) -*base = baseaddrreg MVSOC_DSC_CSBAR_BASE_MASK; - if (size != NULL) -*size = (sizereg MVSOC_DSC_CSSR_SIZE_MASK) + -(~MVSOC_DSC_CSSR_SIZE_MASK + 1); - } else { - if (base != NULL) -*base = 0; - if (size != NULL) -*size = 0; - } - return 0; - } else { - /* - * Read CPU Address Map Registers - */ - uint32_t basereg, ctrlreg, ta, tamask; - - ta = MVSOC_MLMB_WCR_TARGET(mvsoc_tags[i].target) | - MVSOC_MLMB_WCR_ATTR(mvsoc_tags[i].attr); - tamask = MVSOC_MLMB_WCR_TARGET(MVSOC_UNITID_MASK) | - MVSOC_MLMB_WCR_ATTR(MARVELL_ATTR_MASK); +static int +mvsoc_target_ddr(uint32_t attr, uint32_t *base, uint32_t *size) +{ + uint32_t baseaddrreg, sizereg; + int cs; + + /* + * Read DDR SDRAM Controller Address Decode Registers + */ + switch (attr) { + case MARVELL_ATTR_SDRAM_CS0: + cs = 0; + break; + case MARVELL_ATTR_SDRAM_CS1: + cs = 1; + break; + case MARVELL_ATTR_SDRAM_CS2: + cs = 2; + break; + case MARVELL_ATTR_SDRAM_CS3: + cs = 3; + break; + default: + aprint_error(unknwon ATTR: 0x%x, attr); + return -1; + } + sizereg = *(volatile uint32_t *)(dsc_base + MVSOC_DSC_CSSR(cs)); + if (sizereg MVSOC_DSC_CSSR_WINEN) { + baseaddrreg = + *(volatile uint32_t *)(dsc_base + MVSOC_DSC_CSBAR(cs)); + + if (base != NULL) + *base = baseaddrreg MVSOC_DSC_CSBAR_BASE_MASK; + if (size != NULL) + *size = (sizereg MVSOC_DSC_CSSR_SIZE_MASK) + + (~MVSOC_DSC_CSSR_SIZE_MASK + 1); + } else { if (base != NULL) *base = 0; if (size != NULL) *size = 0; + } + return
CVS commit: src/sys/arch/arm/marvell
Module Name:src Committed By: kiyohara Date: Mon Feb 17 05:05:46 UTC 2014 Modified Files: src/sys/arch/arm/marvell: mvsocreg.h Log Message: Add some MVSOC_MLMB_ definitions for supporting DDR3. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/marvell/mvsocreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/marvell/mvsocreg.h diff -u src/sys/arch/arm/marvell/mvsocreg.h:1.8 src/sys/arch/arm/marvell/mvsocreg.h:1.9 --- src/sys/arch/arm/marvell/mvsocreg.h:1.8 Mon Dec 23 04:12:09 2013 +++ src/sys/arch/arm/marvell/mvsocreg.h Mon Feb 17 05:05:46 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: mvsocreg.h,v 1.8 2013/12/23 04:12:09 kiyohara Exp $ */ +/* $NetBSD: mvsocreg.h,v 1.9 2014/02/17 05:05:46 kiyohara Exp $ */ /* * Copyright (c) 2007, 2008 KIYOHARA Takashi * All rights reserved. @@ -97,7 +97,7 @@ #define MVSOC_MLMB_WRLR_REMAP_MASK 0x #define MVSOC_MLMB_WRHR(w) (((w) 4) + 0xc) #define MVSOC_MLMB_IRBAR 0x080 /* Internal regs Base Address */ -#define MVSOC_MLMB_IRBAR_BASE_MASK 0xfff0 +#define MVSOC_MLMB_IRBAR_BASE_MASK 0xfff0 /* CPU Control and Status Registers */ #define MVSOC_MLMB_CPUCR 0x100 /* CPU Configuration Register */ @@ -120,6 +120,14 @@ #define MVSOC_MLMB_L2CFG 0x128 /* L2 Cache Config */ +#define MVSOC_MLMB_NWIN 4 +#define MVSOC_MLMB_WINBAR(w) (((w) 3) + 0x180) +#define MVSOC_MLMB_WINBAR_BASE_MASK 0xff00 +#define MVSOC_MLMB_WINCR(w) (((w) 3) + 0x184) +#define MVSOC_MLMB_WINCR_EN (1 0) +#define MVSOC_MLMB_WINCR_WINCS(x) (((x) 0x1c) 2) +#define MVSOC_MLMB_WINCR_SIZE_MASK 0xff00 + /* Coherent Fabric Control and Status */ #define MVSOC_MLMB_COHERENCY_FABRIC_CTRL 0x200 #define MVSOC_MLMB_COHERENCY_FABRIC_CFG 0x204
CVS commit: src/sys/arch/arm/marvell
Module Name:src Committed By: kiyohara Date: Mon Feb 17 05:11:25 UTC 2014 Modified Files: src/sys/arch/arm/marvell: mvsoctmrreg.h Log Message: Add comment 'Armada XP only' to 25MHz bit. Also it is documented to errata? To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/marvell/mvsoctmrreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/marvell/mvsoctmrreg.h diff -u src/sys/arch/arm/marvell/mvsoctmrreg.h:1.3 src/sys/arch/arm/marvell/mvsoctmrreg.h:1.4 --- src/sys/arch/arm/marvell/mvsoctmrreg.h:1.3 Mon Oct 14 04:20:44 2013 +++ src/sys/arch/arm/marvell/mvsoctmrreg.h Mon Feb 17 05:11:25 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: mvsoctmrreg.h,v 1.3 2013/10/14 04:20:44 kiyohara Exp $ */ +/* $NetBSD: mvsoctmrreg.h,v 1.4 2014/02/17 05:11:25 kiyohara Exp $ */ /* * Copyright (c) 2007 KIYOHARA Takashi * All rights reserved. @@ -43,6 +43,6 @@ /* CPU Timers Control Register (MVSOCTMR_CTCR) */ #define MVSOCTMR_CTCR_CPUTIMEREN(n) (1 ((n) * 2)) #define MVSOCTMR_CTCR_CPUTIMERAUTO(n) (1 ((n) * 2 + 1)) -#define MVSOCTMR_CTCR_25MHZEN(n) (1 ((n) + 11)) +#define MVSOCTMR_CTCR_25MHZEN(n) (1 ((n) + 11)) /* Armada XP only */ #endif /* !_MVSOCTMRREG_H_ */
CVS commit: src/sys/arch/arm/marvell
Module Name:src Committed By: kiyohara Date: Mon Feb 17 05:25:32 UTC 2014 Modified Files: src/sys/arch/arm/marvell: mvsoctmr.c Log Message: Remove TMR_FLAGS_ARMADAXP and Add flags NOBRIDGE, 25MHZ, SYSCLK. - NOBRIDGE does not go via a bridge. - 25MHZ is always counted with the cycle of 25 MHz. - SYSCLK is counted with the cycle of sysClk. This is used in a few days for Armada 370. And please use not mvTclk but variable mvsoctmr_freq for calculation of a clock. (e.g. in delay()) To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/marvell/mvsoctmr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/marvell/mvsoctmr.c diff -u src/sys/arch/arm/marvell/mvsoctmr.c:1.10 src/sys/arch/arm/marvell/mvsoctmr.c:1.11 --- src/sys/arch/arm/marvell/mvsoctmr.c:1.10 Mon Oct 14 04:17:59 2013 +++ src/sys/arch/arm/marvell/mvsoctmr.c Mon Feb 17 05:25:32 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: mvsoctmr.c,v 1.10 2013/10/14 04:17:59 kiyohara Exp $ */ +/* $NetBSD: mvsoctmr.c,v 1.11 2014/02/17 05:25:32 kiyohara Exp $ */ /* * Copyright (c) 2007, 2008, 2010 KIYOHARA Takashi * All rights reserved. @@ -25,7 +25,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mvsoctmr.c,v 1.10 2013/10/14 04:17:59 kiyohara Exp $); +__KERNEL_RCSID(0, $NetBSD: mvsoctmr.c,v 1.11 2014/02/17 05:25:32 kiyohara Exp $); #include opt_ddb.h #include opt_mvsoc.h @@ -71,7 +71,9 @@ struct mvsoctmr_softc { bus_space_handle_t sc_ioh; int sc_irq; -#define TMR_FLAGS_ARMADAXP (1 0) +#define TMR_FLAGS_NOBRIDGE (1 0) +#define TMR_FLAGS_25MHZ (1 1) +#define TMR_FLAGS_SYSCLK (1 2) int sc_flags; }; @@ -92,7 +94,9 @@ static int mvsoctmr_wdog_setmode(struct static void mvsoctmr_wdog_ddb_trap(int); #endif -#define MVSOC_WDOG_MAX_PERIOD (0x / mvTclk) +static int mvsoctmr_freq; + +#define MVSOC_WDOG_MAX_PERIOD (0x / mvsoctmr_freq) static struct mvsoctmr_softc *mvsoctmr_sc; static struct timecounter mvsoctmr_timecounter = { @@ -153,8 +157,15 @@ mvsoctmr_attach(device_t parent, device_ case MARVELL_ARMADAXP_MV78230: case MARVELL_ARMADAXP_MV78260: case MARVELL_ARMADAXP_MV78460: - sc-sc_flags = TMR_FLAGS_ARMADAXP; + sc-sc_flags = TMR_FLAGS_25MHZ | TMR_FLAGS_NOBRIDGE; + break; +#if 0 + case MARVELL_ARMADA370_MV6707: + case MARVELL_ARMADA370_MV6710: + case MARVELL_ARMADA370_MV6W11: + sc-sc_flags = TMR_FLAGS_NOBRIDGE | TMR_FLAGS_SYSCLK; break; +#endif } mvsoctmr_timecounter.tc_name = device_xname(self); @@ -198,7 +209,7 @@ clockhandler(void *arg) #if defined(ARMADAXP) KASSERT(mvsoctmr_sc != NULL); - if (mvsoctmr_sc-sc_flags TMR_FLAGS_ARMADAXP) + if (mvsoctmr_sc-sc_flags TMR_FLAGS_NOBRIDGE) /* Acknowledge all timers-related interrupts */ bus_space_write_4(mvsoctmr_sc-sc_iot, mvsoctmr_sc-sc_ioh, MVSOCTMR_TESR, 0x0); @@ -237,21 +248,24 @@ cpu_initclocks(void) if (sc == NULL) panic(cpu_initclocks: mvsoctmr not found); - mvsoctmr_timecounter.tc_priv = sc; - - if (sc-sc_flags TMR_FLAGS_ARMADAXP) + if (sc-sc_flags TMR_FLAGS_25MHZ) /* We set global timer and counter to 25 MHz mode */ - mvsoctmr_timecounter.tc_frequency = 2500; + mvsoctmr_freq = 2500; + else if (sc-sc_flags TMR_FLAGS_SYSCLK) + mvsoctmr_freq = mvSysclk; else - mvsoctmr_timecounter.tc_frequency = mvTclk; + mvsoctmr_freq = mvTclk; + + mvsoctmr_timecounter.tc_priv = sc; + mvsoctmr_timecounter.tc_frequency = mvsoctmr_freq; - timer0_tval = (mvsoctmr_timecounter.tc_frequency * 2) / (u_long) hz; + timer0_tval = (mvsoctmr_freq * 2) / (u_long) hz; timer0_tval = (timer0_tval / 2) + (timer0_tval 1); mvsoctmr_cntl(sc, MVSOCTMR_TIMER0, timer0_tval, en, autoen); mvsoctmr_cntl(sc, MVSOCTMR_TIMER1, 0x, en, autoen); - if (sc-sc_flags TMR_FLAGS_ARMADAXP) { + if (sc-sc_flags TMR_FLAGS_NOBRIDGE) { /* * Establishing timer interrupts is slightly different for * Armada XP than for other supported SoCs from Marvell. @@ -292,18 +306,18 @@ delay(unsigned int n) initial_tick = bus_space_read_4(sc-sc_iot, sc-sc_ioh, MVSOCTMR_TIMER(MVSOCTMR_TIMER1)); - if (n = UINT_MAX / mvTclk) { + if (n = UINT_MAX / mvsoctmr_freq) { /* * For unsigned arithmetic, division can be replaced with * multiplication with the inverse and a shift. */ - remaining = n * mvTclk / 100; + remaining = n * mvsoctmr_freq / 100; } else { /* * This is a very long delay. * Being slow here doesn't matter. */ - remaining = (unsigned long long) n * mvTclk / 100; + remaining = (unsigned long long) n * mvsoctmr_freq / 100; } while (remaining 0) { @@ -345,7 +359,7 @@ mvsoctmr_cntl(struct mvsoctmr_softc *sc, ctrl |= MVSOCTMR_CTCR_CPUTIMERAUTO(num); else ctrl = ~MVSOCTMR_CTCR_CPUTIMERAUTO(num); - if (sc-sc_flags TMR_FLAGS_ARMADAXP) + if (sc-sc_flags TMR_FLAGS_25MHZ) /* Set
CVS commit: src/crypto/external/bsd/netpgp/dist
Module Name:src Committed By: agc Date: Mon Feb 17 07:23:19 UTC 2014 Modified Files: src/crypto/external/bsd/netpgp/dist: configure src/crypto/external/bsd/netpgp/dist/src/hkpclient: hkpc.1 src/crypto/external/bsd/netpgp/dist/src/lib: libnetpgp.3 src/crypto/external/bsd/netpgp/dist/src/libbn: libnetpgpbn.3 src/crypto/external/bsd/netpgp/dist/src/libdigest: tiger.3 src/crypto/external/bsd/netpgp/dist/src/libmj: libmj.3 src/crypto/external/bsd/netpgp/dist/src/libverify: libnetpgpverify.3 src/crypto/external/bsd/netpgp/dist/src/netpgp: netpgp.1 src/crypto/external/bsd/netpgp/dist/src/netpgpkeys: netpgpkeys.1 src/crypto/external/bsd/netpgp/dist/src/netpgpverify: netpgpverify.1 src/crypto/external/bsd/netpgp/dist/src/pgp2ssh: pgp2ssh.1 Log Message: Manual page fixes from Anthony J. Bentley, with many thanks! Addresses PR/48395 To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/crypto/external/bsd/netpgp/dist/configure cvs rdiff -u -r1.2 -r1.3 \ src/crypto/external/bsd/netpgp/dist/src/hkpclient/hkpc.1 cvs rdiff -u -r1.15 -r1.16 \ src/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3 cvs rdiff -u -r1.3 -r1.4 \ src/crypto/external/bsd/netpgp/dist/src/libbn/libnetpgpbn.3 cvs rdiff -u -r1.3 -r1.4 \ src/crypto/external/bsd/netpgp/dist/src/libdigest/tiger.3 cvs rdiff -u -r1.6 -r1.7 \ src/crypto/external/bsd/netpgp/dist/src/libmj/libmj.3 cvs rdiff -u -r1.5 -r1.6 \ src/crypto/external/bsd/netpgp/dist/src/libverify/libnetpgpverify.3 cvs rdiff -u -r1.18 -r1.19 \ src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.1 cvs rdiff -u -r1.19 -r1.20 \ src/crypto/external/bsd/netpgp/dist/src/netpgpkeys/netpgpkeys.1 cvs rdiff -u -r1.6 -r1.7 \ src/crypto/external/bsd/netpgp/dist/src/netpgpverify/netpgpverify.1 cvs rdiff -u -r1.3 -r1.4 \ src/crypto/external/bsd/netpgp/dist/src/pgp2ssh/pgp2ssh.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/netpgp/dist/configure diff -u src/crypto/external/bsd/netpgp/dist/configure:1.39 src/crypto/external/bsd/netpgp/dist/configure:1.40 --- src/crypto/external/bsd/netpgp/dist/configure:1.39 Mon Feb 17 06:38:07 2014 +++ src/crypto/external/bsd/netpgp/dist/configure Mon Feb 17 07:23:18 2014 @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac Revision: 1.39 . +# From configure.ac Revision: 1.40 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for netpgp 20140210. # Index: src/crypto/external/bsd/netpgp/dist/src/hkpclient/hkpc.1 diff -u src/crypto/external/bsd/netpgp/dist/src/hkpclient/hkpc.1:1.2 src/crypto/external/bsd/netpgp/dist/src/hkpclient/hkpc.1:1.3 --- src/crypto/external/bsd/netpgp/dist/src/hkpclient/hkpc.1:1.2 Sat Jul 20 21:39:55 2013 +++ src/crypto/external/bsd/netpgp/dist/src/hkpclient/hkpc.1 Mon Feb 17 07:23:18 2014 @@ -1,4 +1,4 @@ -.\ $NetBSD: hkpc.1,v 1.2 2013/07/20 21:39:55 wiz Exp $ +.\ $NetBSD: hkpc.1,v 1.3 2014/02/17 07:23:18 agc Exp $ .\ .\ Copyright (c) 2010 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -27,7 +27,7 @@ .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\ POSSIBILITY OF SUCH DAMAGE. .\ -.Dd September 1, 2010 +.Dd February 16, 2014 .Dt HKPC 1 .Os .Sh NAME @@ -86,8 +86,7 @@ whilst the hostname defaults to .Pp The .Dv netpgp -suite of libraries and commands provides a copnvenient client -in +suite of libraries and commands provides a convenient client in .Xr hkpd 1 . .Pp The information is sent to the server in the form of @@ -111,9 +110,16 @@ Output will be printed on stdout. .Xr libmj 3 , .Xr libnetpgp 3 .Sh STANDARDS -The -.Nm -utility is designed to conform to IETF RFC 4880. +.Rs +.%A J. Callas +.%A L. Donnerhacke +.%A H. Finney +.%A D. Shaw +.%A R. Thayer +.%D November 2007 +.%R RFC 4880 +.%T OpenPGP Message Format +.Re .Sh HISTORY The .Nm Index: src/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3 diff -u src/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3:1.15 src/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3:1.16 --- src/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3:1.15 Sat Jul 20 21:39:55 2013 +++ src/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3 Mon Feb 17 07:23:18 2014 @@ -1,4 +1,4 @@ -.\ $NetBSD: libnetpgp.3,v 1.15 2013/07/20 21:39:55 wiz Exp $ +.\ $NetBSD: libnetpgp.3,v 1.16 2014/02/17 07:23:18 agc Exp $ .\ .\ Copyright (c) 2009,2010 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -27,7 +27,7 @@ .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\ POSSIBILITY OF SUCH DAMAGE. .\ -.Dd June 17, 2010 +.Dd February 16, 2014 .Dt LIBNETPGP 3 .Os .Sh NAME @@ -184,14 +184,14 @@ If no public key ring file is set, initi in the .Pa .gnupg/pubring.gpg file in the user's home directory. -Similarily, if no secret
CVS commit: src/sys/dev/usb
Module Name:src Committed By: skrll Date: Mon Feb 17 07:34:21 UTC 2014 Modified Files: src/sys/dev/usb: ehci.c ohci.c usb_subr.c Log Message: Re-establish the default pipe after the initial reading of the device descriptor. This fixes usbd_new_device so that there is no really need to touch QHs/EDs in [eo]hci_device_request. KASSERT the address and maximum packet length now. To generate a diff of this commit: cvs rdiff -u -r1.224 -r1.225 src/sys/dev/usb/ehci.c cvs rdiff -u -r1.249 -r1.250 src/sys/dev/usb/ohci.c cvs rdiff -u -r1.195 -r1.196 src/sys/dev/usb/usb_subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/ehci.c diff -u src/sys/dev/usb/ehci.c:1.224 src/sys/dev/usb/ehci.c:1.225 --- src/sys/dev/usb/ehci.c:1.224 Mon Dec 16 10:04:20 2013 +++ src/sys/dev/usb/ehci.c Mon Feb 17 07:34:21 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ehci.c,v 1.224 2013/12/16 10:04:20 skrll Exp $ */ +/* $NetBSD: ehci.c,v 1.225 2014/02/17 07:34:21 skrll Exp $ */ /* * Copyright (c) 2004-2012 The NetBSD Foundation, Inc. @@ -53,7 +53,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ehci.c,v 1.224 2013/12/16 10:04:20 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: ehci.c,v 1.225 2014/02/17 07:34:21 skrll Exp $); #include ohci.h #include uhci.h @@ -3364,7 +3364,6 @@ ehci_device_request(usbd_xfer_handle xfe usb_device_request_t *req = xfer-request; usbd_device_handle dev = epipe-pipe.device; ehci_softc_t *sc = dev-bus-hci_private; - int addr = dev-address; ehci_soft_qtd_t *setup, *stat, *next; ehci_soft_qh_t *sqh; int isread; @@ -3377,7 +3376,7 @@ ehci_device_request(usbd_xfer_handle xfe DPRINTFN(3,(ehci_device_request: type=0x%02x, request=0x%02x, wValue=0x%04x, wIndex=0x%04x len=%d, addr=%d, endpt=%d\n, req-bmRequestType, req-bRequest, UGETW(req-wValue), - UGETW(req-wIndex), len, addr, + UGETW(req-wIndex), len, dev-address, epipe-pipe.endpoint-edesc-bEndpointAddress)); setup = ehci_alloc_sqtd(sc); @@ -3395,18 +3394,14 @@ ehci_device_request(usbd_xfer_handle xfe sqh = epipe-sqh; - /* - * Update device address and length since they may have changed - * during the setup of the control pipe in usbd_new_device(). - */ - /* XXX This only needs to be done once, but it's too early in open. */ - /* Should not touch ED here! */ - sqh-qh.qh_endp = - (sqh-qh.qh_endp htole32(~(EHCI_QH_ADDRMASK | EHCI_QH_MPLMASK))) | - htole32( - EHCI_QH_SET_ADDR(addr) | - EHCI_QH_SET_MPL(UGETW(epipe-pipe.endpoint-edesc-wMaxPacketSize)) - ); + KASSERTMSG(EHCI_QH_GET_ADDR(le32toh(sqh-qh.qh_endp)) == dev-address, + address QH %d pipe %d\n, + EHCI_QH_GET_ADDR(le32toh(sqh-qh.qh_endp)), dev-address); + KASSERTMSG(EHCI_QH_GET_MPL(le32toh(sqh-qh.qh_endp)) == + UGETW(epipe-pipe.endpoint-edesc-wMaxPacketSize), + MPS QH %d pipe %d\n, + EHCI_QH_GET_MPL(le32toh(sqh-qh.qh_endp)), + UGETW(epipe-pipe.endpoint-edesc-wMaxPacketSize)); /* Set up data transaction */ if (len != 0) { Index: src/sys/dev/usb/ohci.c diff -u src/sys/dev/usb/ohci.c:1.249 src/sys/dev/usb/ohci.c:1.250 --- src/sys/dev/usb/ohci.c:1.249 Tue Jan 28 17:24:42 2014 +++ src/sys/dev/usb/ohci.c Mon Feb 17 07:34:21 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ohci.c,v 1.249 2014/01/28 17:24:42 skrll Exp $ */ +/* $NetBSD: ohci.c,v 1.250 2014/02/17 07:34:21 skrll Exp $ */ /* * Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ohci.c,v 1.249 2014/01/28 17:24:42 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: ohci.c,v 1.250 2014/02/17 07:34:21 skrll Exp $); #include sys/param.h #include sys/systm.h @@ -1695,7 +1695,6 @@ ohci_device_request(usbd_xfer_handle xfe usb_device_request_t *req = xfer-request; usbd_device_handle dev = opipe-pipe.device; ohci_softc_t *sc = dev-bus-hci_private; - int addr = dev-address; ohci_soft_td_t *setup, *stat, *next, *tail; ohci_soft_ed_t *sed; int isread; @@ -1710,7 +1709,7 @@ ohci_device_request(usbd_xfer_handle xfe DPRINTFN(3,(ohci_device_control type=0x%02x, request=0x%02x, wValue=0x%04x, wIndex=0x%04x len=%d, addr=%d, endpt=%d\n, req-bmRequestType, req-bRequest, UGETW(req-wValue), - UGETW(req-wIndex), len, addr, + UGETW(req-wIndex), len, dev-address, opipe-pipe.endpoint-edesc-bEndpointAddress)); setup = opipe-tail.td; @@ -1729,21 +1728,14 @@ ohci_device_request(usbd_xfer_handle xfe sed = opipe-sed; opipe-u.ctl.length = len; - /* Update device address and length since they may have changed - during the setup of the control pipe in usbd_new_device(). */ - /* XXX This only needs to be done once, but it's too early in open. */ - /* Should not touch ED here! */ - - usb_syncmem(sed-dma, sed-offs + offsetof(ohci_ed_t, ed_flags), - sizeof(sed-ed.ed_flags), - BUS_DMASYNC_POSTWRITE |
CVS commit: src/crypto/external/bsd/netpgp/dist/src/lib
Module Name:src Committed By: agc Date: Mon Feb 17 07:39:20 UTC 2014 Modified Files: src/crypto/external/bsd/netpgp/dist/src/lib: crypto.c Log Message: Avoid a warning on Gentoo Linux about fwrite(3) -- their glibc declares fwrite(3) with the warn_unused_result attribute, from Razvan Cojocaru To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 \ src/crypto/external/bsd/netpgp/dist/src/lib/crypto.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/netpgp/dist/src/lib/crypto.c diff -u src/crypto/external/bsd/netpgp/dist/src/lib/crypto.c:1.35 src/crypto/external/bsd/netpgp/dist/src/lib/crypto.c:1.36 --- src/crypto/external/bsd/netpgp/dist/src/lib/crypto.c:1.35 Sun Jan 2 18:13:10 2011 +++ src/crypto/external/bsd/netpgp/dist/src/lib/crypto.c Mon Feb 17 07:39:19 2014 @@ -54,7 +54,7 @@ #if defined(__NetBSD__) __COPYRIGHT(@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.); -__RCSID($NetBSD: crypto.c,v 1.35 2011/01/02 18:13:10 agc Exp $); +__RCSID($NetBSD: crypto.c,v 1.36 2014/02/17 07:39:19 agc Exp $); #endif #include sys/types.h @@ -286,8 +286,11 @@ write_parsed_cb(const pgp_packet_t *pkt, puts(Skipping...); cbinfo-printstate.skipping = 1; } - fwrite(content-unarmoured_text.data, 1, - content-unarmoured_text.length, stdout); + if (fwrite(content-unarmoured_text.data, 1, + content-unarmoured_text.length, stdout) != content-unarmoured_text.length) { + fprintf(stderr, unable to write unarmoured text data\n); + cbinfo-printstate.skipping = 1; + } break; case PGP_PTAG_CT_PK_SESSION_KEY: