svn commit: r224001 - head/usr.sbin/rpcbind

2011-07-14 Thread Xin LI
Author: delphij
Date: Thu Jul 14 07:28:49 2011
New Revision: 224001
URL: http://svn.freebsd.org/changeset/base/224001

Log:
  Use prototype.  While I'm there, add a pair of parenthesis to mark an if
  statment's border.
  
  MFC after:1 month

Modified:
  head/usr.sbin/rpcbind/rpcb_stat.c
  head/usr.sbin/rpcbind/rpcb_svc_com.c
  head/usr.sbin/rpcbind/rpcbind.c
  head/usr.sbin/rpcbind/util.c
  head/usr.sbin/rpcbind/warmstart.c

Modified: head/usr.sbin/rpcbind/rpcb_stat.c
==
--- head/usr.sbin/rpcbind/rpcb_stat.c   Thu Jul 14 07:19:29 2011
(r224000)
+++ head/usr.sbin/rpcbind/rpcb_stat.c   Thu Jul 14 07:28:49 2011
(r224001)
@@ -54,7 +54,7 @@
 static rpcb_stat_byvers inf;
 
 void
-rpcbs_init()
+rpcbs_init(void)
 {
 
 }

Modified: head/usr.sbin/rpcbind/rpcb_svc_com.c
==
--- head/usr.sbin/rpcbind/rpcb_svc_com.cThu Jul 14 07:19:29 2011
(r224000)
+++ head/usr.sbin/rpcbind/rpcb_svc_com.cThu Jul 14 07:28:49 2011
(r224001)
@@ -1076,7 +1076,7 @@ netbuffree(struct netbuf *ap)
 extern bool_t __svc_clean_idle(fd_set *, int, bool_t);
 
 void
-my_svc_run()
+my_svc_run(void)
 {
size_t nfds;
struct pollfd pollfds[FD_SETSIZE];

Modified: head/usr.sbin/rpcbind/rpcbind.c
==
--- head/usr.sbin/rpcbind/rpcbind.c Thu Jul 14 07:19:29 2011
(r224000)
+++ head/usr.sbin/rpcbind/rpcbind.c Thu Jul 14 07:28:49 2011
(r224001)
@@ -178,12 +178,13 @@ main(int argc, char *argv[])
init_transport(nconf);
 
while ((nconf = getnetconfig(nc_handle))) {
-   if (nconf-nc_flag  NC_VISIBLE)
+   if (nconf-nc_flag  NC_VISIBLE) {
if (ipv6_only == 1  strcmp(nconf-nc_protofmly,
inet) == 0) {
/* DO NOTHING */
} else
init_transport(nconf);
+   }
}
endnetconfig(nc_handle);
 
@@ -766,7 +767,7 @@ terminate(int dummy __unused)
 }
 
 void
-rpcbind_abort()
+rpcbind_abort(void)
 {
 #ifdef WARMSTART
write_warmstart();  /* Dump yourself */

Modified: head/usr.sbin/rpcbind/util.c
==
--- head/usr.sbin/rpcbind/util.cThu Jul 14 07:19:29 2011
(r224000)
+++ head/usr.sbin/rpcbind/util.cThu Jul 14 07:28:49 2011
(r224001)
@@ -283,7 +283,7 @@ freeit:
 }
 
 void
-network_init()
+network_init(void)
 {
 #ifdef INET6
struct ifaddrs *ifap, *ifp;

Modified: head/usr.sbin/rpcbind/warmstart.c
==
--- head/usr.sbin/rpcbind/warmstart.c   Thu Jul 14 07:19:29 2011
(r224000)
+++ head/usr.sbin/rpcbind/warmstart.c   Thu Jul 14 07:28:49 2011
(r224001)
@@ -142,7 +142,7 @@ error:  fprintf(stderr, rpcbind: will st
 }
 
 void
-write_warmstart()
+write_warmstart(void)
 {
(void) write_struct(RPCBFILE, (xdrproc_t)xdr_rpcblist_ptr, list_rbl);
 #ifdef PORTMAP
@@ -152,7 +152,7 @@ write_warmstart()
 }
 
 void
-read_warmstart()
+read_warmstart(void)
 {
rpcblist_ptr tmp_rpcbl = NULL;
 #ifdef PORTMAP
___
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: r224002 - head/usr.sbin/syslogd

2011-07-14 Thread Xin LI
Author: delphij
Date: Thu Jul 14 07:33:53 2011
New Revision: 224002
URL: http://svn.freebsd.org/changeset/base/224002

Log:
  Add a new option, -N to disable the default and recommended syslogd(8)
  behavior, which binds to the well known UDP port.
  
  This option implies -s.
  
  MFC after:2 months

Modified:
  head/usr.sbin/syslogd/syslogd.8
  head/usr.sbin/syslogd/syslogd.c

Modified: head/usr.sbin/syslogd/syslogd.8
==
--- head/usr.sbin/syslogd/syslogd.8 Thu Jul 14 07:28:49 2011
(r224001)
+++ head/usr.sbin/syslogd/syslogd.8 Thu Jul 14 07:33:53 2011
(r224002)
@@ -36,7 +36,7 @@
 .Nd log systems messages
 .Sh SYNOPSIS
 .Nm
-.Op Fl 468ACcdknosuv
+.Op Fl 468ACcdkNnosuv
 .Op Fl a Ar allowed_peer
 .Op Fl b Ar bind_address
 .Op Fl f Ar config_file
@@ -227,6 +227,13 @@ facility is reserved for messages read d
 Select the number of minutes between
 .Dq mark
 messages; the default is 20 minutes.
+.It Fl N
+Disable binding on UDP sockets.  RFC 3164 recommends that outgoing
+syslogd messages should originate from the privileged port, this
+option
+.Em disables
+the recommended behavior.  This option inherits
+.Fl s .
 .It Fl n
 Disable dns query for every request.
 .It Fl o

Modified: head/usr.sbin/syslogd/syslogd.c
==
--- head/usr.sbin/syslogd/syslogd.c Thu Jul 14 07:28:49 2011
(r224001)
+++ head/usr.sbin/syslogd/syslogd.c Thu Jul 14 07:33:53 2011
(r224002)
@@ -278,6 +278,7 @@ static int  fklog = -1; /* /dev/klog */
 static int Initialized;/* set when we have initialized ourselves */
 static int MarkInterval = 20 * 60; /* interval between marks in seconds */
 static int MarkSeq;/* mark sequence number */
+static int NoBind; /* don't bind() as suggested by RFC 3164 */
 static int SecureMode; /* when true, receive only unix domain socks */
 #ifdef INET6
 static int family = PF_UNSPEC; /* protocol family (IPv4, IPv6 or both) */
@@ -358,7 +359,7 @@ main(int argc, char *argv[])
dprintf(madvise() failed: %s\n, strerror(errno));
 
bindhostname = NULL;
-   while ((ch = getopt(argc, argv, 468Aa:b:cCdf:kl:m:nop:P:sS:Tuv))
+   while ((ch = getopt(argc, argv, 468Aa:b:cCdf:kl:m:nNop:P:sS:Tuv))
!= -1)
switch (ch) {
case '4':
@@ -437,6 +438,10 @@ main(int argc, char *argv[])
case 'm':   /* mark interval */
MarkInterval = atoi(optarg) * 60;
break;
+   case 'N':
+   NoBind = 1;
+   SecureMode = 1;
+   break;
case 'n':
resolve = 0;
break;
@@ -2685,13 +2690,24 @@ socksetup(int af, char *bindhostname)
close(*s);
continue;
}
-   if (bind(*s, r-ai_addr, r-ai_addrlen)  0) {
-   close(*s);
-   logerror(bind);
-   continue;
-   }
+   /*
+* RFC 3164 recommends that client side message
+* should come from the privileged syslogd port.
+*
+* If the system administrator choose not to obey
+* this, we can skip the bind() step so that the
+* system will choose a port for us.
+*/
+   if (!NoBind) {
+   if (bind(*s, r-ai_addr, r-ai_addrlen)  0) {
+   close(*s);
+   logerror(bind);
+   continue;
+   }
 
-   double_rbuf(*s);
+   if (!SecureMode)
+   double_rbuf(*s);
+   }
 
(*socks)++;
s++;
___
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: r224003 - head/usr.sbin/mountd

2011-07-14 Thread Xin LI
Author: delphij
Date: Thu Jul 14 07:35:28 2011
New Revision: 224003
URL: http://svn.freebsd.org/changeset/base/224003

Log:
  Use calloc() instead of an explicit memset.
  
  MFC after:2 weeks

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

Modified: head/usr.sbin/mountd/mountd.c
==
--- head/usr.sbin/mountd/mountd.c   Thu Jul 14 07:33:53 2011
(r224002)
+++ head/usr.sbin/mountd/mountd.c   Thu Jul 14 07:35:28 2011
(r224003)
@@ -1789,10 +1789,9 @@ get_exp(void)
 {
struct exportlist *ep;
 
-   ep = (struct exportlist *)malloc(sizeof (struct exportlist));
+   ep = (struct exportlist *)calloc(1, sizeof (struct exportlist));
if (ep == (struct exportlist *)NULL)
out_of_mem();
-   memset(ep, 0, sizeof(struct exportlist));
return (ep);
 }
 
@@ -1804,10 +1803,9 @@ get_grp(void)
 {
struct grouplist *gp;
 
-   gp = (struct grouplist *)malloc(sizeof (struct grouplist));
+   gp = (struct grouplist *)calloc(1, sizeof (struct grouplist));
if (gp == (struct grouplist *)NULL)
out_of_mem();
-   memset(gp, 0, sizeof(struct grouplist));
return (gp);
 }
 
___
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: r224004 - head/sbin/dumpfs

2011-07-14 Thread Xin LI
Author: delphij
Date: Thu Jul 14 08:06:03 2011
New Revision: 224004
URL: http://svn.freebsd.org/changeset/base/224004

Log:
  Add a -l option to show file system's corresponding /dev/ufsid path.
  This is useful for scripts that converts existing system's fstab to
  use their /dev/ufsid devices.
  
  MFC after:2 weeks

Modified:
  head/sbin/dumpfs/dumpfs.8
  head/sbin/dumpfs/dumpfs.c

Modified: head/sbin/dumpfs/dumpfs.8
==
--- head/sbin/dumpfs/dumpfs.8   Thu Jul 14 07:35:28 2011(r224003)
+++ head/sbin/dumpfs/dumpfs.8   Thu Jul 14 08:06:03 2011(r224004)
@@ -28,7 +28,7 @@
 .\ @(#)dumpfs.8   8.1 (Berkeley) 6/5/93
 .\ $FreeBSD$
 .\
-.Dd May 8, 2011
+.Dd Jul 14, 2011
 .Dt DUMPFS 8
 .Os
 .Sh NAME
@@ -37,6 +37,7 @@
 .Sh SYNOPSIS
 .Nm
 .Op Fl f
+.Op Fl l
 .Op Fl m
 .Ar filesys | device
 .Sh DESCRIPTION
@@ -44,7 +45,8 @@ The
 .Nm
 utility prints out the UFS super block and cylinder group information
 for the file system or special device specified, unless the
-.Fl f
+.Fl f ,
+.Fl l
 or
 .Fl m
 flag is specified.
@@ -64,6 +66,11 @@ Fragment numbers may be converted to raw
 fragment size, which may be useful when recovering deleted data.
 .Pp
 If
+.Fl l
+is specified, the pathname to the file system's container derived from
+its unique identifier is printed.
+.Pp
+If
 .Fl m
 is specified, a
 .Xr newfs 8

Modified: head/sbin/dumpfs/dumpfs.c
==
--- head/sbin/dumpfs/dumpfs.c   Thu Jul 14 07:35:28 2011(r224003)
+++ head/sbin/dumpfs/dumpfs.c   Thu Jul 14 08:06:03 2011(r224004)
@@ -79,6 +79,7 @@ static const char rcsid[] =
 struct uufsd disk;
 
 intdumpfs(const char *);
+intdumpfsid(void);
 intdumpcg(void);
 intdumpfreespace(const char *, int);
 void   dumpfreespacecg(int);
@@ -92,11 +93,11 @@ int
 main(int argc, char *argv[])
 {
const char *name;
-   int ch, dofreespace, domarshal, eval;
+   int ch, dofreespace, domarshal, dolabel, eval;
 
-   dofreespace = domarshal = eval = 0;
+   dofreespace = domarshal = dolabel = eval = 0;
 
-   while ((ch = getopt(argc, argv, fm)) != -1) {
+   while ((ch = getopt(argc, argv, lfm)) != -1) {
switch (ch) {
case 'f':
dofreespace++;
@@ -104,6 +105,9 @@ main(int argc, char *argv[])
case 'm':
domarshal = 1;
break;
+   case 'l':
+   dolabel = 1;
+   break;
case '?':
default:
usage();
@@ -129,6 +133,8 @@ main(int argc, char *argv[])
eval |= dumpfreespace(name, dofreespace);
else if (domarshal)
eval |= marshal(name);
+   else if (dolabel)
+   eval |= dumpfsid();
else
eval |= dumpfs(name);
ufs_disk_close(disk);
@@ -137,6 +143,14 @@ main(int argc, char *argv[])
 }
 
 int
+dumpfsid(void)
+{
+
+   printf(/dev/ufsid/%x%x\n, afs.fs_id[0], afs.fs_id[1]);
+   return 0;
+}
+
+int
 dumpfs(const char *name)
 {
time_t fstime;
___
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: r224005 - head/sys/mips/conf

2011-07-14 Thread Aleksandr Rybalko
Author: ray
Date: Thu Jul 14 10:05:28 2011
New Revision: 224005
URL: http://svn.freebsd.org/changeset/base/224005

Log:
  Include device rt in RT305X config and little cleanup.
  
  Approved by: adrian (mentor)

Modified:
  head/sys/mips/conf/RT305X
  head/sys/mips/conf/RT305X.hints

Modified: head/sys/mips/conf/RT305X
==
--- head/sys/mips/conf/RT305X   Thu Jul 14 08:06:03 2011(r224004)
+++ head/sys/mips/conf/RT305X   Thu Jul 14 10:05:28 2011(r224005)
@@ -24,42 +24,34 @@ makeoptions MIPS_LITTLE_ENDIAN=defined
 makeoptionsKERNLOADADDR=0x80001000
 
 # Don't build any modules yet.
-makeoptionsMODULES_OVERRIDE=wlan_xauth wlan_wep wlan_tkip wlan_acl 
wlan_amrr wlan_ccmp wlan_rssadapt random if_bridge bridgestp msdosfs md ipfw 
dummynet libalias geom/geom_label ufs usb/uplcom usb/u3g usb/umodem usb/umass 
usb/ucom cam zlib
+makeoptionsMODULES_OVERRIDE=if_bridge bridgestp md ipfw dummynet libalias 
geom/geom_label zlib
 makeoptionsRT3052F
 
 include../rt305x/std.rt305x
 
 hints  RT305X.hints  #Default places to look for devices.
 
-#makeoptions   DEBUG=-g#Build kernel with gdb(1) debug symbols
-
 # Debugging for use in -current
-#options   DEADLKRES   #Enable the deadlock resolver
-#options   INVARIANTS  #Enable calls of extra sanity 
checking
-#options   INVARIANT_SUPPORT   #Extra sanity checks of 
internal structures, required by INVARIANTS
-#options   WITNESS #Enable checks to detect 
deadlocks and cycles
-#options   WITNESS_SKIPSPIN#Don't run witness on spinlocks 
for speed
-#options DIAGNOSTIC
-#options DEBUG_LOCKS
-#options DEBUG_VFS_LOCKS
+#makeoptions   DEBUG=-g#Build kernel with gdb(1) debug symbols
+#options   DEADLKRES   #Enable the deadlock resolver
+#options   INVARIANTS  #Enable calls of extra sanity checking
+#options   INVARIANT_SUPPORT   #Extra sanity checks of internal 
structures, required by INVARIANTS
+#options   WITNESS #Enable checks to detect deadlocks and 
cycles
+#options   WITNESS_SKIPSPIN#Don't run witness on spinlocks for 
speed
+#options   DIAGNOSTIC
+#options   DEBUG_LOCKS
+#options   DEBUG_VFS_LOCKS
 #options   GDB
-optionsDDB
+optionsDDB
 optionsKDB
 
 optionsSCHED_ULE
 #options   SCHED_4BSD  #4BSD scheduler
 #options   COMPAT_43
 optionsINET#InterNETworking
-optionsNFSCL   #Network Filesystem Client
-optionsNFS_ROOT#NFS usable as /, requires NFSCL
 optionsPSEUDOFS#Pseudo-filesystem framework
 #options   _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions
 
-optionsBOOTP
-#options   BOOTP_NFSROOT
-optionsBOOTP_NFSV3
-optionsBOOTP_WIRED_TO=rt0
-optionsBOOTP_COMPAT
 optionsCD9660  # ISO 9660 Filesystem
 optionsROOTDEVNAME=\cd9660:/dev/map/rootfs.uncompress\
 optionsTMPFS   # TMP Memory Filesystem
@@ -68,6 +60,15 @@ options  TMPFS   # TMP Memory Filesystem
 #options   SOFTUPDATES #Enable FFS soft updates support
 #options   UFS_ACL #Support for access control lists
 #options   UFS_DIRHASH #Improve performance on big directories
+
+# BOOTP/NFS boot
+#options   BOOTP
+#options   BOOTP_NFSROOT
+#options   BOOTP_NFSV3
+#options   BOOTP_WIRED_TO=rt0
+#options   BOOTP_COMPAT
+#options   NFSCL   #Network Filesystem Client
+#options   NFS_ROOT#NFS usable as /, requires NFSCL
 #options   ROOTDEVNAME=\nfs:10.0.0.1:/mnt/bsd\
 
 # Options for making kernel less hangry
@@ -89,35 +90,46 @@ options NO_SWAPPING
 optionsZERO_COPY_SOCKETS
 options MROUTING# Multicast routing
 optionsIPFIREWALL_DEFAULT_TO_ACCEPT
+optionsSCSI_DELAY=1000 # Delay (in ms) before probing SCSI
 
-device random
-device loop
-# RT3050F, RT3052F have only pseudo PHYs
-#devicemii
-#devicemiibus
-device pty # Pseudo-ttys (telnet etc)
+device rt
 device ether
+# RT3050F, RT3052F have only attached switch, so no need to mii/miibus
+
+device pty # Pseudo-ttys (telnet etc)
 device bpf # Berkeley packet filter
 device vlan
 #devicelagg
 #device  if_bridge
-device uart
-nodevice   uart_ns8250
 device tun # Packet tunnel.

Re: svn commit: r224005 - head/sys/mips/conf

2011-07-14 Thread Adrian Chadd
Hi!

Yes, he's committed a bit more than just enabling if_rt in this
commit. I'm discussing this with him privately.

Sorry!


Adrian
(pointy-hat on, as I'm his mentor.)

On 14 July 2011 18:05, Aleksandr Rybalko r...@freebsd.org wrote:
 Author: ray
 Date: Thu Jul 14 10:05:28 2011
 New Revision: 224005
 URL: http://svn.freebsd.org/changeset/base/224005

 Log:
  Include device rt in RT305X config and little cleanup.

  Approved by: adrian (mentor)

 Modified:
  head/sys/mips/conf/RT305X
  head/sys/mips/conf/RT305X.hints

 Modified: head/sys/mips/conf/RT305X
 ==
 --- head/sys/mips/conf/RT305X   Thu Jul 14 08:06:03 2011        (r224004)
 +++ head/sys/mips/conf/RT305X   Thu Jul 14 10:05:28 2011        (r224005)
 @@ -24,42 +24,34 @@ makeoptions MIPS_LITTLE_ENDIAN=defined
  makeoptions    KERNLOADADDR=0x80001000

  # Don't build any modules yet.
 -makeoptions    MODULES_OVERRIDE=wlan_xauth wlan_wep wlan_tkip wlan_acl 
 wlan_amrr wlan_ccmp wlan_rssadapt random if_bridge bridgestp msdosfs md ipfw 
 dummynet libalias geom/geom_label ufs usb/uplcom usb/u3g usb/umodem usb/umass 
 usb/ucom cam zlib
 +makeoptions    MODULES_OVERRIDE=if_bridge bridgestp md ipfw dummynet 
 libalias geom/geom_label zlib
  makeoptions    RT3052F

  include                ../rt305x/std.rt305x

  hints          RT305X.hints          #Default places to look for devices.

 -#makeoptions   DEBUG=-g                #Build kernel with gdb(1) debug 
 symbols
 -
  # Debugging for use in -current
 -#options       DEADLKRES               #Enable the deadlock resolver
 -#options               INVARIANTS              #Enable calls of extra sanity 
 checking
 -#options               INVARIANT_SUPPORT       #Extra sanity checks of 
 internal structures, required by INVARIANTS
 -#options               WITNESS                 #Enable checks to detect 
 deadlocks and cycles
 -#options               WITNESS_SKIPSPIN        #Don't run witness on 
 spinlocks for speed
 -#options         DIAGNOSTIC
 -#options     DEBUG_LOCKS
 -#options     DEBUG_VFS_LOCKS
 +#makeoptions   DEBUG=-g                #Build kernel with gdb(1) debug 
 symbols
 +#options       DEADLKRES               #Enable the deadlock resolver
 +#options       INVARIANTS              #Enable calls of extra sanity checking
 +#options       INVARIANT_SUPPORT       #Extra sanity checks of internal 
 structures, required by INVARIANTS
 +#options       WITNESS                 #Enable checks to detect deadlocks 
 and cycles
 +#options       WITNESS_SKIPSPIN        #Don't run witness on spinlocks for 
 speed
 +#options       DIAGNOSTIC
 +#options       DEBUG_LOCKS
 +#options       DEBUG_VFS_LOCKS
  #options       GDB
 -options        DDB
 +options                DDB
  options        KDB

  options        SCHED_ULE
  #options       SCHED_4BSD              #4BSD scheduler
  #options               COMPAT_43
  options        INET                    #InterNETworking
 -options        NFSCL                   #Network Filesystem Client
 -options        NFS_ROOT                #NFS usable as /, requires NFSCL
  options        PSEUDOFS                #Pseudo-filesystem framework
  #options       _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time 
 extensions

 -options        BOOTP
 -#options       BOOTP_NFSROOT
 -options        BOOTP_NFSV3
 -options        BOOTP_WIRED_TO=rt0
 -options        BOOTP_COMPAT
  options        CD9660                  # ISO 9660 Filesystem
  options                ROOTDEVNAME=\cd9660:/dev/map/rootfs.uncompress\
  options        TMPFS                   # TMP Memory Filesystem
 @@ -68,6 +60,15 @@ options      TMPFS                   # TMP Memory 
 Filesystem
  #options       SOFTUPDATES             #Enable FFS soft updates support
  #options       UFS_ACL                 #Support for access control lists
  #options       UFS_DIRHASH             #Improve performance on big 
 directories
 +
 +# BOOTP/NFS boot
 +#options       BOOTP
 +#options       BOOTP_NFSROOT
 +#options       BOOTP_NFSV3
 +#options       BOOTP_WIRED_TO=rt0
 +#options       BOOTP_COMPAT
 +#options       NFSCL                   #Network Filesystem Client
 +#options       NFS_ROOT                #NFS usable as /, requires NFSCL
  #options       ROOTDEVNAME=\nfs:10.0.0.1:/mnt/bsd\

  # Options for making kernel less hangry
 @@ -89,35 +90,46 @@ options             NO_SWAPPING
  options        ZERO_COPY_SOCKETS
  options         MROUTING                # Multicast routing
  options                IPFIREWALL_DEFAULT_TO_ACCEPT
 +options        SCSI_DELAY=1000         # Delay (in ms) before probing SCSI

 -device         random
 -device         loop
 -# RT3050F, RT3052F have only pseudo PHYs
 -#device                mii
 -#device                miibus
 -device                 pty                     # Pseudo-ttys (telnet etc)
 +device         rt
  device         ether
 +# RT3050F, RT3052F have only attached switch, so no need to mii/miibus
 +
 +device    

svn commit: r224008 - head/sys/mips/conf

2011-07-14 Thread Aleksandr Rybalko
Author: ray
Date: Thu Jul 14 11:09:37 2011
New Revision: 224008
URL: http://svn.freebsd.org/changeset/base/224008

Log:
  Revert it back. Too many changes for one commit.
  
  Approved by: adrian (mentor)

Modified:
  head/sys/mips/conf/RT305X
  head/sys/mips/conf/RT305X.hints

Modified: head/sys/mips/conf/RT305X
==
--- head/sys/mips/conf/RT305X   Thu Jul 14 10:31:38 2011(r224007)
+++ head/sys/mips/conf/RT305X   Thu Jul 14 11:09:37 2011(r224008)
@@ -24,34 +24,42 @@ makeoptions MIPS_LITTLE_ENDIAN=defined
 makeoptionsKERNLOADADDR=0x80001000
 
 # Don't build any modules yet.
-makeoptionsMODULES_OVERRIDE=if_bridge bridgestp md ipfw dummynet libalias 
geom/geom_label zlib
+makeoptionsMODULES_OVERRIDE=wlan_xauth wlan_wep wlan_tkip wlan_acl 
wlan_amrr wlan_ccmp wlan_rssadapt random if_bridge bridgestp msdosfs md ipfw 
dummynet libalias geom/geom_label ufs usb/uplcom usb/u3g usb/umodem usb/umass 
usb/ucom cam zlib
 makeoptionsRT3052F
 
 include../rt305x/std.rt305x
 
 hints  RT305X.hints  #Default places to look for devices.
 
-# Debugging for use in -current
 #makeoptions   DEBUG=-g#Build kernel with gdb(1) debug symbols
-#options   DEADLKRES   #Enable the deadlock resolver
-#options   INVARIANTS  #Enable calls of extra sanity checking
-#options   INVARIANT_SUPPORT   #Extra sanity checks of internal 
structures, required by INVARIANTS
-#options   WITNESS #Enable checks to detect deadlocks and 
cycles
-#options   WITNESS_SKIPSPIN#Don't run witness on spinlocks for 
speed
-#options   DIAGNOSTIC
-#options   DEBUG_LOCKS
-#options   DEBUG_VFS_LOCKS
+
+# Debugging for use in -current
+#options   DEADLKRES   #Enable the deadlock resolver
+#options   INVARIANTS  #Enable calls of extra sanity 
checking
+#options   INVARIANT_SUPPORT   #Extra sanity checks of 
internal structures, required by INVARIANTS
+#options   WITNESS #Enable checks to detect 
deadlocks and cycles
+#options   WITNESS_SKIPSPIN#Don't run witness on spinlocks 
for speed
+#options DIAGNOSTIC
+#options DEBUG_LOCKS
+#options DEBUG_VFS_LOCKS
 #options   GDB
-optionsDDB
+optionsDDB
 optionsKDB
 
 optionsSCHED_ULE
 #options   SCHED_4BSD  #4BSD scheduler
 #options   COMPAT_43
 optionsINET#InterNETworking
+optionsNFSCL   #Network Filesystem Client
+optionsNFS_ROOT#NFS usable as /, requires NFSCL
 optionsPSEUDOFS#Pseudo-filesystem framework
 #options   _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions
 
+optionsBOOTP
+#options   BOOTP_NFSROOT
+optionsBOOTP_NFSV3
+optionsBOOTP_WIRED_TO=rt0
+optionsBOOTP_COMPAT
 optionsCD9660  # ISO 9660 Filesystem
 optionsROOTDEVNAME=\cd9660:/dev/map/rootfs.uncompress\
 optionsTMPFS   # TMP Memory Filesystem
@@ -60,15 +68,6 @@ options  TMPFS   # TMP Memory Filesystem
 #options   SOFTUPDATES #Enable FFS soft updates support
 #options   UFS_ACL #Support for access control lists
 #options   UFS_DIRHASH #Improve performance on big directories
-
-# BOOTP/NFS boot
-#options   BOOTP
-#options   BOOTP_NFSROOT
-#options   BOOTP_NFSV3
-#options   BOOTP_WIRED_TO=rt0
-#options   BOOTP_COMPAT
-#options   NFSCL   #Network Filesystem Client
-#options   NFS_ROOT#NFS usable as /, requires NFSCL
 #options   ROOTDEVNAME=\nfs:10.0.0.1:/mnt/bsd\
 
 # Options for making kernel less hangry
@@ -90,46 +89,35 @@ options NO_SWAPPING
 optionsZERO_COPY_SOCKETS
 options MROUTING# Multicast routing
 optionsIPFIREWALL_DEFAULT_TO_ACCEPT
-optionsSCSI_DELAY=1000 # Delay (in ms) before probing SCSI
-
-device rt
-device ether
-# RT3050F, RT3052F have only attached switch, so no need to mii/miibus
 
+device random
+device loop
+# RT3050F, RT3052F have only pseudo PHYs
+#devicemii
+#devicemiibus
 device pty # Pseudo-ttys (telnet etc)
+device ether
 device bpf # Berkeley packet filter
 device vlan
 #devicelagg
 #device  if_bridge
-device tun # Packet tunnel.
-device random
-device loop
-
-# Chip have two UARTs - UART and UART Light
 device uart
 nodevice   uart_ns8250
+device   

svn commit: r224009 - head/sys/mips/conf

2011-07-14 Thread Aleksandr Rybalko
Author: ray
Date: Thu Jul 14 11:53:23 2011
New Revision: 224009
URL: http://svn.freebsd.org/changeset/base/224009

Log:
  Include device rt in RT305X config.
  
  Approved by: adrian (mentor)

Modified:
  head/sys/mips/conf/RT305X
  head/sys/mips/conf/RT305X.hints

Modified: head/sys/mips/conf/RT305X
==
--- head/sys/mips/conf/RT305X   Thu Jul 14 11:09:37 2011(r224008)
+++ head/sys/mips/conf/RT305X   Thu Jul 14 11:53:23 2011(r224009)
@@ -92,9 +92,9 @@ options   IPFIREWALL_DEFAULT_TO_ACCEPT
 
 device random
 device loop
-# RT3050F, RT3052F have only pseudo PHYs
-#devicemii
-#devicemiibus
+# RT3050F, RT3052F have only pseudo PHYs, so mii not required
+device rt
+
 device pty # Pseudo-ttys (telnet etc)
 device ether
 device bpf # Berkeley packet filter

Modified: head/sys/mips/conf/RT305X.hints
==
--- head/sys/mips/conf/RT305X.hints Thu Jul 14 11:09:37 2011
(r224008)
+++ head/sys/mips/conf/RT305X.hints Thu Jul 14 11:53:23 2011
(r224009)
@@ -14,11 +14,12 @@ hint.nvram.1.maxsize=0x4000
 hint.nvram.1.flags=3 # 1 = No check, 2 = Format Generic
 
 # on-board Ralink Frame Engine
-#hint.rt.0.at=nexus0
-#hint.rt.0.maddr=0x1200
-#hint.rt.0.msize=0x20
-#hint.rt.0.irq=9
-hint.rt.0.macaddr=00:18:e7:d5:83:90
+hint.rt.0.at=nexus0
+hint.rt.0.maddr=0x1010
+hint.rt.0.msize=0x1
+hint.rt.0.irq=3
+# macaddr can be statically set
+#hint.rt.0.macaddr=xx:xx:xx:xx:xx:xx
 
 # on-board Ralink 2872 802.11n core
 hint.rt2860.0.at=nexus0
___
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: r224010 - head/sys/netinet

2011-07-14 Thread Bjoern A. Zeeb
Author: bz
Date: Thu Jul 14 13:44:48 2011
New Revision: 224010
URL: http://svn.freebsd.org/changeset/base/224010

Log:
  Unbreak no-INET kernels after r223839 adding the needed #ifdef INET.
  
  MFC after:4 weeks

Modified:
  head/sys/netinet/tcp_subr.c

Modified: head/sys/netinet/tcp_subr.c
==
--- head/sys/netinet/tcp_subr.c Thu Jul 14 11:53:23 2011(r224009)
+++ head/sys/netinet/tcp_subr.c Thu Jul 14 13:44:48 2011(r224010)
@@ -337,7 +337,9 @@ tcp_init(void)
 
TUNABLE_INT_FETCH(net.inet.tcp.soreceive_stream, 
tcp_soreceive_stream);
if (tcp_soreceive_stream) {
+#ifdef INET
tcp_usrreqs.pru_soreceive = soreceive_stream;
+#endif
 #ifdef INET6
tcp6_usrreqs.pru_soreceive = soreceive_stream;
 #endif /* INET6 */
___
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: r224011 - head/usr.bin/top

2011-07-14 Thread Bjoern A. Zeeb
Author: bz
Date: Thu Jul 14 13:47:42 2011
New Revision: 224011
URL: http://svn.freebsd.org/changeset/base/224011

Log:
  Fix indentation.
  
  Obtained from:Ed Maste at Sandvine Incorporated
  Sponsored by: Sandvine Incorporated
  MFC after:3 days

Modified:
  head/usr.bin/top/machine.c

Modified: head/usr.bin/top/machine.c
==
--- head/usr.bin/top/machine.c  Thu Jul 14 13:44:48 2011(r224010)
+++ head/usr.bin/top/machine.c  Thu Jul 14 13:47:42 2011(r224011)
@@ -856,7 +856,7 @@ format_next_process(caddr_t handle, char
(args = kvm_getargv(kd, pp, cmdlengthdelta)) == NULL ||
!(*args)) {
if (ps.thread  pp-ki_flag  P_HADTHREADS 
-   pp-ki_ocomm[0]) {
+   pp-ki_ocomm[0]) {
snprintf(cmdbuf, cmdlengthdelta,
{%s}, pp-ki_ocomm);
} else {
___
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: r224014 - in head: contrib/dialog contrib/dialog/package contrib/dialog/package/debian contrib/dialog/po contrib/dialog/samples gnu/lib/libdialog

2011-07-14 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Thu Jul 14 14:01:36 2011
New Revision: 224014
URL: http://svn.freebsd.org/changeset/base/224014

Log:
  Update dialog to 1.1-20110707.

Added:
  head/contrib/dialog/help.c
 - copied unchanged from r224013, vendor/dialog/dist/help.c
  head/contrib/dialog/po/sk.po
 - copied unchanged from r224013, vendor/dialog/dist/po/sk.po
  head/contrib/dialog/samples/valgrind.log
 - copied unchanged from r224013, vendor/dialog/dist/samples/valgrind.log
Modified:
  head/contrib/dialog/CHANGES
  head/contrib/dialog/VERSION
  head/contrib/dialog/aclocal.m4
  head/contrib/dialog/arrows.c
  head/contrib/dialog/buttons.c
  head/contrib/dialog/calendar.c
  head/contrib/dialog/checklist.c
  head/contrib/dialog/columns.c
  head/contrib/dialog/config.guess
  head/contrib/dialog/config.sub
  head/contrib/dialog/configure
  head/contrib/dialog/configure.in
  head/contrib/dialog/dialog.1
  head/contrib/dialog/dialog.3
  head/contrib/dialog/dialog.c
  head/contrib/dialog/dialog.h
  head/contrib/dialog/dlg_keys.h
  head/contrib/dialog/editbox.c
  head/contrib/dialog/formbox.c
  head/contrib/dialog/fselect.c
  head/contrib/dialog/guage.c
  head/contrib/dialog/inputbox.c
  head/contrib/dialog/makefile.in
  head/contrib/dialog/menubox.c
  head/contrib/dialog/mixedgauge.c
  head/contrib/dialog/msgbox.c
  head/contrib/dialog/package/debian/changelog
  head/contrib/dialog/package/debian/control
  head/contrib/dialog/package/dialog.spec
  head/contrib/dialog/pause.c
  head/contrib/dialog/prgbox.c
  head/contrib/dialog/progressbox.c
  head/contrib/dialog/rc.c
  head/contrib/dialog/tailbox.c
  head/contrib/dialog/textbox.c
  head/contrib/dialog/timebox.c
  head/contrib/dialog/trace.c
  head/contrib/dialog/ui_getc.c
  head/contrib/dialog/util.c
  head/contrib/dialog/yesno.c
  head/gnu/lib/libdialog/Makefile
Directory Properties:
  head/contrib/dialog/   (props changed)

Modified: head/contrib/dialog/CHANGES
==
--- head/contrib/dialog/CHANGES Thu Jul 14 13:58:02 2011(r224013)
+++ head/contrib/dialog/CHANGES Thu Jul 14 14:01:36 2011(r224014)
@@ -1,9 +1,94 @@
--- $Id: CHANGES,v 1.333 2011/03/02 10:06:37 tom Exp $
+-- $Id: CHANGES,v 1.360 2011/07/07 23:35:10 tom Exp $
 -- Thomas E. Dickey dic...@invisible-island.net
 
 This version of dialog was originally from a Debian snapshot.  I've done this
 to it:
 
+2011/07/07
+   + modify util.c to work better with old versions of ncurses:
+ + suppress use of wchgat() before fix in 20060715 which is needed
+   for simple shadow manipulation used here in 2011/06/30 (report
+   by xDog Walker).
+ + add a null-pointer check in dlg_print_scrolled()
+   + fix a regression in dlg_getc() introduced by changes to intercept
+ F1 for help-popup (report by xDog Walker).
+
+2011/06/30
+   + correct license statement for prgbox.c (Debian #632198).
+   + correct layout when --colors is used, by discounting characters in
+ the escape sequences from the column counts (report by xDog Walker).
+   + modify dlg_checklist() so that only one item in the list can
+ initially be selected (report by xDog Walker).
+   + add/use macro dlg_enter_buttoncode() to improve implementation of
+ --nook option (report by xDog Walker).
+   + add option --no-nl-expand to suppress the conversion of \n
+ strings into newlines (request by xDog Walker).
+   + modify LIB_CREATE symbol in makefile.in to include the library
+ dependencies such as ncurses.  This is needed when dynamically
+ loading the library (report/analysis by xDog Walker).
+   + modify dlg_exit_label() to suppress the Cancel button, for
+ consistency.
+   + modify dlg_exit_label() to honor the --nook option, except when there
+ is no other button, e.g., the help-button.
+   + modify dlg_exit_buttoncode() so that it returns the proper code for
+ help-button (report by xDog Walker).
+   + correct loop limit when processing --column-separator (report by
+ xDog Walker).
+   + modify handling of --version and --help to ensure that they are
+ processed, and exit before widgets.  Separate --print-version
+ from --version, allowing its output to be interspersed with
+ widget output (report by xDog Walker).
+   + correct a few places where --version or --help options went
+ always to stdout rather than allowing redirection with the --stderr
+ option (report by xDog Walker).
+   + improve repainting after erasing a widget and its shadow.
+   + add --hline and --hfile options for compatibility with FreeBSD
+ dialog (request by Devin Teske).
+   + add dialog version message when opening a trace file (request by
+ xDog Walker).
+   + show filename of rc-file in traces.
+   + add piped-in data for gauge widget to traces.

svn commit: r224016 - in head: sys/compat/linux sys/conf sys/kern sys/sys usr.bin/ipcs

2011-07-14 Thread Bjoern A. Zeeb
Author: bz
Date: Thu Jul 14 14:18:14 2011
New Revision: 224016
URL: http://svn.freebsd.org/changeset/base/224016

Log:
  Remove semaphore map entry count semmap field and its tuning
  option that is highly recommended to be adjusted in too much
  documentation while doing nothing in FreeBSD since r2729 (rev 1.1).
  
  ipcs(1) needs to be recompiled as it is accessing _KERNEL private
  variables.
  
  Reviewed by:  jhb (before comment change on linux code)
  Sponsored by: Sandvine Incorporated

Modified:
  head/sys/compat/linux/linux_ipc.c
  head/sys/conf/NOTES
  head/sys/conf/options
  head/sys/kern/sysv_sem.c
  head/sys/sys/sem.h
  head/usr.bin/ipcs/ipc.c
  head/usr.bin/ipcs/ipcs.c

Modified: head/sys/compat/linux/linux_ipc.c
==
--- head/sys/compat/linux/linux_ipc.c   Thu Jul 14 14:15:21 2011
(r224015)
+++ head/sys/compat/linux/linux_ipc.c   Thu Jul 14 14:18:14 2011
(r224016)
@@ -575,7 +575,15 @@ linux_semctl(struct thread *td, struct l
return (error);
case LINUX_IPC_INFO:
case LINUX_SEM_INFO:
-   bcopy(seminfo, linux_seminfo, sizeof(linux_seminfo) );
+   bcopy(seminfo, linux_seminfo.semmni, sizeof(linux_seminfo) -
+   sizeof(linux_seminfo.semmap) );
+   /*
+* Linux does not use the semmap field either but populates it
+* with the defined value from SEMMAP, which really is redefined
+* to SEMMNS, which they define as SEMMNI * SEMMSL.
+* Try to simulate this returning our dynamic semmns value.
+*/
+   linux_seminfo.semmap = linux_seminfo.semmns;
 /* XXX BSD equivalent?
 #define used_semids 10
 #define used_sems 10

Modified: head/sys/conf/NOTES
==
--- head/sys/conf/NOTES Thu Jul 14 14:15:21 2011(r224015)
+++ head/sys/conf/NOTES Thu Jul 14 14:18:14 2011(r224016)
@@ -2833,9 +2833,6 @@ options   VERBOSE_SYSINIT
 #
 # SYSV IPC KERNEL PARAMETERS
 #
-# Maximum number of entries in a semaphore map.
-optionsSEMMAP=31
-
 # Maximum number of System V semaphores that can be used on the system at
 # one time.
 optionsSEMMNI=11

Modified: head/sys/conf/options
==
--- head/sys/conf/options   Thu Jul 14 14:15:21 2011(r224015)
+++ head/sys/conf/options   Thu Jul 14 14:18:14 2011(r224016)
@@ -164,7 +164,6 @@ MSGMNI  opt_sysvipc.h
 MSGSEG opt_sysvipc.h
 MSGSSZ opt_sysvipc.h
 MSGTQL opt_sysvipc.h
-SEMMAP opt_sysvipc.h
 SEMMNI opt_sysvipc.h
 SEMMNS opt_sysvipc.h
 SEMMNU opt_sysvipc.h

Modified: head/sys/kern/sysv_sem.c
==
--- head/sys/kern/sysv_sem.cThu Jul 14 14:15:21 2011(r224015)
+++ head/sys/kern/sysv_sem.cThu Jul 14 14:18:14 2011(r224016)
@@ -149,9 +149,6 @@ struct sem_undo {
 #endif
 
 /* shouldn't need tuning */
-#ifndef SEMMAP
-#define SEMMAP 30  /* # of entries in semaphore map */
-#endif
 #ifndef SEMMSL
 #define SEMMSL SEMMNS  /* max # of semaphores per id */
 #endif
@@ -182,7 +179,6 @@ struct sem_undo {
  * semaphore info struct
  */
 struct seminfo seminfo = {
-SEMMAP, /* # of entries in semaphore map */
 SEMMNI, /* # of semaphore identifiers */
 SEMMNS, /* # of semaphores in system */
 SEMMNU, /* # of undo structures in system */
@@ -194,8 +190,6 @@ struct seminfo seminfo = {
 SEMAEM  /* adjust on exit max value */
 };
 
-SYSCTL_INT(_kern_ipc, OID_AUTO, semmap, CTLFLAG_RW, seminfo.semmap, 0,
-Number of entries in the semaphore map);
 SYSCTL_INT(_kern_ipc, OID_AUTO, semmni, CTLFLAG_RDTUN, seminfo.semmni, 0,
 Number of semaphore identifiers);
 SYSCTL_INT(_kern_ipc, OID_AUTO, semmns, CTLFLAG_RDTUN, seminfo.semmns, 0,
@@ -255,7 +249,6 @@ seminit(void)
 {
int i, error;
 
-   TUNABLE_INT_FETCH(kern.ipc.semmap, seminfo.semmap);
TUNABLE_INT_FETCH(kern.ipc.semmni, seminfo.semmni);
TUNABLE_INT_FETCH(kern.ipc.semmns, seminfo.semmns);
TUNABLE_INT_FETCH(kern.ipc.semmnu, seminfo.semmnu);

Modified: head/sys/sys/sem.h
==
--- head/sys/sys/sem.h  Thu Jul 14 14:15:21 2011(r224015)
+++ head/sys/sys/sem.h  Thu Jul 14 14:18:14 2011(r224016)
@@ -107,8 +107,7 @@ union semun {
  * semaphore info struct
  */
 struct seminfo {
-   int semmap, /* # of entries in semaphore map */
-   semmni, /* # of semaphore identifiers */
+   int 

Re: svn commit: r224016 - in head: sys/compat/linux sys/conf sys/kern sys/sys usr.bin/ipcs

2011-07-14 Thread Bjoern A. Zeeb
On Jul 14, 2011, at 2:18 PM, Bjoern A. Zeeb wrote:

 Author: bz
 Date: Thu Jul 14 14:18:14 2011
 New Revision: 224016
 URL: http://svn.freebsd.org/changeset/base/224016
 
 Log:
  Remove semaphore map entry count semmap field and its tuning
  option that is highly recommended to be adjusted in too much
  documentation while doing nothing in FreeBSD since r2729 (rev 1.1).


Stevens, UNP Vol. 2, 11.7 Semaphore Limits does not list the field either btw.

Solaris 2.6, as mentioned in the section 3.9 Kernel Limits, had it along with 
19 others limits.



  ipcs(1) needs to be recompiled as it is accessing _KERNEL private
  variables.
 
  Reviewed by: jhb (before comment change on linux code)
  Sponsored by:Sandvine Incorporated
 
 Modified:
  head/sys/compat/linux/linux_ipc.c
  head/sys/conf/NOTES
  head/sys/conf/options
  head/sys/kern/sysv_sem.c
  head/sys/sys/sem.h
  head/usr.bin/ipcs/ipc.c
  head/usr.bin/ipcs/ipcs.c

-- 
Bjoern A. Zeeb You have to have visions!
 Stop bit received. Insert coin for new address family.

___
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: r224019 - head/sys/powerpc/conf

2011-07-14 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Thu Jul 14 15:35:43 2011
New Revision: 224019
URL: http://svn.freebsd.org/changeset/base/224019

Log:
  Enable PREEMPTION for PowerPC/AIM generic kernels. The last known PREEMPTION
  bug on PowerPC was resolved by r223485, and it appears to run stably at this
  point.

Modified:
  head/sys/powerpc/conf/GENERIC
  head/sys/powerpc/conf/GENERIC64

Modified: head/sys/powerpc/conf/GENERIC
==
--- head/sys/powerpc/conf/GENERIC   Thu Jul 14 14:24:20 2011
(r224018)
+++ head/sys/powerpc/conf/GENERIC   Thu Jul 14 15:35:43 2011
(r224019)
@@ -31,6 +31,7 @@ options   PSIM#GDB PSIM ppc simulator
 optionsMAMBO   #IBM Mambo Full System Simulator
 
 optionsSCHED_ULE   #ULE scheduler
+optionsPREEMPTION  #Enable kernel thread preemption
 optionsINET#InterNETworking
 optionsINET6   #IPv6 communications protocols
 optionsSCTP#Stream Control Transmission Protocol

Modified: head/sys/powerpc/conf/GENERIC64
==
--- head/sys/powerpc/conf/GENERIC64 Thu Jul 14 14:24:20 2011
(r224018)
+++ head/sys/powerpc/conf/GENERIC64 Thu Jul 14 15:35:43 2011
(r224019)
@@ -31,6 +31,7 @@ options   PS3 #Sony 
Playstation 3
 optionsMAMBO   #IBM Mambo Full System Simulator
 
 optionsSCHED_ULE   #ULE scheduler
+optionsPREEMPTION  #Enable kernel thread preemption
 optionsINET#InterNETworking
 optionsINET6   #IPv6 communications protocols
 optionsSCTP#Stream Control Transmission Protocol
___
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: r224023 - head/share/man/man4

2011-07-14 Thread Pyun YongHyeon
Author: yongari
Date: Thu Jul 14 17:34:59 2011
New Revision: 224023
URL: http://svn.freebsd.org/changeset/base/224023

Log:
  Document AX88772B and AX88760. AX88760 is treated as AX88772A in
  driver.
  Mention all ASIX USB controllers that are supported by axe(4).
  Reword media types and explicly mention AX88178 is the only
  controller that supports gigabit link.
  While I'm here use shorten model instead of showing all controller
  model numbers.

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

Modified: head/share/man/man4/axe.4
==
--- head/share/man/man4/axe.4   Thu Jul 14 17:34:56 2011(r224022)
+++ head/share/man/man4/axe.4   Thu Jul 14 17:34:59 2011(r224023)
@@ -30,12 +30,12 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd January 16, 2011
+.Dd July 14, 2011
 .Dt AXE 4
 .Os
 .Sh NAME
 .Nm axe
-.Nd ASIX Electronics AX88172/178/772 USB Ethernet driver
+.Nd ASIX Electronics AX88x7x/760 USB Ethernet driver
 .Sh SYNOPSIS
 To compile this driver into the kernel,
 place the following lines in your
@@ -59,12 +59,14 @@ if_axe_load=YES
 The
 .Nm
 driver provides support for USB Ethernet adapters based on the ASIX
-Electronics AX88172, AX88178 and AX88772 USB 2.0 chipsets.
+Electronics AX88172, AX88178, AX88772, AX88772A, AX88772B and AX88760
+USB 2.0 chipsets.
 .Pp
-The AX88172 and AX88178 are USB 2.0 devices that contain a 10/100
+The AX88172, AX88772, AX88772A, AX88772B and AX88760 contain a 10/100
 Ethernet MAC with MII interface and are designed to work with both
 Ethernet and HomePNA transceivers.
-The AX88772 will additionally support 10/100/1000 MACs.
+The AX88178 has a 10/100/1000 Ethernet MAC with GMII/RGMII interface
+for interfacing with Gigabit Ethernet PHY.
 .Pp
 These devices will operate with
 both USB 1.x and USB 2.0 controllers, however performance with 1.x
@@ -85,43 +87,48 @@ driver supports the following media type
 .It Cm autoselect
 Enable autoselection of the media type and options.
 The user can manually override
-the autoselected mode by adding media options to the
-.Pa /etc/rc.conf
-file.
+the autoselected mode by adding media options to
+.Xr rc.conf 5 .
 .It Cm 10baseT/UTP
 Set 10Mbps operation.
 The
+.Xr ifconfig 8
 .Cm mediaopt
-option can also be used to enable
-.Cm full-duplex
-operation.
-Not specifying
+option can also be used to select either
 .Cm full-duplex
-implies
+or
 .Cm half-duplex
-mode.
+modes.
 .It Cm 100baseTX
 Set 100Mbps (Fast Ethernet) operation.
 The
+.Xr ifconfig 8
 .Cm mediaopt
-option can also be used to enable
+option can also be used to select either
 .Cm full-duplex
-operation.
-Not specifying
+or
+.Cm half-duplex
+modes.
+.It Cm 1000baseT
+Set 1000Mbps (Gigabit Ethernet) operation (AX88178 only).
+The
+.Xr ifconfig 8
+.Cm mediaopt
+option can also be used to select either
 .Cm full-duplex
-implies
+or
 .Cm half-duplex
-mode.
+modes.
 .El
 .Pp
 The
 .Nm
 driver supports the following media options:
-.Bl -tag -width .Cm 10baseT/UTP
+.Bl -tag -width .Cm full-duplex
 .It Cm full-duplex
 Force full duplex operation.
-The interface will operate in
-half duplex mode if this media option is not specified.
+.It Cm half-duplex
+Force half duplex operation.
 .El
 .Pp
 For more information on configuring this device, see
@@ -129,8 +136,8 @@ For more information on configuring this
 .Sh HARDWARE
 The
 .Nm
-driver supports ASIX Electronics AX88172/AX88178/AX88772 based USB Ethernet
-adapters including:
+driver supports ASIX Electronics 
AX88172/AX88178/AX88772/AX88772A/AX88772B/AX88760
+based USB Ethernet adapters including:
 .Pp
 AX88172:
 .Bl -bullet -compact
@@ -139,6 +146,8 @@ AboCom UF200
 .It
 Acer Communications EP1427X2
 .It
+ASIX AX88172
+.It
 ATen UC210T
 .It
 Billionton SnapPort
@@ -167,6 +176,8 @@ System TALKS Inc.\ SGC-X2UL
 AX88178:
 .Bl -bullet -compact
 .It
+ASIX AX88178
+.It
 Belkin F5D5055
 .It
 Logitec LAN-GTJ/U2A
@@ -181,9 +192,9 @@ Sitecom Europe LN-028
 AX88772:
 .Bl -bullet -compact
 .It
-Buffalo (Melco Inc.) LUA3-U2-ATX
+ASIX AX88772
 .It
-Cisco-Linksys USB200Mv2
+Buffalo (Melco Inc.) LUA3-U2-ATX
 .It
 D-Link DUBE100B1
 .It
@@ -191,6 +202,27 @@ Planex UE-200TX-G
 .It
 Planex UE-200TX-G2
 .El
+.Pp
+AX88772A:
+.Bl -bullet -compact
+.It
+ASIX AX88772A
+.It
+Cisco-Linksys USB200Mv2
+.El
+.Pp
+AX88772B:
+.Bl -bullet -compact
+.It
+ASIX AX88772B
+.El
+.Pp
+AX88760:
+.Bl -bullet -compact
+.It
+ASIX AX88760
+.El
+.It
 .Sh DIAGNOSTICS
 .Bl -diag
 .It axe%d: watchdog timeout
@@ -209,7 +241,7 @@ The driver failed to allocate an mbuf fo
 .Xr rgephy 4 ,
 .Xr ifconfig 8
 .Rs
-.%T ASIX AX88172 AX88178 and AX88772 data sheets
+.%T ASIX AX88x7x and AX88760 data sheets
 .%U http://www.asix.com.tw
 .Re
 .Sh HISTORY
___
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: r224025 - head/sbin/dumpfs

2011-07-14 Thread Xin LI
Author: delphij
Date: Thu Jul 14 17:43:23 2011
New Revision: 224025
URL: http://svn.freebsd.org/changeset/base/224025

Log:
  Use _PATH_DEV and make the format more consistent with GEOM_LABEL.
  
  Submitted by: ivoras

Modified:
  head/sbin/dumpfs/dumpfs.c

Modified: head/sbin/dumpfs/dumpfs.c
==
--- head/sbin/dumpfs/dumpfs.c   Thu Jul 14 17:43:18 2011(r224024)
+++ head/sbin/dumpfs/dumpfs.c   Thu Jul 14 17:43:23 2011(r224025)
@@ -68,6 +68,7 @@ static const char rcsid[] =
 #include fcntl.h
 #include fstab.h
 #include libufs.h
+#include paths.h
 #include stdint.h
 #include stdio.h
 #include stdlib.h
@@ -146,7 +147,7 @@ int
 dumpfsid(void)
 {
 
-   printf(/dev/ufsid/%x%x\n, afs.fs_id[0], afs.fs_id[1]);
+   printf(%sufsid/%08x%08x\n, _PATH_DEV, afs.fs_id[0], afs.fs_id[1]);
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: r224024 - head/sys/dev/sound/usb

2011-07-14 Thread Hans Petter Selasky
Author: hselasky
Date: Thu Jul 14 17:43:18 2011
New Revision: 224024
URL: http://svn.freebsd.org/changeset/base/224024

Log:
  Restore USB MIDI transmit buffer size to 1Kbyte.
  
  MFC after:1 week

Modified:
  head/sys/dev/sound/usb/uaudio.c

Modified: head/sys/dev/sound/usb/uaudio.c
==
--- head/sys/dev/sound/usb/uaudio.c Thu Jul 14 17:34:59 2011
(r224023)
+++ head/sys/dev/sound/usb/uaudio.c Thu Jul 14 17:43:18 2011
(r224024)
@@ -192,7 +192,7 @@ struct uaudio_chan {
 };
 
 #defineUMIDI_CABLES_MAX   16   /* units */
-#defineUMIDI_TX_FRAMES128  /* units */
+#defineUMIDI_TX_FRAMES256  /* units */
 #defineUMIDI_TX_BUFFER(UMIDI_TX_FRAMES * 4)/* bytes */
 
 enum {
___
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: r224031 - head/sys/netgraph

2011-07-14 Thread Gleb Smirnoff
Author: glebius
Date: Thu Jul 14 18:38:10 2011
New Revision: 224031
URL: http://svn.freebsd.org/changeset/base/224031

Log:
  In ng_attach_cntl() first allocate things that may fail, and then
  do the rest of initialization. This simplifies code and fixes
  a double free in failure scenario.
  
  Reviewed by:  bz

Modified:
  head/sys/netgraph/ng_socket.c

Modified: head/sys/netgraph/ng_socket.c
==
--- head/sys/netgraph/ng_socket.c   Thu Jul 14 18:37:10 2011
(r224030)
+++ head/sys/netgraph/ng_socket.c   Thu Jul 14 18:38:10 2011
(r224031)
@@ -525,33 +525,32 @@ ng_attach_cntl(struct socket *so)
 {
struct ngsock *priv;
struct ngpcb *pcbp;
+   node_p node;
int error;
 
-   /* Allocate node private info */
-   priv = malloc(sizeof(*priv), M_NETGRAPH_SOCK, M_WAITOK | M_ZERO);
-
/* Setup protocol control block */
-   if ((error = ng_attach_common(so, NG_CONTROL)) != 0) {
-   free(priv, M_NETGRAPH_SOCK);
+   if ((error = ng_attach_common(so, NG_CONTROL)) != 0)
return (error);
-   }
pcbp = sotongpcb(so);
 
-   /* Link the pcb the private data. */
-   priv-ctlsock = pcbp;
-   pcbp-sockdata = priv;
-   priv-refs++;
-
-   /* Initialize mutex. */
-   mtx_init(priv-mtx, ng_socket, NULL, MTX_DEF);
-
/* Make the generic node components */
-   if ((error = ng_make_node_common(typestruct, priv-node)) != 0) {
-   free(priv, M_NETGRAPH_SOCK);
+   if ((error = ng_make_node_common(typestruct, node)) != 0) {
ng_detach_common(pcbp, NG_CONTROL);
return (error);
}
 
+   /* Allocate node private info */
+   priv = malloc(sizeof(*priv), M_NETGRAPH_SOCK, M_WAITOK | M_ZERO);
+
+   /* Initialize mutex. */
+   mtx_init(priv-mtx, ng_socket, NULL, MTX_DEF);
+
+   /* Link the pcb the private data. */
+   priv-ctlsock = pcbp;
+   pcbp-sockdata = priv;
+   priv-refs++;
+   priv-node = node;
+
/* Store a hint for netstat(1). */
priv-node_id = priv-node-nd_ID;
 
___
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: r224036 - in head: sys/kern sys/sys usr.bin/rctl

2011-07-14 Thread Edward Tomasz Napierala
Author: trasz
Date: Thu Jul 14 19:18:17 2011
New Revision: 224036
URL: http://svn.freebsd.org/changeset/base/224036

Log:
  Rename resource names to match these in login.conf.

Modified:
  head/sys/kern/kern_racct.c
  head/sys/kern/kern_rctl.c
  head/sys/sys/racct.h
  head/usr.bin/rctl/rctl.8

Modified: head/sys/kern/kern_racct.c
==
--- head/sys/kern/kern_racct.c  Thu Jul 14 19:09:48 2011(r224035)
+++ head/sys/kern/kern_racct.c  Thu Jul 14 19:18:17 2011(r224036)
@@ -103,7 +103,7 @@ SDT_PROBE_DEFINE2(racct, kernel, racct, 
 
 int racct_types[] = {
[RACCT_CPU] =
-   RACCT_IN_THOUSANDS,
+   RACCT_IN_MILLIONS,
[RACCT_DATA] =
RACCT_RECLAIMABLE | RACCT_INHERITABLE | RACCT_DENIABLE,
[RACCT_STACK] =
@@ -141,7 +141,7 @@ int racct_types[] = {
[RACCT_SHMSIZE] =
RACCT_RECLAIMABLE | RACCT_DENIABLE | RACCT_SLOPPY,
[RACCT_WALLCLOCK] =
-   RACCT_IN_THOUSANDS };
+   RACCT_IN_MILLIONS };
 
 static void
 racct_add_racct(struct racct *dest, const struct racct *src)

Modified: head/sys/kern/kern_rctl.c
==
--- head/sys/kern/kern_rctl.c   Thu Jul 14 19:09:48 2011(r224035)
+++ head/sys/kern/kern_rctl.c   Thu Jul 14 19:18:17 2011(r224036)
@@ -99,17 +99,17 @@ static struct dict subjectnames[] = {
{ NULL, -1 }};
 
 static struct dict resourcenames[] = {
-   { cpu, RACCT_CPU },
-   { data, RACCT_DATA },
-   { stack, RACCT_STACK },
-   { core, RACCT_CORE },
-   { rss, RACCT_RSS },
-   { memlock, RACCT_MEMLOCK },
-   { nproc, RACCT_NPROC },
-   { nofile, RACCT_NOFILE },
-   { vmem, RACCT_VMEM },
-   { npts, RACCT_NPTS },
-   { swap, RACCT_SWAP },
+   { cputime, RACCT_CPU },
+   { datasize, RACCT_DATA },
+   { stacksize, RACCT_STACK },
+   { coredumpsize, RACCT_CORE },
+   { memoryuse, RACCT_RSS },
+   { memorylocked, RACCT_MEMLOCK },
+   { maxproc, RACCT_NPROC },
+   { openfiles, RACCT_NOFILE },
+   { vmemoryuse, RACCT_VMEM },
+   { pseudoterminals, RACCT_NPTS },
+   { swapuse, RACCT_SWAP },
{ nthr, RACCT_NTHR },
{ msgqqueued, RACCT_MSGQQUEUED },
{ msgqsize, RACCT_MSGQSIZE },
@@ -907,7 +907,7 @@ rctl_string_to_rule(char *rulestr, struc
error = str2int64(amountstr, rule-rr_amount);
if (error != 0)
goto out;
-   if (RACCT_IS_IN_THOUSANDS(rule-rr_resource))
+   if (RACCT_IS_IN_MILLIONS(rule-rr_resource))
rule-rr_amount *= 1000;
}
 
@@ -1152,8 +1152,8 @@ rctl_rule_to_sbuf(struct sbuf *sb, const
 
amount = rule-rr_amount;
if (amount != RCTL_AMOUNT_UNDEFINED 
-   RACCT_IS_IN_THOUSANDS(rule-rr_resource))
-   amount /= 1000;
+   RACCT_IS_IN_MILLIONS(rule-rr_resource))
+   amount /= 100;
 
sbuf_printf(sb, %s:%s=%jd,
rctl_resource_name(rule-rr_resource),
@@ -1222,7 +1222,7 @@ rctl_racct_to_sbuf(struct racct *racct, 
if (sloppy == 0  RACCT_IS_SLOPPY(i))
continue;
amount = racct-r_resources[i];
-   if (RACCT_IS_IN_THOUSANDS(i))
+   if (RACCT_IS_IN_MILLIONS(i))
amount /= 1000;
sbuf_printf(sb, %s=%jd,, rctl_resource_name(i), amount);
}

Modified: head/sys/sys/racct.h
==
--- head/sys/sys/racct.hThu Jul 14 19:09:48 2011(r224035)
+++ head/sys/sys/racct.hThu Jul 14 19:18:17 2011(r224036)
@@ -73,7 +73,7 @@ struct ucred;
 /*
  * Resource properties.
  */
-#defineRACCT_IN_THOUSANDS  0x01
+#defineRACCT_IN_MILLIONS   0x01
 #defineRACCT_RECLAIMABLE   0x02
 #defineRACCT_INHERITABLE   0x04
 #defineRACCT_DENIABLE  0x08
@@ -82,11 +82,11 @@ struct ucred;
 extern int racct_types[];
 
 /*
- * Amount stored in c_resources[] is thousand times bigger than what's
+ * Amount stored in c_resources[] is 10**6 times bigger than what's
  * visible to the userland.  It gets fixed up when retrieving resource
  * usage or adding rules.
  */
-#defineRACCT_IS_IN_THOUSANDS(X)(racct_types[X]  
RACCT_IN_THOUSANDS)
+#defineRACCT_IS_IN_MILLIONS(X) (racct_types[X]  RACCT_IN_MILLIONS)
 
 /*
  * Resource usage can drop, as opposed to only grow.

Modified: head/usr.bin/rctl/rctl.8
==
--- head/usr.bin/rctl/rctl.8Thu Jul 14 19:09:48 2011(r224035)
+++ head/usr.bin/rctl/rctl.8Thu Jul 14 19:18:17 2011(r224036)
@@ -25,7 +25,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd May 26, 2011
+.Dd 

svn commit: r224039 - head/sys/dev/mfi

2011-07-14 Thread John Baldwin
Author: jhb
Date: Thu Jul 14 20:11:27 2011
New Revision: 224039
URL: http://svn.freebsd.org/changeset/base/224039

Log:
  Use MFI_STAT_* constants for cmd_status field values rather than magic
  numbers in a few places.
  
  PR:   bin/145960
  Submitted by: gcooper
  MFC after:1 week

Modified:
  head/sys/dev/mfi/mfi.c

Modified: head/sys/dev/mfi/mfi.c
==
--- head/sys/dev/mfi/mfi.c  Thu Jul 14 19:25:42 2011(r224038)
+++ head/sys/dev/mfi/mfi.c  Thu Jul 14 20:11:27 2011(r224039)
@@ -1149,7 +1149,8 @@ mfi_aen_complete(struct mfi_command *cm)
if (sc-mfi_aen_cm == NULL)
return;
 
-   if (sc-mfi_aen_cm-cm_aen_abort || hdr-cmd_status == 0xff) {
+   if (sc-mfi_aen_cm-cm_aen_abort ||
+   hdr-cmd_status == MFI_STAT_INVALID_STATUS) {
sc-mfi_aen_cm-cm_aen_abort = 0;
aborted = 1;
} else {
@@ -1405,7 +1406,7 @@ mfi_bio_complete(struct mfi_command *cm)
hdr = cm-cm_frame-header;
sc = cm-cm_sc;
 
-   if ((hdr-cmd_status != 0) || (hdr-scsi_status != 0)) {
+   if ((hdr-cmd_status != MFI_STAT_OK) || (hdr-scsi_status != 0)) {
bio-bio_flags |= BIO_ERROR;
bio-bio_error = EIO;
device_printf(sc-mfi_dev, I/O error, status= %d 
@@ -1549,7 +1550,7 @@ mfi_send_frame(struct mfi_softc *sc, str
cm-cm_timestamp = time_uptime;
mfi_enqueue_busy(cm);
} else {
-   hdr-cmd_status = 0xff;
+   hdr-cmd_status = MFI_STAT_INVALID_STATUS;
hdr-flags |= MFI_FRAME_DONT_POST_IN_REPLY_QUEUE;
}
 
@@ -1574,14 +1575,14 @@ mfi_send_frame(struct mfi_softc *sc, str
return (0);
 
/* This is a polled command, so busy-wait for it to complete. */
-   while (hdr-cmd_status == 0xff) {
+   while (hdr-cmd_status == MFI_STAT_INVALID_STATUS) {
DELAY(1000);
tm -= 1;
if (tm = 0)
break;
}
 
-   if (hdr-cmd_status == 0xff) {
+   if (hdr-cmd_status == MFI_STAT_INVALID_STATUS) {
device_printf(sc-mfi_dev, Frame %p timed out 
  command 0x%X\n, hdr, cm-cm_frame-dcmd.opcode);
return (ETIMEDOUT);
___
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: r224040 - head/sbin/umount

2011-07-14 Thread Kirk McKusick
Author: mckusick
Date: Thu Jul 14 20:17:05 2011
New Revision: 224040
URL: http://svn.freebsd.org/changeset/base/224040

Log:
  When using -A option (unmount all mounted filesystems), do not attempt
  to unmount /dev as it will always fail.

Modified:
  head/sbin/umount/umount.c

Modified: head/sbin/umount/umount.c
==
--- head/sbin/umount/umount.c   Thu Jul 14 20:11:27 2011(r224039)
+++ head/sbin/umount/umount.c   Thu Jul 14 20:17:05 2011(r224040)
@@ -154,6 +154,8 @@ main(int argc, char *argv[])
sfs = mntbuf[mntsize];
if (checkvfsname(sfs-f_fstypename, typelist))
continue;
+   if (strcmp(sfs-f_mntonname, /dev) == 0)
+   continue;
if (umountfs(sfs) != 0)
errs = 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: r224041 - head/sys/dev/mfi

2011-07-14 Thread John Baldwin
Author: jhb
Date: Thu Jul 14 20:20:33 2011
New Revision: 224041
URL: http://svn.freebsd.org/changeset/base/224041

Log:
  Support controllers whose option ROM is disabled in the BIOS by kicking
  the firmware so that it boots.
  
  PR:   kern/154978
  Submitted by: Andrew Boyer  aboyer of averesystems com
  Obtained from:LSI
  MFC after:1 week

Modified:
  head/sys/dev/mfi/mfi.c
  head/sys/dev/mfi/mfireg.h

Modified: head/sys/dev/mfi/mfi.c
==
--- head/sys/dev/mfi/mfi.c  Thu Jul 14 20:17:05 2011(r224040)
+++ head/sys/dev/mfi/mfi.c  Thu Jul 14 20:20:33 2011(r224041)
@@ -260,8 +260,12 @@ mfi_transition_firmware(struct mfi_softc
case MFI_FWSTATE_FLUSH_CACHE:
max_wait = 20;
break;
+   case MFI_FWSTATE_BOOT_MESSAGE_PENDING:
+   MFI_WRITE4(sc, MFI_IDB, MFI_FWINIT_HOTPLUG);
+   max_wait = 10;
+   break;
default:
-   device_printf(sc-mfi_dev,Unknown firmware state %d\n,
+   device_printf(sc-mfi_dev,Unknown firmware state 
%#x\n,
fw_state);
return (ENXIO);
}
@@ -273,7 +277,7 @@ mfi_transition_firmware(struct mfi_softc
break;
}
if (fw_state == cur_state) {
-   device_printf(sc-mfi_dev, firmware stuck in state 
+   device_printf(sc-mfi_dev, Firmware stuck in state 
%#x\n, fw_state);
return (ENXIO);
}

Modified: head/sys/dev/mfi/mfireg.h
==
--- head/sys/dev/mfi/mfireg.h   Thu Jul 14 20:17:05 2011(r224040)
+++ head/sys/dev/mfi/mfireg.h   Thu Jul 14 20:20:33 2011(r224041)
@@ -112,6 +112,7 @@ __FBSDID($FreeBSD$);
 #define MFI_FWSTATE_WAIT_HANDSHAKE 0x6000
 #define MFI_FWSTATE_FW_INIT_2  0x7000
 #define MFI_FWSTATE_DEVICE_SCAN0x8000
+#define MFI_FWSTATE_BOOT_MESSAGE_PENDING   0x9000
 #define MFI_FWSTATE_FLUSH_CACHE0xa000
 #define MFI_FWSTATE_READY  0xb000
 #define MFI_FWSTATE_OPERATIONAL0xc000
@@ -127,6 +128,7 @@ __FBSDID($FreeBSD$);
 #define MFI_FWINIT_READY   0x0002 /* Move from operational to ready */
 #define MFI_FWINIT_MFIMODE 0x0004 /* unknown */
 #define MFI_FWINIT_CLEAR_HANDSHAKE 0x0008 /* Respond to WAIT_HANDSHAKE */
+#define MFI_FWINIT_HOTPLUG 0x0010
 
 /* MFI Commands */
 typedef enum {
___
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: r224043 - head/sys/sys

2011-07-14 Thread Jung-uk Kim
Author: jkim
Date: Thu Jul 14 21:02:15 2011
New Revision: 224043
URL: http://svn.freebsd.org/changeset/base/224043

Log:
  Prefer uint64_t over u_int64_t.

Modified:
  head/sys/sys/timetc.h

Modified: head/sys/sys/timetc.h
==
--- head/sys/sys/timetc.h   Thu Jul 14 21:00:26 2011(r224042)
+++ head/sys/sys/timetc.h   Thu Jul 14 21:02:15 2011(r224043)
@@ -47,7 +47,7 @@ struct timecounter {
 */
u_int   tc_counter_mask;
/* This mask should mask off any unimplemented bits. */
-   u_int64_t   tc_frequency;
+   uint64_ttc_frequency;
/* Frequency of the counter in Hz. */
char*tc_name;
/* Name of the timecounter. */
___
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: r224044 - head/sys/net

2011-07-14 Thread Mark Peek
Author: mp
Date: Thu Jul 14 21:06:22 2011
New Revision: 224044
URL: http://svn.freebsd.org/changeset/base/224044

Log:
  Clear the filter memory area before using it. Leaving it uninitialized may
  leak previous kernel stack contents through a malicioius BPF filter.
  
  PR:   kern/158880
  Submitted by: Guy Harris
  Obtained from:OpenBSD
  MFC after:1 week

Modified:
  head/sys/net/bpf_filter.c

Modified: head/sys/net/bpf_filter.c
==
--- head/sys/net/bpf_filter.c   Thu Jul 14 21:02:15 2011(r224043)
+++ head/sys/net/bpf_filter.c   Thu Jul 14 21:06:22 2011(r224044)
@@ -177,6 +177,8 @@ bpf_filter(const struct bpf_insn *pc, u_
bpf_u_int32 k;
u_int32_t mem[BPF_MEMWORDS];
 
+   bzero(mem, sizeof(mem));
+
if (pc == NULL)
/*
 * No filter means accept all.
___
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: r224045 - head/sys/dev/ath

2011-07-14 Thread Adrian Chadd
Author: adrian
Date: Thu Jul 14 23:30:30 2011
New Revision: 224045
URL: http://svn.freebsd.org/changeset/base/224045

Log:
  Add a missing check for the global ath_hal_debug.
  
  This was removed accidentally when the per HAL instance
  code was added, and not reverted when I added back the
  global debug variable (for early chip setup debugging.)

Modified:
  head/sys/dev/ath/ah_osdep.c

Modified: head/sys/dev/ath/ah_osdep.c
==
--- head/sys/dev/ath/ah_osdep.c Thu Jul 14 21:06:22 2011(r224044)
+++ head/sys/dev/ath/ah_osdep.c Thu Jul 14 23:30:30 2011(r224045)
@@ -127,7 +127,9 @@ ath_hal_ether_sprintf(const u_int8_t *ma
 void
 DO_HALDEBUG(struct ath_hal *ah, u_int mask, const char* fmt, ...)
 {
-   if ((mask == HAL_DEBUG_UNMASKABLE) || (ah-ah_config.ah_debug  mask)) {
+   if ((mask == HAL_DEBUG_UNMASKABLE) ||
+   (ah-ah_config.ah_debug  mask) ||
+   (ath_hal_debug  mask)) {
__va_list ap;
va_start(ap, fmt);
ath_hal_vprintf(ah, fmt, ap);
___
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: r224046 - head/sys/dev/aic7xxx/aicasm

2011-07-14 Thread Ed Maste
Author: emaste
Date: Fri Jul 15 00:36:47 2011
New Revision: 224046
URL: http://svn.freebsd.org/changeset/base/224046

Log:
  Improve portability #defines for compiling aicasm on other systems.
  
  Submitted by: Robert Millan  rmh debian.org
  Obtained from:Debian GNU/kFreeBSD

Modified:
  head/sys/dev/aic7xxx/aicasm/aicasm.c
  head/sys/dev/aic7xxx/aicasm/aicasm.h
  head/sys/dev/aic7xxx/aicasm/aicasm_gram.y
  head/sys/dev/aic7xxx/aicasm/aicasm_macro_gram.y
  head/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l
  head/sys/dev/aic7xxx/aicasm/aicasm_scan.l
  head/sys/dev/aic7xxx/aicasm/aicasm_symbol.c
  head/sys/dev/aic7xxx/aicasm/aicasm_symbol.h

Modified: head/sys/dev/aic7xxx/aicasm/aicasm.c
==
--- head/sys/dev/aic7xxx/aicasm/aicasm.cThu Jul 14 23:30:30 2011
(r224045)
+++ head/sys/dev/aic7xxx/aicasm/aicasm.cFri Jul 15 00:36:47 2011
(r224046)
@@ -53,7 +53,7 @@
 #include sysexits.h
 #include unistd.h
 
-#if linux
+#if defined(__linux__) || defined(__GLIBC__)
 #include endian.h
 #else
 #include machine/endian.h

Modified: head/sys/dev/aic7xxx/aicasm/aicasm.h
==
--- head/sys/dev/aic7xxx/aicasm/aicasm.hThu Jul 14 23:30:30 2011
(r224045)
+++ head/sys/dev/aic7xxx/aicasm/aicasm.hFri Jul 15 00:36:47 2011
(r224046)
@@ -42,11 +42,7 @@
  * $FreeBSD$
  */
 
-#ifdef __linux__
-#include ../queue.h
-#else
 #include sys/queue.h
-#endif
 
 #ifndef TRUE
 #define TRUE 1

Modified: head/sys/dev/aic7xxx/aicasm/aicasm_gram.y
==
--- head/sys/dev/aic7xxx/aicasm/aicasm_gram.y   Thu Jul 14 23:30:30 2011
(r224045)
+++ head/sys/dev/aic7xxx/aicasm/aicasm_gram.y   Fri Jul 15 00:36:47 2011
(r224046)
@@ -51,12 +51,7 @@
 #include stdlib.h
 #include string.h
 #include sysexits.h
-
-#ifdef __linux__
-#include ../queue.h
-#else
 #include sys/queue.h
-#endif
 
 #include aicasm.h
 #include aicasm_symbol.h

Modified: head/sys/dev/aic7xxx/aicasm/aicasm_macro_gram.y
==
--- head/sys/dev/aic7xxx/aicasm/aicasm_macro_gram.y Thu Jul 14 23:30:30 
2011(r224045)
+++ head/sys/dev/aic7xxx/aicasm/aicasm_macro_gram.y Fri Jul 15 00:36:47 
2011(r224046)
@@ -51,12 +51,7 @@
 #include stdlib.h
 #include string.h
 #include sysexits.h
-
-#ifdef __linux__
-#include ../queue.h
-#else
 #include sys/queue.h
-#endif
 
 #include aicasm.h
 #include aicasm_symbol.h

Modified: head/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l
==
--- head/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l Thu Jul 14 23:30:30 
2011(r224045)
+++ head/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l Fri Jul 15 00:36:47 
2011(r224046)
@@ -51,11 +51,7 @@
 #include stdio.h
 #include string.h
 #include sysexits.h
-#ifdef __linux__
-#include ../queue.h
-#else
 #include sys/queue.h
-#endif
 
 #include aicasm.h
 #include aicasm_symbol.h

Modified: head/sys/dev/aic7xxx/aicasm/aicasm_scan.l
==
--- head/sys/dev/aic7xxx/aicasm/aicasm_scan.l   Thu Jul 14 23:30:30 2011
(r224045)
+++ head/sys/dev/aic7xxx/aicasm/aicasm_scan.l   Fri Jul 15 00:36:47 2011
(r224046)
@@ -51,11 +51,7 @@
 #include stdio.h
 #include string.h
 #include sysexits.h
-#ifdef __linux__
-#include ../queue.h
-#else
 #include sys/queue.h
-#endif
 
 #include aicasm.h
 #include aicasm_symbol.h

Modified: head/sys/dev/aic7xxx/aicasm/aicasm_symbol.c
==
--- head/sys/dev/aic7xxx/aicasm/aicasm_symbol.c Thu Jul 14 23:30:30 2011
(r224045)
+++ head/sys/dev/aic7xxx/aicasm/aicasm_symbol.c Fri Jul 15 00:36:47 2011
(r224046)
@@ -43,11 +43,11 @@
  */
 
 #include sys/types.h
-
-#ifdef __linux__
-#include aicdb.h
-#else
+#include sys/param.h
+#ifdef BSD
 #include db.h
+#else
+#include db_185.h
 #endif
 #include ctype.h
 #include fcntl.h

Modified: head/sys/dev/aic7xxx/aicasm/aicasm_symbol.h
==
--- head/sys/dev/aic7xxx/aicasm/aicasm_symbol.h Thu Jul 14 23:30:30 2011
(r224045)
+++ head/sys/dev/aic7xxx/aicasm/aicasm_symbol.h Fri Jul 15 00:36:47 2011
(r224046)
@@ -42,11 +42,7 @@
  * $FreeBSD$
  */
 
-#ifdef __linux__
-#include ../queue.h
-#else
 #include sys/queue.h
-#endif
 
 typedef enum {
UNINITIALIZED,
___
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: r224048 - head/etc/rc.d

2011-07-14 Thread Kevin Lo
Author: kevlo
Date: Fri Jul 15 01:59:08 2011
New Revision: 224048
URL: http://svn.freebsd.org/changeset/base/224048

Log:
  Remove -n from echo
  
  Reviewed by:  dougb

Modified:
  head/etc/rc.d/routing

Modified: head/etc/rc.d/routing
==
--- head/etc/rc.d/routing   Fri Jul 15 01:50:40 2011(r224047)
+++ head/etc/rc.d/routing   Fri Jul 15 01:59:08 2011(r224048)
@@ -287,7 +287,7 @@ options_inet()
 
if checkyesno gateway_enable; then
ropts_init
-   echo -n ' IPv4 gateway=YES'
+   echo ' IPv4 gateway=YES'
${SYSCTL} net.inet.ip.forwarding=1  /dev/null
else
${SYSCTL} net.inet.ip.forwarding=0  /dev/null
@@ -322,7 +322,7 @@ options_inet6()
 {
if checkyesno ipv6_gateway_enable; then
ropts_init
-   echo -n ' IPv6 gateway=YES'
+   echo ' IPv6 gateway=YES'
${SYSCTL} net.inet6.ip6.forwarding=1  /dev/null
else
${SYSCTL} net.inet6.ip6.forwarding=0  /dev/null
___
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: r224050 - head/sys/arm/mv

2011-07-14 Thread Marcel Moolenaar
Author: marcel
Date: Fri Jul 15 02:16:13 2011
New Revision: 224050
URL: http://svn.freebsd.org/changeset/base/224050

Log:
  Set preload_addr_relocate accordingly so that preloaded modules and
  images are properly relocated.

Modified:
  head/sys/arm/mv/mv_machdep.c

Modified: head/sys/arm/mv/mv_machdep.c
==
--- head/sys/arm/mv/mv_machdep.cFri Jul 15 02:11:26 2011
(r224049)
+++ head/sys/arm/mv/mv_machdep.cFri Jul 15 02:16:13 2011
(r224050)
@@ -340,6 +340,7 @@ initarm(void *mdp, void *unused __unused
 #endif
}
 
+   preload_addr_relocate = KERNVIRTADDR - KERNPHYSADDR;
} else {
/* Fall back to hardcoded metadata. */
lastaddr = fake_preload_metadata();
___
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: r224051 - head/sys/arm/mv

2011-07-14 Thread Marcel Moolenaar
Author: marcel
Date: Fri Jul 15 02:29:10 2011
New Revision: 224051
URL: http://svn.freebsd.org/changeset/base/224051

Log:
  Do not call platform_gpio_init() early. It doesn't work because we do
  not have enough information to reliably setup GPIO pins. Do it when
  we attach the gpio driver. This prevents hangs and the need to fake
  up a softc.

Modified:
  head/sys/arm/mv/gpio.c
  head/sys/arm/mv/mv_machdep.c

Modified: head/sys/arm/mv/gpio.c
==
--- head/sys/arm/mv/gpio.c  Fri Jul 15 02:16:13 2011(r224050)
+++ head/sys/arm/mv/gpio.c  Fri Jul 15 02:29:10 2011(r224051)
@@ -197,10 +197,7 @@ mv_gpio_attach(device_t dev)
}
}
 
-   /*
-* GPIO lines setup is already done at this stage (see mv_machdep.c).
-*/
-   return (0);
+   return (platform_gpio_init());
 }
 
 static int
@@ -565,20 +562,6 @@ mv_handle_gpios_prop(phandle_t ctrl, pce
 
if (fdt_regsize(ctrl, gpio_ctrl, size))
return (ENXIO);
-   /*
-* Since to set up GPIO we use the same functions as GPIO driver, and
-* mv_gpio_softc is NULL at this early stage, we need to create a fake
-* softc and set mv_gpio_softc pointer to that newly created object.
-* After successful GPIO setup, the [shared] pointer will be set back
-* to NULL.
-*/
-   mv_gpio_softc = sc;
-
-   sc.bst = fdtbus_bs_tag;
-   gpio_ctrl += fdt_immr_va;
-
-   if (bus_space_map(sc.bst, gpio_ctrl, size, 0, sc.bsh) != 0)
-   return (ENXIO);
 
if (OF_getprop(ctrl, pin-count, pincnt, sizeof(pcell_t))  0)
return (ENXIO);
@@ -612,8 +595,6 @@ mv_handle_gpios_prop(phandle_t ctrl, pce
gpios += gpio_cells + inc;
}
 
-   /* Reset pointer. */
-   mv_gpio_softc = NULL;
return (0);
 }
 

Modified: head/sys/arm/mv/mv_machdep.c
==
--- head/sys/arm/mv/mv_machdep.cFri Jul 15 02:16:13 2011
(r224050)
+++ head/sys/arm/mv/mv_machdep.cFri Jul 15 02:29:10 2011
(r224051)
@@ -512,13 +512,8 @@ initarm(void *mdp, void *unused __unused
if (platform_mpp_init() != 0)
while (1);
 
-   /*
-* Initialize GPIO as early as possible.
-*/
-   if (platform_gpio_init() != 0)
-   while (1);
-
cninit();
+
physmem = memsize / PAGE_SIZE;
 
debugf(initarm: console initialized\n);
___
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