svn commit: r207609 - stable/8/games/pom

2010-05-04 Thread Edwin Groothuis
Author: edwin
Date: Tue May  4 08:06:53 2010
New Revision: 207609
URL: http://svn.freebsd.org/changeset/base/207609

Log:
  MFC of r201613, r201627
  
  Be able to specify a certain date and/or time for which to calculate
  the phase of the moon.
  While not worlds best improvements, it will help calendar(1) later on.
  
  Also closed bin/79008
  
  PR:   bin/79008

Modified:
  stable/8/games/pom/pom.6
  stable/8/games/pom/pom.c
Directory Properties:
  stable/8/games/pom/   (props changed)

Modified: stable/8/games/pom/pom.6
==
--- stable/8/games/pom/pom.6Tue May  4 06:19:19 2010(r207608)
+++ stable/8/games/pom/pom.6Tue May  4 08:06:53 2010(r207609)
@@ -32,15 +32,34 @@
 .\"@(#)pom.6   8.1 (Berkeley) 5/31/93
 .\" $FreeBSD$
 .\"
-.TH POM 6 "May 31, 1993"
+.Dd May 31, 1993
+.Dt POM 6
 .UC 7
-.SH NAME
-pom \- display the phase of the moon
-.SH SYNOPSIS
-.B pom
-.SH DESCRIPTION
+.Sh NAME
+.Nm pom
+.Nd display the phase of the moon
+.Sh SYNOPSIS
+.Nm 
+.Op Fl d Ar .mm.dd
+.Op Fl t Ar hh:mm:ss
+.Sh DESCRIPTION
 The
-.I pom
+.Nm
 utility displays the current phase of the moon.
 Useful for selecting software completion target dates and predicting
 managerial behavior.
+.Pp
+Use the arguments
+.Fl d
+and
+.Fl o
+to specify a specific date and time for which the phase of the moon
+has to be calculated.
+If
+.Fl d
+but not
+.Fl t
+has been specified, it will calculate the phase of the moon on that
+day at midnight.
+.Sh SEE ALSO
+`Practical Astronomy with Your Calculator' by Duffett-Smith.

Modified: stable/8/games/pom/pom.c
==
--- stable/8/games/pom/pom.cTue May  4 06:19:19 2010(r207608)
+++ stable/8/games/pom/pom.cTue May  4 08:06:53 2010(r207609)
@@ -57,9 +57,13 @@ __FBSDID("$FreeBSD$");
  *
  */
 
-#include 
 #include 
+#include 
 #include 
+#include 
+#include 
+#include 
+#include  
 
 #ifndefPI
 #definePI3.14159265358979323846
@@ -76,20 +80,62 @@ __FBSDID("$FreeBSD$");
 static voidadj360(double *);
 static double  dtor(double);
 static double  potm(double);
+static voidusage(char *progname);
 
 int
-main(void)
+main(int argc, char **argv)
 {
time_t tt;
-   struct tm *GMT;
+   struct tm GMT, tmd;
double days, today, tomorrow;
-   int cnt;
+   int ch, cnt;
+   char *odate = NULL, *otime = NULL;
+
+   while ((ch = getopt(argc, argv, "d:t:")) != -1)
+   switch (ch) {
+   case 'd':
+   odate = optarg;
+   break;
+   case 't':
+   otime = optarg;
+   break;
+   default:
+   usage(argv[0]);
+   }
+
+argc -= optind;
+   argv += optind;
+
+   if (argc)
+   usage(argv[0]);
 
-   (void) time(&tt);
-   GMT = gmtime(&tt);
-   days = (GMT->tm_yday + 1) + ((GMT->tm_hour +
-   (GMT->tm_min / 60.0) + (GMT->tm_sec / 3600.0)) / 24.0);
-   for (cnt = EPOCH; cnt < GMT->tm_year; ++cnt)
+   /* Adjust based on users preferences */
+   time(&tt);
+   if (otime != NULL || odate != NULL) {
+   /* Save today in case -d isn't specified */
+   localtime_r(&tt, &tmd);
+
+   if (odate != NULL) {
+   tmd.tm_year = strtol(odate, NULL, 10) - 1900;
+   tmd.tm_mon = strtol(odate + 5, NULL, 10) - 1;
+   tmd.tm_mday = strtol(odate + 8, NULL, 10);
+   /* Use midnight as the middle of the night */
+   tmd.tm_hour = 0;
+   tmd.tm_min = 0;
+   tmd.tm_sec = 0;
+   }
+   if (otime != NULL) {
+   tmd.tm_hour = strtol(otime, NULL, 10);
+   tmd.tm_min = strtol(otime + 3, NULL, 10);
+   tmd.tm_sec = strtol(otime + 6, NULL, 10);
+   }
+   tt = mktime(&tmd);
+   }
+
+   gmtime_r(&tt, &GMT);
+   days = (GMT.tm_yday + 1) + ((GMT.tm_hour +
+   (GMT.tm_min / 60.0) + (GMT.tm_sec / 3600.0)) / 24.0);
+   for (cnt = EPOCH; cnt < GMT.tm_year; ++cnt)
days += isleap(1900 + cnt) ? 366 : 365;
today = potm(days) + .5;
(void)printf("The Moon is ");
@@ -160,6 +206,7 @@ potm(double days)
 static double
 dtor(double deg)
 {
+
return(deg * PI / 180);
 }
 
@@ -170,6 +217,7 @@ dtor(double deg)
 static void
 adj360(double *deg)
 {
+
for (;;)
if (*deg < 0)
*deg += 360;
@@ -178,3 +226,11 @@ adj360(double *deg)
else
break;
 }
+
+static void
+usage(char *progname)
+{
+
+   fprintf(stderr, "Usage: %s [-d .mm.dd] [-t hh:mm:ss]\n", progname);
+

svn commit: r207610 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2010-05-04 Thread Martin Matuska
Author: mm
Date: Tue May  4 08:37:28 2010
New Revision: 207610
URL: http://svn.freebsd.org/changeset/base/207610

Log:
  MFC r207480:
  
  Change description of tunable group vfs.zfs.txg to be more
  understandable.
  
  Approved by:pjd, delphij (mentor)

Modified:
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/geom/sched/   (props changed)

Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c
==
--- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c   Tue May 
 4 08:06:53 2010(r207609)
+++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c   Tue May 
 4 08:37:28 2010(r207610)
@@ -40,7 +40,8 @@ int zfs_txg_timeout = 30; /* max seconds
 extern int zfs_txg_synctime;
 
 SYSCTL_DECL(_vfs_zfs);
-SYSCTL_NODE(_vfs_zfs, OID_AUTO, txg, CTLFLAG_RW, 0, "ZFS TXG");
+SYSCTL_NODE(_vfs_zfs, OID_AUTO, txg, CTLFLAG_RW, 0,
+"ZFS transaction groups (TXG)");
 TUNABLE_INT("vfs.zfs.txg.timeout", &zfs_txg_timeout);
 SYSCTL_INT(_vfs_zfs_txg, OID_AUTO, timeout, CTLFLAG_RDTUN, &zfs_txg_timeout, 0,
 "Maximum seconds worth of delta per txg");
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r207611 - in head/sys: arm/arm arm/include conf

2010-05-04 Thread Kevin Lo
Author: kevlo
Date: Tue May  4 10:14:05 2010
New Revision: 207611
URL: http://svn.freebsd.org/changeset/base/207611

Log:
  Add support for FA626TE.
  Tested on GM8181 development board.

Modified:
  head/sys/arm/arm/cpufunc.c
  head/sys/arm/arm/cpufunc_asm_fa526.S
  head/sys/arm/arm/elf_trampoline.c
  head/sys/arm/arm/identcpu.c
  head/sys/arm/include/cpuconf.h
  head/sys/arm/include/cpufunc.h
  head/sys/conf/options.arm

Modified: head/sys/arm/arm/cpufunc.c
==
--- head/sys/arm/arm/cpufunc.c  Tue May  4 08:37:28 2010(r207610)
+++ head/sys/arm/arm/cpufunc.c  Tue May  4 10:14:05 2010(r207611)
@@ -783,69 +783,66 @@ struct cpu_functions xscalec3_cpufuncs =
 #endif /* CPU_XSCALE_81342 */
 
 
-#if defined(CPU_FA526)
+#if defined(CPU_FA526) || defined(CPU_FA626TE)
 struct cpu_functions fa526_cpufuncs = {
/* CPU functions */
 
-   .cf_id  = cpufunc_id,
-   .cf_cpwait  = cpufunc_nullop,
+   cpufunc_id, /* id   */
+   cpufunc_nullop, /* cpwait   */
 
/* MMU functions */
 
-   .cf_control = cpufunc_control,
-   .cf_domains = cpufunc_domains,
-   .cf_setttb  = fa526_setttb,
-   .cf_faultstatus = cpufunc_faultstatus,
-   .cf_faultaddress= cpufunc_faultaddress,
+   cpufunc_control,/* control  */
+   cpufunc_domains,/* domain   */
+   fa526_setttb,   /* setttb   */
+   cpufunc_faultstatus,/* faultstatus  */
+   cpufunc_faultaddress,   /* faultaddress */
 
/* TLB functions */
 
-   .cf_tlb_flushID = armv4_tlb_flushID,
-   .cf_tlb_flushID_SE  = fa526_tlb_flushID_SE,
-   .cf_tlb_flushI  = armv4_tlb_flushI,
-   .cf_tlb_flushI_SE   = fa526_tlb_flushI_SE,
-   .cf_tlb_flushD  = armv4_tlb_flushD,
-   .cf_tlb_flushD_SE   = armv4_tlb_flushD_SE,
+   armv4_tlb_flushID,  /* tlb_flushID  */
+   fa526_tlb_flushID_SE,   /* tlb_flushID_SE   */
+   armv4_tlb_flushI,   /* tlb_flushI   */
+   fa526_tlb_flushI_SE,/* tlb_flushI_SE*/
+   armv4_tlb_flushD,   /* tlb_flushD   */
+   armv4_tlb_flushD_SE,/* tlb_flushD_SE*/
 
/* Cache operations */
 
-   .cf_icache_sync_all = fa526_icache_sync_all,
-   .cf_icache_sync_range   = fa526_icache_sync_range,
-
-   .cf_dcache_wbinv_all= fa526_dcache_wbinv_all,
-   .cf_dcache_wbinv_range  = fa526_dcache_wbinv_range,
-   .cf_dcache_inv_range= fa526_dcache_inv_range,
-   .cf_dcache_wb_range = fa526_dcache_wb_range,
-
-   .cf_idcache_wbinv_all   = fa526_idcache_wbinv_all,
-   .cf_idcache_wbinv_range = fa526_idcache_wbinv_range,
-
-
-   .cf_l2cache_wbinv_all = cpufunc_nullop,
-   .cf_l2cache_wbinv_range = (void *)cpufunc_nullop,
-   .cf_l2cache_inv_range = (void *)cpufunc_nullop,
-   .cf_l2cache_wb_range = (void *)cpufunc_nullop,
+   fa526_icache_sync_all,  /* icache_sync_all  */
+   fa526_icache_sync_range,/* icache_sync_range*/
 
+   fa526_dcache_wbinv_all, /* dcache_wbinv_all */
+   fa526_dcache_wbinv_range,   /* dcache_wbinv_range   */
+   fa526_dcache_inv_range, /* dcache_inv_range */
+   fa526_dcache_wb_range,  /* dcache_wb_range  */
+
+   fa526_idcache_wbinv_all,/* idcache_wbinv_all*/
+   fa526_idcache_wbinv_range,  /* idcache_wbinv_range  */
+   cpufunc_nullop, /* l2cache_wbinv_all*/
+   (void *)cpufunc_nullop, /* l2cache_wbinv_range  */
+   (void *)cpufunc_nullop, /* l2cache_inv_range*/
+   (void *)cpufunc_nullop, /* l2cache_wb_range */
 
/* Other functions */
 
-   .cf_flush_prefetchbuf   = fa526_flush_prefetchbuf,
-   .cf_drain_writebuf  = armv4_drain_writebuf,
-   .cf_flush_brnchtgt_C= cpufunc_nullop,
-   .cf_flush_brnchtgt_E= fa526_flush_brnchtgt_E,
+   fa526_flush_prefetchbuf,/* flush_prefetchbuf*/
+   armv4_drain_writebuf,   /* drain_writebuf   */
+   cpufunc_nullop, /* flush_brnchtgt_C */
+   fa526_flush_brnchtgt_E, /* flush_brnchtgt_E */
 
-   .cf_sleep   = fa526_cpu_sleep,
+   fa526_cpu_sleep,/* sleep*/
 
/* Soft functions */
 
-   .cf_dataabt_fixup   = cpufunc_null_fixup,
-   .cf_prefetchabt_fixup   = cpufunc_null_fixup,
+   cpufunc_null_fixup, /* dataabt_fixup*/
+   cpufunc_null_fixup, /* prefetchabt_fixup  

svn commit: r207612 - head/usr.sbin/mergemaster

2010-05-04 Thread Norikatsu Shigemura
Author: nork
Date: Tue May  4 11:25:04 2010
New Revision: 207612
URL: http://svn.freebsd.org/changeset/base/207612

Log:
  Add support run services_mkdb(8).
  
  Approved by:  dougb, imp (mentor)
  Reviewed by:  ume
  MFC after:2 weeks

Modified:
  head/usr.sbin/mergemaster/mergemaster.sh

Modified: head/usr.sbin/mergemaster/mergemaster.sh
==
--- head/usr.sbin/mergemaster/mergemaster.shTue May  4 10:14:05 2010
(r207611)
+++ head/usr.sbin/mergemaster/mergemaster.shTue May  4 11:25:04 2010
(r207612)
@@ -849,6 +849,9 @@ mm_install () {
 /etc/login.conf)
   NEED_CAP_MKDB=yes
   ;;
+/etc/services)
+  NEED_SERVICES_MKDB=yes
+  ;;
 /etc/master.passwd)
   do_install_and_rm 600 "${1}" "${DESTDIR}${INSTALL_DIR}"
   NEED_PWD_MKDB=yes
@@ -1278,6 +1281,17 @@ case "${NEED_CAP_MKDB}" in
   ;;
 esac
 
+case "${NEED_SERVICES_MKDB}" in
+'') ;;
+*)
+  echo ''
+  echo "*** You installed a services file, so make sure that you run"
+  echo "'/usr/sbin/services_mkdb -q -o ${DESTDIR}/var/db/services.db 
${DESTDIR}/etc/services'"
+  echo " to rebuild your services database"
+  run_it_now "/usr/sbin/services_mkdb -q -o ${DESTDIR}/var/db/services.db 
${DESTDIR}/etc/services"
+  ;;
+esac
+
 case "${NEED_PWD_MKDB}" in
 '') ;;
 *)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r207613 - head/usr.bin/chpass

2010-05-04 Thread Ed Maste
Author: emaste
Date: Tue May  4 11:34:13 2010
New Revision: 207613
URL: http://svn.freebsd.org/changeset/base/207613

Log:
  Restore historical behaviour of only executing chflags on files that exist.
  This eliminates cosmetic errors of the form "chflags: ...: No such file or
  directory" during an installworld to an empty destination.

Modified:
  head/usr.bin/chpass/Makefile

Modified: head/usr.bin/chpass/Makefile
==
--- head/usr.bin/chpass/MakefileTue May  4 11:25:04 2010
(r207612)
+++ head/usr.bin/chpass/MakefileTue May  4 11:34:13 2010
(r207613)
@@ -38,7 +38,9 @@ MLINKS+= chpass.1 ypchpass.1 chpass.1 yp
 
 beforeinstall:
 .for i in chpass chfn chsh ypchpass ypchfn ypchsh
+.if exists(${DESTDIR}${BINDIR}/$i)
-chflags noschg ${DESTDIR}${BINDIR}/$i
+.endif
 .endfor
 
 .if !defined(NO_FSCHG)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r207614 - head/libexec/tftpd

2010-05-04 Thread Warner Losh
Author: imp
Date: Tue May  4 13:07:40 2010
New Revision: 207614
URL: http://svn.freebsd.org/changeset/base/207614

Log:
  Bring in new files from edwin's tftp

Added:
  head/libexec/tftpd/tftp-file.c   (contents, props changed)
  head/libexec/tftpd/tftp-file.h   (contents, props changed)
  head/libexec/tftpd/tftp-io.c   (contents, props changed)
  head/libexec/tftpd/tftp-io.h   (contents, props changed)
  head/libexec/tftpd/tftp-options.c   (contents, props changed)
  head/libexec/tftpd/tftp-options.h   (contents, props changed)
  head/libexec/tftpd/tftp-transfer.c   (contents, props changed)
  head/libexec/tftpd/tftp-transfer.h   (contents, props changed)
  head/libexec/tftpd/tftp-utils.c   (contents, props changed)
  head/libexec/tftpd/tftp-utils.h   (contents, props changed)

Added: head/libexec/tftpd/tftp-file.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/libexec/tftpd/tftp-file.c  Tue May  4 13:07:40 2010
(r207614)
@@ -0,0 +1,257 @@
+/*
+ * Copyright (C) 2008 Edwin Groothuis. 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 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 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.
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "tftp-file.h"
+#include "tftp-utils.h"
+
+static FILE*file;
+static int convert;
+
+static charconvbuffer[66000];
+static int gotcr = 0;
+
+static size_t
+convert_from_net(char *buffer, size_t count)
+{
+   size_t i, n;
+
+   /*
+* Convert all CR/LF to LF and all CR,NUL to CR
+*/
+
+   n = 0;
+   for (i = 0; i < count; i++) {
+
+   if (gotcr == 0) {
+   convbuffer[n++] = buffer[i];
+   gotcr = (buffer[i] == '\r');
+   continue;
+   }
+
+   /* CR, NULL -> CR */
+   if (buffer[i] == '\0') {
+   gotcr = 0;
+   continue;
+   }
+
+   /* CR, LF -> LF */
+   if (buffer[i] == '\n') {
+   if (n == 0) {
+   if (ftell(file) != 0) {
+   fseek(file, -1, SEEK_END);
+   convbuffer[n++] = '\n';
+   } else {
+   /* This shouldn't happen */
+   tftp_log(LOG_ERR,
+   "Received LF as first character");
+   abort();
+   }
+   } else
+   convbuffer[n-1] = '\n';
+   gotcr = 0;
+   continue;
+   }
+
+   /* Everything else just accept as is */
+   convbuffer[n++] = buffer[i];
+   gotcr = (buffer[i] == '\r');
+   continue;
+   }
+
+   return fwrite(convbuffer, 1, n, file);
+}
+
+static size_t
+convert_to_net(char *buffer, size_t count, int init)
+{
+   size_t i;
+   static size_t n = 0, read = 0;
+   static int newline = 0;
+
+   if (init) {
+   newline = 0;
+   n = 0;
+   read = 0;
+   return 0 ;
+   }
+
+   /*
+* Convert all LF to CR,LF and all CR to CR,NUL
+*/
+   i = 0;
+
+   if (newline) {
+   buffer[i++] = newline;
+   newline = 0;
+   }
+
+   while (i < count) {
+   if (n == read) {
+   /* When done we're d

Re: svn commit: r207612 - head/usr.sbin/mergemaster

2010-05-04 Thread Alexander Leidinger
Quoting Norikatsu Shigemura  (from Tue, 4 May 2010  
11:25:04 + (UTC)):



Author: nork
Date: Tue May  4 11:25:04 2010
New Revision: 207612
URL: http://svn.freebsd.org/changeset/base/207612

Log:
  Add support run services_mkdb(8).


Shouldn't this (and similar messages) only be done if there is a  
corresponding DB file?


Everything is working just fine without the DB files, and the  
man-pages only recommend to create DB files for performance reasons.  
By default the DB files are not created, and as such it looks a bit  
strange to tell to "make sure" to create the DB file(s).


Bye,
Alexander.

--
The best laid plans of mice and men are held up in the legal department.

http://www.Leidinger.netAlexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org   netchild @ FreeBSD.org  : PGP ID = 72077137
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r207607 - head/usr.bin/tftp

2010-05-04 Thread John Baldwin
On Tuesday 04 May 2010 2:13:18 am Warner Losh wrote:
> Author: imp
> Date: Tue May  4 06:13:17 2010
> New Revision: 207607
> URL: http://svn.freebsd.org/changeset/base/207607
> 
> Log:
>   Go ahead and merge the work edwin@ on tftpd into the tree.  It is a
>   lot better than what's in the tree now.  Edwin tested it at a prior
>   employer, but can't test it today.  I've found that it works a lot
>   better with the various uboot versions that I've used in my embedded
>   work.  Here's the pkg-descr from the port that describes the changes:

bin/67550 and bin/118874 perhaps?

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


Re: svn commit: r207612 - head/usr.sbin/mergemaster

2010-05-04 Thread Norikatsu Shigemura
Hi netchild.

On Tue, 04 May 2010 16:02:55 +0200
Alexander Leidinger  wrote:
> > URL: http://svn.freebsd.org/changeset/base/207612
> > Log:
> >   Add support run services_mkdb(8).
> Shouldn't this (and similar messages) only be done if there is a  
> corresponding DB file?
> Everything is working just fine without the DB files, and the  
> man-pages only recommend to create DB files for performance reasons.  
> By default the DB files are not created, and as such it looks a bit  
> strange to tell to "make sure" to create the DB file(s).

My first patch has a test code '[ -f /var/db/services.db ] &&',
However, as the result, I discussed with dougb, he said that
existing /var/db/services.db is harmless.  So I don't have any
objection, and remove a test code.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r207612 - head/usr.sbin/mergemaster

2010-05-04 Thread Alexander Leidinger
Quoting Norikatsu Shigemura  (from Tue, 4 May 2010  
23:22:46 +0900):



Hi netchild.

On Tue, 04 May 2010 16:02:55 +0200
Alexander Leidinger  wrote:

> URL: http://svn.freebsd.org/changeset/base/207612
> Log:
>   Add support run services_mkdb(8).
Shouldn't this (and similar messages) only be done if there is a
corresponding DB file?
Everything is working just fine without the DB files, and the
man-pages only recommend to create DB files for performance reasons.
By default the DB files are not created, and as such it looks a bit
strange to tell to "make sure" to create the DB file(s).


My first patch has a test code '[ -f /var/db/services.db ] &&',
However, as the result, I discussed with dougb, he said that
existing /var/db/services.db is harmless.  So I don't have any
objection, and remove a test code.


I do not complain about your patch, you just had the bad luck that I  
noticed an extension of something which I think is not user friendly.  
I just used your commit to tell Doug (and others) about it.


I would print such a message only (for login.conf, services or  
whatever), if the DB file exists. Because if it exists, not updating  
the DB file is harmful (it does not contain what people would expect).  
If the file does not exist, there is nothing to do. The user does not  
want or does not know how to use this feature, so do not tell him to  
do or use something he doesn't want or doesn't understand (lack of  
knowledge, not lack of capability).


Bye,
Alexander.

--
Sometime in 1993 NANCY SINATRA will lead a BLOODLESS COUP on GUAM!!

http://www.Leidinger.netAlexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org   netchild @ FreeBSD.org  : PGP ID = 72077137
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r207615 - head/sys/security/audit

2010-05-04 Thread Christian S.J. Peron
Author: csjp
Date: Tue May  4 15:29:07 2010
New Revision: 207615
URL: http://svn.freebsd.org/changeset/base/207615

Log:
  Add a case to make sure that internal audit records get converted
  to BSM format for lpathconf(2) events.
  
  MFC after:2 weeks

Modified:
  head/sys/security/audit/audit_bsm.c

Modified: head/sys/security/audit/audit_bsm.c
==
--- head/sys/security/audit/audit_bsm.c Tue May  4 13:07:40 2010
(r207614)
+++ head/sys/security/audit/audit_bsm.c Tue May  4 15:29:07 2010
(r207615)
@@ -740,6 +740,7 @@ kaudit_to_bsm(struct kaudit_record *kar,
case AUE_LUTIMES:
case AUE_NFS_GETFH:
case AUE_LSTAT:
+   case AUE_LPATHCONF:
case AUE_PATHCONF:
case AUE_READLINK:
case AUE_REVOKE:
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r207616 - stable/7/share/misc

2010-05-04 Thread Brooks Davis
Author: brooks
Date: Tue May  4 15:52:17 2010
New Revision: 207616
URL: http://svn.freebsd.org/changeset/base/207616

Log:
  MFC r205073
  
  Regen:
  * Hart: rev 671 of pcidevs.txt; 22-01-2008 (D-M-Y).
  * Boemler:  vendors.txt (2010-03126)
  
  PR: kern/133733

Modified:
  stable/7/share/misc/pci_vendors   (contents, props changed)
Directory Properties:
  stable/7/share/misc/   (props changed)
  stable/7/share/misc/iso639   (props changed)

Modified: stable/7/share/misc/pci_vendors
==
--- stable/7/share/misc/pci_vendors Tue May  4 15:29:07 2010
(r207615)
+++ stable/7/share/misc/pci_vendors Tue May  4 15:52:17 2010
(r207616)
@@ -18,7 +18,7 @@
4001WinTV PVR-250 (v1)
4009WinTV PVR-250
4801WinTV PVR-250 MCE
-   6800Hauppage Nova -TD-500 DVB-T Tuner Device
+   6800Hauppage Nova -TD-500 DVB-T Tuner Device ( 
PCIVEN_1131&DEV_7130&SUBSYS_4051&REV_014&3B)
 0071   Nebula Electronics Ltd
 0100   Ncipher Corp Ltd
 0123   General Dynamics
@@ -44,6 +44,10 @@
8519OV519 series
 05E3   CyberDoor
0701CBD516
+064E   SUYIN Corporation
+   A101Acer Crystal Eye Webcam (suYin)
+   A103WebCam (SuYin)
+   D101Web Cam (SuYin)
 066F   Sigmatel Inc
3410SMTP3410
3500SMTP3500
@@ -54,6 +58,8 @@
1704ISDN Adapter (PCI Bus, D, C)
 067B   Prolific Technology Inc
2303PL-2303 USB-to-Serial Converter
+   2305USB-to-Printer Bridge Controller (PL-2305)
+   2393prolific (prolific)
3507PL-3507 Hi-Speed USB & IEEE 1394 Combo to IDE Bridge Controller
 069D   Hughes Network Systems (HNS)
 0700   Stream Machine
@@ -70,7 +76,7 @@
 09C1   Arris
0704CM 200E Cable Modem
 0A5C   Broadcom Corporation
-   0201Broadcom USB iLine10(tm) Network Adapter
+   0201Broadcom USB iLine10(tm) Network Adapter (Broadcom NetXtreme 
BCM5782 Gigabie Ethernet Contro)
2000Broadcom Bluetooth Firmware Upgrade Device
2009Broadcom Bluetooth Controller
200ABroadcom Bluetooth Controller
@@ -84,17 +90,17 @@
2038Broadcom Blutonium Device Firmware Downloader (BCM2038)
2039BROADCOM Bluetooth Device
2045Broadcom Bluetooth Controller
-   2046Broadcom USB Bluetooth Device
+   2046Broadcom USB Bluetooth Device ( 5738z)
2047Broadcom USB Bluetooth Device
205EBroadcom Bluetooth Firmware Upgrade Device
-   2100Broadcom Bluetooth 2.0+eDR USB dongle
-   2101Broadcom Bluetooth 2.0+EDR USB dongle
-   2102ANYCOM Blue USB-200/250
+   2100Broadcom Bluetooth 2.0+eDR USB dongle (BT 50)
+   2101Broadcom Bluetooth 2.0+EDR USB dongle ( 5&11BBCF3F&0&2)
+   2102ANYCOM Blue USB-200/250 ( USBVID_04B4&PID_21025&38CD4C16&0&6)
2110Broadcom Bluetooth Controller
2111ANYCOM Blue USB-UHE 200/250
2120Broadcom 2045 Bluetooth 2.0 USB-UHE Device with trace filter ( 
2045)
2121Broadcom 2045 Bluetooth 2.0 USB Device with trace filter
-   2122Broadcom Bluetooth 2.0+EDR USB dongle
+   2122Broadcom Bluetooth 2.0+EDR USB dongle ( BCM92045B3)
21242045B3ROM Bluetooth Dongle
2130Broadcom 2045 Bluetooth 2.0 USB-UHE Device with trace filter
2131Broadcom 2045 Bluetooth 2.0 USB Device with trace filter
@@ -104,7 +110,7 @@
21432046 Flash non UHE Class 1
21442046 Flash non UHE module Class 2
2145Broadcom BCM9204MD LENO Module
-   2146Broadcom 2046 Bluetooth 2.1 USB UHE Dongle
+   2146Broadcom 2045 Bluetooth 2.1 USB UHE Dongle
2147Broadcom 2046 Bluetooth 2.1 USB Dongle
2148Broadcom 2046 Bluetooth 2.1 USB UHE Dongle
2149Broadcom 2046 Bluetooth 2.1 USB Dongle
@@ -122,8 +128,9 @@
2155Broadcom Bluetooth USB Dongle
2157BCM2046 B1 USB 500
2158Broadcom 2046 Bluetooth 2.1 Device
-   4502USB Human Interface Device
-   4503USB Human Interface Device
+   4500Broadcom 2046 Bluetooth 2.1 USB Dongle (BCM2046B1)
+   4502Broadcom 2046 Bluetooth 2.1 USB Dongle (BCM2046B1)
+   4503Broadcom 2046 Bluetooth 2.1 USB Dongle ( BCM2046B1)
5800Unified Security Hub
6300Pirelli ISB Remote NDIS Device
 0A89   BREA Technologies Inc
@@ -144,17 +151,22 @@
0A06RCB672FXX 672-channel modular analog telphony card
 0B49   ASCII Corporation
064FTrance Vibrator
+0C45   Microdia Ltd.
+   602DUSB Webcam (7&2BE7B8E3&0&4)
+   6130USB CAMERA (5&3512B308&0&1)
 0E11   Compaq Computer Corp (Now owned by Hewlett-Packard)
0001PCI to EISA Bridge
-   0002PCI to ISA Bridge
+   0002PCI to ISA Bridge (ISA Bridge)
000FStorageWorks Library Adapt

svn commit: r207617 - in head/sys: dev/drm kern net vm

2010-05-04 Thread Alan Cox
Author: alc
Date: Tue May  4 15:55:41 2010
New Revision: 207617
URL: http://svn.freebsd.org/changeset/base/207617

Log:
  Add page locking to the vm_page_cow* functions.
  
  Push down the acquisition and release of the page queues lock into
  vm_page_wire().
  
  Reviewed by:  kib

Modified:
  head/sys/dev/drm/via_dmablit.c
  head/sys/kern/uipc_cow.c
  head/sys/kern/vfs_bio.c
  head/sys/net/bpf_zerocopy.c
  head/sys/vm/vm_fault.c
  head/sys/vm/vm_page.c

Modified: head/sys/dev/drm/via_dmablit.c
==
--- head/sys/dev/drm/via_dmablit.c  Tue May  4 15:52:17 2010
(r207616)
+++ head/sys/dev/drm/via_dmablit.c  Tue May  4 15:55:41 2010
(r207617)
@@ -251,10 +251,8 @@ via_lock_all_dma_pages(drm_via_sg_info_t
if (m == NULL)
break;
vm_page_lock(m);
-   vm_page_lock_queues();
vm_page_wire(m);
vm_page_unhold(m);
-   vm_page_unlock_queues();
vm_page_unlock(m);
vsg->pages[i] = m;
}

Modified: head/sys/kern/uipc_cow.c
==
--- head/sys/kern/uipc_cow.cTue May  4 15:52:17 2010(r207616)
+++ head/sys/kern/uipc_cow.cTue May  4 15:55:41 2010(r207617)
@@ -131,10 +131,8 @@ socow_setup(struct mbuf *m0, struct uio 
 * set up COW
 */
vm_page_lock(pp);
-   vm_page_lock_queues();
if (vm_page_cowsetup(pp) != 0) {
vm_page_unhold(pp);
-   vm_page_unlock_queues();
vm_page_unlock(pp);
return (0);
}
@@ -144,7 +142,6 @@ socow_setup(struct mbuf *m0, struct uio 
 */
vm_page_wire(pp);
vm_page_unhold(pp);
-   vm_page_unlock_queues();
vm_page_unlock(pp);
/*
 * Allocate an sf buf

Modified: head/sys/kern/vfs_bio.c
==
--- head/sys/kern/vfs_bio.c Tue May  4 15:52:17 2010(r207616)
+++ head/sys/kern/vfs_bio.c Tue May  4 15:55:41 2010(r207617)
@@ -3043,9 +3043,7 @@ allocbuf(struct buf *bp, int size)
 * We have a good page.
 */
vm_page_lock(m);
-   vm_page_lock_queues();
vm_page_wire(m);
-   vm_page_unlock_queues();
vm_page_unlock(m);
bp->b_pages[bp->b_npages] = m;
++bp->b_npages;

Modified: head/sys/net/bpf_zerocopy.c
==
--- head/sys/net/bpf_zerocopy.c Tue May  4 15:52:17 2010(r207616)
+++ head/sys/net/bpf_zerocopy.c Tue May  4 15:55:41 2010(r207617)
@@ -171,10 +171,8 @@ zbuf_sfbuf_get(struct vm_map *map, vm_of
if (pp == NULL)
return (NULL);
vm_page_lock(pp);
-   vm_page_lock_queues();
vm_page_wire(pp);
vm_page_unhold(pp);
-   vm_page_unlock_queues();
vm_page_unlock(pp);
sf = sf_buf_alloc(pp, SFB_NOWAIT);
if (sf == NULL) {

Modified: head/sys/vm/vm_fault.c
==
--- head/sys/vm/vm_fault.c  Tue May  4 15:52:17 2010(r207616)
+++ head/sys/vm/vm_fault.c  Tue May  4 15:55:41 2010(r207617)
@@ -315,8 +315,6 @@ RetryFault:;
(fault_type & VM_PROT_WRITE) &&
(fs.object == fs.first_object)) {
vm_page_cowfault(fs.m);
-   vm_page_unlock_queues();
-   vm_page_unlock(fs.m);
unlock_and_deallocate(&fs);
goto RetryFault;
}
@@ -797,9 +795,7 @@ vnode_locked:
if (wired && (fault_flags &
VM_FAULT_CHANGE_WIRING) == 0) {
vm_page_lock(fs.first_m);
-   vm_page_lock_queues();
vm_page_wire(fs.first_m);
-   vm_page_unlock_queues();
vm_page_unlock(fs.first_m);

vm_page_lock(fs.m);
@@ -1285,9 +1281,7 @@ vm_fault_copy_entry(vm_map_t dst_map, vm
vm_page_unlock(src_m);
 
vm_page_lock(dst_m);
-   vm_page_lock_queues();
vm_page_wire(dst_m);
-   vm_page_unlock_queues();
 

Re: svn commit: r207612 - head/usr.sbin/mergemaster

2010-05-04 Thread Doug Barton
On 5/4/2010 7:02 AM, Alexander Leidinger wrote:
> Quoting Norikatsu Shigemura  (from Tue, 4 May 2010  
> 11:25:04 + (UTC)):
> 
>> Author: nork
>> Date: Tue May  4 11:25:04 2010
>> New Revision: 207612
>> URL: http://svn.freebsd.org/changeset/base/207612
>>
>> Log:
>>   Add support run services_mkdb(8).
> 
> Shouldn't this (and similar messages) only be done if there is a  
> corresponding DB file?

This is the first case where the db file is "optional." All the others
have been created by default for ages now, and nork was simply copying
the existing code (including the "make sure" bit).

As he pointed out, I asked him to make the prompt unconditional since
the db file is small, and harmless if not being used. Making it
conditional now is a pointless micro-optimization that will have to be
removed down the road when having/needing it becomes the default.


hth,

Doug

-- 

... and that's just a little bit of history repeating.
-- Propellerheads

Improve the effectiveness of your Internet presence with
a domain name makeover!http://SupersetSolutions.com/

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


svn commit: r207620 - head/sys/dev/sound/pcm

2010-05-04 Thread Jung-uk Kim
Author: jkim
Date: Tue May  4 16:56:59 2010
New Revision: 207620
URL: http://svn.freebsd.org/changeset/base/207620

Log:
  - Remove more dead code[1].  Since r207330, we only need to check division
  by zero of the second argument 'from'.
  - Prefer u_int32_t over unsigned int to make its intention more clearer.
  - Move the function to a header file and make it a static inline function.
  
  Pointed out by:   Andrew Reilly (areilly at bigpond dot net dot au)[1]
  MFC after:3 days

Modified:
  head/sys/dev/sound/pcm/buffer.c
  head/sys/dev/sound/pcm/buffer.h

Modified: head/sys/dev/sound/pcm/buffer.c
==
--- head/sys/dev/sound/pcm/buffer.c Tue May  4 16:12:48 2010
(r207619)
+++ head/sys/dev/sound/pcm/buffer.c Tue May  4 16:56:59 2010
(r207620)
@@ -566,19 +566,6 @@ sndbuf_updateprevtotal(struct snd_dbuf *
 }
 
 unsigned int
-snd_xbytes(unsigned int v, unsigned int from, unsigned int to)
-{
-
-   if (from == to)
-   return v;
-
-   if (from == 0 || to == 0 || v == 0)
-   return 0;
-
-   return (unsigned int)(((u_int64_t)v * to) / from);
-}
-
-unsigned int
 sndbuf_xbytes(unsigned int v, struct snd_dbuf *from, struct snd_dbuf *to)
 {
if (from == NULL || to == NULL || v == 0)

Modified: head/sys/dev/sound/pcm/buffer.h
==
--- head/sys/dev/sound/pcm/buffer.h Tue May  4 16:12:48 2010
(r207619)
+++ head/sys/dev/sound/pcm/buffer.h Tue May  4 16:56:59 2010
(r207620)
@@ -111,7 +111,6 @@ u_int64_t sndbuf_getblocks(struct snd_db
 u_int64_t sndbuf_getprevblocks(struct snd_dbuf *b);
 u_int64_t sndbuf_gettotal(struct snd_dbuf *b);
 u_int64_t sndbuf_getprevtotal(struct snd_dbuf *b);
-unsigned int snd_xbytes(unsigned int v, unsigned int from, unsigned int to);
 unsigned int sndbuf_xbytes(unsigned int v, struct snd_dbuf *from, struct 
snd_dbuf *to);
 u_int8_t sndbuf_zerodata(u_int32_t fmt);
 void sndbuf_updateprevtotal(struct snd_dbuf *b);
@@ -132,3 +131,14 @@ void sndbuf_dmabounce(struct snd_dbuf *b
 #ifdef OSSV4_EXPERIMENT
 void sndbuf_getpeaks(struct snd_dbuf *b, int *lp, int *rp);
 #endif
+
+static inline u_int32_t
+snd_xbytes(u_int32_t v, u_int32_t from, u_int32_t to)
+{
+
+   if (from == to)
+   return (v);
+   if (from == 0)
+   return (0);
+   return ((u_int64_t)v * to / from);
+}
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r207621 - head/usr.bin/tftp

2010-05-04 Thread Warner Losh
Author: imp
Date: Tue May  4 17:00:18 2010
New Revision: 207621
URL: http://svn.freebsd.org/changeset/base/207621

Log:
  Doh!  Add another new file forgotten by the importer of edwin@'s tftp
  improvements.
  
  MFC after:1 week
  Pointy Hat: imp-o-rama...

Added:
  head/usr.bin/tftp/tftp.h   (contents, props changed)

Added: head/usr.bin/tftp/tftp.h
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/usr.bin/tftp/tftp.hTue May  4 17:00:18 2010(r207621)
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 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.
+ * 3. All advertising materials mentioning features or use of this software
+ *must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 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.
+ *
+ * @(#)extern.h8.1 (Berkeley) 6/6/93
+ * $FreeBSD$
+ */
+
+void   recvfile(int peer, char *port, int fd, char *name, char *mode);
+void   xmitfile(int peer, char *port, int fd, char *name, char *mode);
+
+extern int verbose;
+extern int maxtimeout;
+extern volatile int txrx_error;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r207622 - head/sys/dev/msk

2010-05-04 Thread Pyun YongHyeon
Author: yongari
Date: Tue May  4 17:02:34 2010
New Revision: 207622
URL: http://svn.freebsd.org/changeset/base/207622

Log:
  Drop driver lock before exiting from interrupt handler.
  
  Submitted by: jhb
  MFC after:3 days

Modified:
  head/sys/dev/msk/if_msk.c

Modified: head/sys/dev/msk/if_msk.c
==
--- head/sys/dev/msk/if_msk.c   Tue May  4 17:00:18 2010(r207621)
+++ head/sys/dev/msk/if_msk.c   Tue May  4 17:02:34 2010(r207622)
@@ -3594,6 +3594,7 @@ msk_intr(void *xsc)
(sc->msk_pflags & MSK_FLAG_SUSPEND) != 0 ||
(status & sc->msk_intrmask) == 0) {
CSR_WRITE_4(sc, B0_Y2_SP_ICR, 2);
+   MSK_UNLOCK(sc);
return;
}
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r207623 - head/sys/dev/msk

2010-05-04 Thread Pyun YongHyeon
Author: yongari
Date: Tue May  4 17:12:36 2010
New Revision: 207623
URL: http://svn.freebsd.org/changeset/base/207623

Log:
  Make sure to check whether driver is running before processing
  received frames. Also check driver has valid ifp pointer before
  calling msk_stop() in device_shutdown handler. While I'm here
  remove unnecessary accesses to interrupt mask registers in
  device_shutdown handler because driver puts the controller into
  reset state.
  With these changes, msk(4) now survive from heavy RX traffic(1byte
  UDP frame) while reboot is in progress.
  
  Reported by:  Mark Atkinson < atkin901 <> gmail dot com >

Modified:
  head/sys/dev/msk/if_msk.c

Modified: head/sys/dev/msk/if_msk.c
==
--- head/sys/dev/msk/if_msk.c   Tue May  4 17:02:34 2010(r207622)
+++ head/sys/dev/msk/if_msk.c   Tue May  4 17:12:36 2010(r207623)
@@ -2904,20 +2904,15 @@ mskc_shutdown(device_t dev)
sc = device_get_softc(dev);
MSK_LOCK(sc);
for (i = 0; i < sc->msk_num_port; i++) {
-   if (sc->msk_if[i] != NULL)
+   if (sc->msk_if[i] != NULL && sc->msk_if[i]->msk_ifp != NULL &&
+   ((sc->msk_if[i]->msk_ifp->if_drv_flags &
+   IFF_DRV_RUNNING) != 0))
msk_stop(sc->msk_if[i]);
}
-
-   /* Disable all interrupts. */
-   CSR_WRITE_4(sc, B0_IMSK, 0);
-   CSR_READ_4(sc, B0_IMSK);
-   CSR_WRITE_4(sc, B0_HWE_IMSK, 0);
-   CSR_READ_4(sc, B0_HWE_IMSK);
+   MSK_UNLOCK(sc);
 
/* Put hardware reset. */
CSR_WRITE_2(sc, B0_CTST, CS_RST_SET);
-
-   MSK_UNLOCK(sc);
return (0);
 }
 
@@ -3525,6 +3520,8 @@ msk_handle_events(struct msk_softc *sc)
sc_if->msk_csum = status;
break;
case OP_RXSTAT:
+   if (!(sc_if->msk_ifp->if_drv_flags & IFF_DRV_RUNNING))
+   break;
if (sc_if->msk_framesize >
(MCLBYTES - MSK_RX_BUF_ALIGN))
msk_jumbo_rxeof(sc_if, status, control, len);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r207624 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2010-05-04 Thread Martin Matuska
Author: mm
Date: Tue May  4 17:30:07 2010
New Revision: 207624
URL: http://svn.freebsd.org/changeset/base/207624

Log:
  Fix deadlock during zfs receive.
  
  OpenSolaris onnv revision:9299:8809e849f63e
  
  PR:   kern/146296
  Submitted by: myself
  Approved by:  pjd, delphij (mentor)
  Obtained from:OpenSolaris (Bug ID 6783818, 6826836)
  MFC after:1 week

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c  Tue May  4 
17:12:36 2010(r207623)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c  Tue May  4 
17:30:07 2010(r207624)
@@ -464,15 +464,15 @@ dbuf_read_impl(dmu_buf_impl_t *db, zio_t
ASSERT(db->db_buf == NULL);
 
if (db->db_blkid == DB_BONUS_BLKID) {
-   int bonuslen = dn->dn_bonuslen;
+   int bonuslen = MIN(dn->dn_bonuslen, dn->dn_phys->dn_bonuslen);
 
ASSERT3U(bonuslen, <=, db->db.db_size);
db->db.db_data = zio_buf_alloc(DN_MAX_BONUSLEN);
arc_space_consume(DN_MAX_BONUSLEN);
if (bonuslen < DN_MAX_BONUSLEN)
bzero(db->db.db_data, DN_MAX_BONUSLEN);
-   bcopy(DN_BONUS(dn->dn_phys), db->db.db_data,
-   bonuslen);
+   if (bonuslen)
+   bcopy(DN_BONUS(dn->dn_phys), db->db.db_data, bonuslen);
dbuf_update_data(db);
db->db_state = DB_CACHED;
mutex_exit(&db->db_mtx);

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.cTue May 
 4 17:12:36 2010(r207623)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.cTue May 
 4 17:30:07 2010(r207624)
@@ -128,15 +128,6 @@ dmu_object_reclaim(objset_t *os, uint64_
return (0);
}
 
-   tx = dmu_tx_create(os);
-   dmu_tx_hold_bonus(tx, object);
-   err = dmu_tx_assign(tx, TXG_WAIT);
-   if (err) {
-   dmu_tx_abort(tx);
-   dnode_rele(dn, FTAG);
-   return (err);
-   }
-
nblkptr = 1 + ((DN_MAX_BONUSLEN - bonuslen) >> SPA_BLKPTRSHIFT);
 
/*
@@ -144,16 +135,27 @@ dmu_object_reclaim(objset_t *os, uint64_
 * be a new file instance.   We must clear out the previous file
 * contents before we can change this type of metadata in the dnode.
 */
-   if (dn->dn_nblkptr > nblkptr || dn->dn_datablksz != blocksize)
-   dmu_free_long_range(os, object, 0, DMU_OBJECT_END);
+   if (dn->dn_nblkptr > nblkptr || dn->dn_datablksz != blocksize) {
+   err = dmu_free_long_range(os, object, 0, DMU_OBJECT_END);
+   if (err)
+   goto out;
+   }
+
+   tx = dmu_tx_create(os);
+   dmu_tx_hold_bonus(tx, object);
+   err = dmu_tx_assign(tx, TXG_WAIT);
+   if (err) {
+   dmu_tx_abort(tx);
+   goto out;
+   }
 
dnode_reallocate(dn, ot, blocksize, bonustype, bonuslen, tx);
 
dmu_tx_commit(tx);
-
+out:
dnode_rele(dn, FTAG);
 
-   return (0);
+   return (err);
 }
 
 int
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r207625 - head/sys/dev/sge

2010-05-04 Thread Pyun YongHyeon
Author: yongari
Date: Tue May  4 17:34:00 2010
New Revision: 207625
URL: http://svn.freebsd.org/changeset/base/207625

Log:
  Remove clearing RxHashTable2 register. The register is reprogrammed
  in sge_rxfilter().

Modified:
  head/sys/dev/sge/if_sge.c

Modified: head/sys/dev/sge/if_sge.c
==
--- head/sys/dev/sge/if_sge.c   Tue May  4 17:30:07 2010(r207624)
+++ head/sys/dev/sge/if_sge.c   Tue May  4 17:34:00 2010(r207625)
@@ -1577,7 +1577,6 @@ sge_init_locked(struct sge_softc *sc)
CSR_WRITE_4(sc, RX_DESC, SGE_ADDR_LO(sc->sge_ldata.sge_rx_paddr));
 
CSR_WRITE_4(sc, TxMacControl, 0x60);
-   CSR_WRITE_4(sc, 0x6c, 0);
CSR_WRITE_4(sc, RxWakeOnLan, 0);
CSR_WRITE_4(sc, RxWakeOnLanData, 0);
/* Allow receiving VLAN frames. */
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r207626 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys

2010-05-04 Thread Martin Matuska
Author: mm
Date: Tue May  4 17:40:24 2010
New Revision: 207626
URL: http://svn.freebsd.org/changeset/base/207626

Log:
  Speed up ZFS list operation with objset prefetching.
  
  Partial import of OpenSolaris onnv revisions:
  8415:8809e849f63e, 10474:0e96dd3b905a
  
  PR:   kern/146297
  Submitted by: myself
  Approved by:  pjd, delphij (mentor)
  Obtained from:OpenSolaris (Bug ID 6386929, 6755389, 6847118)
  MFC after:2 weeks

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.cTue May 
 4 17:34:00 2010(r207625)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.cTue May 
 4 17:40:24 2010(r207626)
@@ -1213,6 +1213,39 @@ dmu_objset_find_spa(spa_t *spa, const ch
return (err);
 }
 
+/* ARGSUSED */
+int
+dmu_objset_prefetch(char *name, void *arg)
+{
+   dsl_dataset_t *ds;
+
+   if (dsl_dataset_hold(name, FTAG, &ds))
+   return (0);
+
+   if (!BP_IS_HOLE(&ds->ds_phys->ds_bp)) {
+   mutex_enter(&ds->ds_opening_lock);
+   if (!dsl_dataset_get_user_ptr(ds)) {
+   uint32_t aflags = ARC_NOWAIT | ARC_PREFETCH;
+   zbookmark_t zb;
+
+   zb.zb_objset = ds->ds_object;
+   zb.zb_object = 0;
+   zb.zb_level = -1;
+   zb.zb_blkid = 0;
+
+   (void) arc_read_nolock(NULL, dsl_dataset_get_spa(ds),
+   &ds->ds_phys->ds_bp, NULL, NULL,
+   ZIO_PRIORITY_ASYNC_READ,
+   ZIO_FLAG_CANFAIL | ZIO_FLAG_SPECULATIVE,
+   &aflags, &zb);
+   }
+   mutex_exit(&ds->ds_opening_lock);
+   }
+
+   dsl_dataset_rele(ds, FTAG);
+   return (0);
+}
+
 void
 dmu_objset_set_user(objset_t *os, void *user_ptr)
 {

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h
Tue May  4 17:34:00 2010(r207625)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h
Tue May  4 17:40:24 2010(r207626)
@@ -26,8 +26,6 @@
 #ifndef_SYS_DMU_OBJSET_H
 #define_SYS_DMU_OBJSET_H
 
-#pragma ident  "%Z%%M% %I% %E% SMI"
-
 #include 
 #include 
 #include 
@@ -118,6 +116,7 @@ int dmu_objset_find(char *name, int func
 int flags);
 int dmu_objset_find_spa(spa_t *spa, const char *name,
 int func(spa_t *, uint64_t, const char *, void *), void *arg, int flags);
+int dmu_objset_prefetch(char *name, void *arg);
 void dmu_objset_byteswap(void *buf, size_t size);
 int dmu_objset_evict_dbufs(objset_t *os);
 

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue May 
 4 17:34:00 2010(r207625)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue May 
 4 17:40:24 2010(r207626)
@@ -1349,6 +1349,14 @@ zfs_ioc_dataset_list_next(zfs_cmd_t *zc)
(void) strlcat(zc->zc_name, "/", sizeof (zc->zc_name));
p = zc->zc_name + strlen(zc->zc_name);
 
+   if (zc->zc_cookie == 0) {
+   uint64_t cookie = 0;
+   int len = sizeof (zc->zc_name) - (p - zc->zc_name);
+
+   while (dmu_dir_list_next(os, len, p, NULL, &cookie) == 0)
+   dmu_objset_prefetch(p, NULL);
+   }
+
do {
error = dmu_dir_list_next(os,
sizeof (zc->zc_name) - (p - zc->zc_name), p,
@@ -1387,6 +1395,9 @@ zfs_ioc_snapshot_list_next(zfs_cmd_t *zc
objset_t *os;
int error;
 
+   if (zc->zc_cookie == 0)
+   dmu_objset_find(zc->zc_name, dmu_objset_prefetch,
+   NULL, DS_FIND_SNAPSHOTS);
error = dmu_objset_open(zc->zc_name,
DMU_OST_ANY, DS_MODE_USER | DS_MODE_READONLY, &os);
if (error)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


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

2010-05-04 Thread Martin Matuska
Author: mm
Date: Tue May  4 17:44:40 2010
New Revision: 207627
URL: http://svn.freebsd.org/changeset/base/207627

Log:
  Enable "zfs list" to list explicitly requested snapshots.
  
  Partial import of OpenSolaris onnv revision:
  8415:8809e849f63e
  
  PR:   kern/146297
  Submitted by: myself
  Approved by:  pjd, delphij (mentor)
  Obtained from:OpenSolaris (Bug ID 6758338)
  MFC after:2 weeks

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

Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
==
--- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.cTue May  4 17:40:24 
2010(r207626)
+++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.cTue May  4 17:44:40 
2010(r207627)
@@ -1790,7 +1790,7 @@ zfs_do_list(int argc, char **argv)
boolean_t scripted = B_FALSE;
static char default_fields[] =
"name,used,available,referenced,mountpoint";
-   int types = ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME;
+   int types = ZFS_TYPE_DATASET;
boolean_t types_specified = B_FALSE;
char *fields = NULL;
list_cbdata_t cb = { 0 };
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r207628 - head/sys/dev/sge

2010-05-04 Thread Pyun YongHyeon
Author: yongari
Date: Tue May  4 19:04:51 2010
New Revision: 207628
URL: http://svn.freebsd.org/changeset/base/207628

Log:
  Enable multi-descriptor transmisstion for fragmented mbufs. There
  is no more need to defragment mbufs. After transmitting the
  multi-fragmented frame, the controller updates only the first
  descriptor of multi-descriptor transmission so it's driver's
  responsibility to clear OWN bits of remaining descriptor of
  multi-descriptor transmission. It seems the controller behaves much
  like jme(4) controllers in descriptor handling.
  
  Tested by:xclin  cs dot nctu dot edu dot tw >

Modified:
  head/sys/dev/sge/if_sge.c
  head/sys/dev/sge/if_sgereg.h

Modified: head/sys/dev/sge/if_sge.c
==
--- head/sys/dev/sge/if_sge.c   Tue May  4 17:44:40 2010(r207627)
+++ head/sys/dev/sge/if_sge.c   Tue May  4 19:04:51 2010(r207628)
@@ -756,6 +756,8 @@ sge_dma_alloc(struct sge_softc *sc)
 {
struct sge_chain_data *cd;
struct sge_list_data *ld;
+   struct sge_rxdesc *rxd;
+   struct sge_txdesc *txd;
int error, i;
 
cd = &sc->sge_cdata;
@@ -869,8 +871,12 @@ sge_dma_alloc(struct sge_softc *sc)
 
/* Create DMA maps for Tx buffers. */
for (i = 0; i < SGE_TX_RING_CNT; i++) {
+   txd = &cd->sge_txdesc[i];
+   txd->tx_m = NULL;
+   txd->tx_dmamap = NULL;
+   txd->tx_ndesc = 0;
error = bus_dmamap_create(cd->sge_txmbuf_tag, 0,
-   &cd->sge_tx_map[i]);
+   &txd->tx_dmamap);
if (error != 0) {
device_printf(sc->sge_dev,
"could not create Tx DMA map.\n");
@@ -886,8 +892,11 @@ sge_dma_alloc(struct sge_softc *sc)
}
/* Create DMA maps for Rx buffers. */
for (i = 0; i < SGE_RX_RING_CNT; i++) {
+   rxd = &cd->sge_rxdesc[i];
+   rxd->rx_m = NULL;
+   rxd->rx_dmamap = NULL;
error = bus_dmamap_create(cd->sge_rxmbuf_tag, 0,
-   &cd->sge_rx_map[i]);
+   &rxd->rx_dmamap);
if (error) {
device_printf(sc->sge_dev,
"could not create Rx DMA map.\n");
@@ -903,6 +912,8 @@ sge_dma_free(struct sge_softc *sc)
 {
struct sge_chain_data *cd;
struct sge_list_data *ld;
+   struct sge_rxdesc *rxd;
+   struct sge_txdesc *txd;
int i;
 
cd = &sc->sge_cdata;
@@ -934,10 +945,11 @@ sge_dma_free(struct sge_softc *sc)
/* Rx buffers. */
if (cd->sge_rxmbuf_tag != NULL) {
for (i = 0; i < SGE_RX_RING_CNT; i++) {
-   if (cd->sge_rx_map[i] != NULL) {
+   rxd = &cd->sge_rxdesc[i];
+   if (rxd->rx_dmamap != NULL) {
bus_dmamap_destroy(cd->sge_rxmbuf_tag,
-   cd->sge_rx_map[i]);
-   cd->sge_rx_map[i] = NULL;
+   rxd->rx_dmamap);
+   rxd->rx_dmamap = NULL;
}
}
if (cd->sge_rx_spare_map != NULL) {
@@ -951,10 +963,11 @@ sge_dma_free(struct sge_softc *sc)
/* Tx buffers. */
if (cd->sge_txmbuf_tag != NULL) {
for (i = 0; i < SGE_TX_RING_CNT; i++) {
-   if (cd->sge_tx_map[i] != NULL) {
+   txd = &cd->sge_txdesc[i];
+   if (txd->tx_dmamap != NULL) {
bus_dmamap_destroy(cd->sge_txmbuf_tag,
-   cd->sge_tx_map[i]);
-   cd->sge_tx_map[i] = NULL;
+   txd->tx_dmamap);
+   txd->tx_dmamap = NULL;
}
}
bus_dma_tag_destroy(cd->sge_txmbuf_tag);
@@ -991,18 +1004,20 @@ static int
 sge_list_tx_free(struct sge_softc *sc)
 {
struct sge_chain_data *cd;
+   struct sge_txdesc *txd;
int i;
 
SGE_LOCK_ASSERT(sc);
cd = &sc->sge_cdata;
for (i = 0; i < SGE_TX_RING_CNT; i++) {
-   if (cd->sge_tx_mbuf[i] != NULL) {
-   bus_dmamap_sync(cd->sge_txmbuf_tag,
-   cd->sge_tx_map[i], BUS_DMASYNC_POSTWRITE);
-   bus_dmamap_unload(cd->sge_txmbuf_tag,
-   cd->sge_tx_map[i]);
-   m_free(cd->sge_tx_mbuf[i]);
-   cd->sge_tx_mbuf[i] = NULL;
+   txd = &cd->sge_txdesc[i];
+   if (txd->tx_m != NULL) {
+   bus_dmamap_sync(cd->sge_txmbuf_tag, txd->tx_dmamap,
+   BUS_DMASYNC_POSTWRITE);
+   bus_dmamap_unload(cd->sge_txmbuf_tag, txd->t

svn commit: r207629 - stable/8/usr.bin/unzip

2010-05-04 Thread Xin LI
Author: delphij
Date: Tue May  4 19:18:00 2010
New Revision: 207629
URL: http://svn.freebsd.org/changeset/base/207629

Log:
  MFC r196981, r200844, r201630, r203977, r203978, r204352:
  
  r196981 (rdivacky):
  
  Add C/c/f/p/v switches plus a bunch of minor fixes and cleanups.
  
  Obtained from:NetBSD
  
  r200844 (jh):
  
  Don't print the archive name with -p and -q options.
  
  PR:   bin/141280
  
  r201630 (kientzle):
  
  When restoring files, use the mode for the mode.
  
  Thanks to: Jun Kuriyama for pointing this out
  
  r203977 (gavin):
  
  Implement the rename query, for when a file with the same name as the one
  about to be extracted already exists.  The question, and interpretation
  of the response is deliberately compatible with Info-Zip.
  
  This change was originally obtained from NetBSD, but has three changes:
   - better compatibility with Info-Zip in the handling of ^D
   - Use getdelim() rather than getline()
   - bug fix: != changed to == in the "file rename" code
  
  I suspect the latter is also a bug in NetBSD, but I can't easily confirm
  this.
  
  PR:   bin/143307
  Reviewed by:  rdivacky (change to unzip.c only)
  Obtained from:NetBSD src/usr.bin/unzip/unzip.c 1.8
  
  r203978 (gavin):
  
  Bump .Dd for r203977
  
  r204352 (ru):
  
  Fixed static linkage.
  
  ==
  
  Requested by: Alex Kozlov 

Modified:
  stable/8/usr.bin/unzip/Makefile
  stable/8/usr.bin/unzip/unzip.1
  stable/8/usr.bin/unzip/unzip.c
Directory Properties:
  stable/8/usr.bin/unzip/   (props changed)

Modified: stable/8/usr.bin/unzip/Makefile
==
--- stable/8/usr.bin/unzip/Makefile Tue May  4 19:04:51 2010
(r207628)
+++ stable/8/usr.bin/unzip/Makefile Tue May  4 19:18:00 2010
(r207629)
@@ -3,7 +3,7 @@
 PROG = unzip
 WARNS ?= 6
 CSTD = c99
-DPADD = ${LIBARCHIVE}
-LDADD = -larchive
+DPADD = ${LIBARCHIVE} ${LIBZ}
+LDADD = -larchive -lz
 
 .include 

Modified: stable/8/usr.bin/unzip/unzip.1
==
--- stable/8/usr.bin/unzip/unzip.1  Tue May  4 19:04:51 2010
(r207628)
+++ stable/8/usr.bin/unzip/unzip.1  Tue May  4 19:18:00 2010
(r207629)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 30, 2008
+.Dd February 16, 2010
 .Dt UNZIP 1
 .Os
 .Sh NAME
@@ -33,7 +33,7 @@
 .Nd extract files from a ZIP archive
 .Sh SYNOPSIS
 .Nm
-.Op Fl ajLlnoqtu
+.Op Fl aCcfjLlnopqtuv
 .Op Fl d Ar dir
 .Ar zipfile
 .Sh DESCRIPTION
@@ -44,9 +44,22 @@ The following options are available:
 .It Fl a
 When extracting a text file, convert DOS-style line endings to
 Unix-style line endings.
+.It Fl C
+Match file names case-insensitively.
+.It Fl c
+Extract to stdout/screen.
+When extracting files from the zipfile, they are written to stdout.
+This is similar to
+.Fl p ,
+but doesn't suppress normal output.
 .It Fl d Ar dir
 Extract files into the specified directory rather than the current
 directory.
+.It Fl f
+Update existing.
+Extract only files from the zipfile if a file with the same name
+already exists on disk and is older than the former.
+Otherwise, the file is silently skipped.
 .It Fl j
 Ignore directories stored in the zipfile; instead, extract all files
 directly into the extraction directory.
@@ -56,13 +69,19 @@ Convert the names of the extracted files
 List, rather than extract, the contents of the zipfile.
 .It Fl n
 No overwrite.
-When extacting a file from the zipfile, if a file with the same name
+When extracting a file from the zipfile, if a file with the same name
 already exists on disk, the file is silently skipped.
 .It Fl o
 Overwrite.
-When extacting a file from the zipfile, if a file with the same name
+When extracting a file from the zipfile, if a file with the same name
 already exists on disk, the existing file is replaced with the file
 from the zipfile.
+.It Fl p
+Extract to stdout.
+When extracting files from the zipfile, they are written to stdout.
+The normal output is suppressed as if
+.Fl q
+was specified.
 .It Fl q
 Quiet: print less information while extracting.
 .It Fl t
@@ -70,15 +89,25 @@ Test: do not extract anything, but verif
 in the archive.
 .It Fl u
 Update.
-When extacting a file from the zipfile, if a file with the same name
+When extracting a file from the zipfile, if a file with the same name
 already exists on disk, the existing file is replaced with the file
 from the zipfile if and only if the latter is newer than the former.
 Otherwise, the file is silently skipped.
+.It Fl v
+List verbosely, rather than extract, the contents of the zipfile.
+This differs from
+.Fl l
+by using the long listing.
+Note that most of the data is currently fake and does not reflect the
+content of the archive.
+.It Fl x Ar pattern
+Exclude files matching the pattern
+.Ar pattern .
 .El
 .Pp
 Note that only one of
 .Fl n ,
-.Fl o
+.Fl o ,
 and
 .Fl u
 may be specified.
@@ -129,17 +1

svn commit: r207630 - head/sys/boot/forth

2010-05-04 Thread Xin LI
Author: delphij
Date: Tue May  4 19:58:55 2010
New Revision: 207630
URL: http://svn.freebsd.org/changeset/base/207630

Log:
  Remove if_ar, if_ray, if_sr, if_ppp, if_sl to reflect the current modules
  available, they were removed due to NEEDSGIANT.
  
  While I'm there, add if_et which was missed quite a while ago.
  
  MFC after:2 weeks

Modified:
  head/sys/boot/forth/loader.conf

Modified: head/sys/boot/forth/loader.conf
==
--- head/sys/boot/forth/loader.conf Tue May  4 19:18:00 2010
(r207629)
+++ head/sys/boot/forth/loader.conf Tue May  4 19:58:55 2010
(r207630)
@@ -197,8 +197,6 @@ if_epair_load="NO"  # Virtual b-t-b Ethe
 if_faith_load="NO" # IPv6-to-IPv4 TCP relay capturing interface
 if_gif_load="NO"   # generic tunnel interface
 if_gre_load="NO"   # encapsulating network device
-if_ppp_load="NO"   # Kernel ppp
-if_sl_load="NO"# SLIP
 if_stf_load="NO"   # 6to4 tunnel interface
 if_tap_load="NO"   # Ethernet tunnel software network interface
 if_tun_load="NO"   # Tunnel driver (user process ppp)
@@ -217,7 +215,6 @@ if_age_load="NO"# Attansic/Atheros L1 
 if_alc_load="NO"   # Atheros AR8131/AR8132 Ethernet
 if_ale_load="NO"   # Atheros AR8121/AR8113/AR8114 Ethernet
 if_an_load="NO"# Aironet 4500/4800 802.11 wireless NICs
-if_ar_load="NO"# Digi SYNC/570i
 if_ath_load="NO"   # Atheros IEEE 802.11 wireless NICs
 if_aue_load="NO"   # ADMtek AN986 Pegasus USB Ethernet
 if_awi_load="NO"   # AMD PCnetMobile IEEE 802.11 wireless NICs
@@ -237,6 +234,7 @@ if_ed_load="NO" # National Semiconduct
 if_em_load="NO"# Intel(R) PRO/1000 Gigabit Ethernet
 if_en_load="NO"# Midway-based ATM interfaces
 if_ep_load="NO"# 3Com Etherlink III (3c5x9)
+if_et_load="NO"# Agere ET1310 10/100/Gigabit Ethernet
 if_ex_load="NO"# Intel EtherExpress Pro/10 Ethernet
 if_fe_load="NO"# Fujitsu MB86960A/MB86965A based 
Ethernet
# adapters
@@ -265,17 +263,15 @@ if_nve_load="NO"  # NVIDIA nForce MCP Ne
 if_nxge_load="NO"  # Neterion Xframe 10Gb Ethernet
 if_pcn_load="NO"   # AMD PCnet PCI
 if_ral_load="NO"   # Ralink Technology wireless
-if_ray_load="NO"   # Raytheon Raylink/Webgear Aviator PCCard
 if_re_load="NO"# RealTek 8139C+/8169/8169S/8110S
 if_rl_load="NO"# RealTek 8129/8139
 if_rue_load="NO"   # RealTek RTL8150 USB to Fast Ethernet
 if_sbni_load="NO"  # Granch SBNI12 leased line adapters
 if_sf_load="NO"# Adaptec Duralink PCI (AIC-6915 
"starfire")
-if_sge_load="NO"   # Silicon Integrated Systems SiS190/191
+if_sge_load="NO"   # Silicon Integrated Systems SiS 190/191
 if_sis_load="NO"   # Silicon Integrated Systems SiS 900/7016
 if_sk_load="NO"# SysKonnect SK-984x series PCI Gigabit 
Ethernet
 if_sn_load="NO"# SMC 91Cxx
-if_sr_load="NO"# synchronous RISCom/N2 / WANic 400/405
 if_ste_load="NO"   # Sundance Technologies ST201 Fast Ethernet
 if_stge_load="NO"  # Sundance/Tamarack TC9021 Gigabit Ethernet
 if_ti_load="NO"# Alteon Networks Tigon 1 and Tigon 2
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r207624 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2010-05-04 Thread Andrew Thompson
On Tue, May 04, 2010 at 05:30:07PM +, Martin Matuska wrote:
> Author: mm
> Date: Tue May  4 17:30:07 2010
> New Revision: 207624
> URL: http://svn.freebsd.org/changeset/base/207624
> 
> Log:
>   Fix deadlock during zfs receive.
>   
>   OpenSolaris onnv revision:  9299:8809e849f63e
>   

I believe I have hit this before, thanks for importing the fix.


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


svn commit: r207631 - in vendor/llvm/dist: docs lib/CodeGen lib/Target/ARM lib/Target/CellSPU lib/Target/X86 lib/Target/X86/AsmParser lib/Transforms/Scalar lib/VMCore test/CodeGen/CellSPU test/MC/A...

2010-05-04 Thread Roman Divacky
Author: rdivacky
Date: Tue May  4 20:50:39 2010
New Revision: 207631
URL: http://svn.freebsd.org/changeset/base/207631

Log:
  Update LLVM to r103052.

Added:
  vendor/llvm/dist/test/CodeGen/CellSPU/storestruct.ll
  vendor/llvm/dist/test/MC/AsmParser/X86/x86_64-suffix-matching.s
Modified:
  vendor/llvm/dist/docs/FAQ.html
  vendor/llvm/dist/lib/CodeGen/LiveIntervalAnalysis.cpp
  vendor/llvm/dist/lib/CodeGen/PHIElimination.cpp
  vendor/llvm/dist/lib/CodeGen/PHIElimination.h
  vendor/llvm/dist/lib/Target/ARM/ARMISelDAGToDAG.cpp
  vendor/llvm/dist/lib/Target/ARM/NEONPreAllocPass.cpp
  vendor/llvm/dist/lib/Target/CellSPU/SPUISelDAGToDAG.cpp
  vendor/llvm/dist/lib/Target/X86/AsmParser/X86AsmParser.cpp
  vendor/llvm/dist/lib/Target/X86/X86.td
  vendor/llvm/dist/lib/Transforms/Scalar/GVN.cpp
  vendor/llvm/dist/lib/VMCore/Metadata.cpp
  vendor/llvm/dist/test/Transforms/GlobalOpt/metadata.ll
  vendor/llvm/dist/utils/TableGen/ClangDiagnosticsEmitter.cpp

Modified: vendor/llvm/dist/docs/FAQ.html
==
--- vendor/llvm/dist/docs/FAQ.html  Tue May  4 19:58:55 2010
(r207630)
+++ vendor/llvm/dist/docs/FAQ.html  Tue May  4 20:50:39 2010
(r207631)
@@ -632,22 +632,22 @@ Stop.
 Use commands like this:
 
 
-  Compile your program as normal with llvm-g++:
+  Compile your program with llvm-g++:
 
 
-% llvm-g++ x.cpp -o program
+% llvm-g++ -emit-llvm x.cpp -o program.bc -c
 
 
   or:
 
 
-% llvm-g++ a.cpp -c
-% llvm-g++ b.cpp -c
-% llvm-g++ a.o b.o -o program
+% llvm-g++ a.cpp -c -emit-llvm
+% llvm-g++ b.cpp -c -emit-llvm
+% llvm-ld a.o b.o -o program
 
 
-  With llvm-gcc3, this will generate program and program.bc.  The .bc
- file is the LLVM version of the program all linked together.
+   This will generate program and program.bc.  The .bc
+  file is the LLVM version of the program all linked together.
 
   Convert the LLVM code to C code, using the LLC tool with the C
   backend:
@@ -659,7 +659,7 @@ Stop.
   Finally, compile the C file:
 
 
-% cc x.c
+% cc x.c -lstdc++
 
 
 
@@ -931,7 +931,7 @@ F.i:
   src="http://www.w3.org/Icons/valid-html401-blue"; alt="Valid HTML 4.01">
 
   http://llvm.org";>LLVM Compiler Infrastructure
-  Last modified: $Date: 2010-02-26 00:41:41 +0100 (Fri, 26 Feb 2010) $
+  Last modified: $Date: 2010-05-04 20:16:00 +0200 (Tue, 04 May 2010) $
 
 
 

Modified: vendor/llvm/dist/lib/CodeGen/LiveIntervalAnalysis.cpp
==
--- vendor/llvm/dist/lib/CodeGen/LiveIntervalAnalysis.cpp   Tue May  4 
19:58:55 2010(r207630)
+++ vendor/llvm/dist/lib/CodeGen/LiveIntervalAnalysis.cpp   Tue May  4 
20:50:39 2010(r207631)
@@ -262,6 +262,23 @@ static void printRegName(unsigned reg, c
 }
 #endif
 
+static
+bool MultipleDefsByMI(const MachineInstr &MI, unsigned MOIdx) {
+  unsigned Reg = MI.getOperand(MOIdx).getReg();
+  for (unsigned i = MOIdx+1, e = MI.getNumOperands(); i < e; ++i) {
+const MachineOperand &MO = MI.getOperand(i);
+if (!MO.isReg())
+  continue;
+if (MO.getReg() == Reg && MO.isDef()) {
+  assert(MI.getOperand(MOIdx).getSubReg() != MO.getSubReg() &&
+ MI.getOperand(MOIdx).getSubReg() &&
+ MO.getSubReg());
+  return true;
+}
+  }
+  return false;
+}
+
 void LiveIntervals::handleVirtualRegisterDef(MachineBasicBlock *mbb,
  MachineBasicBlock::iterator mi,
  SlotIndex MIIdx,
@@ -372,6 +389,13 @@ void LiveIntervals::handleVirtualRegiste
 }
 
   } else {
+if (MultipleDefsByMI(*mi, MOIdx))
+  // Mutple defs of the same virtual register by the same instruction. e.g.
+  // %reg1031:5, %reg1031:6 = VLD1q16 %reg1024, ...
+  // This is likely due to elimination of REG_SEQUENCE instructions. Return
+  // here since there is nothing to do.
+  return;
+
 // If this is the second time we see a virtual register definition, it
 // must be due to phi elimination or two addr elimination.  If this is
 // the result of two address elimination, then the vreg is one of the

Modified: vendor/llvm/dist/lib/CodeGen/PHIElimination.cpp
==
--- vendor/llvm/dist/lib/CodeGen/PHIElimination.cpp Tue May  4 19:58:55 
2010(r207630)
+++ vendor/llvm/dist/lib/CodeGen/PHIElimination.cpp Tue May  4 20:50:39 
2010(r207631)
@@ -30,6 +30,7 @@
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/Compiler.h"
 #include "llvm/Support/Debug.h"
+#include "llvm/Support/ErrorHandling.h"
 #include 
 #include 
 using namespace llvm;
@@ -52,22 +53,22 @@ void llvm::PHIElimination::getAnalysisUs
   MachineFunctionPass::getAnalysisUsage(AU);
 }
 
-bool llvm::PHIElimination::runOnMachineFunction(MachineFunction &Fn) {
-  MRI = &Fn.getRegInfo();
+bool llvm::PHIElimination

svn commit: r207632 - in vendor/clang/dist: include/clang/AST include/clang/Analysis include/clang/Basic include/clang/Driver include/clang/Frontend include/clang/Lex include/clang/Parse include/cl...

2010-05-04 Thread Roman Divacky
Author: rdivacky
Date: Tue May  4 20:51:19 2010
New Revision: 207632
URL: http://svn.freebsd.org/changeset/base/207632

Log:
  Update clang to r103052.

Added:
  vendor/clang/dist/test/Misc/macro-backtrace-limit.c
Modified:
  vendor/clang/dist/include/clang/AST/ASTDiagnostic.h
  vendor/clang/dist/include/clang/AST/UnresolvedSet.h
  vendor/clang/dist/include/clang/Analysis/AnalysisDiagnostic.h
  vendor/clang/dist/include/clang/Basic/Diagnostic.h
  vendor/clang/dist/include/clang/Basic/Diagnostic.td
  vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td
  vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td
  vendor/clang/dist/include/clang/Driver/CC1Options.td
  vendor/clang/dist/include/clang/Driver/DriverDiagnostic.h
  vendor/clang/dist/include/clang/Driver/Options.td
  vendor/clang/dist/include/clang/Frontend/DiagnosticOptions.h
  vendor/clang/dist/include/clang/Frontend/FrontendDiagnostic.h
  vendor/clang/dist/include/clang/Frontend/TextDiagnosticPrinter.h
  vendor/clang/dist/include/clang/Lex/LexDiagnostic.h
  vendor/clang/dist/include/clang/Parse/ParseDiagnostic.h
  vendor/clang/dist/include/clang/Sema/SemaDiagnostic.h
  vendor/clang/dist/lib/AST/StmtDumper.cpp
  vendor/clang/dist/lib/Basic/Diagnostic.cpp
  vendor/clang/dist/lib/CodeGen/CGBlocks.cpp
  vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp
  vendor/clang/dist/lib/CodeGen/CGDecl.cpp
  vendor/clang/dist/lib/CodeGen/CGDeclCXX.cpp
  vendor/clang/dist/lib/CodeGen/CGObjC.cpp
  vendor/clang/dist/lib/Driver/Tools.cpp
  vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp
  vendor/clang/dist/lib/Frontend/TextDiagnosticPrinter.cpp
  vendor/clang/dist/lib/Sema/SemaDecl.cpp
  vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp
  vendor/clang/dist/lib/Sema/SemaExpr.cpp
  vendor/clang/dist/lib/Sema/SemaOverload.cpp
  vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp
  vendor/clang/dist/test/CodeGen/staticinit.c
  vendor/clang/dist/test/CodeGenCXX/reference-in-blocks.cpp
  vendor/clang/dist/test/CodeGenObjCXX/ivar-objects.mm
  vendor/clang/dist/test/Sema/function-redecl.c
  vendor/clang/dist/test/SemaCXX/default-assignment-operator.cpp
  vendor/clang/dist/test/SemaTemplate/instantiate-function-params.cpp

Modified: vendor/clang/dist/include/clang/AST/ASTDiagnostic.h
==
--- vendor/clang/dist/include/clang/AST/ASTDiagnostic.h Tue May  4 20:50:39 
2010(r207631)
+++ vendor/clang/dist/include/clang/AST/ASTDiagnostic.h Tue May  4 20:51:19 
2010(r207632)
@@ -15,7 +15,7 @@
 namespace clang {
   namespace diag {
 enum {
-#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,SFINAE) ENUM,
+#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,SFINAE,CATEGORY) ENUM,
 #define ASTSTART
 #include "clang/Basic/DiagnosticASTKinds.inc"
 #undef DIAG

Modified: vendor/clang/dist/include/clang/AST/UnresolvedSet.h
==
--- vendor/clang/dist/include/clang/AST/UnresolvedSet.h Tue May  4 20:50:39 
2010(r207631)
+++ vendor/clang/dist/include/clang/AST/UnresolvedSet.h Tue May  4 20:51:19 
2010(r207632)
@@ -45,6 +45,7 @@ public:
 
   NamedDecl *getDecl() const { return ir->getDecl(); }
   AccessSpecifier getAccess() const { return ir->getAccess(); }
+  void setAccess(AccessSpecifier AS) { ir->setAccess(AS); }
   DeclAccessPair getPair() const { return *ir; }
 
   NamedDecl *operator*() const { return getDecl(); }

Modified: vendor/clang/dist/include/clang/Analysis/AnalysisDiagnostic.h
==
--- vendor/clang/dist/include/clang/Analysis/AnalysisDiagnostic.h   Tue May 
 4 20:50:39 2010(r207631)
+++ vendor/clang/dist/include/clang/Analysis/AnalysisDiagnostic.h   Tue May 
 4 20:51:19 2010(r207632)
@@ -15,7 +15,7 @@
 namespace clang {
   namespace diag {
 enum {
-#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,SFINAE) ENUM,
+#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,SFINAE,CATEGORY) ENUM,
 #define ANALYSISSTART
 #include "clang/Basic/DiagnosticAnalysisKinds.inc"
 #undef DIAG

Modified: vendor/clang/dist/include/clang/Basic/Diagnostic.h
==
--- vendor/clang/dist/include/clang/Basic/Diagnostic.h  Tue May  4 20:50:39 
2010(r207631)
+++ vendor/clang/dist/include/clang/Basic/Diagnostic.h  Tue May  4 20:51:19 
2010(r207632)
@@ -60,7 +60,7 @@ namespace clang {
 
 // Get typedefs for common diagnostics.
 enum {
-#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,SFINAE) ENUM,
+#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,SFINAE,CATEGORY) ENUM,
 #include "clang/Basic/DiagnosticCommonKinds.inc"
   NUM_BUILTIN_COMMON_DIAGNOSTICS
 #undef DIAG
@@ -283,13 +283,13 @@ public:
   void setTemplateBacktraceLimit(unsigned Limit) {
 TemplateBacktraceLimit = Limit;
   }
-
+  
   /// \brief Retrieve th

svn commit: r207633 - stable/8/sys/dev/usb/controller

2010-05-04 Thread Andrew Thompson
Author: thompsa
Date: Tue May  4 21:16:01 2010
New Revision: 207633
URL: http://svn.freebsd.org/changeset/base/207633

Log:
  MFC r201797
  
   Remove unused uhci_dump_qhs().

Modified:
  stable/8/sys/dev/usb/controller/uhci.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/geom/sched/   (props changed)

Modified: stable/8/sys/dev/usb/controller/uhci.c
==
--- stable/8/sys/dev/usb/controller/uhci.c  Tue May  4 20:51:19 2010
(r207632)
+++ stable/8/sys/dev/usb/controller/uhci.c  Tue May  4 21:16:01 2010
(r207633)
@@ -830,33 +830,6 @@ uhci_dump_all(uhci_softc_t *sc)
 }
 
 static void
-uhci_dump_qhs(uhci_qh_t *sqh)
-{
-   uint8_t temp;
-
-   temp = uhci_dump_qh(sqh);
-
-   /*
-* uhci_dump_qhs displays all the QHs and TDs from the given QH
-* onwards Traverses sideways first, then down.
-*
-* QH1 QH2 No QH TD2.1 TD2.2 TD1.1 etc.
-*
-* TD2.x being the TDs queued at QH2 and QH1 being referenced from QH1.
-*/
-
-   if (temp & 1)
-   uhci_dump_qhs(sqh->h_next);
-   else
-   DPRINTF("No QH\n");
-
-   if (temp & 2)
-   uhci_dump_tds(sqh->e_next);
-   else
-   DPRINTF("No TD\n");
-}
-
-static void
 uhci_dump_tds(uhci_td_t *td)
 {
for (;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r207634 - stable/7/sys/nfsclient

2010-05-04 Thread John Baldwin
Author: jhb
Date: Tue May  4 21:21:05 2010
New Revision: 207634
URL: http://svn.freebsd.org/changeset/base/207634

Log:
  MFC: 202767,202774
  Add a timeout for the negative name cache entries in the NFS client.
  This avoids a bogus negative name cache entry from persisting forever
  when another client creates an entry with the same name within the
  same NFS server time of day clock tick.  Unlike 8.x and later, the
  timeout is only adjustable via a system-wide sysctl
  (vfs.nfs.negative_name_timeout) rather than a mount option.  Setting
  the timeout to 0 disables negative name caching.
  
  I also fixed one obvious typo where args.timeo should be
  args.maxgrouplist.

Modified:
  stable/7/sys/nfsclient/nfs_vfsops.c
  stable/7/sys/nfsclient/nfs_vnops.c
  stable/7/sys/nfsclient/nfsmount.h
  stable/7/sys/nfsclient/nfsnode.h

Modified: stable/7/sys/nfsclient/nfs_vfsops.c
==
--- stable/7/sys/nfsclient/nfs_vfsops.c Tue May  4 21:16:01 2010
(r207633)
+++ stable/7/sys/nfsclient/nfs_vfsops.c Tue May  4 21:21:05 2010
(r207634)
@@ -951,7 +951,7 @@ nfs_mount(struct mount *mp, struct threa
}
if (vfs_getopt(mp->mnt_optnew, "maxgroups", (void **)&opt, NULL) == 0) {
ret = sscanf(opt, "%d", &args.maxgrouplist);
-   if (ret != 1 || args.timeo <= 0) {
+   if (ret != 1 || args.maxgrouplist <= 0) {
vfs_mount_error(mp, "illegal maxgroups: %s",
opt);
error = EINVAL;

Modified: stable/7/sys/nfsclient/nfs_vnops.c
==
--- stable/7/sys/nfsclient/nfs_vnops.c  Tue May  4 21:16:01 2010
(r207633)
+++ stable/7/sys/nfsclient/nfs_vnops.c  Tue May  4 21:21:05 2010
(r207634)
@@ -225,6 +225,10 @@ int nfs_directio_enable = 0;
 SYSCTL_INT(_vfs_nfs, OID_AUTO, nfs_directio_enable, CTLFLAG_RW,
   &nfs_directio_enable, 0, "Enable NFS directio");
 
+static u_int   negnametimeo = NFS_DEFAULT_NEGNAMETIMEO;
+SYSCTL_UINT(_vfs_nfs, OID_AUTO, negative_name_timeout, CTLFLAG_RW,
+  &negnametimeo, 0, "Negative name cache entry timeout");
+
 /*
  * This sysctl allows other processes to mmap a file that has been opened
  * O_DIRECT by a process.  In general, having processes mmap the file while
@@ -918,9 +922,12 @@ nfs_lookup(struct vop_lookup_args *ap)
 * We only accept a negative hit in the cache if the
 * modification time of the parent directory matches
 * our cached copy.  Otherwise, we discard all of the
-* negative cache entries for this directory.
+* negative cache entries for this directory. We also
+* only trust -ve cache entries for less than
+* negnametimeo seconds.
 */
-   if (VOP_GETATTR(dvp, &vattr, cnp->cn_cred, td) == 0 &&
+   if ((u_int)(ticks - np->n_dmtime_ticks) < (negnametimeo * hz) &&
+   VOP_GETATTR(dvp, &vattr, cnp->cn_cred, td) == 0 &&
vattr.va_mtime.tv_sec == np->n_dmtime) {
nfsstats.lookupcache_hits++;
return (ENOENT);
@@ -1063,8 +1070,10 @@ nfsmout:
 */
mtx_lock(&np->n_mtx);
if (np->n_dmtime <= dmtime) {
-   if (np->n_dmtime == 0)
+   if (np->n_dmtime == 0) {
np->n_dmtime = dmtime;
+   np->n_dmtime_ticks = ticks;
+   }
mtx_unlock(&np->n_mtx);
cache_enter(dvp, NULL, cnp);
} else

Modified: stable/7/sys/nfsclient/nfsmount.h
==
--- stable/7/sys/nfsclient/nfsmount.h   Tue May  4 21:16:01 2010
(r207633)
+++ stable/7/sys/nfsclient/nfsmount.h   Tue May  4 21:21:05 2010
(r207634)
@@ -114,6 +114,10 @@ struct nfsmount {
 #define NFS_TPRINTF_DELAY   30
 #endif
 
+#ifndef NFS_DEFAULT_NEGNAMETIMEO
+#define NFS_DEFAULT_NEGNAMETIMEO   60
+#endif
+
 #endif
 
 #endif

Modified: stable/7/sys/nfsclient/nfsnode.h
==
--- stable/7/sys/nfsclient/nfsnode.hTue May  4 21:16:01 2010
(r207633)
+++ stable/7/sys/nfsclient/nfsnode.hTue May  4 21:21:05 2010
(r207634)
@@ -110,6 +110,7 @@ struct nfsnode {
struct timespec n_mtime;/* Prev modify time. */
time_t  n_ctime;/* Prev create time. */
time_t  n_dmtime;   /* Prev dir modify time. */
+   int n_dmtime_ticks; /* Tick of -ve

Re: [PATCH] RUSAGE_THREAD

2010-05-04 Thread Alexander Krizhanovsky

Konstantin,

Concerning i/o counters we collect them in rucollect() in for loop and 
update in various places, for example in vfs_bio.c. Rusage of an exiting 
threads is handled in exit1() -> ruadd().


Your version of the patch certainly is more robust, however I'm still 
concerning about following things, which could be done better:


1) Zeroing of thread runtime statistic looks fine if we use it only for 
whole process statistic calculating, but now (when it's also used as is 
for the thread statistic) it should be handled independently, i.e. 
RUSAGE_{SELF,CHILDREN} calls should not affect the thread structures 
somehow. So I suppose we need to introduce some new counters to proc 
structure and counters update code (it was stopped me to go on this way).


2) With first in mind, getruasge(RUSAGE_THREAD) is called in current 
thread and doesn't affect or use information from other threads, so it 
definitely should use less number of locks, may be with atomic 
operations for read-update-write operations. In fact the same getting 
per-thread statistic in Linux is done _without_ locks at all (however 
Linux uses different process/thread model).


If we're in time and it really looks like a problem (is getrusage() ever 
a hotspot?) I can try to prepare the patch with less locking on this 
weekend.


Also I still don't understand the sanity check in calccru1() for 
negativeness of tu ( (int64_t)tu < 0 ) - is it reachable? It seems that 
it is possible only after about 300 thousand years of uptime... Could 
you please explain this?


Should I write further about the patch to svn-src-all@ (sorry, but I'm 
new in FreeBSD mailing) ?


Kostik Belousov wrote:

On Mon, May 03, 2010 at 08:13:00PM +, Alexander Krizhanovsky wrote:
  

Kostik,

thank you very much for the review!

Kostik Belousov wrote:


On Mon, Apr 19, 2010 at 12:46:48AM +, Alexander Krizhanovsky wrote:
 
  

Hi all!

This patch implements per-thread rusage statistic (like RUSAGE_THREAD in 
Linux and RUSAGE_LWP in OpenSolaris).


Unfortunately, we have to acquire a number of locks to read/update 
system and user times for current thread rusage information because it's 
also used for whole process statistic and needs to be zeroed.


Any comments are very appreciated.

It's tested against 8.0-RELEASE. Appropriate PR is submitted.

--
Alexander Krizhanovsky
NatSys Lab. (http://natsys-lab.com)
tel: +7 (916) 717-3899, +7 (499) 747-6304
e-mail: a...@natsys-lab.com

   


I think this should be somewhat modified before commit.

First, please separate patch into two pieces. One would introduce
ruxagg_tlock() helper and use it in existing locations instead of
three-liners. Possibly, add K&R->ANSI C kern_getrusage definition
change.

Second would actually add RUSAGE_THREAD. There, please follow
the style(9), in particular, do not initialize the local variables
at the declaration, instead, use explicit initialization in the code.
 
  
Done. I have also introduced third patch for casting microseconds to 
timeval and replaced a few appropriate places in whole kernel code.
patch-rusage-thread-03052010.txt is incremental for 
patch-ruxagg_tlock-03052010.txt, which is by turn incremental for 
patch-usec2timeval-03052010.txt.


I have made following change for calcru1():
-   if ((int64_t)tu < 0) {
-   /* XXX: this should be an assert /phk */
-   printf("calcru: negative runtime of %jd usec for pid %d 
(%s)\n",

-   (intmax_t)tu, p->p_pid, p->p_comm);
-   tu = ruxp->rux_tu;
-   }
+   KASSERT((int64_t)tu < 0, ("calcru: negative runtime of %jd usec "
+   "for pid %d (%s)\n",
+   (intmax_t)tu, p->p_pid, p->p_comm));

tu can become negative at about 300 thousand years of uptime, so this 
condition seems quite unrealistic and indeed should be replaced by an 
assertion. However I didn't understand why it isn't done so far and the 
comment only was added. Did I miss something?




Should calctru() share the code with calcru1() ? I am esp. concerned
with sanity check like negative runtime etc. Possibly, this code
  

>from calcru1() should be separated into function used from both


calcru1() and calctru().

Man page for getrusage(2) should be updated.
 
  

It's added to patch-rusage-thread-03052010.txt.

In the end - shoud I raise a new PR (the original one is kern/145813)?



Thanks for the submission.
  


It was some time, I already committed ruxagg_tlock() part, that caused
some feedback, and I reworked the rest of the patch myself. See svn-src@
for some discussion, and the latest version that I intend to commit
shortly is below. Your comments are welcome.

Lets discuss third patch after this is landed.

diff --git a/lib/libc/sys/getrusage.2 b/lib/libc/sys/getrusage.2
index bdf5d45..423503f 100644
--- a/lib/libc/sys/getrusage.2
+++ b/lib/libc/sys/getrusage.2
@@ -28,7 +28,7 @@
 .\" @(#)getrusage.2  

svn commit: r207635 - head/sys/dev/sge

2010-05-04 Thread Pyun YongHyeon
Author: yongari
Date: Tue May  4 21:23:59 2010
New Revision: 207635
URL: http://svn.freebsd.org/changeset/base/207635

Log:
  Free entire mbuf chain instead of the first mbuf.

Modified:
  head/sys/dev/sge/if_sge.c

Modified: head/sys/dev/sge/if_sge.c
==
--- head/sys/dev/sge/if_sge.c   Tue May  4 21:21:05 2010(r207634)
+++ head/sys/dev/sge/if_sge.c   Tue May  4 21:23:59 2010(r207635)
@@ -1015,7 +1015,7 @@ sge_list_tx_free(struct sge_softc *sc)
bus_dmamap_sync(cd->sge_txmbuf_tag, txd->tx_dmamap,
BUS_DMASYNC_POSTWRITE);
bus_dmamap_unload(cd->sge_txmbuf_tag, txd->tx_dmamap);
-   m_free(txd->tx_m);
+   m_freem(txd->tx_m);
txd->tx_m = NULL;
txd->tx_ndesc = 0;
}
@@ -1064,7 +1064,7 @@ sge_list_rx_free(struct sge_softc *sc)
BUS_DMASYNC_POSTREAD);
bus_dmamap_unload(cd->sge_rxmbuf_tag,
rxd->rx_dmamap);
-   m_free(rxd->rx_m);
+   m_freem(rxd->rx_m);
rxd->rx_m = NULL;
}
}
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r207636 - stable/7/usr.bin/stat

2010-05-04 Thread Jilles Tjoelker
Author: jilles
Date: Tue May  4 21:56:16 2010
New Revision: 207636
URL: http://svn.freebsd.org/changeset/base/207636

Log:
  MFC r207153: stat: Allow -f %Sf to display the file flags symbolically.
  
  PR:   124349

Modified:
  stable/7/usr.bin/stat/stat.1
  stable/7/usr.bin/stat/stat.c
Directory Properties:
  stable/7/usr.bin/stat/   (props changed)

Modified: stable/7/usr.bin/stat/stat.1
==
--- stable/7/usr.bin/stat/stat.1Tue May  4 21:23:59 2010
(r207635)
+++ stable/7/usr.bin/stat/stat.1Tue May  4 21:56:16 2010
(r207636)
@@ -36,7 +36,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 27, 2007
+.Dd April 24, 2010
 .Dt STAT 1
 .Os
 .Sh NAME
@@ -239,6 +239,11 @@ Display date in
 format.
 .It Cm dr
 Display actual device name.
+.It Cm f
+Display the flags of
+.Ar file
+as in
+.Nm ls Fl lTdo .
 .It Cm gu
 Display group or user name.
 .It Cm p

Modified: stable/7/usr.bin/stat/stat.c
==
--- stable/7/usr.bin/stat/stat.cTue May  4 21:23:59 2010
(r207635)
+++ stable/7/usr.bin/stat/stat.cTue May  4 21:56:16 2010
(r207636)
@@ -187,6 +187,9 @@ int format1(const struct stat *,/* stat
char *, size_t, /* a place to put the output */
int, int, int, int, /* the parsed format */
int, int);
+#if HAVE_STRUCT_STAT_ST_FLAGS
+char   *xfflagstostr(unsigned long);
+#endif
 
 char *timefmt;
 int linkfail;
@@ -329,6 +332,25 @@ main(int argc, char *argv[])
return (am_readlink ? linkfail : errs);
 }
 
+#if HAVE_STRUCT_STAT_ST_FLAGS
+/*
+ * fflagstostr() wrapper that leaks only once
+ */
+char *
+xfflagstostr(unsigned long fflags)
+{
+   static char *str = NULL;
+
+   if (str != NULL)
+   free(str);
+
+   str = fflagstostr(fflags);
+   if (str == NULL)
+   err(1, "fflagstostr");
+   return (str);
+}
+#endif /* HAVE_STRUCT_STAT_ST_FLAGS */
+
 void
 usage(const char *synopsis)
 {
@@ -721,8 +743,11 @@ format1(const struct stat *st,
case SHOW_st_flags:
small = (sizeof(st->st_flags) == 4);
data = st->st_flags;
-   sdata = NULL;
-   formats = FMTF_DECIMAL | FMTF_OCTAL | FMTF_UNSIGNED | FMTF_HEX;
+   sdata = xfflagstostr(st->st_flags);
+   if (*sdata == '\0')
+   sdata = "-";
+   formats = FMTF_DECIMAL | FMTF_OCTAL | FMTF_UNSIGNED | FMTF_HEX |
+   FMTF_STRING;
if (ofmt == 0)
ofmt = FMTF_UNSIGNED;
break;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r207637 - svnadmin/conf

2010-05-04 Thread Wes Peters
Author: wes
Date: Tue May  4 22:22:31 2010
New Revision: 207637
URL: http://svn.freebsd.org/changeset/base/207637

Log:
  Update my email address.
  
  Approved by:  core (implicit)

Modified:
  svnadmin/conf/access

Modified: svnadmin/conf/access
==
--- svnadmin/conf/accessTue May  4 21:56:16 2010(r207636)
+++ svnadmin/conf/accessTue May  4 22:22:31 2010(r207637)
@@ -228,7 +228,7 @@ uqs
 vanhu
 versus
 weongyo
-wesw...@opensail.org
+wes
 wilko  wkbco...@xs4all.nl
 will
 wkoszek
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r207638 - head/sys/dev/msk

2010-05-04 Thread Pyun YongHyeon
Author: yongari
Date: Tue May  4 22:24:19 2010
New Revision: 207638
URL: http://svn.freebsd.org/changeset/base/207638

Log:
  When VLAN hardware tagging is disabled, make sure to disable VLAN
  checksum offloading as well as TSO over VLAN.
  
  Reported by:  jhb

Modified:
  head/sys/dev/msk/if_msk.c

Modified: head/sys/dev/msk/if_msk.c
==
--- head/sys/dev/msk/if_msk.c   Tue May  4 22:22:31 2010(r207637)
+++ head/sys/dev/msk/if_msk.c   Tue May  4 22:24:19 2010(r207638)
@@ -1101,7 +1101,8 @@ msk_ioctl(struct ifnet *ifp, u_long comm
(IFCAP_VLAN_HWTAGGING & ifp->if_capabilities) != 0) {
ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING;
if ((IFCAP_VLAN_HWTAGGING & ifp->if_capenable) == 0)
-   ifp->if_capenable &= ~IFCAP_VLAN_HWTSO;
+   ifp->if_capenable &=
+   ~(IFCAP_VLAN_HWTSO | IFCAP_VLAN_HWCSUM);
msk_setvlan(sc_if, ifp);
}
if (ifp->if_mtu > ETHERMTU &&
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


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

2010-05-04 Thread Navdeep Parhar
Author: np
Date: Tue May  4 23:55:08 2010
New Revision: 207639
URL: http://svn.freebsd.org/changeset/base/207639

Log:
  Add IFCAP_LINKSTATE to cxgb's capabilities.
  
  MFC after:3 days

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

Modified: head/sys/dev/cxgb/cxgb_main.c
==
--- head/sys/dev/cxgb/cxgb_main.c   Tue May  4 22:24:19 2010
(r207638)
+++ head/sys/dev/cxgb/cxgb_main.c   Tue May  4 23:55:08 2010
(r207639)
@@ -981,7 +981,7 @@ cxgb_makedev(struct port_info *pi)
 
 #define CXGB_CAP (IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU | IFCAP_HWCSUM | \
 IFCAP_VLAN_HWCSUM | IFCAP_TSO | IFCAP_JUMBO_MTU | IFCAP_LRO | \
-IFCAP_VLAN_HWTSO)
+IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE)
 #define CXGB_CAP_ENABLE (CXGB_CAP & ~IFCAP_TSO6)
 
 static int
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r207640 - stable/8/share/mk

2010-05-04 Thread Xin LI
Author: delphij
Date: Wed May  5 00:38:20 2010
New Revision: 207640
URL: http://svn.freebsd.org/changeset/base/207640

Log:
  MFC r206973:
  
  When CPUTYPE is defined to any value, on amd64 platform "mmx" is
  available through MACHINE_CPU, indicating the CPU supports that
  feature, as done by revision 138685.
  
  This changeset adds "mmx" into the default amd64 MACHINE_CPU list
  when no CPUTYPE is specified to provide consistent behavior.
  
  PR:   amd64/145593
  Submitted by: mm

Modified:
  stable/8/share/mk/bsd.cpu.mk
Directory Properties:
  stable/8/share/mk/   (props changed)

Modified: stable/8/share/mk/bsd.cpu.mk
==
--- stable/8/share/mk/bsd.cpu.mkTue May  4 23:55:08 2010
(r207639)
+++ stable/8/share/mk/bsd.cpu.mkWed May  5 00:38:20 2010
(r207640)
@@ -9,7 +9,7 @@ _CPUCFLAGS =
 . if ${MACHINE_ARCH} == "i386"
 MACHINE_CPU = i486
 . elif ${MACHINE_ARCH} == "amd64"
-MACHINE_CPU = amd64 sse2 sse
+MACHINE_CPU = amd64 sse2 sse mmx
 . elif ${MACHINE_ARCH} == "ia64"
 MACHINE_CPU = itanium
 . elif ${MACHINE_ARCH} == "powerpc"
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r207641 - stable/7/share/mk

2010-05-04 Thread Xin LI
Author: delphij
Date: Wed May  5 00:39:06 2010
New Revision: 207641
URL: http://svn.freebsd.org/changeset/base/207641

Log:
  MFC r206973:
  
  When CPUTYPE is defined to any value, on amd64 platform "mmx" is
  available through MACHINE_CPU, indicating the CPU supports that
  feature, as done by revision 138685.
  
  This changeset adds "mmx" into the default amd64 MACHINE_CPU list
  when no CPUTYPE is specified to provide consistent behavior.
  
  PR:   amd64/145593
  Submitted by: mm

Modified:
  stable/7/share/mk/bsd.cpu.mk
Directory Properties:
  stable/7/share/mk/   (props changed)

Modified: stable/7/share/mk/bsd.cpu.mk
==
--- stable/7/share/mk/bsd.cpu.mkWed May  5 00:38:20 2010
(r207640)
+++ stable/7/share/mk/bsd.cpu.mkWed May  5 00:39:06 2010
(r207641)
@@ -9,7 +9,7 @@ _CPUCFLAGS =
 . if ${MACHINE_ARCH} == "i386"
 MACHINE_CPU = i486
 . elif ${MACHINE_ARCH} == "amd64"
-MACHINE_CPU = amd64 sse2 sse
+MACHINE_CPU = amd64 sse2 sse mmx
 . elif ${MACHINE_ARCH} == "ia64"
 MACHINE_CPU = itanium
 . elif ${MACHINE_ARCH} == "sparc64"
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r207642 - stable/6/share/mk

2010-05-04 Thread Xin LI
Author: delphij
Date: Wed May  5 00:39:50 2010
New Revision: 207642
URL: http://svn.freebsd.org/changeset/base/207642

Log:
  MFC r206973:
  
  When CPUTYPE is defined to any value, on amd64 platform "mmx" is
  available through MACHINE_CPU, indicating the CPU supports that
  feature, as done by revision 138685.
  
  This changeset adds "mmx" into the default amd64 MACHINE_CPU list
  when no CPUTYPE is specified to provide consistent behavior.
  
  PR:   amd64/145593
  Submitted by: mm

Modified:
  stable/6/share/mk/bsd.cpu.mk
Directory Properties:
  stable/6/share/mk/   (props changed)

Modified: stable/6/share/mk/bsd.cpu.mk
==
--- stable/6/share/mk/bsd.cpu.mkWed May  5 00:39:06 2010
(r207641)
+++ stable/6/share/mk/bsd.cpu.mkWed May  5 00:39:50 2010
(r207642)
@@ -12,7 +12,7 @@ MACHINE_CPU = i486
 _CPUCFLAGS = -mcpu=ev4 -mtune=ev5
 MACHINE_CPU = ev4
 . elif ${MACHINE_ARCH} == "amd64"
-MACHINE_CPU = amd64 sse2 sse
+MACHINE_CPU = amd64 sse2 sse mmx
 . elif ${MACHINE_ARCH} == "ia64"
 MACHINE_CPU = itanium
 . elif ${MACHINE_ARCH} == "sparc64"
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r207643 - in head: sys/dev/cxgb usr.sbin/cxgbtool

2010-05-04 Thread Navdeep Parhar
Author: np
Date: Wed May  5 00:41:40 2010
New Revision: 207643
URL: http://svn.freebsd.org/changeset/base/207643

Log:
  Add support for hardware filters to cxgb(4).  The T3 chip can inspect
  L2/3/4 headers and can drop or steer packets as instructed.  Filtering
  based on src ip, dst ip, src port, dst port, 802.1q, udp/tcp, and mac
  addr is possible.  Add support in cxgbtool to program these filters.
  Some simple examples:
  
  Drop all tcp/80 traffic coming from the subnet specified.
  # cxgbtool cxgb2 filter 0 sip 192.168.1.0/24 dport 80 type tcp action drop
  
  Steer all incoming UDP traffic to qset 0.
  # cxgbtool cxgb2 filter 1 type udp queue 0 action pass
  
  Steer all tcp traffic from 192.168.1.1 to qset 1.
  # cxgbtool cxgb2 filter 2 sip 192.168.1.1 type tcp queue 1 action pass
  
  Drop fragments.
  # cxgbtool cxgb2 filter 3 type frag action drop
  
  List all filters.
  # cxgbtool cxgb2 filter list
  index SIPDIP sport dport VLAN PRI P/MAC type Q
  0 192.168.1.0/24 0.0.0.0 *800 0/1 */*tcp -
  1 0.0.0.0/0  0.0.0.0 * *0 0/1 */*udp 0
  2 192.168.1.1/32 0.0.0.0 * *0 0/1 */*tcp 1
  3 0.0.0.0/0  0.0.0.0 * *0 0/1 */*   frag -
  16367 0.0.0.0/0  0.0.0.0 * *0 0/1 */*  * *
  
  MFC after:2 weeks

Modified:
  head/sys/dev/cxgb/cxgb_ioctl.h
  head/sys/dev/cxgb/cxgb_main.c
  head/usr.sbin/cxgbtool/cxgbtool.c

Modified: head/sys/dev/cxgb/cxgb_ioctl.h
==
--- head/sys/dev/cxgb/cxgb_ioctl.h  Wed May  5 00:39:50 2010
(r207642)
+++ head/sys/dev/cxgb/cxgb_ioctl.h  Wed May  5 00:41:40 2010
(r207643)
@@ -59,6 +59,9 @@ enum {
CH_CLEAR_STATS,
CH_GET_UP_LA,
CH_GET_UP_IOQS,
+   CH_SET_FILTER,
+   CH_DEL_FILTER,
+   CH_GET_FILTER,
 };
 
 /* statistics categories */
@@ -215,6 +218,29 @@ struct ch_up_ioqs {
struct t3_ioq_entry *data;
 };
 
+struct ch_filter_tuple {
+   uint32_t sip;
+   uint32_t dip;
+   uint16_t sport;
+   uint16_t dport;
+   uint16_t vlan:12;
+   uint16_t vlan_prio:3;
+};
+
+struct ch_filter {
+   uint32_t filter_id;
+   struct ch_filter_tuple val;
+   struct ch_filter_tuple mask;
+   uint16_t mac_addr_idx;
+   uint8_t mac_hit:1;
+   uint8_t proto:2;
+
+   uint8_t want_filter_id:1;
+   uint8_t pass:1;
+   uint8_t rss:1;
+   uint8_t qset;
+};
+
 #define CHELSIO_SETREG _IOW('f', CH_SETREG, struct ch_reg)
 #define CHELSIO_GETREG _IOWR('f', CH_GETREG, struct ch_reg)
 #define CHELSIO_GETMTUTAB  _IOR('f', CH_GETMTUTAB, struct ch_mtus)
@@ -239,4 +265,7 @@ struct ch_up_ioqs {
 #define CHELSIO_GET_EEPROM _IOWR('f', CH_GET_EEPROM, struct ch_eeprom)
 #define CHELSIO_GET_UP_LA  _IOWR('f', CH_GET_UP_LA, struct ch_up_la)
 #define CHELSIO_GET_UP_IOQS_IOWR('f', CH_GET_UP_IOQS, struct ch_up_ioqs)
+#define CHELSIO_SET_FILTER _IOW('f', CH_SET_FILTER, struct ch_filter)
+#define CHELSIO_DEL_FILTER _IOW('f', CH_DEL_FILTER, struct ch_filter)
+#define CHELSIO_GET_FILTER _IOWR('f', CH_GET_FILTER, struct ch_filter)
 #endif

Modified: head/sys/dev/cxgb/cxgb_main.c
==
--- head/sys/dev/cxgb/cxgb_main.c   Wed May  5 00:39:50 2010
(r207642)
+++ head/sys/dev/cxgb/cxgb_main.c   Wed May  5 00:41:40 2010
(r207643)
@@ -99,6 +99,13 @@ static void cxgb_ext_intr_handler(void *
 static void cxgb_tick_handler(void *, int);
 static void cxgb_tick(void *);
 static void setup_rss(adapter_t *sc);
+static int alloc_filters(struct adapter *);
+static int setup_hw_filters(struct adapter *);
+static int set_filter(struct adapter *, int, const struct filter_info *);
+static inline void mk_set_tcb_field(struct cpl_set_tcb_field *, unsigned int,
+unsigned int, u64, u64);
+static inline void set_tcb_field_ulp(struct cpl_set_tcb_field *, unsigned int,
+unsigned int, u64, u64);
 
 /* Attachment glue for the PCI controller end of the device.  Each port of
  * the device is attached separately, as defined later.
@@ -1661,6 +1668,13 @@ cxgb_up(struct adapter *sc)
if ((err = update_tpsram(sc)))
goto out;
 
+   if (is_offload(sc)) {
+   sc->params.mc5.nservers = 0;
+   sc->params.mc5.nroutes = 0;
+   sc->params.mc5.nfilters = t3_mc5_size(&sc->mc5) -
+   MC5_MIN_TIDS;
+   }
+
err = t3_init_hw(sc, 0);
if (err)
goto out;
@@ -1672,6 +1686,7 @@ cxgb_up(struct adapter *sc)
if (err)
goto out;
 
+   alloc_filters(sc);
setup_rss(sc);
 

svn commit: r207644 - in head/sys: dev/agp fs/tmpfs kern vm

2010-05-04 Thread Alan Cox
Author: alc
Date: Wed May  5 03:45:46 2010
New Revision: 207644
URL: http://svn.freebsd.org/changeset/base/207644

Log:
  Push down the acquisition of the page queues lock into vm_page_unwire().
  
  Update the comment describing which lock should be held on entry to
  vm_page_wire().
  
  Reviewed by:  kib

Modified:
  head/sys/dev/agp/agp.c
  head/sys/dev/agp/agp_i810.c
  head/sys/fs/tmpfs/tmpfs_vnops.c
  head/sys/kern/vfs_bio.c
  head/sys/vm/vm_fault.c
  head/sys/vm/vm_glue.c
  head/sys/vm/vm_page.c

Modified: head/sys/dev/agp/agp.c
==
--- head/sys/dev/agp/agp.c  Wed May  5 00:41:40 2010(r207643)
+++ head/sys/dev/agp/agp.c  Wed May  5 03:45:46 2010(r207644)
@@ -624,9 +624,7 @@ bad:
if (k >= i)
vm_page_wakeup(m);
vm_page_lock(m);
-   vm_page_lock_queues();
vm_page_unwire(m, 0);
-   vm_page_unlock_queues();
vm_page_unlock(m);
}
VM_OBJECT_UNLOCK(mem->am_obj);
@@ -660,9 +658,7 @@ agp_generic_unbind_memory(device_t dev, 
for (i = 0; i < mem->am_size; i += PAGE_SIZE) {
m = vm_page_lookup(mem->am_obj, atop(i));
vm_page_lock(m);
-   vm_page_lock_queues();
vm_page_unwire(m, 0);
-   vm_page_unlock_queues();
vm_page_unlock(m);
}
VM_OBJECT_UNLOCK(mem->am_obj);

Modified: head/sys/dev/agp/agp_i810.c
==
--- head/sys/dev/agp/agp_i810.c Wed May  5 00:41:40 2010(r207643)
+++ head/sys/dev/agp/agp_i810.c Wed May  5 03:45:46 2010(r207644)
@@ -1011,9 +1011,7 @@ agp_i810_free_memory(device_t dev, struc
VM_OBJECT_LOCK(mem->am_obj);
m = vm_page_lookup(mem->am_obj, 0);
vm_page_lock(m);
-   vm_page_lock_queues();
vm_page_unwire(m, 0);
-   vm_page_unlock_queues();
vm_page_unlock(m);
VM_OBJECT_UNLOCK(mem->am_obj);
} else {

Modified: head/sys/fs/tmpfs/tmpfs_vnops.c
==
--- head/sys/fs/tmpfs/tmpfs_vnops.c Wed May  5 00:41:40 2010
(r207643)
+++ head/sys/fs/tmpfs/tmpfs_vnops.c Wed May  5 03:45:46 2010
(r207644)
@@ -461,9 +461,7 @@ tmpfs_nocacheread(vm_object_t tobj, vm_p
VM_OBJECT_LOCK(tobj);
 out:
vm_page_lock(m);
-   vm_page_lock_queues();
vm_page_unwire(m, TRUE);
-   vm_page_unlock_queues();
vm_page_unlock(m);
vm_page_wakeup(m);
vm_object_pip_subtract(tobj, 1);

Modified: head/sys/kern/vfs_bio.c
==
--- head/sys/kern/vfs_bio.c Wed May  5 00:41:40 2010(r207643)
+++ head/sys/kern/vfs_bio.c Wed May  5 03:45:46 2010(r207644)
@@ -1571,7 +1571,6 @@ vfs_vmio_release(struct buf *bp)
 * everything on the inactive queue.
 */
vm_page_lock(m);
-   vm_page_lock_queues();
vm_page_unwire(m, 0);
/*
 * We don't mess with busy pages, it is
@@ -1580,6 +1579,7 @@ vfs_vmio_release(struct buf *bp)
 */
if ((m->oflags & VPO_BUSY) == 0 && m->busy == 0 &&
m->wire_count == 0) {
+   vm_page_lock_queues();
/*
 * Might as well free the page if we can and it has
 * no valid data.  We also free the page if the
@@ -1593,8 +1593,8 @@ vfs_vmio_release(struct buf *bp)
} else if (buf_vm_page_count_severe()) {
vm_page_try_to_cache(m);
}
+   vm_page_unlock_queues();
}
-   vm_page_unlock_queues();
vm_page_unlock(m);
}
VM_OBJECT_UNLOCK(bp->b_bufobj->bo_object);
@@ -2957,9 +2957,7 @@ allocbuf(struct buf *bp, int size)
 
bp->b_pages[i] = NULL;
vm_page_lock(m);
-   vm_page_lock_queues();
vm_page_unwire(m, 0);
-   vm_page_unlock_queues();
vm_page_unlock(m);
}
VM_OBJECT_UNLOCK(bp->b_bufobj->bo_object);

Modified: head/sys/vm/vm_fault.c
==
--- head/sys/vm/vm_fault.c  Wed May  5 00:41:40 2010(r207643)
+++ head/sys/vm/vm_fault.c 

svn commit: r207645 - head/sys/mips/mips

2010-05-04 Thread Neel Natu
Author: neel
Date: Wed May  5 04:37:45 2010
New Revision: 207645
URL: http://svn.freebsd.org/changeset/base/207645

Log:
  Fix DDB backtrace involving kernel modules.
  
  We can no longer assume that all valid program counter values reside
  within the kernel object file.

Modified:
  head/sys/mips/mips/db_trace.c

Modified: head/sys/mips/mips/db_trace.c
==
--- head/sys/mips/mips/db_trace.c   Wed May  5 03:45:46 2010
(r207644)
+++ head/sys/mips/mips/db_trace.c   Wed May  5 04:37:45 2010
(r207645)
@@ -181,7 +181,7 @@ loop:
}
/* check for bad PC */
/*XXX MIPS64 bad: These hard coded constants are lame */
-   if (pc & 3 || pc < (uintptr_t)0x8000 || pc >= (uintptr_t)edata) {
+   if (pc & 3 || pc < (uintptr_t)0x8000) {
(*printfn) ("PC 0x%x: not in kernel\n", pc);
ra = 0;
goto done;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r207646 - stable/8/sys/cam

2010-05-04 Thread Alexander Motin
Author: mav
Date: Wed May  5 05:11:12 2010
New Revision: 207646
URL: http://svn.freebsd.org/changeset/base/207646

Log:
  MFC r207490:
  Add xpt_schedule_dev_sendq() call, lost at r203108. It is not needed in
  usual operation, but required in some conditions to make queue running
  after being shrinked.

Modified:
  stable/8/sys/cam/cam_xpt.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/geom/sched/   (props changed)

Modified: stable/8/sys/cam/cam_xpt.c
==
--- stable/8/sys/cam/cam_xpt.c  Wed May  5 04:37:45 2010(r207645)
+++ stable/8/sys/cam/cam_xpt.c  Wed May  5 05:11:12 2010(r207646)
@@ -4809,6 +4809,8 @@ camisr_runqueue(void *V_queue)
if ((dev->flags & CAM_DEV_TAG_AFTER_COUNT) != 0
 && (--dev->tag_delay_count == 0))
xpt_start_tags(ccb_h->path);
+   if (!device_is_send_queued(dev))
+   xpt_schedule_dev_sendq(ccb_h->path->bus, dev);
}
 
if (ccb_h->status & CAM_RELEASE_SIMQ) {
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r207647 - stable/8/sys/cam/ata

2010-05-04 Thread Alexander Motin
Author: mav
Date: Wed May  5 05:18:08 2010
New Revision: 207647
URL: http://svn.freebsd.org/changeset/base/207647

Log:
  MFC r207282:
  Update device identify data and serial number when device change detected.
  Reprobe immediately following this should have fresh data.

Modified:
  stable/8/sys/cam/ata/ata_xpt.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/geom/sched/   (props changed)

Modified: stable/8/sys/cam/ata/ata_xpt.c
==
--- stable/8/sys/cam/ata/ata_xpt.c  Wed May  5 05:11:12 2010
(r207646)
+++ stable/8/sys/cam/ata/ata_xpt.c  Wed May  5 05:18:08 2010
(r207647)
@@ -768,6 +768,7 @@ noerror:
{
struct ccb_pathinq cpi;
int16_t *ptr;
+   int changed = 1;
 
ident_buf = &softc->ident_data;
for (ptr = (int16_t *)ident_buf;
@@ -809,9 +810,12 @@ noerror:
 sizeof(ident_buf->serial))) {
/* Device changed. */
xpt_async(AC_LOST_DEVICE, path, NULL);
-   } else
+   } else {
bcopy(&softc->ident_data, ident_buf, 
sizeof(struct ata_params));
-   } else {
+   changed = 0;
+   }
+   }
+   if (changed) {
bcopy(&softc->ident_data, ident_buf, sizeof(struct 
ata_params));
/* Clean up from previous instance of this device */
if (path->device->serial_num != NULL) {
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"