svn commit: r232482 - head/sys/powerpc/powermac

2012-03-04 Thread Andreas Tobler
Author: andreast
Date: Sun Mar  4 08:43:33 2012
New Revision: 232482
URL: http://svn.freebsd.org/changeset/base/232482

Log:
  Add support for PWM controlled fans. I found these fans on my PowerMac9,1.
  These fans are not located under the same node as the the RPM controlled ones,
  So I had to adapt the current source to parse and fill the properties 
correctly.
  To control the fans we can set the PWM ratio via sysctl between 20 and 100%.
  
  Tested by:nwhitehorn
  MFC after:3 weeks

Modified:
  head/sys/powerpc/powermac/smu.c

Modified: head/sys/powerpc/powermac/smu.c
==
--- head/sys/powerpc/powermac/smu.c Sun Mar  4 07:29:35 2012
(r232481)
+++ head/sys/powerpc/powermac/smu.c Sun Mar  4 08:43:33 2012
(r232482)
@@ -74,8 +74,21 @@ struct smu_fan {
device_t dev;
cell_t  reg;
 
+   enum {
+   SMU_FAN_RPM,
+   SMU_FAN_PWM
+   } type;
int old_style;
int setpoint;
+   int rpm;
+};
+
+/* We can read the PWM and the RPM from a PWM controlled fan.
+ * Offer both values via sysctl.
+ */
+enum {
+   SMU_PWM_SYSCTL_PWM   = 1 << 8,
+   SMU_PWM_SYSCTL_RPM   = 2 << 8
 };
 
 struct smu_sensor {
@@ -205,6 +218,10 @@ static MALLOC_DEFINE(M_SMU, "smu", "SMU 
 /* Command types */
 #define SMU_ADC0xd8
 #define SMU_FAN0x4a
+#define SMU_RPM_STATUS 0x01
+#define SMU_RPM_SETPOINT   0x02
+#define SMU_PWM_STATUS 0x11
+#define SMU_PWM_SETPOINT   0x12
 #define SMU_I2C0x9a
 #define  SMU_I2C_SIMPLE0x00
 #define  SMU_I2C_NORMAL0x01
@@ -303,19 +320,21 @@ smu_attach(device_t dev)
EVENTHANDLER_REGISTER(cpufreq_post_change, smu_cpufreq_post_change, dev,
EVENTHANDLER_PRI_ANY);
 
+   node = ofw_bus_get_node(dev);
+
+   /* Some SMUs have RPM and PWM controlled fans which do not sit
+* under the same node. So we have to attach them separately.
+*/
+   smu_attach_fans(dev, node);
+
/*
-* Detect and attach child devices.
+* Now detect and attach the other child devices.
 */
-   node = ofw_bus_get_node(dev);
for (child = OF_child(node); child != 0; child = OF_peer(child)) {
char name[32];
memset(name, 0, sizeof(name));
OF_getprop(child, "name", name, sizeof(name));
 
-   if (strncmp(name, "rpm-fans", 9) == 0 ||
-   strncmp(name, "fans", 5) == 0)
-   smu_attach_fans(dev, child);
-
if (strncmp(name, "sensors", 8) == 0)
smu_attach_sensors(dev, child);
 
@@ -660,7 +679,7 @@ smu_fan_set_rpm(struct smu_fan *fan, int
cmd.data[1] = fan->reg;
cmd.data[2] = (rpm >> 8) & 0xff;
cmd.data[3] = rpm & 0xff;
-   
+
error = smu_run_cmd(smu, &cmd, 1);
if (error && error != EWOULDBLOCK)
fan->old_style = 1;
@@ -668,7 +687,7 @@ smu_fan_set_rpm(struct smu_fan *fan, int
 
if (fan->old_style) {
cmd.len = 14;
-   cmd.data[0] = 0;
+   cmd.data[0] = 0x00; /* RPM fan. */
cmd.data[1] = 1 << fan->reg;
cmd.data[2 + 2*fan->reg] = (rpm >> 8) & 0xff;
cmd.data[3 + 2*fan->reg] = rpm & 0xff;
@@ -704,7 +723,7 @@ smu_fan_read_rpm(struct smu_fan *fan)
if (fan->old_style) {
cmd.cmd = SMU_FAN;
cmd.len = 1;
-   cmd.data[0] = 1;
+   cmd.data[0] = SMU_RPM_STATUS;
 
error = smu_run_cmd(smu, &cmd, 1);
if (error)
@@ -715,6 +734,98 @@ smu_fan_read_rpm(struct smu_fan *fan)
 
return (rpm);
 }
+static int
+smu_fan_set_pwm(struct smu_fan *fan, int pwm)
+{
+   device_t smu = fan->dev;
+   struct smu_cmd cmd;
+   int error;
+
+   cmd.cmd = SMU_FAN;
+   error = EIO;
+
+   /* Clamp to allowed range */
+   pwm = max(fan->fan.min_rpm, pwm);
+   pwm = min(fan->fan.max_rpm, pwm);
+
+   /*
+* Apple has two fan control mechanisms. We can't distinguish
+* them except by seeing if the new one fails. If the new one
+* fails, use the old one.
+*/
+   
+   if (!fan->old_style) {
+   cmd.len = 4;
+   cmd.data[0] = 0x30;
+   cmd.data[1] = fan->reg;
+   cmd.data[2] = (pwm >> 8) & 0xff;
+   cmd.data[3] = pwm & 0xff;
+   
+   error = smu_run_cmd(smu, &cmd, 1);
+   if (error && error != EWOULDBLOCK)
+   fan->old_style = 1;
+   }
+
+   if (fan->old_style) {
+   cmd.len = 14;
+   cmd.data[0] = 0x10; /* PWM fan. */
+   cmd.data[1] = 1 << fan->reg;
+ 

svn commit: r232483 - in head/sys/fs: hpfs msdosfs ntfs

2012-03-04 Thread Kevin Lo
Author: kevlo
Date: Sun Mar  4 09:38:20 2012
New Revision: 232483
URL: http://svn.freebsd.org/changeset/base/232483

Log:
  Clean up style(9) nits

Modified:
  head/sys/fs/hpfs/hpfs_vfsops.c
  head/sys/fs/msdosfs/msdosfs_vfsops.c
  head/sys/fs/ntfs/ntfs_vfsops.c

Modified: head/sys/fs/hpfs/hpfs_vfsops.c
==
--- head/sys/fs/hpfs/hpfs_vfsops.c  Sun Mar  4 08:43:33 2012
(r232482)
+++ head/sys/fs/hpfs/hpfs_vfsops.c  Sun Mar  4 09:38:20 2012
(r232483)
@@ -283,11 +283,11 @@ hpfs_mountfs(devvp, mp, td)
hpmp->hpm_devvp = devvp;
hpmp->hpm_dev = devvp->v_rdev;
hpmp->hpm_mp = mp;
-   if (1 == vfs_scanopt(mp->mnt_optnew, "uid", "%d", &v))
+   if (vfs_scanopt(mp->mnt_optnew, "uid", "%d", &v) == 1)
hpmp->hpm_uid = v;
-   if (1 == vfs_scanopt(mp->mnt_optnew, "gid", "%d", &v))
+   if (vfs_scanopt(mp->mnt_optnew, "gid", "%d", &v) == 1)
hpmp->hpm_gid = v;
-   if (1 == vfs_scanopt(mp->mnt_optnew, "mode", "%d", &v))
+   if (vfs_scanopt(mp->mnt_optnew, "mode", "%d", &v) == 1)
hpmp->hpm_mode = v;
 
error = hpfs_bminit(hpmp);

Modified: head/sys/fs/msdosfs/msdosfs_vfsops.c
==
--- head/sys/fs/msdosfs/msdosfs_vfsops.cSun Mar  4 08:43:33 2012
(r232482)
+++ head/sys/fs/msdosfs/msdosfs_vfsops.cSun Mar  4 09:38:20 2012
(r232483)
@@ -149,13 +149,13 @@ update_mp(struct mount *mp, struct threa
}
}
 
-   if (1 == vfs_scanopt(mp->mnt_optnew, "gid", "%d", &v))
+   if (vfs_scanopt(mp->mnt_optnew, "gid", "%d", &v) == 1)
pmp->pm_gid = v;
-   if (1 == vfs_scanopt(mp->mnt_optnew, "uid", "%d", &v))
+   if (vfs_scanopt(mp->mnt_optnew, "uid", "%d", &v) == 1)
pmp->pm_uid = v;
-   if (1 == vfs_scanopt(mp->mnt_optnew, "mask", "%d", &v))
+   if (vfs_scanopt(mp->mnt_optnew, "mask", "%d", &v) == 1)
pmp->pm_mask = v & ALLPERMS;
-   if (1 == vfs_scanopt(mp->mnt_optnew, "dirmask", "%d", &v))
+   if (vfs_scanopt(mp->mnt_optnew, "dirmask", "%d", &v) == 1)
pmp->pm_dirmask = v & ALLPERMS;
vfs_flagopt(mp->mnt_optnew, "shortname",
&pmp->pm_flags, MSDOSFSMNT_SHORTNAME);

Modified: head/sys/fs/ntfs/ntfs_vfsops.c
==
--- head/sys/fs/ntfs/ntfs_vfsops.c  Sun Mar  4 08:43:33 2012
(r232482)
+++ head/sys/fs/ntfs/ntfs_vfsops.c  Sun Mar  4 09:38:20 2012
(r232483)
@@ -345,11 +345,11 @@ ntfs_mountfs(devvp, mp, td)
 
ntmp->ntm_mountp = mp;
ntmp->ntm_devvp = devvp;
-   if (1 == vfs_scanopt(mp->mnt_optnew, "uid", "%d", &v))
+   if (vfs_scanopt(mp->mnt_optnew, "uid", "%d", &v) == 1)
ntmp->ntm_uid = v;
-   if (1 == vfs_scanopt(mp->mnt_optnew, "gid", "%d", &v))
+   if (vfs_scanopt(mp->mnt_optnew, "gid", "%d", &v) == 1)
ntmp->ntm_gid = v;
-   if (1 == vfs_scanopt(mp->mnt_optnew, "mode", "%d", &v))
+   if (vfs_scanopt(mp->mnt_optnew, "mode", "%d", &v) == 1)
ntmp->ntm_mode = v & ACCESSPERMS;
vfs_flagopt(mp->mnt_optnew,
"caseins", &ntmp->ntm_flag, NTFS_MFLAG_CASEINS);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232484 - head/sys/net80211

2012-03-04 Thread Gleb Smirnoff
Author: glebius
Date: Sun Mar  4 09:45:43 2012
New Revision: 232484
URL: http://svn.freebsd.org/changeset/base/232484

Log:
  Fix build w/o 'options IEEE80211_SUPPORT_MESH'.

Modified:
  head/sys/net80211/ieee80211_input.c

Modified: head/sys/net80211/ieee80211_input.c
==
--- head/sys/net80211/ieee80211_input.c Sun Mar  4 09:38:20 2012
(r232483)
+++ head/sys/net80211/ieee80211_input.c Sun Mar  4 09:45:43 2012
(r232484)
@@ -760,6 +760,7 @@ ieee80211_parse_action(struct ieee80211_
break;
}
break;
+#ifdef IEEE80211_SUPPORT_MESH
case IEEE80211_ACTION_CAT_MESH:
switch (ia->ia_action) {
case IEEE80211_ACTION_MESH_LMETRIC:
@@ -791,6 +792,7 @@ ieee80211_parse_action(struct ieee80211_
return EINVAL;
}
break;
+#endif
}
return 0;
 }
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232485 - head/sys/fs/cd9660

2012-03-04 Thread Kevin Lo
Author: kevlo
Date: Sun Mar  4 09:48:58 2012
New Revision: 232485
URL: http://svn.freebsd.org/changeset/base/232485

Log:
  Remove unnecessary casts

Modified:
  head/sys/fs/cd9660/cd9660_vfsops.c

Modified: head/sys/fs/cd9660/cd9660_vfsops.c
==
--- head/sys/fs/cd9660/cd9660_vfsops.c  Sun Mar  4 09:45:43 2012
(r232484)
+++ head/sys/fs/cd9660/cd9660_vfsops.c  Sun Mar  4 09:48:58 2012
(r232485)
@@ -484,7 +484,7 @@ out:
PICKUP_GIANT();
}
if (isomp) {
-   free((caddr_t)isomp, M_ISOFSMNT);
+   free(isomp, M_ISOFSMNT);
mp->mnt_data = NULL;
}
dev_rel(dev);
@@ -522,7 +522,7 @@ cd9660_unmount(mp, mntflags)
PICKUP_GIANT();
vrele(isomp->im_devvp);
dev_rel(isomp->im_dev);
-   free((caddr_t)isomp, M_ISOFSMNT);
+   free(isomp, M_ISOFSMNT);
mp->mnt_data = NULL;
MNT_ILOCK(mp);
mp->mnt_flag &= ~MNT_LOCAL;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232487 - head/sys/net

2012-03-04 Thread Marko Zec
Author: zec
Date: Sun Mar  4 11:11:03 2012
New Revision: 232487
URL: http://svn.freebsd.org/changeset/base/232487

Log:
  Properly restore curvnet context when returning early from
  ether_input_internal().
  
  This change only affects options VIMAGE kernel builds.
  
  PR:   kern/165643
  Submitted by: Vijay Singh
  MFC after:3 days

Modified:
  head/sys/net/if_ethersubr.c

Modified: head/sys/net/if_ethersubr.c
==
--- head/sys/net/if_ethersubr.c Sun Mar  4 10:37:26 2012(r232486)
+++ head/sys/net/if_ethersubr.c Sun Mar  4 11:11:03 2012(r232487)
@@ -661,8 +661,10 @@ ether_input_internal(struct ifnet *ifp, 
m = (*lagg_input_p)(ifp, m);
if (m != NULL)
ifp = m->m_pkthdr.rcvif;
-   else 
+   else {
+   CURVNET_RESTORE();
return;
+   }
}
 
/*
@@ -681,6 +683,7 @@ ether_input_internal(struct ifnet *ifp, 
 #endif
ifp->if_ierrors++;
m_freem(m);
+   CURVNET_RESTORE();
return;
}
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232488 - head/sys/powerpc/include

2012-03-04 Thread Andreas Tobler
Author: andreast
Date: Sun Mar  4 11:55:28 2012
New Revision: 232488
URL: http://svn.freebsd.org/changeset/base/232488

Log:
  Restore proper dot symbol creation for assembly files in the kernel build 
case.
  Without this patch we were not able to see the assembly function.
  Only the function descriptor was visible.
  
  - Distinguish between user-land and kernel when creating the ENTRY() point of
assembly source.
  - Make the ENTRY() macro more readable, replace the .align directive with the
gas platform independant .p2align directive.
  - Create an END()macro for later use to provide traceback tables on powerpc64.

Modified:
  head/sys/powerpc/include/asm.h

Modified: head/sys/powerpc/include/asm.h
==
--- head/sys/powerpc/include/asm.h  Sun Mar  4 11:11:03 2012
(r232487)
+++ head/sys/powerpc/include/asm.h  Sun Mar  4 11:55:28 2012
(r232488)
@@ -61,19 +61,51 @@
 #defineHIDENAME(asmsym)__CONCAT(.,asmsym)
 #endif
 
-#define_GLOBAL(x) \
-   .data; .align 2; .globl x; x:
-
-#ifdef __powerpc64__ 
-#define _ENTRY(x) \
-   .text; .align 2; .globl x; .section ".opd","aw"; \
-   .align 3; x: \
-   .quad .L.x,.TOC.@tocbase,0; .size x,24; .previous; \
-   .align 4; .type x,@function; .L.x:
-#else
-#define_ENTRY(x) \
-   .text; .align 4; .globl x; .type x,@function; x:
-#endif
+#ifdef _KERNEL
+#defineDOT_LABEL(name) __CONCAT(.,name)
+#defineTYPE_ENTRY(name).size   name,24; \
+   .type   DOT_LABEL(name),@function; \
+   .globl  DOT_LABEL(name);
+#defineEND_SIZE(name)  .size   
DOT_LABEL(name),.-DOT_LABEL(name);
+#else /* !_KERNEL */
+#defineDOT_LABEL(name) __CONCAT(.L.,name)
+#defineTYPE_ENTRY(name).type   name,@function;
+#defineEND_SIZE(name)  .size   name,.-DOT_LABEL(name);
+#endif /* _KERNEL */
+
+#define_GLOBAL(name) \
+   .data; \
+   .p2align 2; \
+   .globl  name; \
+   name:
+
+#ifdef __powerpc64__
+#define_ENTRY(name) \
+   .section ".text"; \
+   .p2align 2; \
+   .globl  name; \
+   .section ".opd","aw"; \
+   .p2align 3; \
+   name: \
+   .quad   DOT_LABEL(name),.TOC.@tocbase,0; \
+   .previous; \
+   .p2align 4; \
+   TYPE_ENTRY(name) \
+DOT_LABEL(name):
+
+#define_END(name) \
+   .long   0; \
+   .byte   0,0,0,0,0,0,0,0; \
+   END_SIZE(name)
+#else /* !__powerpc64__ */
+#define_ENTRY(name) \
+   .text; \
+   .p2align 4; \
+   .globl  name; \
+   .type   name,@function; \
+   name:
+#define_END(name)
+#endif /* __powerpc64__ */
 
 #if defined(PROF) || (defined(_KERNEL) && defined(GPROF))
 # ifdef __powerpc64__
@@ -99,6 +131,7 @@
 #endif
 
 #defineASENTRY(y)  _ENTRY(ASMNAME(y)); _PROF_PROLOGUE
+#defineEND(y)  _END(CNAME(y))
 #defineENTRY(y)_ENTRY(CNAME(y)); _PROF_PROLOGUE
 #defineGLOBAL(y)   _GLOBAL(CNAME(y))
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232491 - in head/sys: amd64/include i386/include pc98/include x86/include

2012-03-04 Thread Tijl Coosemans
Author: tijl
Date: Sun Mar  4 14:00:32 2012
New Revision: 232491
URL: http://svn.freebsd.org/changeset/base/232491

Log:
  Copy amd64 float.h to x86 and merge with i386 float.h. Replace
  amd64/i386/pc98 float.h with stubs.

Added:
  head/sys/x86/include/float.h
 - copied, changed from r232490, head/sys/amd64/include/float.h
Modified:
  head/sys/amd64/include/float.h
  head/sys/i386/include/float.h
  head/sys/pc98/include/float.h

Modified: head/sys/amd64/include/float.h
==
--- head/sys/amd64/include/float.h  Sun Mar  4 12:52:48 2012
(r232490)
+++ head/sys/amd64/include/float.h  Sun Mar  4 14:00:32 2012
(r232491)
@@ -1,94 +1,6 @@
 /*-
- * Copyright (c) 1989 Regents of the University of California.
- * 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.
- * 4. Neither the name of the University nor the names of its contributors
- *may be used to endorse or promote products derived from this software
- *without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- *
- * from: @(#)float.h   7.1 (Berkeley) 5/8/90
- * $FreeBSD$
+ * This file is in the public domain.
  */
+/* $FreeBSD$ */
 
-#ifndef _MACHINE_FLOAT_H_
-#define _MACHINE_FLOAT_H_ 1
-
-#include 
-
-__BEGIN_DECLS
-extern int __flt_rounds(void);
-__END_DECLS
-
-#define FLT_RADIX  2   /* b */
-#define FLT_ROUNDS __flt_rounds()
-#if __ISO_C_VISIBLE >= 1999
-#defineFLT_EVAL_METHOD 0   /* no promotions */
-#defineDECIMAL_DIG 21  /* max precision in decimal 
digits */
-#endif
-
-#define FLT_MANT_DIG   24  /* p */
-#define FLT_EPSILON1.19209290E-07F /* b**(1-p) */
-#define FLT_DIG6   /* floor((p-1)*log10(b))+(b == 
10) */
-#define FLT_MIN_EXP(-125)  /* emin */
-#define FLT_MIN1.17549435E-38F /* b**(emin-1) */
-#define FLT_MIN_10_EXP (-37)   /* ceil(log10(b**(emin-1))) */
-#define FLT_MAX_EXP128 /* emax */
-#define FLT_MAX3.40282347E+38F /* (1-b**(-p))*b**emax */
-#define FLT_MAX_10_EXP 38  /* floor(log10((1-b**(-p))*b**emax)) */
-#if __ISO_C_VISIBLE >= 2011
-#defineFLT_TRUE_MIN1.40129846E-45F /* b**(emin-p) */
-#defineFLT_DECIMAL_DIG 9   /* ceil(1+p*log10(b)) */
-#defineFLT_HAS_SUBNORM 1
-#endif /* __ISO_C_VISIBLE >= 2011 */
-
-#define DBL_MANT_DIG   53
-#define DBL_EPSILON2.2204460492503131E-16
-#define DBL_DIG15
-#define DBL_MIN_EXP(-1021)
-#define DBL_MIN2.2250738585072014E-308
-#define DBL_MIN_10_EXP (-307)
-#define DBL_MAX_EXP1024
-#define DBL_MAX1.7976931348623157E+308
-#define DBL_MAX_10_EXP 308
-#if __ISO_C_VISIBLE >= 2011
-#defineDBL_TRUE_MIN4.9406564584124654E-324
-#defineDBL_DECIMAL_DIG 17
-#defineDBL_HAS_SUBNORM 1
-#endif /* __ISO_C_VISIBLE >= 2011 */
-
-#define LDBL_MANT_DIG  64
-#define LDBL_EPSILON   1.0842021724855044340E-19L
-#define LDBL_DIG   18
-#define LDBL_MIN_EXP   (-16381)
-#define LDBL_MIN   3.3621031431120935063E-4932L
-#define LDBL_MIN_10_EXP(-4931)
-#define LDBL_MAX_EXP   16384
-#define LDBL_MAX   1.1897314953572317650E+4932L
-#define LDBL_MAX_10_EXP4932
-#if __ISO_C_VISIBLE >= 2011
-#defineLDBL_TRUE_MIN   3.6451995318824746025E-4951L
-#defineLDBL_DECIMAL_DIG 21
-#defineLDBL_HAS_SUBNORM 1
-#endif /* __ISO_C_VISIBLE >= 2011 */
-
-#endif /* _MACHINE_FLOAT_H_ */
+#include 

Modified: head/sys/i386/include/float.h
==
--- head/sys/i386/include/

svn commit: r232492 - in head/sys: amd64/include i386/include pc98/include x86/include

2012-03-04 Thread Tijl Coosemans
Author: tijl
Date: Sun Mar  4 14:12:57 2012
New Revision: 232492
URL: http://svn.freebsd.org/changeset/base/232492

Log:
  Copy amd64 trap.h to x86 and replace amd64/i386/pc98 trap.h with stubs.

Added:
  head/sys/x86/include/trap.h
 - copied unchanged from r232490, head/sys/amd64/include/trap.h
Modified:
  head/sys/amd64/include/trap.h
  head/sys/i386/include/trap.h
  head/sys/pc98/include/trap.h

Modified: head/sys/amd64/include/trap.h
==
--- head/sys/amd64/include/trap.h   Sun Mar  4 14:00:32 2012
(r232491)
+++ head/sys/amd64/include/trap.h   Sun Mar  4 14:12:57 2012
(r232492)
@@ -1,95 +1,6 @@
 /*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * 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.
- * 4. Neither the name of the University nor the names of its contributors
- *may be used to endorse or promote products derived from this software
- *without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- *
- * from: @(#)trap.h5.4 (Berkeley) 5/9/91
- * $FreeBSD$
+ * This file is in the public domain.
  */
+/* $FreeBSD$ */
 
-#ifndef _MACHINE_TRAP_H_
-#define_MACHINE_TRAP_H_
-
-/*
- * Trap type values
- * also known in trap.c for name strings
- */
-
-#defineT_PRIVINFLT 1   /* privileged instruction */
-#defineT_BPTFLT3   /* breakpoint instruction */
-#defineT_ARITHTRAP 6   /* arithmetic trap */
-#defineT_PROTFLT   9   /* protection fault */
-#defineT_TRCTRAP   10  /* debug exception (sic) */
-#defineT_PAGEFLT   12  /* page fault */
-#defineT_ALIGNFLT  14  /* alignment fault */
-
-#defineT_DIVIDE18  /* integer divide fault */
-#defineT_NMI   19  /* non-maskable trap */
-#defineT_OFLOW 20  /* overflow trap */
-#defineT_BOUND 21  /* bound instruction fault */
-#defineT_DNA   22  /* device not available fault */
-#defineT_DOUBLEFLT 23  /* double fault */
-#defineT_FPOPFLT   24  /* fp coprocessor operand fetch fault */
-#defineT_TSSFLT25  /* invalid tss fault */
-#defineT_SEGNPFLT  26  /* segment not present fault */
-#defineT_STKFLT27  /* stack fault */
-#defineT_MCHK  28  /* machine check trap */
-#defineT_XMMFLT29  /* SIMD floating-point exception */
-#defineT_RESERVED  30  /* reserved (unknown) */
-#defineT_DTRACE_RET32  /* DTrace pid return */
-#defineT_DTRACE_PROBE  33  /* DTrace fasttrap probe */
-
-/* XXX most of the following codes aren't used, but could be. */
-
-/* definitions for  */
-#defineILL_RESAD_FAULT T_RESADFLT
-#defineILL_PRIVIN_FAULTT_PRIVINFLT
-#defineILL_RESOP_FAULT T_RESOPFLT
-#defineILL_ALIGN_FAULT T_ALIGNFLT
-#defineILL_FPOP_FAULT  T_FPOPFLT   /* coprocessor operand 
fault */
-
-/* old FreeBSD macros, deprecated */
-#defineFPE_INTOVF_TRAP 0x1 /* integer overflow */
-#defineFPE_INTDIV_TRAP 0x2 /* integer divide by zero */
-#defineFPE_FLTDIV_TRAP 0x3 /* floating/decimal divide by zero */
-#defineFPE_FLTOVF_TRAP 0x4 /* floating overflow */
-#defineFPE_FLTUND_TRAP 0x5 /* floating underflow */
-#defineFPE_FPU_NP_TRAP 0x6 /* floating point unit not present  */
-#define

svn commit: r232493 - head/sys/fs/cd9660

2012-03-04 Thread Konstantin Belousov
Author: kib
Date: Sun Mar  4 14:51:42 2012
New Revision: 232493
URL: http://svn.freebsd.org/changeset/base/232493

Log:
  Remove unneeded cast to u_int. The values as small enough to fit into
  int, beside the use of MIN macro which performs type promotions.
  
  Submitted by: bde
  MFC after:3 weeks

Modified:
  head/sys/fs/cd9660/cd9660_vnops.c

Modified: head/sys/fs/cd9660/cd9660_vnops.c
==
--- head/sys/fs/cd9660/cd9660_vnops.c   Sun Mar  4 14:12:57 2012
(r232492)
+++ head/sys/fs/cd9660/cd9660_vnops.c   Sun Mar  4 14:51:42 2012
(r232493)
@@ -318,8 +318,7 @@ cd9660_read(ap)
do {
lbn = lblkno(imp, uio->uio_offset);
on = blkoff(imp, uio->uio_offset);
-   n = MIN((u_int)(imp->logical_block_size - on),
-   uio->uio_resid);
+   n = MIN(imp->logical_block_size - on, uio->uio_resid);
diff = (off_t)ip->i_size - uio->uio_offset;
if (diff <= 0)
return (0);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232494 - head/sys/kern

2012-03-04 Thread Konstantin Belousov
Author: kib
Date: Sun Mar  4 14:55:37 2012
New Revision: 232494
URL: http://svn.freebsd.org/changeset/base/232494

Log:
  Instead of incomplete handling of read(2)/write(2) return values that
  does not fit into registers, declare that we do not support this case
  using CTASSERT(), and remove endianess-unsafe code to split return value
  into td_retval.
  
  While there, change the style of the sysctl debug.iosize_max_clamp
  definition.
  
  Requested by: bde
  MFC after:3 weeks

Modified:
  head/sys/kern/sys_generic.c

Modified: head/sys/kern/sys_generic.c
==
--- head/sys/kern/sys_generic.c Sun Mar  4 14:51:42 2012(r232493)
+++ head/sys/kern/sys_generic.c Sun Mar  4 14:55:37 2012(r232494)
@@ -75,8 +75,14 @@ __FBSDID("$FreeBSD$");
 #include 
 
 int iosize_max_clamp = 1;
-SYSCTL_INT(_debug, OID_AUTO, iosize_max_clamp, CTLFLAG_RW, &iosize_max_clamp, 
0,
-"Clamp max i/o size to INT_MAX");
+SYSCTL_INT(_debug, OID_AUTO, iosize_max_clamp, CTLFLAG_RW,
+&iosize_max_clamp, 0, "Clamp max i/o size to INT_MAX");
+/*
+ * Assert that the return value of read(2) and write(2) syscalls fits
+ * into a register.  If not, an architecture will need to provide the
+ * usermode wrappers to reconstruct the result.
+ */
+CTASSERT(sizeof(register_t) >= sizeof(size_t));
 
 static MALLOC_DEFINE(M_IOCTLOPS, "ioctlops", "ioctl data buffer");
 static MALLOC_DEFINE(M_SELECT, "select", "select() buffer");
@@ -338,12 +344,7 @@ dofileread(td, fd, fp, auio, offset, fla
ktrgenio(fd, UIO_READ, ktruio, error);
}
 #endif
-#if SSIZE_MAX > LONG_MAX
-   td->td_retval[1] = cnt >> (sizeof(register_t) * CHAR_BIT);
-   td->td_retval[0] = cnt;
-#else
td->td_retval[0] = cnt;
-#endif
return (error);
 }
 
@@ -555,12 +556,7 @@ dofilewrite(td, fd, fp, auio, offset, fl
ktrgenio(fd, UIO_WRITE, ktruio, error);
}
 #endif
-#if SSIZE_MAX > LONG_MAX
-   td->td_retval[1] = cnt >> (sizeof(register_t) * CHAR_BIT);
-   td->td_retval[0] = cnt;
-#else
td->td_retval[0] = cnt;
-#endif
return (error);
 }
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232495 - head/sys/kern

2012-03-04 Thread Konstantin Belousov
Author: kib
Date: Sun Mar  4 15:09:01 2012
New Revision: 232495
URL: http://svn.freebsd.org/changeset/base/232495

Log:
  pipe_read(): change the type of size to int, and remove signed clamp.
  pipe_write(): change the type of desiredsize back to int, its value fits.
  
  Requested by: bde
  MFC after:3 weeks

Modified:
  head/sys/kern/sys_pipe.c

Modified: head/sys/kern/sys_pipe.c
==
--- head/sys/kern/sys_pipe.cSun Mar  4 14:55:37 2012(r232494)
+++ head/sys/kern/sys_pipe.cSun Mar  4 15:09:01 2012(r232495)
@@ -647,7 +647,7 @@ pipe_read(fp, uio, active_cred, flags, t
struct pipe *rpipe;
int error;
int nread = 0;
-   u_int size;
+   int size;
 
rpipe = fp->f_data;
PIPE_LOCK(rpipe);
@@ -681,7 +681,7 @@ pipe_read(fp, uio, active_cred, flags, t
if (size > rpipe->pipe_buffer.cnt)
size = rpipe->pipe_buffer.cnt;
if (size > uio->uio_resid)
-   size = (u_int) uio->uio_resid;
+   size = uio->uio_resid;
 
PIPE_UNLOCK(rpipe);
error = uiomove(
@@ -1023,8 +1023,9 @@ pipe_write(fp, uio, active_cred, flags, 
struct thread *td;
int flags;
 {
-   int error;
-   size_t desiredsize, orig_resid;
+   int error = 0;
+   int desiredsize;
+   ssize_t orig_resid;
struct pipe *wpipe, *rpipe;
 
rpipe = fp->f_data;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


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

2012-03-04 Thread Eitan Adler
Author: eadler
Date: Sun Mar  4 15:22:03 2012
New Revision: 232496
URL: http://svn.freebsd.org/changeset/base/232496

Log:
  PR:   docs/158813
  Submitted by: Ben Kaduk 
  Approved by:  bcr
  MFC after:1 week

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

Modified: head/share/man/man4/jme.4
==
--- head/share/man/man4/jme.4   Sun Mar  4 15:09:01 2012(r232495)
+++ head/share/man/man4/jme.4   Sun Mar  4 15:22:03 2012(r232496)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 29, 2011
+.Dd March 4, 2012
 .Dt JME 4
 .Os
 .Sh NAME
@@ -130,23 +130,26 @@ variables and
 tunables:
 .Bl -tag -width "xx"
 .It Va dev.jme.%d.tx_coal_to
-Maximum amount of time to delay for Tx completion interrupt in
-units of 1us.
-The accepted range is 1 to 65535, the default is 100 (100us).
+This variable sets the maximum amount of time to delay
+before sending a Tx completion interrupt, in microseconds.
+The accepted range is 1 to 65535; the default is 100 (100us).
 .It Va dev.jme.%d.tx_coal_pkt
-Maximum number of packets to fire Tx completion interrupt.
-The accepted range is 1 to 255, the default is 8.
+This variable sets the maximum number of outgoing packets which may be
+coalesced together into a single Tx completion interrupt.
+The accepted range is 1 to 255; the default is 8.
 .It Va dev.jme.%d.rx_coal_to
-Maximum amount of time to delay for Rx completion interrupt in
-units of 1us.
-The accepted range is 1 to 65535, the default is 100 (100us).
+This variable sets the maximum amount of time to wait for
+additional packets to arrive (for possible packet coalescing)
+before firing an Rx completion interrupt, in microseconds.
+The accepted range is 1 to 65535; the default is 100 (100us).
 .It Va dev.jme.%d.rx_coal_pkt
-Maximum number of packets to fire Rx completion interrupt.
-The accepted range is 1 to 255, the default is 2.
+This variable sets the maximum number of incoming packets which may be
+coalesced into a single Rx completion interrupt.
+The accepted range is 1 to 255; the default is 2.
 .It Va dev.jme.%d.process_limit
-Maximum amount of Rx events to be processed in the event loop before
-rescheduling a taskqueue.
-The accepted range is 10 to 255, the default value is 128 events.
+This variable sets the maximum number of events that will be processed
+in a single batch before the handler is requeued into a taskqueue.
+The accepted range is 10 to 255; the default value is 128 events.
 The interface does not need to be brought down and up again before
 a change takes effect.
 .El
@@ -173,22 +176,22 @@ driver tries to avoid unnecessary statio
 controllers that use eFuse to store station address.
 The number of times that eFuse can be safely reprogrammed is 16 at
 most.
-In addition, there is no way to restore factory default station
-address once station address is reprogrammed via eFuse.
-It is highly recommended not to reprogram station address and
-it is responsibility of administrator to store original station
-address into a safe place when station address should be changed.
+In addition, there is no way to restore the factory default station
+address once the station address has been reprogrammed via eFuse.
+It is highly recommended not to reprogram the station address and
+it is the responsibility of the administrator to store the original station
+address in a safe place when station address is changed.
 .Pp
 There are two known 1000baseT link establishment issues with JMC25x.
 If the full mask revision number of JMC25x controller is less than
-or equal to 4 and link partner enabled IEEE 802.3az Energy Efficient
-Ethernet feature,  the controller would not be able to establish a
+or equal to 4 and the link partner enabled the IEEE 802.3az Energy Efficient
+Ethernet feature,  the controller will not be able to establish a
 1000baseT link.
-Also if the length of cable is longer than 120 meters, controller
+Also, if the length of the cable is longer than 120 meters, the controller
 can not establish a 1000baseT link.
-The known workaround for the issue is to force manual link
+The known workaround for these issues is to force manual link
 configuration with 100baseTX instead of relying on auto-negotiation.
-The full mask revision number of controller could be checked with
+The full mask revision number of controller can be checked with the
 verbose kernel boot option.
-Use lower nibble of chip revision number to get full mask revision of
-the controller. 
+Use the lower nibble of the chip revision number to get the
+full mask revision of the controller.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r232496 - head/share/man/man4

2012-03-04 Thread Eitan Adler
On Sun, Mar 4, 2012 at 10:22 AM, Eitan Adler  wrote:
> Author: eadler
> Date: Sun Mar  4 15:22:03 2012
> New Revision: 232496
> URL: http://svn.freebsd.org/changeset/base/232496
>
> Log:
>  PR:           docs/158813
>  Submitted by: Ben Kaduk 
>  Approved by:  bcr
>  MFC after:    1 week

Forgot the actual log message. :(

"Fix a variety of English language grammar issues and style nits"



-- 
Eitan Adler
Source & Ports committer
X11, Bugbusting teams
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232497 - head/lib/libc/arm

2012-03-04 Thread Olivier Houchard
Author: cognet
Date: Sun Mar  4 15:25:11 2012
New Revision: 232497
URL: http://svn.freebsd.org/changeset/base/232497

Log:
  Add  __aeabi_read_tp to the symbol list.

Modified:
  head/lib/libc/arm/Symbol.map

Modified: head/lib/libc/arm/Symbol.map
==
--- head/lib/libc/arm/Symbol.mapSun Mar  4 15:22:03 2012
(r232496)
+++ head/lib/libc/arm/Symbol.mapSun Mar  4 15:25:11 2012
(r232497)
@@ -40,6 +40,7 @@ FBSDprivate_1.0 {
__sys_exit;
 
_set_tp;
+   __aeabi_read_tp;
___longjmp;
__umodsi3;
__modsi3;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232498 - in head: etc/mtree include include/xlocale lib/libc/locale sys/sys

2012-03-04 Thread David Chisnall
Author: theraven
Date: Sun Mar  4 15:31:13 2012
New Revision: 232498
URL: http://svn.freebsd.org/changeset/base/232498

Log:
  Reapply 227753 (xlocale cleanup), plus some fixes so that it passes build
  universe with gcc.
  
  Approved by:  dim (mentor)

Added:
  head/include/xlocale/
 - copied from r231713, head/include/xlocale/
Deleted:
  head/include/_xlocale_ctype.h
Modified:
  head/etc/mtree/BSD.include.dist
  head/include/Makefile
  head/include/ctype.h
  head/include/langinfo.h
  head/include/locale.h
  head/include/runetype.h
  head/include/string.h
  head/include/time.h
  head/include/wchar.h
  head/include/wctype.h
  head/include/xlocale.h
  head/include/xlocale/_ctype.h
  head/lib/libc/locale/Symbol.map
  head/lib/libc/locale/setrunelocale.c
  head/lib/libc/locale/table.c
  head/lib/libc/locale/xlocale.c
  head/lib/libc/locale/xlocale_private.h
  head/sys/sys/cdefs.h

Modified: head/etc/mtree/BSD.include.dist
==
--- head/etc/mtree/BSD.include.dist Sun Mar  4 15:25:11 2012
(r232497)
+++ head/etc/mtree/BSD.include.dist Sun Mar  4 15:31:13 2012
(r232498)
@@ -329,4 +329,6 @@
 ..
 vm
 ..
+xlocale
+..
 ..

Modified: head/include/Makefile
==
--- head/include/Makefile   Sun Mar  4 15:25:11 2012(r232497)
+++ head/include/Makefile   Sun Mar  4 15:31:13 2012(r232498)
@@ -6,7 +6,7 @@
 .include 
 
 CLEANFILES= osreldate.h version vers.c
-SUBDIR= arpa gssapi protocols rpcsvc rpc
+SUBDIR= arpa gssapi protocols rpcsvc rpc xlocale
 INCS=  a.out.h ar.h assert.h bitstring.h complex.h cpio.h _ctype.h ctype.h \
db.h \
dirent.h dlfcn.h elf.h elf-hints.h err.h fmtmsg.h fnmatch.h fstab.h \
@@ -24,7 +24,7 @@ INCS= a.out.h ar.h assert.h bitstring.h 
strings.h sysexits.h tar.h termios.h tgmath.h \
time.h timeconv.h timers.h ttyent.h \
ulimit.h unistd.h utime.h utmpx.h uuid.h varargs.h vis.h \
-   wchar.h wctype.h wordexp.h xlocale.h _xlocale_ctype.h
+   wchar.h wctype.h wordexp.h xlocale.h
 
 MHDRS= float.h floatingpoint.h stdarg.h
 

Modified: head/include/ctype.h
==
--- head/include/ctype.hSun Mar  4 15:25:11 2012(r232497)
+++ head/include/ctype.hSun Mar  4 15:31:13 2012(r232498)
@@ -78,6 +78,10 @@ int  isphonogram(int);
 intisrune(int);
 intisspecial(int);
 #endif
+
+#if __POSIX_VISIBLE >= 200809
+#include 
+#endif
 __END_DECLS
 
 #ifndef __cplusplus

Modified: head/include/langinfo.h
==
--- head/include/langinfo.h Sun Mar  4 15:25:11 2012(r232497)
+++ head/include/langinfo.h Sun Mar  4 15:31:13 2012(r232498)
@@ -130,6 +130,10 @@ typedef__nl_item   nl_item;
 
 __BEGIN_DECLS
 char   *nl_langinfo(nl_item);
+
+#if __POSIX_VISIBLE >= 200809
+#include 
+#endif
 __END_DECLS
 
 #endif /* !_LANGINFO_H_ */

Modified: head/include/locale.h
==
--- head/include/locale.h   Sun Mar  4 15:25:11 2012(r232497)
+++ head/include/locale.h   Sun Mar  4 15:31:13 2012(r232498)
@@ -77,54 +77,11 @@ struct lconv {
 __BEGIN_DECLS
 struct lconv   *localeconv(void);
 char   *setlocale(int, const char *);
-__END_DECLS
 
 #if __POSIX_VISIBLE >= 200809
-
-#define LC_COLLATE_MASK  (1<<0)
-#define LC_CTYPE_MASK(1<<1)
-#define LC_MESSAGES_MASK (1<<2)
-#define LC_MONETARY_MASK (1<<3)
-#define LC_NUMERIC_MASK  (1<<4)
-#define LC_TIME_MASK (1<<5)
-#define LC_ALL_MASK  (LC_COLLATE_MASK | LC_CTYPE_MASK | LC_MESSAGES_MASK | 
\
-   LC_MONETARY_MASK | LC_NUMERIC_MASK | LC_TIME_MASK)
-
-#define LC_GLOBAL_LOCALE ((locale_t)-1)
-
-__BEGIN_DECLS
-
-typedef struct _xlocale *locale_t;
-/**
- * Creates a new locale.  
- */
-locale_tnewlocale(int mask, const char *locale, locale_t base);
-
-/**
- * Returns an identical duplicate of the passed locale.  The returned locale
- * must be freed with freelocale().  The returned locale will share components
- * with the original.
- */
-locale_tduplocale(locale_t base);
-/*
- * Free a locale_t.  This is quite a poorly named function.  It actually
- * disclaims a reference to a locale_t, rather than freeing it.  
- */
-int freelocale(locale_t loc);
-
-/*
- * Returns the name of the locale for a particular component of a locale_t.
- */
-const char *querylocale(int mask, locale_t loc);
-
-/*
- * Installs the specified locale_t as this thread's locale.
- */
-locale_tuselocale(locale_t loc);
-
+#include 
+#endif
 __END_DECLS
 
-#endif /* __POSIX_VISIBLE >= 200809 */
-
 
 #endif /* _LOCALE_H_ */

Modified: head/include/runetype.h
=

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

2012-03-04 Thread Eitan Adler
Author: eadler
Date: Sun Mar  4 16:26:49 2012
New Revision: 232501
URL: http://svn.freebsd.org/changeset/base/232501

Log:
  ehci tunables are only available when kernel is compiled with USB_DEBUG
  
  PR:   docs/163646
  Reported by:  Momchil Ivanov 
  Submitted by: Benjamin Kaduk 
  Approved by:  cperciva
  MFC after:1 week

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

Modified: head/share/man/man4/ehci.4
==
--- head/share/man/man4/ehci.4  Sun Mar  4 16:24:58 2012(r232500)
+++ head/share/man/man4/ehci.4  Sun Mar  4 16:26:49 2012(r232501)
@@ -80,7 +80,11 @@ The
 device driver first appeared in
 .Fx 5.1 .
 .Sh LOADER TUNABLES
-Tunables can be set at the
+When the kernel has been compiled with
+.Cd options USB_DEBUG ,
+some tunables become available that affect the behavior of
+.Nm .
+These tunables can be set at the
 .Xr loader 8
 prompt before booting the kernel or stored in
 .Xr loader.conf 5 .
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232502 - head/sbin/geom/class/eli

2012-03-04 Thread Eitan Adler
Author: eadler
Date: Sun Mar  4 16:37:44 2012
New Revision: 232502
URL: http://svn.freebsd.org/changeset/base/232502

Log:
  Fix a variety of grammar issues and style nits.
  
  PR:   docs/165668
  Submitted by: Robert Simmons 
  Reviewed by:  ka...@mit.edu
  Approved by:  cperciva
  MFC after:1 week

Modified:
  head/sbin/geom/class/eli/geli.8

Modified: head/sbin/geom/class/eli/geli.8
==
--- head/sbin/geom/class/eli/geli.8 Sun Mar  4 16:26:49 2012
(r232501)
+++ head/sbin/geom/class/eli/geli.8 Sun Mar  4 16:37:44 2012
(r232502)
@@ -24,29 +24,29 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd October 25, 2011
+.Dd March 4, 2012
 .Dt GELI 8
 .Os
 .Sh NAME
 .Nm geli
-.Nd "control utility for cryptographic GEOM class"
+.Nd "control utility for the cryptographic GEOM class"
 .Sh SYNOPSIS
-To compile GEOM_ELI into your kernel, place the following lines in your kernel
+To compile GEOM_ELI into your kernel, add the following lines to your kernel
 configuration file:
 .Bd -ragged -offset indent
 .Cd "device crypto"
 .Cd "options GEOM_ELI"
 .Ed
 .Pp
-Alternately, to load the GEOM_ELI module at boot time, place the following line
-in your
+Alternatively, to load the GEOM_ELI module at boot time, add the following line
+to your
 .Xr loader.conf 5 :
 .Bd -literal -offset indent
 geom_eli_load="YES"
 .Ed
 .Pp
 Usage of the
-.Xr geli 8
+.Nm
 utility:
 .Pp
 .Nm
@@ -189,7 +189,8 @@ or
 Can create a key from a couple of components (user entered passphrase, random
 bits from a file, etc.).
 .It
-Allows to encrypt the root partition - the user will be asked for the
+Allows encryption of the root partition.
+The user will be asked for the
 passphrase before the root file system is mounted.
 .It
 The passphrase of the user is strengthened with:
@@ -200,29 +201,30 @@ The passphrase of the user is strengthen
 .%N 2898
 .Re
 .It
-Allows to use two independent keys (e.g.
+Allows the use of two independent keys (e.g., a
 .Qq "user key"
-and
+and a
 .Qq "company key" ) .
 .It
 It is fast -
 .Nm
 performs simple sector-to-sector encryption.
 .It
-Allows to backup/restore Master Keys, so when a user has to quickly
-destroy his keys,
-it is possible to get the data back by restoring keys from the backup.
+Allows Master Keys to be backed up and restored,
+so that if a user has to quickly destroy his keys,
+it is possible to get the data back by restoring keys from
+backup.
 .It
 Providers can be configured to automatically detach on last close
 (so users do not have to remember to detach providers after unmounting
 the file systems).
 .It
-Allows to attach a provider with a random, one-time key - useful for swap
+Allows attaching a provider with a random, one-time key - useful for swap
 partitions and temporary file systems.
 .It
-Allows to verify data integrity (data authentication).
+Allows verification of data integrity (data authentication).
 .It
-Allows to suspend and resume encrypted devices.
+Allows suspending and resuming encrypted devices.
 .El
 .Pp
 The first argument to
@@ -230,12 +232,12 @@ The first argument to
 indicates an action to be performed:
 .Bl -tag -width ".Cm configure"
 .It Cm init
-Initialize provider which needs to be encrypted.
+Initialize the provider which needs to be encrypted.
 Here you can set up the cryptographic algorithm to use, key length, etc.
-The last provider's sector is used to store metadata.
+The last sector of the provider is used to store metadata.
 The
 .Cm init
-subcommand also automatically backups metadata in
+subcommand also automatically writes metadata backups to
 .Pa /var/backups/.eli
 file.
 The metadata can be recovered with the
@@ -246,7 +248,7 @@ Additional options include:
 .Bl -tag -width ".Fl J Ar newpassfile"
 .It Fl a Ar aalgo
 Enable data integrity verification (authentication) using the given algorithm.
-This will reduce size of available storage and also reduce speed.
+This will reduce the size of storage available and also reduce speed.
 For example, when using 4096 bytes sector and
 .Nm HMAC/SHA256
 algorithm, 89% of the original provider storage will be available for use.
@@ -320,9 +322,9 @@ and 192 for
 Do not use passphrase as the key component.
 .It Fl s Ar sectorsize
 Change decrypted provider's sector size.
-Increasing sector size allows to increase performance, because we need to
-generate an IV and do encrypt/decrypt for every single sector - less number
-of sectors means less work to do.
+Increasing the sector size allows increased performance,
+because encryption/decryption which requires an initialization vector
+is done per sector; fewer sectors means less computational work.
 .It Fl V Ar version
 Metadata version to use.
 This option is helpful when creating provider that may be used by older
@@ -345,7 +347,7 @@ Additional options include:
 .Bl -tag -width ".Fl j Ar passfile"
 .It Fl d
 If specified, a decrypted provider will be detached automatically on last 
c

svn commit: r232503 - head/lib/libc/string

2012-03-04 Thread Eitan Adler
Author: eadler
Date: Sun Mar  4 16:39:08 2012
New Revision: 232503
URL: http://svn.freebsd.org/changeset/base/232503

Log:
  POSIX mandates that swab do nothing when len < 0
  
  PR:   kern/140690
  Submitted by: Jeremy Huddleston 
  Approved by:  cperciva
  MFC after:2 weeks

Modified:
  head/lib/libc/string/swab.3
  head/lib/libc/string/swab.c

Modified: head/lib/libc/string/swab.3
==
--- head/lib/libc/string/swab.3 Sun Mar  4 16:37:44 2012(r232502)
+++ head/lib/libc/string/swab.3 Sun Mar  4 16:39:08 2012(r232503)
@@ -28,7 +28,7 @@
 .\" @(#)swab.3 8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd December 10, 2004
+.Dd March 4, 2012
 .Dt SWAB 3
 .Os
 .Sh NAME
@@ -54,6 +54,9 @@ swapping adjacent bytes.
 The argument
 .Fa len
 must be an even number.
+If
+.Fa len
+is less than zero, nothing will be done.
 .Sh SEE ALSO
 .Xr bzero 3 ,
 .Xr memset 3

Modified: head/lib/libc/string/swab.c
==
--- head/lib/libc/string/swab.c Sun Mar  4 16:37:44 2012(r232502)
+++ head/lib/libc/string/swab.c Sun Mar  4 16:39:08 2012(r232503)
@@ -45,6 +45,8 @@ swab(const void * __restrict from, void 
int n;
char *fp, *tp;
 
+   if (len <= 0)
+   return;
n = len >> 1;
fp = (char *)from;
tp = (char *)to;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232504 - head/lib/libc/stdio

2012-03-04 Thread Eitan Adler
Author: eadler
Date: Sun Mar  4 16:41:07 2012
New Revision: 232504
URL: http://svn.freebsd.org/changeset/base/232504

Log:
  Remove reference to gcc's non-standard -fwritable-strings, which
  doesn't exist in recent releases (and is bad advice anyway)
  
  PR:   docs/163119
  Submitted by: Yuri Pankov 
  Approved by:  cperciva
  MFC after:1 week

Modified:
  head/lib/libc/stdio/mktemp.3

Modified: head/lib/libc/stdio/mktemp.3
==
--- head/lib/libc/stdio/mktemp.3Sun Mar  4 16:39:08 2012
(r232503)
+++ head/lib/libc/stdio/mktemp.3Sun Mar  4 16:41:07 2012
(r232504)
@@ -28,7 +28,7 @@
 .\" @(#)mktemp.3   8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd February 11, 1998
+.Dd March 4, 2012
 .Dt MKTEMP 3
 .Os
 .Sh NAME
@@ -180,12 +180,6 @@ with an argument of
 will result in a core dump due to
 .Fn mkstemp
 attempting to modify the string constant that was given.
-If the program in question makes heavy use of that type
-of function call, you do have the option of compiling the program
-so that it will store string constants in a writable segment of memory.
-See
-.Xr gcc 1
-for more information.
 .Sh SEE ALSO
 .Xr chmod 2 ,
 .Xr getpid 2 ,
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232505 - head/lib/libc/stdio

2012-03-04 Thread Eitan Adler
Author: eadler
Date: Sun Mar  4 16:44:04 2012
New Revision: 232505
URL: http://svn.freebsd.org/changeset/base/232505

Log:
  Remove outdated comment of seven years
  
  PR:   docs/116116
  Approved by:  cperciva
  MFC after:1 week

Modified:
  head/lib/libc/stdio/mktemp.3

Modified: head/lib/libc/stdio/mktemp.3
==
--- head/lib/libc/stdio/mktemp.3Sun Mar  4 16:41:07 2012
(r232504)
+++ head/lib/libc/stdio/mktemp.3Sun Mar  4 16:44:04 2012
(r232505)
@@ -236,10 +236,3 @@ and the return status of the call should
 This will ensure that the program does not continue blindly
 in the event that an attacker has already created the file
 with the intention of manipulating or reading its contents.
-.Pp
-The implementation of these functions calls
-.Xr arc4random 3 ,
-which is not reentrant.
-You must provide your own locking around this and other consumers of the
-.Xr arc4random 3
-API.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232506 - head/sys/modules/dtrace/dtrace

2012-03-04 Thread Eitan Adler
Author: eadler
Date: Sun Mar  4 16:46:27 2012
New Revision: 232506
URL: http://svn.freebsd.org/changeset/base/232506

Log:
  Explicitly list dependency
  
  PR:   misc/160463
  Submitted by: Garrett Cooper 
  Helped by:kan
  Approved by:  cperciva
  MFC after:3 days

Modified:
  head/sys/modules/dtrace/dtrace/Makefile

Modified: head/sys/modules/dtrace/dtrace/Makefile
==
--- head/sys/modules/dtrace/dtrace/Makefile Sun Mar  4 16:44:04 2012
(r232505)
+++ head/sys/modules/dtrace/dtrace/Makefile Sun Mar  4 16:46:27 2012
(r232506)
@@ -42,4 +42,6 @@ EXPORT_SYMS=  dtrace_register \
dtrace_unregister \
dtrace_probe_lookup
 
+dtrace_asm.o:  assym.s
+
 .include 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


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

2012-03-04 Thread Eitan Adler
Author: eadler
Date: Sun Mar  4 16:59:45 2012
New Revision: 232507
URL: http://svn.freebsd.org/changeset/base/232507

Log:
  Bump date as modified the man page
  
  Submitted by: gjb

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

Modified: head/share/man/man4/ehci.4
==
--- head/share/man/man4/ehci.4  Sun Mar  4 16:46:27 2012(r232506)
+++ head/share/man/man4/ehci.4  Sun Mar  4 16:59:45 2012(r232507)
@@ -29,7 +29,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd February 24, 2011
+.Dd March 4, 2012
 .Dt EHCI 4
 .Os
 .Sh NAME
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232509 - head/sys/compat/ndis

2012-03-04 Thread Bruce Cran
Author: brucec
Date: Sun Mar  4 17:08:43 2012
New Revision: 232509
URL: http://svn.freebsd.org/changeset/base/232509

Log:
  Fix race condition in KfRaiseIrql().
  
  After getting the current irql, if the kthread gets preempted and
  subsequently runs on a different CPU, the saved irql could be wrong.
  
  Also, correct the panic string.
  
  PR:   kern/165630
  Submitted by: Vladislav Movchan 

Modified:
  head/sys/compat/ndis/subr_hal.c

Modified: head/sys/compat/ndis/subr_hal.c
==
--- head/sys/compat/ndis/subr_hal.c Sun Mar  4 17:00:46 2012
(r232508)
+++ head/sys/compat/ndis/subr_hal.c Sun Mar  4 17:08:43 2012
(r232509)
@@ -392,16 +392,18 @@ KfRaiseIrql(uint8_t irql)
 {
uint8_t oldirql;
 
+   sched_pin();
oldirql = KeGetCurrentIrql();
 
/* I am so going to hell for this. */
if (oldirql > irql)
-   panic("IRQL_NOT_LESS_THAN");
+   panic("IRQL_NOT_LESS_THAN_OR_EQUAL");
 
-   if (oldirql != DISPATCH_LEVEL) {
-   sched_pin();
+   if (oldirql != DISPATCH_LEVEL) 
mtx_lock(&disp_lock[curthread->td_oncpu]);
-   }
+   else
+   sched_unpin();  
+
 /*printf("RAISE IRQL: %d %d\n", irql, oldirql);*/
 
return (oldirql);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232510 - head/usr.sbin/pc-sysinstall/backend

2012-03-04 Thread Eitan Adler
Author: eadler
Date: Sun Mar  4 17:33:22 2012
New Revision: 232510
URL: http://svn.freebsd.org/changeset/base/232510

Log:
  Permit the use of raidz3 in pc-sysinstall
  
  PR:   conf/164709
  Submitted by: Garrett Cooper 
  Reviewed by:  brd, brooks
  Approved by:  cperciva
  MFC after:3 days

Modified:
  head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh

Modified: head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh
==
--- head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh   Sun Mar  4 
17:08:43 2012(r232509)
+++ head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh   Sun Mar  4 
17:33:22 2012(r232510)
@@ -59,7 +59,7 @@ get_fs_line_xvars()
   ZTYPE="NONE"
   ZFSVARS="`echo $LINE | cut -d '(' -f 2- | cut -d ')' -f 1 | xargs`"
 
-  echo $ZFSVARS | grep -qE 
"^(disk|file|mirror|raidz(1|2)?|spare|log|cache):" 2>/dev/null
+  echo $ZFSVARS | grep -qE 
"^(disk|file|mirror|raidz(1|2|3)?|spare|log|cache):" 2>/dev/null
  if [ $? -eq 0 ] ; then
ZTYPE=`echo $ZFSVARS | cut -f1 -d:`
ZFSVARS=`echo $ZFSVARS | sed "s|$ZTYPE: ||g" | sed "s|$ZTYPE:||g"`
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232512 - head/sys/arm/mv

2012-03-04 Thread Rafal Jaworowski
Author: raj
Date: Sun Mar  4 18:13:45 2012
New Revision: 232512
URL: http://svn.freebsd.org/changeset/base/232512

Log:
  Remove unused #defines. All this is now retrieved from the device tree.
  
  MFC after:1 week

Modified:
  head/sys/arm/mv/mvreg.h

Modified: head/sys/arm/mv/mvreg.h
==
--- head/sys/arm/mv/mvreg.h Sun Mar  4 17:53:40 2012(r232511)
+++ head/sys/arm/mv/mvreg.h Sun Mar  4 18:13:45 2012(r232512)
@@ -34,132 +34,6 @@
 #ifndef _MVREG_H_
 #define _MVREG_H_
 
-/*
- * Interrupt sources
- */
-#if defined(SOC_MV_ORION)
-
-#define MV_INT_BRIDGE  0   /* AHB-MBus Bridge Interrupt */
-#define MV_INT_UART0   3   /* UART0 Interrupt */
-#define MV_INT_UART1   4
-#define MV_INT_GPIO7_0 6   /* GPIO[7:0] Interrupt */
-#define MV_INT_GPIO15_87   /* GPIO[15:8] Interrupt */
-#define MV_INT_GPIO23_16   8   /* GPIO[23:16] Interrupt */
-#define MV_INT_GPIO31_24   9   /* GPIO[31:24] Interrupt */
-#define MV_INT_PEX0_ERR10  /* PCI Express Error */
-#define MV_INT_PEX011  /* PCI Express INTA,B,C,D Message */
-#define MV_INT_PCI_ERR 15  /* PCI Error */
-#define MV_INT_USB_BERR16  /* USB Bridge Error */
-#define MV_INT_USB_CI  17  /* USB Controller interrupt */
-#define MV_INT_GBERX   18  /* GbE receive interrupt */
-#define MV_INT_GBETX   19  /* GbE transmit interrupt */
-#define MV_INT_GBEMISC 20  /* GbE misc. interrupt */
-#define MV_INT_GBESUM  21  /* GbE summary interrupt */
-#define MV_INT_GBEERR  22  /* GbE error interrupt */
-#define MV_INT_IDMA_ERR23  /* DMA error interrupt */
-#define MV_INT_IDMA0   24  /* IDMA chan. 0 completion interrupt */
-#define MV_INT_IDMA1   25  /* IDMA chan. 1 completion interrupt */
-#define MV_INT_IDMA2   26  /* IDMA chan. 2 completion interrupt */
-#define MV_INT_IDMA3   27  /* IDMA chan. 3 completion interrupt */
-#define MV_INT_SATA29  /* Serial-ATA Interrupt */
-
-#elif defined(SOC_MV_KIRKWOOD)
-
-#define MV_INT_BRIDGE  1   /* AHB-MBus Bridge Interrupt */
-#define MV_INT_XOR0_CHAN0  5   /* XOR engine 0 channel 0 Interrupt */
-#define MV_INT_XOR0_CHAN1  6   /* XOR engine 0 channel 1 Interrupt */
-#define MV_INT_XOR1_CHAN0  7   /* XOR engine 1 channel 0 Interrupt */
-#define MV_INT_XOR1_CHAN1  8   /* XOR engine 1 channel 1 Interrupt */
-#define MV_INT_PEX09   /* PCI Express INTA,B,C,D Message */
-#define MV_INT_GBESUM  11  /* GbE0 summary interrupt */
-#define MV_INT_GBERX   12  /* GbE0 receive interrupt */
-#define MV_INT_GBETX   13  /* GbE0 transmit interrupt */
-#define MV_INT_GBEMISC 14  /* GbE0 misc. interrupt */
-#define MV_INT_GBE1SUM 15  /* GbE1 summary interrupt */
-#define MV_INT_GBE1RX  16  /* GbE1 receive interrupt */
-#define MV_INT_GBE1TX  17  /* GbE1 transmit interrupt */
-#define MV_INT_GBE1MISC18  /* GbE1 misc. interrupt */
-#define MV_INT_USB_CI  19  /* USB Controller interrupt */
-#define MV_INT_SATA21  /* Serial-ATA Interrupt */
-#define MV_INT_CESA22  /* Security engine completion int. */
-#define MV_INT_IDMA_ERR23  /* DMA error interrupt */
-#define MV_INT_UART0   33  /* UART0 Interrupt */
-#define MV_INT_UART1   34
-#define MV_INT_GPIO7_0 35  /* GPIO[7:0] Interrupt */
-#define MV_INT_GPIO15_836  /* GPIO[15:8] Interrupt */
-#define MV_INT_GPIO23_16   37  /* GPIO[23:16] Interrupt */
-#define MV_INT_GPIO31_24   38  /* GPIO[31:24] Interrupt */
-#define MV_INT_GPIOHI7_0   39  /* GPIOHI[7:0] Interrupt */
-#define MV_INT_GPIOHI15_8  40  /* GPIOHI[15:8] Interrupt */
-#define MV_INT_GPIOHI23_16 41  /* GPIOHI[23:16] Interrupt */
-#define MV_INT_XOR0_ERR42  /* XOR engine 0 error Interrupt 
*/
-#define MV_INT_XOR1_ERR43  /* XOR engine 1 error Interrupt 
*/
-#define MV_INT_PEX0_ERR44  /* PCI Express Error */
-#define MV_INT_GBEERR  46  /* GbE0 error interrupt */
-#define MV_INT_GBE1ERR 47  /* GbE1 error interrupt */
-#define MV_INT_USB_BERR48  /* USB Bridge Error */
-
-#elif defined(SOC_MV_DISCOVERY)
-
-#define MV_INT_ERRSUM  0   /* Summary of error interrupts */
-#define MV_INT_SPI 1   /* SPI interrupt */
-#define MV_INT_TWSI0   2   /* TWSI0 interrupt */
-#define MV_INT_TWSI1   3   /* TWSI1 interrupt */
-#define MV_INT_IDMA0   4   /* IDMA Channel0 completion */
-#define MV_INT_IDMA1

svn commit: r232513 - head/sys/netinet

2012-03-04 Thread Bjoern A. Zeeb
Author: bz
Date: Sun Mar  4 18:47:20 2012
New Revision: 232513
URL: http://svn.freebsd.org/changeset/base/232513

Log:
  Correct typo in the RFC number for the constants based on IANA assignments
  for IPv6 Neighbor Discovery Option types for "IPv6 Router Advertisement
  Options for DNS Configuration".  It is RFC 6106.
  
  MFC after:3 days

Modified:
  head/sys/netinet/icmp6.h

Modified: head/sys/netinet/icmp6.h
==
--- head/sys/netinet/icmp6.hSun Mar  4 18:13:45 2012(r232512)
+++ head/sys/netinet/icmp6.hSun Mar  4 18:47:20 2012(r232513)
@@ -298,8 +298,8 @@ struct nd_opt_hdr { /* Neighbor discove
 #define ND_OPT_REDIRECTED_HEADER   4
 #define ND_OPT_MTU 5
 #define ND_OPT_ROUTE_INFO  24  /* RFC 4191 */
-#define ND_OPT_RDNSS   25  /* RFC 6016 */
-#define ND_OPT_DNSSL   31  /* RFC 6016 */
+#define ND_OPT_RDNSS   25  /* RFC 6106 */
+#define ND_OPT_DNSSL   31  /* RFC 6106 */
 
 struct nd_opt_prefix_info {/* prefix information */
u_int8_tnd_opt_pi_type;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r232264 - in head/sys: amd64/include i386/include pc98/include x86/include

2012-03-04 Thread John Baldwin
On Tuesday, February 28, 2012 01:38:34 PM Tijl Coosemans wrote:
> Author: tijl
> Date: Tue Feb 28 18:38:33 2012
> New Revision: 232264
> URL: http://svn.freebsd.org/changeset/base/232264
> 
> Log:
>   Copy amd64 _stdint.h to x86 and merge with i386 _stdint.h. Replace
>   amd64/i386/pc98 _stdint.h with stubs.
> 
> Added:
>   head/sys/x86/include/_stdint.h
>  - copied, changed from r232259, head/sys/amd64/include/_stdint.h

This broke C++ software (such as the audio/flac port), that #includes
 with __STDC_LIMIT_MACROS defined but not __STDC_CONSTANT_MACROS 
defined.  The problem is that you have changed UINT64_MAX and INT64_MAX to use 
UINT64_C() and INT64_C(), so in this case UINT64_MAX now expands to 
UINT64_C(...) which can't be resolved to a constant.

You should be able to reproduce this via the following:

% cat > bar.cc
#define __STDC_LIMIT_MACROS
#include 
% c++ -c bar.cc

(The test to see if __WORDSIZE should be defined at the end of stdint.h trips 
over this bug.)

While you could do something like add __INT64_C() and __UINT64_C() macros that 
are always defined and use them for INT64_MAX and UINT64_MAX, I think the 
simplest fix is probably to just use #ifdef _LP64 tests to define INT64_MAX 
and UINT64_MAX as pure constants as those are the only two macros effected.

(I've just hardcoded those two constants on my little netbook so I can keep 
building ports and that worked fine for audio/flac).

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


svn commit: r232514 - head/sys/netinet6

2012-03-04 Thread Bjoern A. Zeeb
Author: bz
Date: Sun Mar  4 18:51:45 2012
New Revision: 232514
URL: http://svn.freebsd.org/changeset/base/232514

Log:
  In nd6_options() ignore the RFC 6106 options completely rather than printing
  them if nd6_debug is enabled as unknown.  Leave a comment about the RFC4191
  option as I am undecided so far.
  
  Discussed with:   hrs
  MFC after:3 days

Modified:
  head/sys/netinet6/nd6.c

Modified: head/sys/netinet6/nd6.c
==
--- head/sys/netinet6/nd6.c Sun Mar  4 18:47:20 2012(r232513)
+++ head/sys/netinet6/nd6.c Sun Mar  4 18:51:45 2012(r232514)
@@ -380,6 +380,14 @@ nd6_options(union nd_opts *ndopts)
ndopts->nd_opts_pi_end =
(struct nd_opt_prefix_info *)nd_opt;
break;
+   /* What about ND_OPT_ROUTE_INFO? RFC 4191 */
+   case ND_OPT_RDNSS:  /* RFC 6106 */
+   case ND_OPT_DNSSL:  /* RFC 6106 */
+   /*
+* Silently ignore options we know and do not care about
+* in the kernel.
+*/
+   break;
default:
/*
 * Unknown options must be silently ignored,
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232515 - head/etc/rc.d

2012-03-04 Thread Bjoern A. Zeeb
Author: bz
Date: Sun Mar  4 18:53:35 2012
New Revision: 232515
URL: http://svn.freebsd.org/changeset/base/232515

Log:
  Rather than printing the output from route add for all FIBs just print them
  for the default FIB followed by a statement with a list of FIB numbers for
  all the other FIBs we install the routes for.
  
  Request by:   kib (to make it less noisy)
  Tested by:kib
  MFC after:3 days

Modified:
  head/etc/rc.d/routing

Modified: head/etc/rc.d/routing
==
--- head/etc/rc.d/routing   Sun Mar  4 18:51:45 2012(r232514)
+++ head/etc/rc.d/routing   Sun Mar  4 18:53:35 2012(r232515)
@@ -147,14 +147,21 @@ static_inet6()
: ${fibs:=1}
 
# disallow "internal" addresses to appear on the wire
-   i=0
-   while test ${i} -lt ${fibs}; do
-   setfib -F ${i} route ${_action} \
-   -inet6 :::0.0.0.0 -prefixlen 96 ::1 -reject
-   setfib -F ${i} route ${_action} \
-   -inet6 ::0.0.0.0 -prefixlen 96 ::1 -reject
-   i=$((i + 1))
-   done
+   route ${_action} -inet6 :::0.0.0.0 -prefixlen 96 ::1 -reject
+   route ${_action} -inet6 ::0.0.0.0 -prefixlen 96 ::1 -reject
+   i=1
+   if test ${i} -lt ${fibs}; then
+   printf "Also installing reject routes for FIBs"
+   while test ${i} -lt ${fibs}; do
+   setfib -F ${i} route -q ${_action} \
+   -inet6 :::0.0.0.0 -prefixlen 96 ::1 -reject
+   setfib -F ${i} route -q ${_action} \
+   -inet6 ::0.0.0.0 -prefixlen 96 ::1 -reject
+   printf " %d" ${i}
+   i=$((i + 1))
+   done
+   printf "\n"
+   fi
 
case ${ipv6_defaultrouter} in
[Nn][Oo] | '')
@@ -226,14 +233,21 @@ static_inet6()
# for the host case, you will allow to omit the identifiers.
# Under this configuration, the packets will go to the default
# interface.
-   i=0
-   while test ${i} -lt ${fibs}; do
-   setfib -F ${i} route ${_action} \
-   -inet6 fe80:: -prefixlen 10 ::1 -reject
-   setfib -F ${i} route ${_action} \
-   -inet6 ff02:: -prefixlen 16 ::1 -reject
-   i=$((i + 1))
-   done
+   route ${_action} -inet6 fe80:: -prefixlen 10 ::1 -reject
+   route ${_action} -inet6 ff02:: -prefixlen 16 ::1 -reject
+   i=1
+   if test ${i} -lt ${fibs}; then
+   printf "Also installing reject routes for FIBs"
+   while test ${i} -lt ${fibs}; do
+   setfib -F ${i} route -q ${_action} \
+   -inet6 fe80:: -prefixlen 10 ::1 -reject
+   setfib -F ${i} route -q ${_action} \
+   -inet6 ff02:: -prefixlen 16 ::1 -reject
+   printf " %d" ${i}
+   i=$((i + 1))
+   done
+   printf "\n"
+   fi
 
case ${ipv6_default_interface} in
'')
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232516 - head/share/man/man9

2012-03-04 Thread John Baldwin
Author: jhb
Date: Sun Mar  4 18:55:33 2012
New Revision: 232516
URL: http://svn.freebsd.org/changeset/base/232516

Log:
  Document pci_find_extcap() and pci_find_htcap().

Modified:
  head/share/man/man9/Makefile
  head/share/man/man9/pci.9

Modified: head/share/man/man9/Makefile
==
--- head/share/man/man9/MakefileSun Mar  4 18:53:35 2012
(r232515)
+++ head/share/man/man9/MakefileSun Mar  4 18:55:33 2012
(r232516)
@@ -981,6 +981,8 @@ MLINKS+=pci.9 pci_alloc_msi.9 \
pci.9 pci_find_cap.9 \
pci.9 pci_find_dbsf.9 \
pci.9 pci_find_device.9 \
+   pci.9 pci_find_extcap.9 \
+   pci.9 pci_find_htcap.9 \
pci.9 pci_get_max_read_req.9 \
pci.9 pci_get_powerstate.9 \
pci.9 pci_get_vpd_ident.9 \

Modified: head/share/man/man9/pci.9
==
--- head/share/man/man9/pci.9   Sun Mar  4 18:53:35 2012(r232515)
+++ head/share/man/man9/pci.9   Sun Mar  4 18:55:33 2012(r232516)
@@ -40,6 +40,8 @@
 .Nm pci_find_cap ,
 .Nm pci_find_dbsf ,
 .Nm pci_find_device ,
+.Nm pci_find_extcap ,
+.Nm pci_find_htcap ,
 .Nm pci_get_max_read_req ,
 .Nm pci_get_powerstate ,
 .Nm pci_get_vpd_ident ,
@@ -81,6 +83,10 @@
 .Ft device_t
 .Fn pci_find_device "uint16_t vendor" "uint16_t device"
 .Ft int
+.Fn pci_find_extcap "device_t dev" "int capability" "int *capreg"
+.Ft int
+.Fn pci_find_htcap "device_t dev" "int capability" "int *capreg"
+.Ft int
 .Fn pci_get_max_read_req "device_t dev"
 .Ft int
 .Fn pci_get_powerstate "device_t dev"
@@ -225,6 +231,49 @@ If the capability is not found or the de
 returns an error.
 .Pp
 The
+.Fn pci_find_extcap
+function is used to locate the first instance of a PCI-express
+extended capability register set for the device
+.Fa dev .
+The extended capability to locate is specified by ID via
+.Fa capability .
+Constant macros of the form
+.Dv PCIZ_xxx
+for standard extended capability IDs are defined in
+.In dev/pci/pcireg.h .
+If the extended capability is found, then
+.Fa *capreg
+is set the offset in configuration space of the extended capability
+register set, and
+.Fn pci_find_extcap
+returns zero.
+If the extended capability is not found or the device is not a
+PCI-express device,
+.Fn pci_find_extcap
+returns an error.
+.Pp
+The
+.Fn pci_find_htcap
+function is used to locate the first instance of a HyperTransport capability
+register set for the device
+.Fa dev .
+The capability to locate is specified by type via
+.Fa capability .
+Constant macros of the form
+.Dv PCIM_HTCAP_xxx
+for standard HyperTransport capability types are defined in
+.In dev/pci/pcireg.h .
+If the capability is found, then
+.Fa *capreg
+is set the offset in configuration space of the capability register set,
+and
+.Fn pci_find_htcap
+returns zero.
+If the capability is not found or the device is not a HyperTransport device,
+.Fn pci_find_htcap
+returns an error.
+.Pp
+The
 .Fn pci_get_vpd_ident
 function is used to fetch a device's Vital Product Data
 .Pq VPD
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232517 - head/sys/netinet

2012-03-04 Thread Marko Zec
Author: zec
Date: Sun Mar  4 18:59:38 2012
New Revision: 232517
URL: http://svn.freebsd.org/changeset/base/232517

Log:
  Change SYSINIT priorities so that ip_mroute_modevent() is executed
  before vnet_mroute_init(), since vnet_mroute_init() depends on mfchashsize
  tunable to be set, and that is done in in ip_mroute_modevent().
  Apparently I broke that ordering with r208744 almost 2 years ago...
  
  PR:   kern/162201
  Submitted by: Stevan Markovic (mcafee.com)
  MFC after:3 days

Modified:
  head/sys/netinet/ip_mroute.c

Modified: head/sys/netinet/ip_mroute.c
==
--- head/sys/netinet/ip_mroute.cSun Mar  4 18:55:33 2012
(r232516)
+++ head/sys/netinet/ip_mroute.cSun Mar  4 18:59:38 2012
(r232517)
@@ -2822,7 +2822,7 @@ vnet_mroute_init(const void *unused __un
callout_init(&V_bw_meter_ch, CALLOUT_MPSAFE);
 }
 
-VNET_SYSINIT(vnet_mroute_init, SI_SUB_PSEUDO, SI_ORDER_MIDDLE, 
vnet_mroute_init,
+VNET_SYSINIT(vnet_mroute_init, SI_SUB_PSEUDO, SI_ORDER_ANY, vnet_mroute_init,
NULL);
 
 static void
@@ -2945,4 +2945,4 @@ static moduledata_t ip_mroutemod = {
 0
 };
 
-DECLARE_MODULE(ip_mroute, ip_mroutemod, SI_SUB_PSEUDO, SI_ORDER_ANY);
+DECLARE_MODULE(ip_mroute, ip_mroutemod, SI_SUB_PSEUDO, SI_ORDER_MIDDLE);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r232496 - head/share/man/man4

2012-03-04 Thread John Baldwin
On Sunday, March 04, 2012 10:22:04 AM Eitan Adler wrote:
> Author: eadler
> Date: Sun Mar  4 15:22:03 2012
> New Revision: 232496
> URL: http://svn.freebsd.org/changeset/base/232496
> 
> Log:
>   PR: docs/158813
>   Submitted by:   Ben Kaduk 
>   Approved by:bcr
>   MFC after:  1 week

Can you do a forced commit to add a commit log of the actual change please?

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


svn commit: r232518 - in head/sys: boot/fdt/dts dev/fdt dev/mge dev/tsec

2012-03-04 Thread Rafal Jaworowski
Author: raj
Date: Sun Mar  4 19:22:52 2012
New Revision: 232518
URL: http://svn.freebsd.org/changeset/base/232518

Log:
  Respect phy-handle property in Ethernet nodes of the device tree.
  
  This lets specify whereabouts of the parent PHY for a given MAC node
  (and get rid of ugly kludges in mge(4) and tsec(4)).
  
  Obtained from:Semihalf
  MFC after:1 week

Modified:
  head/sys/boot/fdt/dts/db78100.dts
  head/sys/dev/fdt/fdt_common.c
  head/sys/dev/fdt/fdt_common.h
  head/sys/dev/mge/if_mge.c
  head/sys/dev/mge/if_mgevar.h
  head/sys/dev/tsec/if_tsec.c
  head/sys/dev/tsec/if_tsec.h
  head/sys/dev/tsec/if_tsec_fdt.c

Modified: head/sys/boot/fdt/dts/db78100.dts
==
--- head/sys/boot/fdt/dts/db78100.dts   Sun Mar  4 18:59:38 2012
(r232517)
+++ head/sys/boot/fdt/dts/db78100.dts   Sun Mar  4 19:22:52 2012
(r232518)
@@ -221,6 +221,9 @@
phy0: ethernet-phy@0 {
reg = <0x8>;
};
+   phy1: ethernet-phy@1 {
+   reg = <0x9>;
+   };
};
};
 
@@ -234,17 +237,7 @@
local-mac-address = [ 00 00 00 00 00 00 ];
interrupts = <45 46 47 44 70>;
interrupt-parent = <&PIC>;
-   phy-handle = <&phy0>;
-
-   mdio@0 {
-   #address-cells = <1>;
-   #size-cells = <0>;
-   compatible = "mrvl,mdio";
-
-   phy0: ethernet-phy@0 {
-   reg = <0x9>;
-   };
-   };
+   phy-handle = <&phy1>;
};
 
serial0: serial@12000 {

Modified: head/sys/dev/fdt/fdt_common.c
==
--- head/sys/dev/fdt/fdt_common.c   Sun Mar  4 18:59:38 2012
(r232517)
+++ head/sys/dev/fdt/fdt_common.c   Sun Mar  4 19:22:52 2012
(r232518)
@@ -542,11 +542,13 @@ out:
 }
 
 int
-fdt_get_phyaddr(phandle_t node, int *phy_addr)
+fdt_get_phyaddr(phandle_t node, device_t dev, int *phy_addr, void **phy_sc)
 {
phandle_t phy_node;
ihandle_t phy_ihandle;
pcell_t phy_handle, phy_reg;
+   uint32_t i;
+   device_t parent, child;
 
if (OF_getprop(node, "phy-handle", (void *)&phy_handle,
sizeof(phy_handle)) <= 0)
@@ -561,6 +563,47 @@ fdt_get_phyaddr(phandle_t node, int *phy
return (ENXIO);
 
*phy_addr = fdt32_to_cpu(phy_reg);
+
+   /*
+* Search for softc used to communicate with phy.
+*/
+
+   /*
+* Step 1: Search for ancestor of the phy-node with a "phy-handle"
+* property set.
+*/
+   phy_node = OF_parent(phy_node);
+   while (phy_node != 0) {
+   if (OF_getprop(phy_node, "phy-handle", (void *)&phy_handle,
+   sizeof(phy_handle)) > 0)
+   break;
+   phy_node = OF_parent(phy_node);
+   }
+   if (phy_node == 0)
+   return (ENXIO);
+
+   /*
+* Step 2: For each device with the same parent and name as ours
+* compare its node with the one found in step 1, ancestor of phy
+* node (stored in phy_node).
+*/
+   parent = device_get_parent(dev);
+   i = 0;
+   child = device_find_child(parent, device_get_name(dev), i);
+   while (child != NULL) {
+   if (ofw_bus_get_node(child) == phy_node)
+   break;
+   i++;
+   child = device_find_child(parent, device_get_name(dev), i);
+   }
+   if (child == NULL)
+   return (ENXIO);
+
+   /*
+* Use softc of the device found.
+*/
+   *phy_sc = (void *)device_get_softc(child);
+
return (0);
 }
 

Modified: head/sys/dev/fdt/fdt_common.h
==
--- head/sys/dev/fdt/fdt_common.h   Sun Mar  4 18:59:38 2012
(r232517)
+++ head/sys/dev/fdt/fdt_common.h   Sun Mar  4 19:22:52 2012
(r232518)
@@ -89,7 +89,7 @@ int fdt_data_to_res(pcell_t *, int, int,
 int fdt_data_verify(void *, int);
 phandle_t fdt_find_compatible(phandle_t, const char *, int);
 int fdt_get_mem_regions(struct mem_region *, int *, uint32_t *);
-int fdt_get_phyaddr(phandle_t node, int *);
+int fdt_get_phyaddr(phandle_t, device_t, int *, void **);
 int fdt_immr_addr(vm_offset_t);
 int fdt_regsize(phandle_t, u_long *, u_long *);
 int fdt_intr_decode(phandle_t, pcell_t *, int *, int *, int *);

Modified: head/sys/dev/mge/if_mge.c
==

Re: svn commit: r232496 - head/share/man/man4

2012-03-04 Thread Eitan Adler
On Sun, Mar 4, 2012 at 1:52 PM, John Baldwin  wrote:
> Can you do a forced commit to add a commit log of the actual change please?

I don't know of any real way to do forced commits so does the
following look acceptable?

%cat log
Forced commit because I forgot my log message in r232496:

Fix a variety of English language grammar issues and style nits

%svn diff
Index: share/man/man4/jme.4
===
--- share/man/man4/jme.4(revision 231896)
+++ share/man/man4/jme.4(working copy)

Property changes on: share/man/man4/jme.4
___
Added: forcecommit
## -0,0 +1 ##
+1
\ No newline at end of property



-- 
Eitan Adler
Source & Ports committer
X11, Bugbusting teams
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232519 - head/sys/x86/include

2012-03-04 Thread Tijl Coosemans
Author: tijl
Date: Sun Mar  4 20:02:20 2012
New Revision: 232519
URL: http://svn.freebsd.org/changeset/base/232519

Log:
  Do not use INT64_C and UINT64_C to define 64 bit integer limits.  They
  aren't defined for C++ code unless __STDC_CONSTANT_MACROS is defined.
  
  Reported by:  jhb

Modified:
  head/sys/x86/include/_stdint.h

Modified: head/sys/x86/include/_stdint.h
==
--- head/sys/x86/include/_stdint.h  Sun Mar  4 19:22:52 2012
(r232518)
+++ head/sys/x86/include/_stdint.h  Sun Mar  4 20:02:20 2012
(r232519)
@@ -69,23 +69,27 @@
  * ISO/IEC 9899:1999
  * 7.18.2.1 Limits of exact-width integer types
  */
-/* Minimum values of exact-width signed integer types. */
 #defineINT8_MIN(-0x7f-1)
 #defineINT16_MIN   (-0x7fff-1)
 #defineINT32_MIN   (-0x7fff-1)
-#defineINT64_MIN   (-INT64_C(0x7fff)-1)
 
-/* Maximum values of exact-width signed integer types. */
 #defineINT8_MAX0x7f
 #defineINT16_MAX   0x7fff
 #defineINT32_MAX   0x7fff
-#defineINT64_MAX   INT64_C(0x7fff)
 
-/* Maximum values of exact-width unsigned integer types. */
 #defineUINT8_MAX   0xff
 #defineUINT16_MAX  0x
 #defineUINT32_MAX  0xU
-#defineUINT64_MAX  UINT64_C(0x)
+
+#ifdef _LP64
+#defineINT64_MIN   (-0x7fff-1)
+#defineINT64_MAX   0x7fff
+#defineUINT64_MAX  0x
+#else
+#defineINT64_MIN   (-0x7fffLL-1)
+#defineINT64_MAX   0x7fffLL
+#defineUINT64_MAX  0xULL
+#endif
 
 /*
  * ISO/IEC 9899:1999
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r232264 - in head/sys: amd64/include i386/include pc98/include x86/include

2012-03-04 Thread Tijl Coosemans
On Sunday 04 March 2012 19:51:22 John Baldwin wrote:
> On Tuesday, February 28, 2012 01:38:34 PM Tijl Coosemans wrote:
>> Author: tijl
>> Date: Tue Feb 28 18:38:33 2012
>> New Revision: 232264
>> URL: http://svn.freebsd.org/changeset/base/232264
>> 
>> Log:
>>   Copy amd64 _stdint.h to x86 and merge with i386 _stdint.h. Replace
>>   amd64/i386/pc98 _stdint.h with stubs.
>> 
>> Added:
>>   head/sys/x86/include/_stdint.h
>>  - copied, changed from r232259, head/sys/amd64/include/_stdint.h
> 
> This broke C++ software (such as the audio/flac port), that #includes
>  with __STDC_LIMIT_MACROS defined but not __STDC_CONSTANT_MACROS 
> defined.  The problem is that you have changed UINT64_MAX and INT64_MAX to 
> use 
> UINT64_C() and INT64_C(), so in this case UINT64_MAX now expands to 
> UINT64_C(...) which can't be resolved to a constant.
> 
> You should be able to reproduce this via the following:
> 
> % cat > bar.cc
> #define __STDC_LIMIT_MACROS
> #include 
> % c++ -c bar.cc
> 
> (The test to see if __WORDSIZE should be defined at the end of stdint.h trips 
> over this bug.)
> 
> While you could do something like add __INT64_C() and __UINT64_C() macros 
> that 
> are always defined and use them for INT64_MAX and UINT64_MAX, I think the 
> simplest fix is probably to just use #ifdef _LP64 tests to define INT64_MAX 
> and UINT64_MAX as pure constants as those are the only two macros effected.
> 
> (I've just hardcoded those two constants on my little netbook so I can keep 
> building ports and that worked fine for audio/flac).

Fixed in r232519.


signature.asc
Description: This is a digitally signed message part.


svn commit: r232520 - in head/sys: amd64/amd64 amd64/include i386/include pc98/include x86/include

2012-03-04 Thread Tijl Coosemans
Author: tijl
Date: Sun Mar  4 20:24:28 2012
New Revision: 232520
URL: http://svn.freebsd.org/changeset/base/232520

Log:
  Copy amd64 ptrace.h to x86 and merge with i386 ptrace.h. Replace
  amd64/i386/pc98 ptrace.h with stubs.
  
  For amd64 PT_GETXSTATE and PT_SETXSTATE have been redefined to match the
  i386 values. The old values are still supported but should no longer be
  used.
  
  Reviewed by:  kib

Added:
  head/sys/x86/include/ptrace.h
 - copied, changed from r232518, head/sys/amd64/include/ptrace.h
Modified:
  head/sys/amd64/amd64/ptrace_machdep.c
  head/sys/amd64/include/ptrace.h
  head/sys/i386/include/ptrace.h
  head/sys/pc98/include/ptrace.h

Modified: head/sys/amd64/amd64/ptrace_machdep.c
==
--- head/sys/amd64/amd64/ptrace_machdep.c   Sun Mar  4 20:02:20 2012
(r232519)
+++ head/sys/amd64/amd64/ptrace_machdep.c   Sun Mar  4 20:24:28 2012
(r232520)
@@ -126,6 +126,12 @@ cpu_ptrace(struct thread *td, int req, v
return (cpu32_ptrace(td, req, addr, data));
 #endif
 
+   /* Support old values of PT_GETXSTATE and PT_SETXSTATE. */
+   if (req == PT_FIRSTMACH + 0)
+   req = PT_GETXSTATE;
+   if (req == PT_FIRSTMACH + 1)
+   req = PT_SETXSTATE;
+
switch (req) {
case PT_GETXSTATE:
case PT_SETXSTATE:

Modified: head/sys/amd64/include/ptrace.h
==
--- head/sys/amd64/include/ptrace.h Sun Mar  4 20:02:20 2012
(r232519)
+++ head/sys/amd64/include/ptrace.h Sun Mar  4 20:24:28 2012
(r232520)
@@ -1,41 +1,6 @@
 /*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California.  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.
- * 4. Neither the name of the University nor the names of its contributors
- *may be used to endorse or promote products derived from this software
- *without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- *
- * @(#)ptrace.h8.1 (Berkeley) 6/11/93
- * $FreeBSD$
+ * This file is in the public domain.
  */
+/* $FreeBSD$ */
 
-#ifndef _MACHINE_PTRACE_H_
-#define _MACHINE_PTRACE_H_
-
-#define__HAVE_PTRACE_MACHDEP
-
-#define PT_GETXSTATE   (PT_FIRSTMACH + 0)
-#define PT_SETXSTATE   (PT_FIRSTMACH + 1)
-
-#endif
+#include 

Modified: head/sys/i386/include/ptrace.h
==
--- head/sys/i386/include/ptrace.h  Sun Mar  4 20:02:20 2012
(r232519)
+++ head/sys/i386/include/ptrace.h  Sun Mar  4 20:24:28 2012
(r232520)
@@ -1,43 +1,6 @@
 /*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California.  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.
- * 4. Neither the name of the University nor the names of its contributors
- *may be used to endorse or promote products derived from this software
- *without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AN

Re: svn commit: r232496 - head/share/man/man4

2012-03-04 Thread Ben Kaduk
On Sun, Mar 4, 2012 at 2:32 PM, Eitan Adler  wrote:
> On Sun, Mar 4, 2012 at 1:52 PM, John Baldwin  wrote:
>> Can you do a forced commit to add a commit log of the actual change please?
>
> I don't know of any real way to do forced commits so does the
> following look acceptable?

You should be able to start that commit with an interactive editor for
the commit message, background the editor, revert the actual change,
and then foreground the editor and finish the commit.  I believe
that's the current best practice for doing forced commits.

-Ben

>
> %cat log
> Forced commit because I forgot my log message in r232496:
>
> Fix a variety of English language grammar issues and style nits
>
> %svn diff
> Index: share/man/man4/jme.4
> ===
> --- share/man/man4/jme.4        (revision 231896)
> +++ share/man/man4/jme.4        (working copy)
>
> Property changes on: share/man/man4/jme.4
> ___
> Added: forcecommit
> ## -0,0 +1 ##
> +1
> \ No newline at end of property
>
>
>
> --
> Eitan Adler
> Source & Ports committer
> X11, Bugbusting teams
> ___
> svn-src-head@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232521 - in head/sys: amd64/conf i386/conf

2012-03-04 Thread Robert Millan
Author: rmh
Date: Sun Mar  4 21:31:13 2012
New Revision: 232521
URL: http://svn.freebsd.org/changeset/base/232521

Log:
  Exclude USB drivers (except umass and ukbd) from main kernel image on i386
  and amd64.
  
  Reviewed by:  hselasky, arch, usb
  Approved by:  kib (mentor)

Modified:
  head/sys/amd64/conf/GENERIC
  head/sys/i386/conf/GENERIC
  head/sys/i386/conf/XBOX

Modified: head/sys/amd64/conf/GENERIC
==
--- head/sys/amd64/conf/GENERIC Sun Mar  4 20:24:28 2012(r232520)
+++ head/sys/amd64/conf/GENERIC Sun Mar  4 21:31:13 2012(r232521)
@@ -303,39 +303,8 @@ device ohci# OHCI PCI->USB 
interface
 device ehci# EHCI PCI->USB interface (USB 2.0)
 device xhci# XHCI PCI->USB interface (USB 3.0)
 device usb # USB Bus (required)
-#deviceudbp# USB Double Bulk Pipe devices (needs 
netgraph)
-device uhid# "Human Interface Devices"
 device ukbd# Keyboard
-device ulpt# Printer
 device umass   # Disks/Mass storage - Requires scbus and da
-device ums # Mouse
-device urio# Diamond Rio 500 MP3 player
-# USB Serial devices
-device u3g # USB-based 3G modems (Option, Huawei, Sierra)
-device uark# Technologies ARK3116 based serial adapters
-device ubsa# Belkin F5U103 and compatible serial adapters
-device uftdi   # For FTDI usb serial adapters
-device uipaq   # Some WinCE based devices
-device uplcom  # Prolific PL-2303 serial adapters
-device uslcom  # SI Labs CP2101/CP2102 serial adapters
-device uvisor  # Visor and Palm devices
-device uvscom  # USB serial support for DDI pocket's PHS
-# USB Ethernet, requires miibus
-device aue # ADMtek USB Ethernet
-device axe # ASIX Electronics USB Ethernet
-device cdce# Generic USB over Ethernet
-device cue # CATC USB Ethernet
-device kue # Kawasaki LSI USB Ethernet
-device rue # RealTek RTL8150 USB Ethernet
-device udav# Davicom DM9601E USB
-# USB Wireless
-device rum # Ralink Technology RT2501USB wireless NICs
-device run # Ralink Technology RT2700/RT2800/RT3000 NICs.
-device uath# Atheros AR5523 wireless NICs
-device upgt# Conexant/Intersil PrismGT wireless NICs.
-device ural# Ralink Technology RT2500USB wireless NICs
-device urtw# Realtek RTL8187B/L wireless NICs
-device zyd # ZyDAS zd1211/zd1211b wireless NICs
 
 # FireWire support
 device firewire# FireWire bus code
@@ -351,7 +320,6 @@ device  sound   # Generic sound driver 
(r
 device snd_es137x  # Ensoniq AudioPCI ES137x
 device snd_hda # Intel High Definition Audio
 device snd_ich # Intel, NVidia and other ICH AC'97 Audio
-device snd_uaudio  # USB Audio
 device snd_via8233 # VIA VT8233x Audio
 
 # MMC/SD

Modified: head/sys/i386/conf/GENERIC
==
--- head/sys/i386/conf/GENERIC  Sun Mar  4 20:24:28 2012(r232520)
+++ head/sys/i386/conf/GENERIC  Sun Mar  4 21:31:13 2012(r232521)
@@ -316,39 +316,8 @@ device ohci# OHCI PCI->USB 
interface
 device ehci# EHCI PCI->USB interface (USB 2.0)
 device xhci# XHCI PCI->USB interface (USB 3.0)
 device usb # USB Bus (required)
-#deviceudbp# USB Double Bulk Pipe devices (needs 
netgraph)
-device uhid# "Human Interface Devices"
 device ukbd# Keyboard
-device ulpt# Printer
 device umass   # Disks/Mass storage - Requires scbus and da
-device ums # Mouse
-device urio# Diamond Rio 500 MP3 player
-# USB Serial devices
-device u3g # USB-based 3G modems (Option, Huawei, Sierra)
-device uark# Technologies ARK3116 based serial adapters
-device ubsa# Belkin F5U103 and compatible serial adapters
-device uftdi   # For FTDI usb serial adapters
-device uipaq   # Some WinCE based devices
-device uplcom  # Prolific PL-2303 serial adapters
-device uslcom  # SI Labs CP2101/CP2102 serial adapters
-device uvisor  # Visor and Palm devices
-device uvscom  # USB serial support for DDI pocket's PHS
-# USB E

svn commit: r232522 - head

2012-03-04 Thread Dimitry Andric
Author: dim
Date: Sun Mar  4 21:36:18 2012
New Revision: 232522
URL: http://svn.freebsd.org/changeset/base/232522

Log:
  Fix a thinko in r232322, where gcc (and its tools) are not built during
  the cross-tools stage, if CC=clang and WITH_CLANG_IS_CC is not set.
  
  This causes no 'cc' to be installed in the temporary cross-tools tree,
  making lint fall over later in the build, because it ignores ${CC} and
  attempts to run 'cc' anyway.
  
  To fix this, only skip building gcc during cross-tools, if WITHOUT_GCC
  is set, or if WITH_CLANG_IS_CC is set.
  
  Pointy hat to:dim
  MFC after:2 weeks

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Sun Mar  4 21:31:13 2012(r232521)
+++ head/Makefile.inc1  Sun Mar  4 21:36:18 2012(r232522)
@@ -1108,7 +1108,7 @@ _aicasm= sys/modules/aic7xxx/aicasm
 _share=share/syscons/scrnmaps
 .endif
 
-.if ${MK_GCC} != "no" && (${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != 
"clang")
+.if ${MK_GCC} != "no" && ${MK_CLANG_IS_CC} == "no"
 _gcc_tools= gnu/usr.bin/cc/cc_tools
 .endif
 
@@ -1175,7 +1175,7 @@ _clang=   usr.bin/clang
 _clang_libs=   lib/clang
 .endif
 
-.if ${MK_GCC} != "no" && (${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != 
"clang")
+.if ${MK_GCC} != "no" && ${MK_CLANG_IS_CC} == "no"
 _cc=   gnu/usr.bin/cc
 .endif
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r232521 - in head/sys: amd64/conf i386/conf

2012-03-04 Thread Andrey Chernov
On Sun, Mar 04, 2012 at 09:31:13PM +, Robert Millan wrote:
> Author: rmh
> Date: Sun Mar  4 21:31:13 2012
> New Revision: 232521
> URL: http://svn.freebsd.org/changeset/base/232521
> 
> Log:
>   Exclude USB drivers (except umass and ukbd) from main kernel image on i386
>   and amd64.

IMHO, generic should support USB mouse too.

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


Re: svn commit: r232264 - in head/sys: amd64/include i386/include pc98/include x86/include

2012-03-04 Thread Andrey Kosachenko

Hi,

On 04.03.2012 20:51, John Baldwin wrote:

On Tuesday, February 28, 2012 01:38:34 PM Tijl Coosemans wrote:

Author: tijl
Date: Tue Feb 28 18:38:33 2012
New Revision: 232264
URL: http://svn.freebsd.org/changeset/base/232264

Log:
   Copy amd64 _stdint.h to x86 and merge with i386 _stdint.h. Replace
   amd64/i386/pc98 _stdint.h with stubs.

Added:
   head/sys/x86/include/_stdint.h
  - copied, changed from r232259, head/sys/amd64/include/_stdint.h


This broke C++ software (such as the audio/flac port), that #includes
  with __STDC_LIMIT_MACROS defined but not __STDC_CONSTANT_MACROS
defined.  The problem is that you have changed UINT64_MAX and INT64_MAX to use
UINT64_C() and INT64_C(), so in this case UINT64_MAX now expands to
UINT64_C(...) which can't be resolved to a constant.

You should be able to reproduce this via the following:

% cat>  bar.cc
#define __STDC_LIMIT_MACROS
#include
% c++ -c bar.cc

(The test to see if __WORDSIZE should be defined at the end of stdint.h trips
over this bug.)

While you could do something like add __INT64_C() and __UINT64_C() macros that
are always defined and use them for INT64_MAX and UINT64_MAX, I think the
simplest fix is probably to just use #ifdef _LP64 tests to define INT64_MAX
and UINT64_MAX as pure constants as those are the only two macros effected.

(I've just hardcoded those two constants on my little netbook so I can keep
building ports and that worked fine for audio/flac).


As far as I can see reported issue was addressed in -r232519.

However there is one more issue that might be connected to recent 
changes (sorry, not sure what exactly is wrong here). Attempt to build 
emulators/virtualbox-ose fails with the following error:


---
kBuild: Compiling tstVMStructRC - 
/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/src/VBox/VMM/testcase/tstVMStructRC.cpp

In file included from /usr/include/sys/types.h:63,
 from 
/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/include/iprt/types.h:85,
 from 
/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/include/VBox/types.h:30,
 from 
/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/src/VBox/VMM/testcase/tstVMStructRC.cpp:33:
/usr/include/sys/_stdint.h:74: error: conflicting declaration 'typedef 
__intptr_t intptr_t'

^^

/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/include/iprt/stdint.h:162: 
error: 'intptr_t' has a previous declaration as 'typedef long int intptr_t'
/usr/include/sys/_stdint.h:78: error: conflicting declaration 'typedef 
__uintptr_t uintptr_t'
/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/include/iprt/stdint.h:165: 
error: 'uintptr_t' has a previous declaration as 'typedef long unsigned 
int uintptr_t'
kBuild: Compiling tstAsmStructsasm - 
/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/src/VBox/VMM/testcase/tstAsmStructsAsm.asm
kBuild: Compiling tstGlobalConfig - 
/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/src/VBox/VMM/testcase/tstGlobalConfig.cpp
kmk: *** 
[/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/out/freebsd.amd64/release/obj/tstVMStructRC/tstVMStructRC.o] 
Error 1

The failing command:
@c++ -m32 -c -O2 -g -pipe -pedantic -Wshadow -Wall -Wextra 
-Wno-missing-field-initializers -Wno-unused -Wno-trigraphs 
-fdiagnostics-show-option -Wno-long-long -Wno-variadic-macros 
-fno-exceptions -O2 -mtune=generic -fno-omit-frame-pointer -mno-sse 
-mno-mmx -mno-sse2 -mno-3dnow -fno-strict-aliasing -fno-stack-protector 
-fvisibility=hidden -DVBOX_HAVE_VISIBILITY_HIDDEN 
-DRT_USE_VISIBILITY_DEFAULT -fvisibility-inlines-hidden -fno-rtti -O0 
-I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/src/VBox/VMM/include 
-I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/src/VBox/VMM/PATM 
-I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/include 
-I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/out/freebsd.amd64/release 
-DVBOX -DVBOX_WITH_DEBUGGER -DVBOX_OSE -DVBOX_WITH_64_BITS_GUESTS 
-DVBOX_WITH_HARDENING 
-DRTPATH_APP_PRIVATE=\"/usr/local/share/virtualbox-ose\" 
-DRTPATH_APP_PRIVATE_ARCH=\"/usr/local/lib/virtualbox\" 
-DRTPATH_SHARED_LIBS=\"/usr/local/lib/virtualbox\" 
-DRTPATH_APP_DOCS=\"/usr/local/share/doc/virtualbox-ose\" 
-DRT_OS_FREEBSD -D__FREEBSD__ -DRT_ARCH_X86 -D__X86__ -DIN_RC 
-DHC_ARCH_BITS=64 -DGC_ARCH_BITS=64 -DIN_VMM_RC -DIN_DIS -DIN_RT_RC 
-DVBOX_WITH_RAW_MODE -DIPRT_DONT_USE_SYSTEM_STDINT_H 
-Wp,-MD,/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/out/freebsd.amd64/release/obj/tstVMStructRC/tstVMStructRC.o.dep 
-Wp,-MT,/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/out/freebsd.amd64/release/obj/tstVMStructRC/tstVMStructRC.o 
-Wp,-MP -o 
/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.1.8_OSE/out/freebsd.amd64/release/obj/tstVMStructRC/tstVMStructRC.o 
/usr

svn commit: r232525 - head/sys/net80211

2012-03-04 Thread Adrian Chadd
Author: adrian
Date: Sun Mar  4 23:04:16 2012
New Revision: 232525
URL: http://svn.freebsd.org/changeset/base/232525

Log:
  Fix style(9) issues.

Modified:
  head/sys/net80211/ieee80211_alq.c

Modified: head/sys/net80211/ieee80211_alq.c
==
--- head/sys/net80211/ieee80211_alq.c   Sun Mar  4 22:46:11 2012
(r232524)
+++ head/sys/net80211/ieee80211_alq.c   Sun Mar  4 23:04:16 2012
(r232525)
@@ -85,8 +85,10 @@ ieee80211_alq_setlogging(int enable)
ieee80211_alq_qsize);
ieee80211_alq_lost = 0;
ieee80211_alq_logged = 0;
-   printf("net80211: logging to %s enabled; struct size %d 
bytes\n",
-   ieee80211_alq_logfile, sizeof(struct ieee80211_alq_rec));
+   printf("net80211: logging to %s enabled; "
+   "struct size %d bytes\n",
+   ieee80211_alq_logfile,
+   sizeof(struct ieee80211_alq_rec));
} else {
if (ieee80211_alq)
alq_close(ieee80211_alq);
@@ -100,14 +102,14 @@ ieee80211_alq_setlogging(int enable)
 static int
 sysctl_ieee80211_alq_log(SYSCTL_HANDLER_ARGS)
 {
-int error, enable;
+   int error, enable;
 
-enable = (ieee80211_alq != NULL);
-error = sysctl_handle_int(oidp, &enable, 0, req);
-if (error || !req->newptr)
-return (error);
-else   
-return (ieee80211_alq_setlogging(enable));
+   enable = (ieee80211_alq != NULL);
+   error = sysctl_handle_int(oidp, &enable, 0, req);
+   if (error || !req->newptr)
+   return (error);
+   else
+   return (ieee80211_alq_setlogging(enable));
 }
 
 SYSCTL_PROC(_net_wlan, OID_AUTO, alq, CTLTYPE_INT|CTLFLAG_RW,
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232526 - head/sys/net80211

2012-03-04 Thread Adrian Chadd
Author: adrian
Date: Sun Mar  4 23:13:52 2012
New Revision: 232526
URL: http://svn.freebsd.org/changeset/base/232526

Log:
  Add the thread id to the net80211 alq records.
  
  This will (hopefully) aid in debugging concurrency related issues.

Modified:
  head/sys/net80211/ieee80211_alq.c
  head/sys/net80211/ieee80211_alq.h

Modified: head/sys/net80211/ieee80211_alq.c
==
--- head/sys/net80211/ieee80211_alq.c   Sun Mar  4 23:04:16 2012
(r232525)
+++ head/sys/net80211/ieee80211_alq.c   Sun Mar  4 23:13:52 2012
(r232526)
@@ -152,6 +152,7 @@ ieee80211_alq_log(struct ieee80211vap *v
r->r_version = 1;
r->r_wlan = htons(vap->iv_ifp->if_dunit);
r->r_op = op;
+   r->r_threadid = (uint32_t) curthread->td_ucred;
memcpy(&r->r_payload, p, MIN(l, sizeof(r->r_payload)));
alq_post(ieee80211_alq, ale);
 }

Modified: head/sys/net80211/ieee80211_alq.h
==
--- head/sys/net80211/ieee80211_alq.h   Sun Mar  4 23:04:16 2012
(r232525)
+++ head/sys/net80211/ieee80211_alq.h   Sun Mar  4 23:13:52 2012
(r232526)
@@ -38,6 +38,7 @@
  */
 struct ieee80211_alq_rec {
uint32_tr_timestamp;/* XXX may wrap! */
+   uint32_tr_threadid; /* current thread id */
uint16_tr_wlan; /* wlan interface number */
uint8_t r_version;  /* version */
uint8_t r_op;   /* top-level operation id */
@@ -46,6 +47,7 @@ struct ieee80211_alq_rec {
 };
 
 /* General logging function */
-extern void ieee80211_alq_log(struct ieee80211vap *vap, uint8_t op, u_char *p, 
int l);
+extern void ieee80211_alq_log(struct ieee80211vap *vap, uint8_t op,
+   u_char *p, int l);
 
 #endif /* __IEEE80211_ALQ_H__ */
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r232526 - head/sys/net80211

2012-03-04 Thread Andrew Thompson
On 5 March 2012 12:13, Adrian Chadd  wrote:
> Author: adrian
> Date: Sun Mar  4 23:13:52 2012
> New Revision: 232526
> URL: http://svn.freebsd.org/changeset/base/232526
>
> Log:
>  Add the thread id to the net80211 alq records.
>
>  This will (hopefully) aid in debugging concurrency related issues.
>
> Modified:
>  head/sys/net80211/ieee80211_alq.c
>  head/sys/net80211/ieee80211_alq.h
>
> Modified: head/sys/net80211/ieee80211_alq.c
> ==
> --- head/sys/net80211/ieee80211_alq.c   Sun Mar  4 23:04:16 2012        
> (r232525)
> +++ head/sys/net80211/ieee80211_alq.c   Sun Mar  4 23:13:52 2012        
> (r232526)
> @@ -152,6 +152,7 @@ ieee80211_alq_log(struct ieee80211vap *v
>        r->r_version = 1;
>        r->r_wlan = htons(vap->iv_ifp->if_dunit);
>        r->r_op = op;
> +       r->r_threadid = (uint32_t) curthread->td_ucred;

Shouldn't this be td_tid?


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


Re: svn commit: r232526 - head/sys/net80211

2012-03-04 Thread Adrian Chadd
grr, i must've mis-pasted the line. thanks, I'll fix this.


Adrian


On 4 March 2012 16:53, Andrew Thompson  wrote:
> On 5 March 2012 12:13, Adrian Chadd  wrote:
>> Author: adrian
>> Date: Sun Mar  4 23:13:52 2012
>> New Revision: 232526
>> URL: http://svn.freebsd.org/changeset/base/232526
>>
>> Log:
>>  Add the thread id to the net80211 alq records.
>>
>>  This will (hopefully) aid in debugging concurrency related issues.
>>
>> Modified:
>>  head/sys/net80211/ieee80211_alq.c
>>  head/sys/net80211/ieee80211_alq.h
>>
>> Modified: head/sys/net80211/ieee80211_alq.c
>> ==
>> --- head/sys/net80211/ieee80211_alq.c   Sun Mar  4 23:04:16 2012        
>> (r232525)
>> +++ head/sys/net80211/ieee80211_alq.c   Sun Mar  4 23:13:52 2012        
>> (r232526)
>> @@ -152,6 +152,7 @@ ieee80211_alq_log(struct ieee80211vap *v
>>        r->r_version = 1;
>>        r->r_wlan = htons(vap->iv_ifp->if_dunit);
>>        r->r_op = op;
>> +       r->r_threadid = (uint32_t) curthread->td_ucred;
>
> Shouldn't this be td_tid?
>
>
> Andrew
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232530 - head/sys/net80211

2012-03-04 Thread Adrian Chadd
Author: adrian
Date: Mon Mar  5 02:36:15 2012
New Revision: 232530
URL: http://svn.freebsd.org/changeset/base/232530

Log:
  Oops - used the wrong field.
  
  Noticed by:   nwhitehorn

Modified:
  head/sys/net80211/ieee80211_alq.c

Modified: head/sys/net80211/ieee80211_alq.c
==
--- head/sys/net80211/ieee80211_alq.c   Mon Mar  5 02:14:47 2012
(r232529)
+++ head/sys/net80211/ieee80211_alq.c   Mon Mar  5 02:36:15 2012
(r232530)
@@ -152,7 +152,7 @@ ieee80211_alq_log(struct ieee80211vap *v
r->r_version = 1;
r->r_wlan = htons(vap->iv_ifp->if_dunit);
r->r_op = op;
-   r->r_threadid = (uint32_t) curthread->td_ucred;
+   r->r_threadid = (uint32_t) curthread->td_tid;
memcpy(&r->r_payload, p, MIN(l, sizeof(r->r_payload)));
alq_post(ieee80211_alq, ale);
 }
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232531 - head/usr.sbin/bsdinstall/scripts

2012-03-04 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Mon Mar  5 02:40:18 2012
New Revision: 232531
URL: http://svn.freebsd.org/changeset/base/232531

Log:
  Make the chroot shell more functional by providing devfs.
  
  Reported by:  Robert Simmons
  MFC after:4 days

Modified:
  head/usr.sbin/bsdinstall/scripts/auto

Modified: head/usr.sbin/bsdinstall/scripts/auto
==
--- head/usr.sbin/bsdinstall/scripts/auto   Mon Mar  5 02:36:15 2012
(r232530)
+++ head/usr.sbin/bsdinstall/scripts/auto   Mon Mar  5 02:40:18 2012
(r232531)
@@ -216,6 +216,7 @@ dialog --backtitle "FreeBSD Installer" -
 --yesno "The installation is now finished. Before exiting the installer, 
would you like to open a shell in the new system to make any final manual 
modifications?" 0 0
 if [ $? -eq 0 ]; then
clear
+   mount -t devfs devfs "$BSDINSTALL_CHROOT/dev"
echo This shell is operating in a chroot in the new system. \
When finished making configuration changes, type \"exit\".
chroot "$BSDINSTALL_CHROOT" /bin/sh 2>&1
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


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

2012-03-04 Thread Gleb Smirnoff
Author: glebius
Date: Mon Mar  5 06:12:15 2012
New Revision: 232538
URL: http://svn.freebsd.org/changeset/base/232538

Log:
  Fix ng_ipfw(4) cookie number in example.
  
  Pointed out by:   "Jacco van Buuren" 

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

Modified: head/share/man/man4/ng_patch.4
==
--- head/share/man/man4/ng_patch.4  Mon Mar  5 05:18:58 2012
(r232537)
+++ head/share/man/man4/ng_patch.4  Mon Mar  5 06:12:15 2012
(r232538)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 9, 2010
+.Dd March 5, 2012
 .Dt NG_PATCH 4
 .Os
 .Sh NAME
@@ -185,7 +185,7 @@ So you do:
{ mode=7 value=0xf7 length=1 offset=1 } \e
{ mode=8 value=0x02 length=1 offset=1 } ] }
 SEQ
-/sbin/ipfw add 160 netgraph 600 ip from any to any not dst-port 80
+/sbin/ipfw add 160 netgraph 300 ip from any to any not dst-port 80
 .Ed
 .Pp
 This first does
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r232539 - head/sys/dev/usb/controller

2012-03-04 Thread Hans Petter Selasky
Author: hselasky
Date: Mon Mar  5 06:41:44 2012
New Revision: 232539
URL: http://svn.freebsd.org/changeset/base/232539

Log:
  Fix for DWC OTG interrupt register programming.
  Fix a compiler warning.
  Add missing header file.
  
  MFC after:1 week

Modified:
  head/sys/dev/usb/controller/dwc_otg.c
  head/sys/dev/usb/controller/dwc_otg.h
  head/sys/dev/usb/controller/dwc_otg_atmelarm.c

Modified: head/sys/dev/usb/controller/dwc_otg.c
==
--- head/sys/dev/usb/controller/dwc_otg.c   Mon Mar  5 06:12:15 2012
(r232538)
+++ head/sys/dev/usb/controller/dwc_otg.c   Mon Mar  5 06:41:44 2012
(r232539)
@@ -91,6 +91,7 @@ __FBSDID("$FreeBSD$");
 
 #defineDWC_OTG_MSK_GINT_ENABLED\
(DWC_OTG_MSK_GINT_ENUM_DONE |   \
+   DWC_OTG_MSK_GINT_USB_RESET |\
DWC_OTG_MSK_GINT_USB_SUSPEND |  \
DWC_OTG_MSK_GINT_INEP | \
DWC_OTG_MSK_GINT_RXFLVL |   \
@@ -730,7 +731,10 @@ repeat:
}
}
 
-   /* check if no packets have been transferred */
+   if (!to--)
+   goto not_complete;
+
+   /* check if not all packets have been transferred */
temp = DWC_OTG_READ_4(sc, DWC_OTG_REG_DIEPTSIZ(td->ep_no));
 
if (DWC_OTG_MSK_DXEPTSIZ_GET_NPKT(temp) != 0) {
@@ -812,9 +816,7 @@ repeat:
 
/* else we need to transmit a short packet */
}
-
-   if (--to)
-   goto repeat;
+   goto repeat;
 
 not_complete:
return (1); /* not complete */
@@ -927,7 +929,6 @@ repeat:
 
if (sc->sc_last_rx_status != 0) {
 
-   uint32_t temp;
uint8_t ep_no;
 
temp = DWC_OTG_MSK_GRXSTS_GET_BYTE_CNT(
@@ -1042,6 +1043,18 @@ dwc_otg_interrupt(struct dwc_otg_softc *
 
DPRINTFN(14, "GINTSTS=0x%08x\n", status);
 
+   if (status & DWC_OTG_MSK_GINT_USB_RESET) {
+
+   /* set correct state */
+   sc->sc_flags.status_bus_reset = 0;
+   sc->sc_flags.status_suspend = 0;
+   sc->sc_flags.change_suspend = 0;
+   sc->sc_flags.change_connect = 1;
+
+   /* complete root HUB interrupt endpoint */
+   dwc_otg_root_intr(sc);
+   }
+
/* check for any bus state change interrupts */
if (status & DWC_OTG_MSK_GINT_ENUM_DONE) {
 
@@ -1115,6 +1128,7 @@ dwc_otg_interrupt(struct dwc_otg_softc *
}
/* check VBUS */
if (status & (DWC_OTG_MSK_GINT_USB_SUSPEND |
+   DWC_OTG_MSK_GINT_USB_RESET |
DWC_OTG_MSK_GINT_SESSREQINT)) {
uint32_t temp;
 
@@ -1133,9 +1147,10 @@ dwc_otg_interrupt(struct dwc_otg_softc *
 
for (x = 0; x != sc->sc_dev_in_ep_max; x++) {
temp = DWC_OTG_READ_4(sc, DWC_OTG_REG_DIEPINT(x));
-   if (temp == 0)
-   continue;
-   DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DIEPINT(x), temp);
+   if (temp & DWC_OTG_MSK_DIEP_XFER_COMPLETE) {
+   DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DIEPINT(x),
+   DWC_OTG_MSK_DIEP_XFER_COMPLETE);
+   }
}
}
 
@@ -1773,17 +1788,25 @@ dwc_otg_init(struct dwc_otg_softc *sc)
sc->sc_irq_mask = DWC_OTG_MSK_GINT_ENABLED;
DWC_OTG_WRITE_4(sc, DWC_OTG_REG_GINTMSK, sc->sc_irq_mask);
 
-   /*
-* Disable all endpoint interrupts,
-* we use the SOF IRQ for transmit:
-*/
-
/* enable all endpoint interrupts */
-   DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DIEPMSK,
-   /* DWC_OTG_MSK_DIEP_FIFO_EMPTY | */
-   DWC_OTG_MSK_DIEP_XFER_COMPLETE);
-   DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DOEPMSK, 0);
-   DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DAINTMSK, 0x);
+   temp = DWC_OTG_READ_4(sc, DWC_OTG_REG_GHWCFG2);
+   if (temp & DWC_OTG_MSK_GHWCFG2_MPI) {
+   uint8_t x;
+
+   DPRINTF("Multi Process Interrupts\n");
+
+   for (x = 0; x != sc->sc_dev_in_ep_max; x++) {
+   DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DIEPEACHMSK(x),
+   DWC_OTG_MSK_DIEP_XFER_COMPLETE);
+   DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DOEPEACHMSK(x), 0);
+   }
+   DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DEACHINTMSK, 0x);
+   } else {
+   DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DIEPMSK,
+   DWC_OTG_MSK_DIEP_XFER_COMPLETE);
+   DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DOEPMSK, 0);
+   DWC_OTG_WRITE_4(sc, DWC_OTG_REG_DAINTMSK, 0x);
+   }
 
/* enable global IRQ */
DWC_OTG_WRITE_4(sc, DWC_OTG_REG_GAHBCFG,

Modified: head/sys/dev/usb/controller/dwc_otg.h
==
--- h

svn commit: r232540 - in head/sys/modules/usb: . dwc_otg

2012-03-04 Thread Hans Petter Selasky
Author: hselasky
Date: Mon Mar  5 06:46:35 2012
New Revision: 232540
URL: http://svn.freebsd.org/changeset/base/232540

Log:
  Add DWC OTG module to ARM builds.
  
  MFC after:1 week

Added:
  head/sys/modules/usb/dwc_otg/
  head/sys/modules/usb/dwc_otg/Makefile   (contents, props changed)
Modified:
  head/sys/modules/usb/Makefile

Modified: head/sys/modules/usb/Makefile
==
--- head/sys/modules/usb/Makefile   Mon Mar  5 06:41:44 2012
(r232539)
+++ head/sys/modules/usb/Makefile   Mon Mar  5 06:46:35 2012
(r232540)
@@ -31,7 +31,7 @@
 # MK_SOURCELESS_UCODE option (see below).
 
 SUBDIR = usb
-SUBDIR += ehci musb ohci uhci xhci uss820dci ${_at91dci} ${_atmegadci} 
${_avr32dci}
+SUBDIR += ${_dwc_otg} ehci ${_musb} ohci uhci xhci ${_uss820dci} ${_at91dci} 
${_atmegadci} ${_avr32dci}
 SUBDIR += ${_rum} run ${_uath} upgt usie ural ${_zyd} ${_urtw}
 SUBDIR += atp uhid ukbd ums udbp ufm uep
 SUBDIR += ucom u3g uark ubsa ubser uchcom ucycom ufoma uftdi ugensa uipaq ulpt 
\
@@ -54,6 +54,9 @@ _urtw=urtw
 .if ${MACHINE_CPUARCH} == "arm"
 _at91dci=  at91dci
 _atmegadci=atmegadci
+_dwc_otg=  dwc_otg
+_musb= musb
+_uss820dci=uss820dci
 .endif
 
 .if ${MACHINE_CPUARCH} == "i386"

Added: head/sys/modules/usb/dwc_otg/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/modules/usb/dwc_otg/Makefile   Mon Mar  5 06:46:35 2012
(r232540)
@@ -0,0 +1,42 @@
+#
+# $FreeBSD$
+#
+# Copyright (c) 2012 Hans Petter Selasky. 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.
+#
+
+S= ${.CURDIR}/../../..
+
+.PATH: $S/dev/usb/controller
+
+KMOD=  dwc_otg
+SRCS=  bus_if.h device_if.h usb_if.h \
+   opt_bus.h opt_usb.h \
+   dwc_otg.c \
+   pci_if.h
+
+.if defined(HAS_ATMELARM)
+SRCS+= dwc_otg_atmelarm.c
+.endif
+
+.include 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"