svn commit: r240299 - head/usr.bin/find

2012-09-10 Thread Dag-Erling Sm�rgrav
Author: des
Date: Mon Sep 10 07:56:59 2012
New Revision: 240299
URL: http://svn.freebsd.org/changeset/base/240299

Log:
  Note that -quit terminates successfully.
  
  Requested by: jmg@

Modified:
  head/usr.bin/find/find.1

Modified: head/usr.bin/find/find.1
==
--- head/usr.bin/find/find.1Mon Sep 10 06:07:28 2012(r240298)
+++ head/usr.bin/find/find.1Mon Sep 10 07:56:59 2012(r240299)
@@ -744,7 +744,7 @@ option was specified.
 .It Ic -quit
 Causes
 .Nm
-to immediately terminate.
+to immediately terminate successfully.
 .It Ic -regex Ar pattern
 True if the whole path of the file matches
 .Ar pattern
___
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: r240300 - releng/9.1/usr.sbin/pkg

2012-09-10 Thread Baptiste Daroussin
Author: bapt
Date: Mon Sep 10 08:14:58 2012
New Revision: 240300
URL: http://svn.freebsd.org/changeset/base/240300

Log:
  MFC: r239663, r239664
  
  change ALWAYS_ASSUME_YES to ASSUME_ALWAYS_YES for consistency with pkg(8)
  if not on a tty prompt about the missing pkg(8) but default on 'no' except if
  ASSUME_ALWAYS_YES is set
  
  Approved by:  re (kib)

Modified:
  releng/9.1/usr.sbin/pkg/pkg.c
Directory Properties:
  releng/9.1/usr.sbin/pkg/   (props changed)

Modified: releng/9.1/usr.sbin/pkg/pkg.c
==
--- releng/9.1/usr.sbin/pkg/pkg.c   Mon Sep 10 07:56:59 2012
(r240299)
+++ releng/9.1/usr.sbin/pkg/pkg.c   Mon Sep 10 08:14:58 2012
(r240300)
@@ -425,9 +425,11 @@ main(__unused int argc, char *argv[])
 * not tty. Check the environment to see if user has answer
 * tucked in there already.
 */
-   if (getenv("ALWAYS_ASSUME_YES") == NULL &&
-   isatty(fileno(stdin))) {
+   if (getenv("ASSUME_ALWAYS_YES") == NULL) {
printf("%s", confirmation_message);
+   if (!isatty(fileno(stdin)))
+   exit(EXIT_FAILURE);
+
if (pkg_query_yes_no() == 0)
exit(EXIT_FAILURE);
}
___
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: r240301 - head/lib/libkvm

2012-09-10 Thread Kevin Lo
Author: kevlo
Date: Mon Sep 10 08:16:45 2012
New Revision: 240301
URL: http://svn.freebsd.org/changeset/base/240301

Log:
  If the IdlePDPT is not present, PAE is not active

Modified:
  head/lib/libkvm/kvm_i386.c

Modified: head/lib/libkvm/kvm_i386.c
==
--- head/lib/libkvm/kvm_i386.c  Mon Sep 10 08:14:58 2012(r240300)
+++ head/lib/libkvm/kvm_i386.c  Mon Sep 10 08:16:45 2012(r240301)
@@ -238,7 +238,6 @@ _kvm_initvtop(kvm_t *kd)
return (-1);
}
kd->vmst->PTD = PTD;
-   return (0);
kd->vmst->pae = 0;
}
return (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: r240302 - head/sys/dev/usb/controller

2012-09-10 Thread Hans Petter Selasky
Author: hselasky
Date: Mon Sep 10 08:23:56 2012
New Revision: 240302
URL: http://svn.freebsd.org/changeset/base/240302

Log:
  Cleanup interrupt handling in Host Mode.

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

Modified: head/sys/dev/usb/controller/dwc_otg.c
==
--- head/sys/dev/usb/controller/dwc_otg.c   Mon Sep 10 08:16:45 2012
(r240301)
+++ head/sys/dev/usb/controller/dwc_otg.c   Mon Sep 10 08:23:56 2012
(r240302)
@@ -488,13 +488,15 @@ dwc_otg_host_channel_alloc(struct dwc_ot
 
/* check if channel is enabled */
temp = DWC_OTG_READ_4(sc, DOTG_HCCHAR(x));
-   if (temp & HCCHAR_CHENA)
+   if (temp & HCCHAR_CHENA) {
+   DPRINTF("CH=%d is BUSY\n", x);
continue;
+   }
 
sc->sc_hcchar[x] = td->hcchar;
 
-   DPRINTF("HCCHAR=0x%08x HCSPLT=0x%08x\n",
-   td->hcchar, td->hcsplt);
+   DPRINTF("HCCHAR=0x%08x(0x%08x) HCSPLT=0x%08x\n",
+   td->hcchar, temp, td->hcsplt);
 
temp = DWC_OTG_READ_4(sc, DOTG_HCINT(x));
DWC_OTG_WRITE_4(sc, DOTG_HCINT(x), temp);
@@ -502,6 +504,11 @@ dwc_otg_host_channel_alloc(struct dwc_ot
DWC_OTG_WRITE_4(sc, DOTG_HCTSIZ(x), 0);
DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(x), 0);
 
+   /* reset TX FIFO */
+   DWC_OTG_WRITE_4(sc, DOTG_GRSTCTL,
+   GRSTCTL_TXFIFO(x) |
+   GRSTCTL_TXFFLSH);
+
/* set channel */
td->channel = x;
 
@@ -534,7 +541,8 @@ dwc_otg_host_setup_tx(struct dwc_otg_td 
DPRINTF("HPTXSTS=0x%08x\n", temp);
 
max_buffer = 4 * (temp & HPTXSTS_PTXFSPCAVAIL_MASK);
-   max_frames = (temp & HPTXSTS_PTXQSPCAVAIL_MASK) >> 
HPTXSTS_PTXQSPCAVAIL_SHIFT;
+   max_frames = (temp & HPTXSTS_PTXQSPCAVAIL_MASK)
+   >> HPTXSTS_PTXQSPCAVAIL_SHIFT;
 
max_buffer = max_buffer - (max_buffer % td->max_packet_size);
if (max_buffer == 0 || max_frames == 0)
@@ -563,11 +571,9 @@ dwc_otg_host_setup_tx(struct dwc_otg_td 
 
/* enable interrupts */
DWC_OTG_WRITE_4(sc, DOTG_HCINTMSK(td->channel),
-   HCINT_STALL | HCINT_DATATGLERR | HCINT_BBLERR |
-   HCINT_AHBERR | HCINT_CHHLTD | HCINT_XFERCOMPL);
-
-   sc->sc_haint_mask |= (1 << td->channel);
-   DWC_OTG_WRITE_4(sc, DOTG_HAINTMSK, sc->sc_haint_mask);
+   HCINT_STALL | HCINT_BBLERR |
+   HCINT_AHBERR | HCINT_CHHLTD | HCINT_XACTERR |
+   HCINT_XFERCOMPL);
 
/* transfer data into FIFO */
bus_space_write_region_4(sc->sc_io_tag, sc->sc_io_hdl,
@@ -744,8 +750,8 @@ dwc_otg_host_data_rx(struct dwc_otg_td *
return (0); /* complete */
}
 
-   if (temp & (HCINT_DATATGLERR | HCINT_BBLERR |
-   HCINT_AHBERR | HCINT_CHHLTD)) {
+   if (temp & (HCINT_BBLERR |
+   HCINT_AHBERR | HCINT_CHHLTD | HCINT_XACTERR)) {
td->error_any = 1;
return (0); /* complete */
}
@@ -871,11 +877,9 @@ not_complete:
 
/* enable interrupts */
DWC_OTG_WRITE_4(sc, DOTG_HCINTMSK(td->channel),
-   HCINT_STALL | HCINT_DATATGLERR | HCINT_BBLERR |
-   HCINT_AHBERR | HCINT_CHHLTD | HCINT_XFERCOMPL);
-
-   sc->sc_haint_mask |= (1 << td->channel);
-   DWC_OTG_WRITE_4(sc, DOTG_HAINTMSK, sc->sc_haint_mask);
+   HCINT_STALL | HCINT_BBLERR |
+   HCINT_AHBERR | HCINT_CHHLTD | HCINT_XACTERR |
+   HCINT_XFERCOMPL);
 
temp |= HCCHAR_EPDIR_IN;
 
@@ -1029,8 +1033,8 @@ dwc_otg_host_data_tx(struct dwc_otg_td *
return (0); /* complete */
}
 
-   if (temp & (HCINT_DATATGLERR | HCINT_BBLERR |
-   HCINT_AHBERR | HCINT_CHHLTD)) {
+   if (temp & (HCINT_BBLERR |
+   HCINT_AHBERR | HCINT_CHHLTD | HCINT_XACTERR)) {
td->error_any = 1;
return (0); /* complete */
}
@@ -1067,7 +1071,8 @@ dwc_otg_host_data_tx(struct dwc_otg_td *
temp = DWC_OTG_READ_4(sc, DOTG_HPTXSTS);
 
max_buffer = 4 * (temp & HPTXSTS_PTXFSPCAVAIL_MASK);
-   max_frames = (temp & HPTXSTS_PTXQSPCAVAIL_MASK) >> 
HPTXSTS_PTXQSPCAVAIL_SHIFT;
+   max_frames = (temp & HPTXSTS_PTXQSPCAVAIL_MASK)
+   >> HPTXSTS_PTXQSPCAVAIL_SHIFT;
 
max_buffer = max_buffer - (max_buffer % td->max_packet_size);
if (max_buffer == 0 || max_frames < 2)
@@ -1120,11 +1125,9 @@ dwc_otg_host_data_tx(struct dwc_otg_td *
 
/* enable interrupts */
DWC_OTG_WRITE_4(sc, DOTG_HCINTMSK(td->chann

svn commit: r240303 - in head/sys/cddl: compat/opensolaris/kern compat/opensolaris/sys contrib/opensolaris/uts/common/sys

2012-09-10 Thread Martin Matuska
Author: mm
Date: Mon Sep 10 10:24:57 2012
New Revision: 240303
URL: http://svn.freebsd.org/changeset/base/240303

Log:
  Add assfail() and assfail3() to the opensolaris module.
  Remove obsoleted intermediate cddl/compat/opensolaris/sys/debug.h.
  
  MFC after:2 weeks

Added:
  head/sys/cddl/compat/opensolaris/sys/assfail.h   (contents, props changed)
Deleted:
  head/sys/cddl/compat/opensolaris/sys/debug.h
Modified:
  head/sys/cddl/compat/opensolaris/kern/opensolaris_cmn_err.c
  head/sys/cddl/contrib/opensolaris/uts/common/sys/debug.h

Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_cmn_err.c
==
--- head/sys/cddl/compat/opensolaris/kern/opensolaris_cmn_err.c Mon Sep 10 
08:23:56 2012(r240302)
+++ head/sys/cddl/compat/opensolaris/kern/opensolaris_cmn_err.c Mon Sep 10 
10:24:57 2012(r240303)
@@ -19,9 +19,13 @@
  * CDDL HEADER END
  *
  * $FreeBSD$
- *
+ */
+/*
+ * Copyright 2007 John Birrell . All rights reserved.
+ * Copyright 2012 Martin Matuska . All rights reserved.
  */
 
+#include 
 #include 
 
 void
@@ -68,3 +72,19 @@ cmn_err(int type, const char *fmt, ...)
vcmn_err(type, fmt, ap);
va_end(ap);
 }
+
+int
+assfail(const char *a, const char *f, int l) {
+
+   panic("solaris assert: %s, file: %s, line: %d", a, f, l);
+
+   return (0);
+}
+
+void
+assfail3(const char *a, uintmax_t lv, const char *op, uintmax_t rv,
+const char *f, int l) {
+
+   panic("solaris assert: %s (0x%jx %s 0x%jx), file: %s, line: %d",
+   a, lv, op, rv, f, l);
+}

Added: head/sys/cddl/compat/opensolaris/sys/assfail.h
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/cddl/compat/opensolaris/sys/assfail.h  Mon Sep 10 10:24:57 
2012(r240303)
@@ -0,0 +1,46 @@
+/*-
+ * Copyright (c) 2012 Martin Matuska 
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS 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 AUTHORS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _OPENSOLARIS_SYS_ASSFAIL_H_
+#define_OPENSOLARIS_SYS_ASSFAIL_H_
+
+#include 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int assfail(const char *, const char *, int);
+void assfail3(const char *, uintmax_t, const char *, uintmax_t, const char *,
+int);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _OPENSOLARIS_SYS_ASSFAIL_H_ */

Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/debug.h
==
--- head/sys/cddl/contrib/opensolaris/uts/common/sys/debug.hMon Sep 10 
08:23:56 2012(r240302)
+++ head/sys/cddl/contrib/opensolaris/uts/common/sys/debug.hMon Sep 10 
10:24:57 2012(r240303)
@@ -21,6 +21,7 @@
 /*
  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
+ * Copyright 2012 Martin Matuska . All rights reserved.
  */
 
 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
@@ -31,6 +32,9 @@
 
 #include 
 #include 
+#ifdef _KERNEL
+#include 
+#endif
 
 #ifdef __cplusplus
 extern "C" {
___
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: r240304 - head/usr.bin/chat

2012-09-10 Thread Joel Dahl
Author: joel (doc committer)
Date: Mon Sep 10 11:08:08 2012
New Revision: 240304
URL: http://svn.freebsd.org/changeset/base/240304

Log:
  mdocify the chat(8) manual page.
  
  Reviewed by:  brueffer

Modified:
  head/usr.bin/chat/chat.8

Modified: head/usr.bin/chat/chat.8
==
--- head/usr.bin/chat/chat.8Mon Sep 10 10:24:57 2012(r240303)
+++ head/usr.bin/chat/chat.8Mon Sep 10 11:08:08 2012(r240304)
@@ -1,41 +1,81 @@
-.\" -*- nroff -*-
-.\" manual page [] for chat 1.8
 .\" $FreeBSD$
-.\" SH section heading
-.\" SS subsection heading
-.\" LP paragraph
-.\" IP indented paragraph
-.\" TP hanging label
-.TH CHAT 8 "27 Sep 1997" "Chat Version 1.17"
-.SH NAME
-chat \- Automated conversational script with a modem
-.SH SYNOPSIS
-.B chat
-[
-.I options
-]
-.I script
-.SH DESCRIPTION
-.LP
-The \fIchat\fR program defines a conversational exchange between the
+.Dd September 10, 2012
+.Dt CHAT 8
+.Os
+.Sh NAME
+.Nm chat
+.Nd Automated conversational script with a modem
+.Sh SYNOPSIS
+.Nm
+.Op Fl eSsVv
+.Op Fl f Ar chat-file
+.Op Fl r Ar report-file
+.Op Fl T Ar phone-number
+.Op Fl t Ar timeout
+.Op Fl U Ar phone-number2
+.Op Ar script
+.Sh DESCRIPTION
+The
+.Nm
+program defines a conversational exchange between the
 computer and the modem.
 Its primary purpose is to establish the
-connection between the Point-to-Point Protocol Daemon (\fIpppd\fR) and
-the remote's \fIpppd\fR process.
-.SH OPTIONS
-.TP
-.B -f \fI
-Read the chat script from the chat \fIfile\fR.
+connection between the Point-to-Point Protocol Daemon
+.Pq pppd
+and the remote's pppd process.
+.Sh OPTIONS
+.Bl -tag -width indent
+.It Fl e
+Start with the echo option turned on.
+Echoing may also be turned on
+or off at specific points in the chat script by using the ECHO
+keyword.
+When echoing is enabled, all output from the modem is echoed
+to
+.Em stderr .
+.It Fl f Ar chat-file
+Read the chat script from the chat file.
 The use of this option
 is mutually exclusive with the chat script parameters.
 The user must
 have read access to the file.
-Multiple lines are permitted in the
-file.
+Multiple lines are permitted in the file.
 Space or horizontal tab characters should be used to separate
 the strings.
-.TP
-.B -t \fI
+.It Fl r Ar report-file
+Set the file for output of the report strings.
+If you use the keyword
+.Dv REPORT ,
+the resulting strings are written to this file.
+If this
+option is not used and you still use
+.Dv REPORT
+keywords, the
+.Pa stderr
+file is used for the report strings.
+.It Fl S
+Do not use
+.Xr syslog 3 .
+By default, error messages are sent to
+.Xr syslog 3 .
+The use of
+.Fl S
+will prevent both log messages from
+.Fl v
+and error messages from being sent to
+.Xr syslog 3 .
+.It Fl s
+Use
+.Em stderr .
+All log messages from
+.Fl v
+and all error messages will be
+sent to
+.Em stderr .
+.It Fl T Ar phone-number
+Pass in an arbitrary string, usually a phone number, that will be
+substituted for the \\T substitution metacharacter in a send string.
+.It Fl t Ar timeout
 Set the timeout for the expected string to be received.
 If the string
 is not received within the time limit then the reply string is not
@@ -43,96 +83,81 @@ sent.
 An alternate reply may be sent or the script will fail if there
 is no alternate reply string.
 A failed script will cause the
-\fIchat\fR program to terminate with a non-zero error code.
-.TP
-.B -r \fI
-Set the file for output of the report strings.
-If you use the keyword
-\fIREPORT\fR, the resulting strings are written to this file.
-If this
-option is not used and you still use \fIREPORT\fR keywords, the
-\fIstderr\fR file is used for the report strings.
-.TP
-.B -e
-Start with the echo option turned on.
-Echoing may also be turned on
-or off at specific points in the chat script by using the \fIECHO\fR
-keyword.
-When echoing is enabled, all output from the modem is echoed
-to \fIstderr\fR.
-.TP
-.B -v
-Request that the \fIchat\fR script be executed in a verbose mode.
+.Nm
+program to terminate with a non-zero error code.
+.It Fl U Ar phone-number2
+Pass in a second string, usually a phone number, that will be
+substituted for the \\U substitution metacharacter in a send string.
+This is useful when dialing an ISDN terminal adapter that requires two
+numbers.
+.It Fl V
+Request that the
+.Nm
+script be executed in a
+.Em stderr
+verbose mode.
 The
-\fIchat\fR program will then log the execution state of the chat
-script as well as all text received from the modem and the output
-strings sent to the modem.  The default is to log through
-.IR syslog (3);
-the logging method may be altered with the -S and -s flags.
-Logging is
-done to the \fIlocal2\fR facility at level \fIinfo\fR for verbose tracing
-and level \fIerr\fR for some errors.
-.TP
-.B -V
-Request that the \fIchat\fR script be executed in a stderr verbose
-mode.
-The \fIchat\fR program will then log all text received from the
+.Nm
+prog

svn commit: r240305 - in stable/9/sys: net netinet netinet6

2012-09-10 Thread Gleb Smirnoff
Author: glebius
Date: Mon Sep 10 11:38:02 2012
New Revision: 240305
URL: http://svn.freebsd.org/changeset/base/240305

Log:
  Merge r238002, r238016, r238092 from head:
  
  r238002 by tuexen@:
Remove dead code (on FreeBSD) as suggested by glebius@.
  
  r238016:
Remove route caching from IP multicast routing code. There is no
reason to do that, and also, cached route never got unreferenced,
which meant a reference leak.
  
Reviewed by:  bms
  
  r238092:
When ip_output()/ip6_output() is supplied a struct route *ro argument,
it skips FLOWTABLE lookup. However, the non-NULL ro has dual meaning
here: it may be supplied to provide route, and it may be supplied to
store and return to caller the route that ip_output()/ip6_output()
finds. In the latter case skipping FLOWTABLE lookup is pessimisation.
  
The difference between struct route filled by FLOWTABLE and filled
by rtalloc() family is that the former doesn't hold a reference on
its rtentry. Reference is hold by flow entry, and it is about to
be released in future. Thus, route filled by FLOWTABLE shouldn't
be passed to RTFREE() macro.
  
- Introduce new flag for struct route/route_in6, that marks route
  not holding a reference on rtentry.
- Introduce new macro RO_RTFREE() that cleans up a struct route
  depending on its kind.
- All callers to ip_output()/ip6_output() that do supply non-NULL
  but empty route should use RO_RTFREE() to free results of
  lookup.
- ip_output()/ip6_output() now do FLOWTABLE lookup always when
  ro->ro_rt == NULL.

Modified:
  stable/9/sys/net/flowtable.c
  stable/9/sys/net/route.h
  stable/9/sys/netinet/ip_input.c
  stable/9/sys/netinet/ip_mroute.c
  stable/9/sys/netinet/ip_mroute.h
  stable/9/sys/netinet/ip_output.c
  stable/9/sys/netinet/sctp_output.c
  stable/9/sys/netinet6/ip6_mroute.c
  stable/9/sys/netinet6/ip6_mroute.h
  stable/9/sys/netinet6/ip6_output.c
  stable/9/sys/netinet6/nd6_nbr.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/net/flowtable.c
==
--- stable/9/sys/net/flowtable.cMon Sep 10 11:08:08 2012
(r240304)
+++ stable/9/sys/net/flowtable.cMon Sep 10 11:38:02 2012
(r240305)
@@ -618,6 +618,7 @@ flow_to_route(struct flentry *fle, struc
sin->sin_addr.s_addr = hashkey[2];
ro->ro_rt = __DEVOLATILE(struct rtentry *, fle->f_rt);
ro->ro_lle = __DEVOLATILE(struct llentry *, fle->f_lle);
+   ro->ro_flags |= RT_NORTREF;
 }
 #endif /* INET */
 
@@ -825,7 +826,7 @@ flow_to_route_in6(struct flentry *fle, s
memcpy(&sin6->sin6_addr, &hashkey[5], sizeof (struct in6_addr));
ro->ro_rt = __DEVOLATILE(struct rtentry *, fle->f_rt);
ro->ro_lle = __DEVOLATILE(struct llentry *, fle->f_lle);
-
+   ro->ro_flags |= RT_NORTREF;
 }
 #endif /* INET6 */
 

Modified: stable/9/sys/net/route.h
==
--- stable/9/sys/net/route.hMon Sep 10 11:08:08 2012(r240304)
+++ stable/9/sys/net/route.hMon Sep 10 11:38:02 2012(r240305)
@@ -54,7 +54,8 @@ struct route {
struct  sockaddr ro_dst;
 };
 
-#define RT_CACHING_CONTEXT 0x1
+#defineRT_CACHING_CONTEXT  0x1 /* XXX: not used anywhere */
+#defineRT_NORTREF  0x2 /* doesn't hold reference on 
ro_rt */
 
 /*
  * These numbers are used by reliable protocols for determining
@@ -341,6 +342,18 @@ struct rt_addrinfo {
RTFREE_LOCKED(_rt); \
 } while (0)
 
+#defineRO_RTFREE(_ro) do { \
+   if ((_ro)->ro_rt) { \
+   if ((_ro)->ro_flags & RT_NORTREF) { \
+   (_ro)->ro_flags &= ~RT_NORTREF; \
+   (_ro)->ro_rt = NULL;\
+   } else {\
+   RT_LOCK((_ro)->ro_rt);  \
+   RTFREE_LOCKED((_ro)->ro_rt);\
+   }   \
+   }   \
+} while (0)
+
 struct radix_node_head *rt_tables_get_rnh(int, int);
 
 struct ifmultiaddr;

Modified: stable/9/sys/netinet/ip_input.c
==
--- stable/9/sys/netinet/ip_input.c Mon Sep 10 11:08:08 2012
(r240304)
+++ stable/9/sys/netinet/ip_input.c Mon Sep 10 11:38:02 2012
(r240305)
@@ -1495,8 +1495,7 @@ ip_forward(struct mbuf *m, int srcrt)
 
if (error == EMSGSIZE && ro.ro_rt)
mtu = ro.ro_rt->rt_rmx.rmx_mtu;
-   if (ro.ro_rt)
-   RTFREE(ro.ro_rt);
+   RO_RTFREE(&ro);
 
if (error)
  

svn commit: r240306 - stable/9/share/man/man9

2012-09-10 Thread Gleb Smirnoff
Author: glebius
Date: Mon Sep 10 11:38:55 2012
New Revision: 240306
URL: http://svn.freebsd.org/changeset/base/240306

Log:
  Merge r238093:
Document RO_RTFREE() macro.

Modified:
  stable/9/share/man/man9/rtalloc.9
Directory Properties:
  stable/9/share/man/man9/   (props changed)

Modified: stable/9/share/man/man9/rtalloc.9
==
--- stable/9/share/man/man9/rtalloc.9   Mon Sep 10 11:38:02 2012
(r240305)
+++ stable/9/share/man/man9/rtalloc.9   Mon Sep 10 11:38:55 2012
(r240306)
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 14, 2011
+.Dd July 4, 2012
 .Dt RTALLOC 9
 .Os
 .Sh NAME
@@ -52,6 +52,7 @@
 .Fn RT_UNLOCK "struct rt_entry *rt"
 .Fn RT_ADDREF "struct rt_entry *rt"
 .Fn RT_REMREF "struct rt_entry *rt"
+.Fn RO_RTFREE "struct route *ro"
 .Ft void
 .Fn rtfree "struct rt_entry *rt"
 .Ft "struct rtentry *"
@@ -203,6 +204,14 @@ Its usage is contrary to
 .Fn RT_ADDREF .
 .Pp
 The
+.Fn RO_RTFREE
+macro is used to free route entry that is referenced by struct route.
+At certain circumstances the latter may not hold a reference on rtentry,
+and
+.Fn RO_RTFREE
+treats such routes correctly.
+.Pp
+The
 .Fn rtfree
 function does the actual free of the routing table entry, and shouldn't
 be called directly by facilities, that just perform routing table lookups.
___
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: r240307 - stable/9/sys/netinet

2012-09-10 Thread Gleb Smirnoff
Author: glebius
Date: Mon Sep 10 11:43:28 2012
New Revision: 240307
URL: http://svn.freebsd.org/changeset/base/240307

Log:
  Merge r238516 from head:
If ip_output() returns EMSGSIZE to tcp_output(), then the latter calls
tcp_mtudisc(), which in its turn may call tcp_output(). Under certain
conditions (must admit they are very special) an infinite recursion can
happen.
  
To avoid recursion we can pass struct route to ip_output() and obtain
correct mtu. This allows us not to use tcp_mtudisc() but call 
tcp_mss_update()
directly.
  
PR: kern/155585
Submitted by:   zont

Modified:
  stable/9/sys/netinet/tcp_output.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/netinet/tcp_output.c
==
--- stable/9/sys/netinet/tcp_output.c   Mon Sep 10 11:38:55 2012
(r240306)
+++ stable/9/sys/netinet/tcp_output.c   Mon Sep 10 11:43:28 2012
(r240307)
@@ -182,7 +182,7 @@ tcp_output(struct tcpcb *tp)
int idle, sendalot;
int sack_rxmit, sack_bytes_rxmt;
struct sackhole *p;
-   int tso;
+   int tso, mtu;
struct tcpopt to;
 #if 0
int maxburst = TCP_MAXBURST;
@@ -223,6 +223,7 @@ again:
tcp_sack_adjust(tp);
sendalot = 0;
tso = 0;
+   mtu = 0;
off = tp->snd_nxt - tp->snd_una;
sendwin = min(tp->snd_wnd, tp->snd_cwnd);
 
@@ -1206,6 +1207,9 @@ timer:
 */
 #ifdef INET6
if (isipv6) {
+   struct route_in6 ro;
+
+   bzero(&ro, sizeof(ro));
/*
 * we separately set hoplimit for every segment, since the
 * user might want to change the value via setsockopt.
@@ -1215,10 +1219,13 @@ timer:
ip6->ip6_hlim = in6_selecthlim(tp->t_inpcb, NULL);
 
/* TODO: IPv6 IP6TOS_ECT bit on */
-   error = ip6_output(m,
-   tp->t_inpcb->in6p_outputopts, NULL,
-   ((so->so_options & SO_DONTROUTE) ?
-   IP_ROUTETOIF : 0), NULL, NULL, tp->t_inpcb);
+   error = ip6_output(m, tp->t_inpcb->in6p_outputopts, &ro,
+   ((so->so_options & SO_DONTROUTE) ?  IP_ROUTETOIF : 0),
+   NULL, NULL, tp->t_inpcb);
+
+   if (error == EMSGSIZE && ro.ro_rt != NULL)
+   mtu = ro.ro_rt->rt_rmx.rmx_mtu;
+   RO_RTFREE(&ro);
}
 #endif /* INET6 */
 #if defined(INET) && defined(INET6)
@@ -1226,6 +1233,9 @@ timer:
 #endif
 #ifdef INET
 {
+   struct route ro;
+
+   bzero(&ro, sizeof(ro));
ip->ip_len = m->m_pkthdr.len;
 #ifdef INET6
if (tp->t_inpcb->inp_vflag & INP_IPV6PROTO)
@@ -1242,9 +1252,13 @@ timer:
if (V_path_mtu_discovery && tp->t_maxopd > V_tcp_minmss)
ip->ip_off |= IP_DF;
 
-   error = ip_output(m, tp->t_inpcb->inp_options, NULL,
+   error = ip_output(m, tp->t_inpcb->inp_options, &ro,
((so->so_options & SO_DONTROUTE) ? IP_ROUTETOIF : 0), 0,
tp->t_inpcb);
+
+   if (error == EMSGSIZE && ro.ro_rt != NULL)
+   mtu = ro.ro_rt->rt_rmx.rmx_mtu;
+   RO_RTFREE(&ro);
 }
 #endif /* INET */
if (error) {
@@ -1291,21 +1305,18 @@ out:
 * For some reason the interface we used initially
 * to send segments changed to another or lowered
 * its MTU.
-*
-* tcp_mtudisc() will find out the new MTU and as
-* its last action, initiate retransmission, so it
-* is important to not do so here.
-*
 * If TSO was active we either got an interface
 * without TSO capabilits or TSO was turned off.
-* Disable it for this connection as too and
-* immediatly retry with MSS sized segments generated
-* by this function.
+* If we obtained mtu from ip_output() then update
+* it and try again.
 */
if (tso)
tp->t_flags &= ~TF_TSO;
-   tcp_mtudisc(tp->t_inpcb, -1);
-   return (0);
+   if (mtu != 0) {
+   tcp_mss_update(tp, -1, mtu, NULL, NULL);
+   goto again;
+   }
+   return (error);
case EHOSTDOWN:
case EHOSTUNREACH:
case ENETDOWN:
___
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-unsubsc

svn commit: r240308 - stable/9/libexec/rtld-elf

2012-09-10 Thread Konstantin Belousov
Author: kib
Date: Mon Sep 10 11:50:42 2012
New Revision: 240308
URL: http://svn.freebsd.org/changeset/base/240308

Log:
  MFC r238471:
  Implement DT_RUNPATH and -z nodefaultlib.
  
  MFC note: The ld_library_path_rpath default value was flipped to true,
  effectively reverting rtld back to the pre-patch behaviour, unless
  LD_LIBRARY_PATH_RPATH environment variable is set and its value is 0/N/n.

Modified:
  stable/9/libexec/rtld-elf/rtld.1
  stable/9/libexec/rtld-elf/rtld.c
  stable/9/libexec/rtld-elf/rtld.h
Directory Properties:
  stable/9/libexec/rtld-elf/   (props changed)

Modified: stable/9/libexec/rtld-elf/rtld.1
==
--- stable/9/libexec/rtld-elf/rtld.1Mon Sep 10 11:43:28 2012
(r240307)
+++ stable/9/libexec/rtld-elf/rtld.1Mon Sep 10 11:50:42 2012
(r240308)
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 1, 2009
+.Dd June 28, 2012
 .Dt RTLD 1
 .Os
 .Sh NAME
@@ -86,14 +86,39 @@ dynamic linker.
 After the dynamic linker has finished loading,
 relocating, and initializing the program and its required shared
 objects, it transfers control to the entry point of the program.
+The following search order is used to locate required shared objects:
 .Pp
-To locate the required shared objects in the file system,
-.Nm
-may use a
-.Dq hints
-file prepared by the
+.Bl -enum -offset indent -compact
+.It
+.Dv DT_RPATH
+of the referencing object unless that object also contains a
+.Dv DT_RUNPATH
+tag
+.It
+.Dv DT_RPATH
+of the program unless the referencing object contains a
+.Dv DT_RUNPATH
+tag
+.It
+Path indicated by
+.Ev LD_LIBRARY_PATH
+environment variable
+.It
+.Dv DT_RUNPATH
+of the referencing object
+.It
+Hints file produced by the
 .Xr ldconfig 8
-utility.
+utility
+.It
+The
+.Pa /lib
+and
+.Pa /usr/lib
+directories, unless the referencing object was linked using the
+.Dq Fl z Ar nodefaultlib
+option
+.El
 .Pp
 The
 .Nm
@@ -143,6 +168,20 @@ This variable is unset for set-user-ID a
 A colon separated list of directories, overriding the default search path
 for shared libraries.
 This variable is unset for set-user-ID and set-group-ID programs.
+.It Ev LD_LIBRARY_PATH_RPATH
+If the variable is specified and has a value starting with
+any of \'y\', \'Y\' or \'1\' symbols, the path specified by
+.Ev LD_LIBRARY_PATH
+variable is allowed to override the path from
+.Dv DT_RPATH
+for binaries which does not contain
+.Dv DT_RUNPATH
+tag.
+For such binaries, when the variable
+.Ev LD_LIBRARY_PATH_RPATH
+is set,
+.Dq Fl z Ar nodefaultlib
+link-time option is ignored as well.
 .It Ev LD_PRELOAD
 A list of shared libraries, separated by colons and/or white space,
 to be linked in before any

Modified: stable/9/libexec/rtld-elf/rtld.c
==
--- stable/9/libexec/rtld-elf/rtld.cMon Sep 10 11:43:28 2012
(r240307)
+++ stable/9/libexec/rtld-elf/rtld.cMon Sep 10 11:50:42 2012
(r240308)
@@ -80,8 +80,9 @@ typedef void * (*path_enum_proc) (const 
 static const char *basename(const char *);
 static void die(void) __dead2;
 static void digest_dynamic1(Obj_Entry *, int, const Elf_Dyn **,
-const Elf_Dyn **);
-static void digest_dynamic2(Obj_Entry *, const Elf_Dyn *, const Elf_Dyn *);
+const Elf_Dyn **, const Elf_Dyn **);
+static void digest_dynamic2(Obj_Entry *, const Elf_Dyn *, const Elf_Dyn *,
+const Elf_Dyn *);
 static void digest_dynamic(Obj_Entry *, int);
 static Obj_Entry *digest_phdr(const Elf_Phdr *, int, caddr_t, const char *);
 static Obj_Entry *dlcheck(void *);
@@ -94,7 +95,7 @@ static void errmsg_restore(char *);
 static char *errmsg_save(void);
 static void *fill_search_info(const char *, size_t, void *);
 static char *find_library(const char *, const Obj_Entry *);
-static const char *gethints(void);
+static const char *gethints(bool);
 static void init_dag(Obj_Entry *);
 static void init_rtld(caddr_t, Elf_Auxinfo **);
 static void initlist_add_neededs(Needed_Entry *, Objlist *);
@@ -233,6 +234,8 @@ size_t tls_static_space;/* Static TLS s
 int tls_dtv_generation = 1;/* Used to detect when dtv size changes  */
 int tls_max_index = 1; /* Largest module index allocated */
 
+bool ld_library_path_rpath = true;
+
 /*
  * Fill in a DoneList with an allocation large enough to hold all of
  * the currently-loaded objects.  Keep this as a macro since it calls
@@ -323,6 +326,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_
 Obj_Entry **preload_tail;
 Objlist initlist;
 RtldLockState lockstate;
+char *library_path_rpath;
 int mib[2];
 size_t len;
 
@@ -394,7 +398,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_
 if (unsetenv(LD_ "PRELOAD") || unsetenv(LD_ "LIBMAP") ||
unsetenv(LD_ "LIBRARY_PATH") || unsetenv(LD_ "LIBMAP_DISABLE") ||
unsetenv(LD_ "DEBUG") || unsetenv(LD_ "ELF_HINTS_PATH") ||
-   unsetenv(LD_ "LOADFLTR")) {
+   unsetenv(LD_ "

svn commit: r240309 - in stable/9/sys: net netinet netinet6

2012-09-10 Thread Gleb Smirnoff
Author: glebius
Date: Mon Sep 10 12:02:58 2012
New Revision: 240309
URL: http://svn.freebsd.org/changeset/base/240309

Log:
  Merge r232054 by kmacy:
When using flowtable llentrys can outlive the interface with
which they're associated at which the lle_tbl pointer points
to freed memory and the llt_free pointer is no longer valid.
  
Move the free pointer in to the llentry itself and update the
initalization sites.

Modified:
  stable/9/sys/net/if_llatbl.h
  stable/9/sys/netinet/in.c
  stable/9/sys/netinet6/in6.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/net/if_llatbl.h
==
--- stable/9/sys/net/if_llatbl.hMon Sep 10 11:50:42 2012
(r240308)
+++ stable/9/sys/net/if_llatbl.hMon Sep 10 12:02:58 2012
(r240309)
@@ -106,7 +106,6 @@ struct llentry {
("negative refcnt %d", (lle)->lle_refcnt)); \
(lle)->lle_refcnt++;\
 } while (0)
-
 #defineLLE_REMREF(lle) do {\
LLE_WLOCK_ASSERT(lle);  \
KASSERT((lle)->lle_refcnt > 1,  \
@@ -116,7 +115,7 @@ struct llentry {
 
 #defineLLE_FREE_LOCKED(lle) do {   \
if ((lle)->lle_refcnt <= 1) \
-   (lle)->lle_tbl->llt_free((lle)->lle_tbl, (lle));\
+   (lle)->lle_free((lle)->lle_tbl, (lle));\
else {  \
(lle)->lle_refcnt--;\
LLE_WUNLOCK(lle);   \
@@ -152,7 +151,6 @@ struct lltable {
int llt_af;
struct ifnet*llt_ifp;
 
-   void(*llt_free)(struct lltable *, struct llentry *);
void(*llt_prefix_free)(struct lltable *,
const struct sockaddr *prefix,
const struct sockaddr *mask,

Modified: stable/9/sys/netinet/in.c
==
--- stable/9/sys/netinet/in.c   Mon Sep 10 11:50:42 2012(r240308)
+++ stable/9/sys/netinet/in.c   Mon Sep 10 12:02:58 2012(r240309)
@@ -1323,6 +1323,20 @@ struct in_llentry {
struct sockaddr_in  l3_addr4;
 };
 
+/*
+ * Deletes an address from the address table.
+ * This function is called by the timer functions
+ * such as arptimer() and nd6_llinfo_timer(), and
+ * the caller does the locking.
+ */
+static void
+in_lltable_free(struct lltable *llt, struct llentry *lle)
+{
+   LLE_WUNLOCK(lle);
+   LLE_LOCK_DESTROY(lle);
+   free(lle, M_LLTABLE);
+}
+
 static struct llentry *
 in_lltable_new(const struct sockaddr *l3addr, u_int flags)
 {
@@ -1340,25 +1354,11 @@ in_lltable_new(const struct sockaddr *l3
lle->base.la_expire = time_uptime; /* mark expired */
lle->l3_addr4 = *(const struct sockaddr_in *)l3addr;
lle->base.lle_refcnt = 1;
+   lle->base.lle_free = in_lltable_free;
LLE_LOCK_INIT(&lle->base);
return &lle->base;
 }
 
-/*
- * Deletes an address from the address table.
- * This function is called by the timer functions
- * such as arptimer() and nd6_llinfo_timer(), and
- * the caller does the locking.
- */
-static void
-in_lltable_free(struct lltable *llt, struct llentry *lle)
-{
-   LLE_WUNLOCK(lle);
-   LLE_LOCK_DESTROY(lle);
-   free(lle, M_LLTABLE);
-}
-
-
 #define IN_ARE_MASKED_ADDR_EQUAL(d, a, m)  (   \
(((ntohl((d)->sin_addr.s_addr) ^ (a)->sin_addr.s_addr) & 
(m)->sin_addr.s_addr)) == 0 )
 
@@ -1640,7 +1640,6 @@ in_domifattach(struct ifnet *ifp)
 
llt = lltable_init(ifp, AF_INET);
if (llt != NULL) {
-   llt->llt_free = in_lltable_free;
llt->llt_prefix_free = in_lltable_prefix_free;
llt->llt_lookup = in_lltable_lookup;
llt->llt_dump = in_lltable_dump;

Modified: stable/9/sys/netinet6/in6.c
==
--- stable/9/sys/netinet6/in6.c Mon Sep 10 11:50:42 2012(r240308)
+++ stable/9/sys/netinet6/in6.c Mon Sep 10 12:02:58 2012(r240309)
@@ -2421,6 +2421,20 @@ struct in6_llentry {
struct sockaddr_in6 l3_addr6;
 };
 
+/*
+ * Deletes an address from the address table.
+ * This function is called by the timer functions
+ * such as arptimer() and nd6_llinfo_timer(), and
+ * the caller does the locking.
+ */
+static void
+in6_lltable_free(struct lltable *llt, struct llentry *lle)
+{
+   LLE_WUNLOCK(lle);
+   LLE_LOCK_DESTROY(lle);
+   free(lle, M_LLTABLE);
+}
+
 static struct llentry *
 in6_lltable_new(const struct sockaddr *l3addr, u_int flags)
 {
@@ -243

svn commit: r240310 - in stable/9/sys: net netinet netinet6

2012-09-10 Thread Gleb Smirnoff
Author: glebius
Date: Mon Sep 10 12:09:19 2012
New Revision: 240310
URL: http://svn.freebsd.org/changeset/base/240310

Log:
  Merge 238945,238967:
Some style(9) and whitespace changes.

Modified:
  stable/9/sys/net/if_llatbl.c
  stable/9/sys/net/if_llatbl.h
  stable/9/sys/netinet/if_ether.c
  stable/9/sys/netinet/in.c
  stable/9/sys/netinet6/in6.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/net/if_llatbl.c
==
--- stable/9/sys/net/if_llatbl.cMon Sep 10 12:02:58 2012
(r240309)
+++ stable/9/sys/net/if_llatbl.cMon Sep 10 12:09:19 2012
(r240310)
@@ -121,8 +121,8 @@ llentry_free(struct llentry *lle)
pkts_dropped++;
}
 
-   KASSERT(lle->la_numheld == 0, 
-   ("%s: la_numheld %d > 0, pkts_droped %zd", __func__, 
+   KASSERT(lle->la_numheld == 0,
+   ("%s: la_numheld %d > 0, pkts_droped %zd", __func__,
 lle->la_numheld, pkts_dropped));
 
lle->la_flags &= ~LLE_VALID;
@@ -143,17 +143,17 @@ llentry_update(struct llentry **llep, st
 {
struct llentry *la;
 
-   IF_AFDATA_RLOCK(ifp);   
+   IF_AFDATA_RLOCK(ifp);
la = lla_lookup(lt, LLE_EXCLUSIVE,
(struct sockaddr *)dst);
IF_AFDATA_RUNLOCK(ifp);
-   if ((la == NULL) && 
+   if ((la == NULL) &&
(ifp->if_flags & (IFF_NOARP | IFF_STATICARP)) == 0) {
IF_AFDATA_WLOCK(ifp);
la = lla_lookup(lt,
(LLE_CREATE | LLE_EXCLUSIVE),
(struct sockaddr *)dst);
-   IF_AFDATA_WUNLOCK(ifp); 
+   IF_AFDATA_WUNLOCK(ifp);
}
if (la != NULL && (*llep != la)) {
if (*llep != NULL)
@@ -185,7 +185,7 @@ lltable_free(struct lltable *llt)
SLIST_REMOVE(&V_lltables, llt, lltable, llt_link);
LLTABLE_WUNLOCK();
 
-   for (i=0; i < LLTBL_HASHTBL_SIZE; i++) {
+   for (i = 0; i < LLTBL_HASHTBL_SIZE; i++) {
LIST_FOREACH_SAFE(lle, &llt->lle_head[i], lle_next, next) {
int canceled;
 
@@ -230,7 +230,7 @@ lltable_drain(int af)
 
 void
 lltable_prefix_free(int af, struct sockaddr *prefix, struct sockaddr *mask,
-   u_int flags)
+u_int flags)
 {
struct lltable *llt;
 
@@ -300,7 +300,7 @@ lla_rt_output(struct rt_msghdr *rtm, str
if (rtm->rtm_flags & RTF_ANNOUNCE) {
flags |= LLE_PUB;
 #ifdef INET
-   if (dst->sa_family == AF_INET && 
+   if (dst->sa_family == AF_INET &&
((struct sockaddr_inarp *)dst)->sin_other != 0) {
struct rtentry *rt;
((struct sockaddr_inarp *)dst)->sin_other = 0;
@@ -345,7 +345,7 @@ lla_rt_output(struct rt_msghdr *rtm, str
 
if (flags & LLE_CREATE)
flags |= LLE_EXCLUSIVE;
-   
+
IF_AFDATA_LOCK(ifp);
lle = lla_lookup(llt, flags, dst);
IF_AFDATA_UNLOCK(ifp);
@@ -381,7 +381,7 @@ lla_rt_output(struct rt_msghdr *rtm, str
 #ifdef INET
/*  gratuitous ARP */
if ((laflags & LLE_PUB) && dst->sa_family == AF_INET) {
-   arprequest(ifp, 
+   arprequest(ifp,
&((struct sockaddr_in *)dst)->sin_addr,
&((struct sockaddr_in *)dst)->sin_addr,
((laflags & LLE_PROXY) ?
@@ -454,7 +454,7 @@ llatbl_lle_show(struct llentry_sa *la)
 
sin = (struct sockaddr_in *)&la->l3_addr;
inet_ntoa_r(sin->sin_addr, l3s);
-   db_printf(" l3_addr=%s\n", l3s);
+   db_printf(" l3_addr=%s\n", l3s);
break;
}
 #endif
@@ -466,7 +466,7 @@ llatbl_lle_show(struct llentry_sa *la)
 
sin6 = (struct sockaddr_in6 *)&la->l3_addr;
ip6_sprintf(l3s, &sin6->sin6_addr);
-   db_printf(" l3_addr=%s\n", l3s);
+   db_printf(" l3_addr=%s\n", l3s);
break;
}
 #endif

Modified: stable/9/sys/net/if_llatbl.h
==
--- stable/9/sys/net/if_llatbl.hMon Sep 10 12:02:58 2012
(r240309)
+++ stable/9/sys/net/if_llatbl.hMon Sep 10 12:09:19 2012
(r240310)
@@ -61,17 +61,17 @@ struct llentry {
struct llentries *lle_head;
void(*lle_free)(struct lltable *, struct llentry *);
struct mbuf  *la_hold;
-   int  la_numheld;  /* # of packets currently held */
+   int  la_numheld;  /* # of packets currently held */
time_t   la_expire;
-   uint16_t  

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

2012-09-10 Thread Gleb Smirnoff
Author: glebius
Date: Mon Sep 10 12:11:11 2012
New Revision: 240311
URL: http://svn.freebsd.org/changeset/base/240311

Log:
  Merge r238989:
The llentry_update() is used only by flowtable and the latter
always passes NULL pointer to it. Thus, code can be simplified
and function renamed to llentry_alloc() to match rtalloc().

Modified:
  stable/9/sys/net/flowtable.c
  stable/9/sys/net/if_llatbl.c
  stable/9/sys/net/if_llatbl.h
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/net/flowtable.c
==
--- stable/9/sys/net/flowtable.cMon Sep 10 12:09:19 2012
(r240310)
+++ stable/9/sys/net/flowtable.cMon Sep 10 12:11:11 2012
(r240311)
@@ -1257,7 +1257,7 @@ uncached:

else
l3addr = (struct sockaddr_storage *)&ro->ro_dst;
-   llentry_update(&lle, LLTABLE6(ifp), l3addr, ifp);
+   lle = llentry_alloc(ifp, LLTABLE6(ifp), l3addr);
}
 #endif 
 #ifdef INET
@@ -1266,7 +1266,7 @@ uncached:
l3addr = (struct sockaddr_storage 
*)rt->rt_gateway;
else
l3addr = (struct sockaddr_storage *)&ro->ro_dst;
-   llentry_update(&lle, LLTABLE(ifp), l3addr, ifp);
+   lle = llentry_alloc(ifp, LLTABLE(ifp), l3addr); 
}

 #endif

Modified: stable/9/sys/net/if_llatbl.c
==
--- stable/9/sys/net/if_llatbl.cMon Sep 10 12:09:19 2012
(r240310)
+++ stable/9/sys/net/if_llatbl.cMon Sep 10 12:11:11 2012
(r240311)
@@ -132,42 +132,33 @@ llentry_free(struct llentry *lle)
 }
 
 /*
- * Update an llentry for address dst (equivalent to rtalloc for new-arp)
- * Caller must pass in a valid struct llentry * (or NULL)
+ * (al)locate an llentry for address dst (equivalent to rtalloc for new-arp).
  *
- * if found the llentry * is returned referenced and unlocked
+ * If found the llentry * is returned referenced and unlocked.
  */
-int
-llentry_update(struct llentry **llep, struct lltable *lt,
-struct sockaddr_storage *dst, struct ifnet *ifp)
+struct llentry *
+llentry_alloc(struct ifnet *ifp, struct lltable *lt,
+struct sockaddr_storage *dst)
 {
struct llentry *la;
 
IF_AFDATA_RLOCK(ifp);
-   la = lla_lookup(lt, LLE_EXCLUSIVE,
-   (struct sockaddr *)dst);
+   la = lla_lookup(lt, LLE_EXCLUSIVE, (struct sockaddr *)dst);
IF_AFDATA_RUNLOCK(ifp);
if ((la == NULL) &&
(ifp->if_flags & (IFF_NOARP | IFF_STATICARP)) == 0) {
IF_AFDATA_WLOCK(ifp);
-   la = lla_lookup(lt,
-   (LLE_CREATE | LLE_EXCLUSIVE),
+   la = lla_lookup(lt, (LLE_CREATE | LLE_EXCLUSIVE),
(struct sockaddr *)dst);
IF_AFDATA_WUNLOCK(ifp);
}
-   if (la != NULL && (*llep != la)) {
-   if (*llep != NULL)
-   LLE_FREE(*llep);
+
+   if (la != NULL) {
LLE_ADDREF(la);
LLE_WUNLOCK(la);
-   *llep = la;
-   } else if (la != NULL)
-   LLE_WUNLOCK(la);
-
-   if (la == NULL)
-   return (ENOENT);
+   }
 
-   return (0);
+   return (la);
 }
 
 /*

Modified: stable/9/sys/net/if_llatbl.h
==
--- stable/9/sys/net/if_llatbl.hMon Sep 10 12:09:19 2012
(r240310)
+++ stable/9/sys/net/if_llatbl.hMon Sep 10 12:11:11 2012
(r240311)
@@ -189,8 +189,8 @@ voidlltable_drain(int);
 intlltable_sysctl_dumparp(int, struct sysctl_req *);
 
 size_t llentry_free(struct llentry *);
-intllentry_update(struct llentry **, struct lltable *,
-   struct sockaddr_storage *, struct ifnet *);
+struct llentry  *llentry_alloc(struct ifnet *, struct lltable *,
+   struct sockaddr_storage *);
 
 /*
  * Generic link layer address lookup function.
___
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: r240312 - head/sys/dev/usb/controller

2012-09-10 Thread Hans Petter Selasky
Author: hselasky
Date: Mon Sep 10 12:23:56 2012
New Revision: 240312
URL: http://svn.freebsd.org/changeset/base/240312

Log:
  Fix for IRQ hang in DWC OTG host mode.

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

Modified: head/sys/dev/usb/controller/dwc_otg.c
==
--- head/sys/dev/usb/controller/dwc_otg.c   Mon Sep 10 12:11:11 2012
(r240311)
+++ head/sys/dev/usb/controller/dwc_otg.c   Mon Sep 10 12:23:56 2012
(r240312)
@@ -498,8 +498,16 @@ dwc_otg_host_channel_alloc(struct dwc_ot
DPRINTF("HCCHAR=0x%08x(0x%08x) HCSPLT=0x%08x\n",
td->hcchar, temp, td->hcsplt);
 
+   /* clear leftover interrupts */
temp = DWC_OTG_READ_4(sc, DOTG_HCINT(x));
DWC_OTG_WRITE_4(sc, DOTG_HCINT(x), temp);
+
+   /* enable interrupts */
+   DWC_OTG_WRITE_4(sc, DOTG_HCINTMSK(x),
+   HCINT_STALL | HCINT_BBLERR |
+   HCINT_AHBERR | HCINT_CHHLTD | HCINT_XACTERR |
+   HCINT_XFERCOMPL);
+
DWC_OTG_WRITE_4(sc, DOTG_HCSPLT(x), td->hcsplt);
DWC_OTG_WRITE_4(sc, DOTG_HCTSIZ(x), 0);
DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(x), 0);
@@ -569,12 +577,6 @@ dwc_otg_host_setup_tx(struct dwc_otg_td 
/* must enable channel before writing data to FIFO */
DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel), temp);
 
-   /* enable interrupts */
-   DWC_OTG_WRITE_4(sc, DOTG_HCINTMSK(td->channel),
-   HCINT_STALL | HCINT_BBLERR |
-   HCINT_AHBERR | HCINT_CHHLTD | HCINT_XACTERR |
-   HCINT_XFERCOMPL);
-
/* transfer data into FIFO */
bus_space_write_region_4(sc->sc_io_tag, sc->sc_io_hdl,
DOTG_DFIFO(td->channel), (uint32_t *)&req, sizeof(req) / 4);
@@ -875,12 +877,6 @@ not_complete:
(td->toggle ? (HCTSIZ_PID_DATA1 << HCTSIZ_PID_SHIFT) :
(HCTSIZ_PID_DATA0 << HCTSIZ_PID_SHIFT)));
 
-   /* enable interrupts */
-   DWC_OTG_WRITE_4(sc, DOTG_HCINTMSK(td->channel),
-   HCINT_STALL | HCINT_BBLERR |
-   HCINT_AHBERR | HCINT_CHHLTD | HCINT_XACTERR |
-   HCINT_XFERCOMPL);
-
temp |= HCCHAR_EPDIR_IN;
 
/* must enable channel before data can be received */
@@ -1123,12 +1119,6 @@ dwc_otg_host_data_tx(struct dwc_otg_td *
/* must enable before writing data to FIFO */
DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel), temp);
 
-   /* enable interrupts */
-   DWC_OTG_WRITE_4(sc, DOTG_HCINTMSK(td->channel),
-   HCINT_STALL | HCINT_BBLERR |
-   HCINT_AHBERR | HCINT_CHHLTD | HCINT_XACTERR |
-   HCINT_XFERCOMPL);
-
if (count != 0) {
 
/* clear topmost word before copy */
@@ -1632,7 +1622,17 @@ dwc_otg_interrupt(struct dwc_otg_softc *
status, haint, DWC_OTG_READ_4(sc, DOTG_HFNUM));
 
if (haint != 0) {
+   uint8_t x;
 
+   /* clear left-over interrupts */
+   for (x = 0; x != sc->sc_host_ch_max; x++) {
+   /* check if channel is disabled */
+   if (sc->sc_hcchar[x] == 0) {
+   uint32_t temp;
+   temp = DWC_OTG_READ_4(sc, DOTG_HCINT(x));
+   DWC_OTG_WRITE_4(sc, DOTG_HCINT(x), temp);
+   }
+   }
}
 
if (status & GINTSTS_USBRST) {
@@ -2064,7 +2064,7 @@ dwc_otg_setup_standard_chain(struct usb_
td = xfer->td_transfer_first;
td->toggle = (xfer->endpoint->toggle_next ? 1 : 0);
 
-   td->hcchar = ((xfer->max_packet_count & 3) << HCCHAR_MC_SHIFT) |
+   td->hcchar =
(xfer->address << HCCHAR_DEVADDR_SHIFT) |
(xfer_type << HCCHAR_EPTYPE_SHIFT) |
((xfer->endpointno & UE_ADDR) << HCCHAR_EPNUM_SHIFT) |
@@ -2092,6 +2092,14 @@ dwc_otg_setup_standard_chain(struct usb_
td->hcsplt = 0;
}
break;
+   case USB_SPEED_HIGH:
+   td->hcsplt = 0;
+   if (xfer_type == UE_ISOCHRONOUS ||
+   xfer_type == UE_INTERRUPT) {
+   td->hcchar |= ((xfer->max_packet_count & 3)
+   << HCCHAR_MC_SHIFT);
+   }
+   break;
default:
td->hcsplt = 0;
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: r240313 - in stable/9/sys: net netinet netinet6

2012-09-10 Thread Gleb Smirnoff
Author: glebius
Date: Mon Sep 10 12:25:57 2012
New Revision: 240313
URL: http://svn.freebsd.org/changeset/base/240313

Log:
  Merge r238990 (manually resolving absence of r237263):
Fix races between in_lltable_prefix_free(), lla_lookup(),
llentry_free() and arptimer():
  
o Use callout_init_rw() for lle timeout, this allows us safely
  disestablish them.
  - This allows us to simplify the arptimer() and make it
race safe.
o Consistently use ifp->if_afdata_lock to lock access to
  linked lists in the lle hashes.
o Introduce new lle flag LLE_LINKED, which marks an entry that
  is attached to the hash.
  - Use LLE_LINKED to avoid double unlinking via consequent
calls to llentry_free().
  - Mark lle with LLE_DELETED via |= operation istead of =,
so that other flags won't be lost.
o Make LLE_ADDREF(), LLE_REMREF() and LLE_FREE_LOCKED() more
  consistent and provide more informative KASSERTs.
  
The patch is a collaborative work of all submitters and myself.
  
PR: kern/165863
Submitted by:   zont, rstone
Submitted by:   Eric van Gyzen 

Modified:
  stable/9/sys/net/if_llatbl.c
  stable/9/sys/net/if_llatbl.h
  stable/9/sys/net/if_var.h
  stable/9/sys/netinet/if_ether.c
  stable/9/sys/netinet/in.c
  stable/9/sys/netinet6/in6.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/net/if_llatbl.c
==
--- stable/9/sys/net/if_llatbl.cMon Sep 10 12:23:56 2012
(r240312)
+++ stable/9/sys/net/if_llatbl.cMon Sep 10 12:25:57 2012
(r240313)
@@ -109,10 +109,19 @@ llentry_free(struct llentry *lle)
size_t pkts_dropped;
struct mbuf *next;
 
-   pkts_dropped = 0;
+   IF_AFDATA_WLOCK_ASSERT(lle->lle_tbl->llt_ifp);
LLE_WLOCK_ASSERT(lle);
+
+   /* XXX: guard against race with other llentry_free(). */
+   if (!(lle->la_flags & LLE_LINKED)) {
+   LLE_FREE_LOCKED(lle);
+   return (0);
+   }
+
LIST_REMOVE(lle, lle_next);
+   lle->la_flags &= ~(LLE_VALID | LLE_LINKED);
 
+   pkts_dropped = 0;
while ((lle->la_numheld > 0) && (lle->la_hold != NULL)) {
next = lle->la_hold->m_nextpkt;
m_freem(lle->la_hold);
@@ -125,7 +134,6 @@ llentry_free(struct llentry *lle)
("%s: la_numheld %d > 0, pkts_droped %zd", __func__,
 lle->la_numheld, pkts_dropped));
 
-   lle->la_flags &= ~LLE_VALID;
LLE_FREE_LOCKED(lle);
 
return (pkts_dropped);
@@ -176,17 +184,16 @@ lltable_free(struct lltable *llt)
SLIST_REMOVE(&V_lltables, llt, lltable, llt_link);
LLTABLE_WUNLOCK();
 
+   IF_AFDATA_WLOCK(llt->llt_ifp);
for (i = 0; i < LLTBL_HASHTBL_SIZE; i++) {
LIST_FOREACH_SAFE(lle, &llt->lle_head[i], lle_next, next) {
-   int canceled;
-
-   canceled = callout_drain(&lle->la_timer);
LLE_WLOCK(lle);
-   if (canceled)
+   if (callout_stop(&lle->la_timer))
LLE_REMREF(lle);
llentry_free(lle);
}
}
+   IF_AFDATA_WUNLOCK(llt->llt_ifp);
 
free(llt, M_LLTABLE);
 }

Modified: stable/9/sys/net/if_llatbl.h
==
--- stable/9/sys/net/if_llatbl.hMon Sep 10 12:23:56 2012
(r240312)
+++ stable/9/sys/net/if_llatbl.hMon Sep 10 12:25:57 2012
(r240313)
@@ -103,26 +103,28 @@ struct llentry {
 #defineLLE_ADDREF(lle) do {\
LLE_WLOCK_ASSERT(lle);  \
KASSERT((lle)->lle_refcnt >= 0, \
-   ("negative refcnt %d", (lle)->lle_refcnt)); \
+   ("negative refcnt %d on lle %p",\
+   (lle)->lle_refcnt, (lle))); \
(lle)->lle_refcnt++;\
 } while (0)
 
 #defineLLE_REMREF(lle) do {\
LLE_WLOCK_ASSERT(lle);  \
-   KASSERT((lle)->lle_refcnt > 1,  \
-   ("bogus refcnt %d", (lle)->lle_refcnt));\
+   KASSERT((lle)->lle_refcnt > 0,  \
+   ("bogus refcnt %d on lle %p",   \
+   (lle)->lle_refcnt, (lle))); \
(lle)->lle_refcnt--;\
 } while (0)
 
 #defineLLE_FREE_LOCKED(lle) do {   \
-   if ((lle)->lle_refcnt <= 1) \
-   (lle)->lle_free((lle)->lle_tbl, (lle));\
+   if ((lle)->lle_refcnt == 1)  

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

2012-09-10 Thread Hans Petter Selasky
Author: hselasky
Date: Mon Sep 10 13:50:34 2012
New Revision: 240314
URL: http://svn.freebsd.org/changeset/base/240314

Log:
  Poll VBUS status every second, hence the AT91 GPIO library doesn't support
  registering interrupt handlers yet for GPIO events.

Modified:
  head/sys/dev/usb/controller/at91dci.c
  head/sys/dev/usb/controller/at91dci_atmelarm.c

Modified: head/sys/dev/usb/controller/at91dci.c
==
--- head/sys/dev/usb/controller/at91dci.c   Mon Sep 10 12:25:57 2012
(r240313)
+++ head/sys/dev/usb/controller/at91dci.c   Mon Sep 10 13:50:34 2012
(r240314)
@@ -740,7 +740,6 @@ at91dci_vbus_interrupt(struct at91dci_so
 {
DPRINTFN(5, "vbus = %u\n", is_on);
 
-   USB_BUS_LOCK(&sc->sc_bus);
if (is_on) {
if (!sc->sc_flags.status_vbus) {
sc->sc_flags.status_vbus = 1;
@@ -760,7 +759,6 @@ at91dci_vbus_interrupt(struct at91dci_so
at91dci_root_intr(sc);
}
}
-   USB_BUS_UNLOCK(&sc->sc_bus);
 }
 
 void

Modified: head/sys/dev/usb/controller/at91dci_atmelarm.c
==
--- head/sys/dev/usb/controller/at91dci_atmelarm.c  Mon Sep 10 12:25:57 
2012(r240313)
+++ head/sys/dev/usb/controller/at91dci_atmelarm.c  Mon Sep 10 13:50:34 
2012(r240314)
@@ -83,24 +83,18 @@ struct at91_udp_softc {
struct at91_pmc_clock *sc_mclk;
struct at91_pmc_clock *sc_iclk;
struct at91_pmc_clock *sc_fclk;
-   struct resource *sc_vbus_irq_res;
-   void   *sc_vbus_intr_hdl;
+   struct callout sc_vbus;
 };
 
 static void
 at91_vbus_poll(struct at91_udp_softc *sc)
 {
-   uint32_t temp;
uint8_t vbus_val;
 
-   /* XXX temporary clear interrupts here */
-
-   temp = at91_pio_gpio_clear_interrupt(VBUS_BASE);
-
-   /* just forward it */
-
vbus_val = at91_pio_gpio_get(VBUS_BASE, VBUS_MASK);
at91dci_vbus_interrupt(&sc->sc_dci, vbus_val);
+
+   callout_reset(&sc->sc_vbus, hz, (void *)&at91_vbus_poll, sc);
 }
 
 static void
@@ -168,6 +162,8 @@ at91_udp_attach(device_t dev)
USB_GET_DMA_TAG(dev), NULL)) {
return (ENOMEM);
}
+   callout_init_mtx(&sc->sc_vbus, &sc->sc_dci.sc_bus.bus_mtx, 0);
+
/*
 * configure VBUS input pin, enable deglitch and enable
 * interrupt :
@@ -175,7 +171,7 @@ at91_udp_attach(device_t dev)
at91_pio_use_gpio(VBUS_BASE, VBUS_MASK);
at91_pio_gpio_input(VBUS_BASE, VBUS_MASK);
at91_pio_gpio_set_deglitch(VBUS_BASE, VBUS_MASK, 1);
-   at91_pio_gpio_set_interrupt(VBUS_BASE, VBUS_MASK, 1);
+   at91_pio_gpio_set_interrupt(VBUS_BASE, VBUS_MASK, 0);
 
/*
 * configure PULLUP output pin :
@@ -210,13 +206,6 @@ at91_udp_attach(device_t dev)
if (!(sc->sc_dci.sc_irq_res)) {
goto error;
}
-   rid = 1;
-   sc->sc_vbus_irq_res =
-   bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE);
-   if (sc->sc_vbus_irq_res == NULL) {
-   at91_pio_gpio_set_interrupt(VBUS_BASE, VBUS_MASK, 0);
-   device_printf(dev, "No VBUS IRQ!\n");
-   }
sc->sc_dci.sc_bus.bdev = device_add_child(dev, "usbus", -1);
if (!(sc->sc_dci.sc_bus.bdev)) {
goto error;
@@ -234,25 +223,7 @@ at91_udp_attach(device_t dev)
sc->sc_dci.sc_intr_hdl = NULL;
goto error;
}
-#if (__FreeBSD_version >= 700031)
-   if (sc->sc_vbus_irq_res != NULL) {
-   err = bus_setup_intr(dev, sc->sc_vbus_irq_res,
-   INTR_TYPE_BIO | INTR_MPSAFE,
-   NULL, (driver_intr_t *)at91_vbus_poll, sc,
-   &sc->sc_vbus_intr_hdl);
-   }
-#else
-   if (sc->sc_vbus_irq_res != NULL) {
-   err = bus_setup_intr(dev, sc->sc_vbus_irq_res,
-   INTR_TYPE_BIO | INTR_MPSAFE,
-   (driver_intr_t *)at91_vbus_poll, sc,
-   &sc->sc_vbus_intr_hdl);
-   }
-#endif
-   if (err) {
-   sc->sc_vbus_intr_hdl = NULL;
-   goto error;
-   }
+
err = at91dci_init(&sc->sc_dci);
if (!err) {
err = device_probe_and_attach(sc->sc_dci.sc_bus.bdev);
@@ -261,7 +232,9 @@ at91_udp_attach(device_t dev)
goto error;
} else {
/* poll VBUS one time */
+   USB_BUS_LOCK(&sc->sc_dci.sc_bus);
at91_vbus_poll(sc);
+   USB_BUS_UNLOCK(&sc->sc_dci.sc_bus);
}
return (0);
 
@@ -285,6 +258,12 @@ at91_udp_detach(device_t dev)
/* during module unload there are lots of children leftover */
device_delete_children(dev);
 
+   USB_BUS_LOCK(&sc->sc_dci.sc_bus);
+   callout_stop(&sc->sc_vbus);
+   USB_BUS_UNLOCK(&sc->sc_dci.sc_bus);
+
+

svn commit: r240315 - stable/9/usr.sbin/pc-sysinstall/backend

2012-09-10 Thread Josh Paetzel
Author: jpaetzel
Date: Mon Sep 10 14:10:10 2012
New Revision: 240315
URL: http://svn.freebsd.org/changeset/base/240315

Log:
  MFC r240165:
  
  Add TRIM support, enabled by default.
  Fix a bug installing components from a localPath.
  Allow autosizing of any partition, not just the last partition.
  Adjust how ZFS is laid out to work with Boot Environments.
  
  Submitted by: kmoore
  Obtained from:PC-BSD

Modified:
  stable/9/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh
  stable/9/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh
  stable/9/usr.sbin/pc-sysinstall/backend/functions-disk.sh
  stable/9/usr.sbin/pc-sysinstall/backend/functions-installcomponents.sh
  stable/9/usr.sbin/pc-sysinstall/backend/functions-mountdisk.sh
  stable/9/usr.sbin/pc-sysinstall/backend/functions-newfs.sh
Directory Properties:
  stable/9/usr.sbin/pc-sysinstall/   (props changed)

Modified: stable/9/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh
==
--- stable/9/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh   Mon Sep 
10 13:50:34 2012(r240314)
+++ stable/9/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh   Mon Sep 
10 14:10:10 2012(r240315)
@@ -164,6 +164,38 @@ gen_glabel_name()
   export VAL="${NAME}${NUM}" 
 };
 
+# Function to determine the size we can safely use when 0 is specified
+get_autosize()
+{
+  # Disk tag to look for
+  dTag="$1"
+
+  # Total MB Avail
+  get_disk_mediasize_mb "$2"
+  local _aSize=$VAL
+
+  while read line
+  do
+# Check for data on this slice
+echo $line | grep -q "^${_dTag}-part=" 2>/dev/null
+if [ $? -ne 0 ] ; then continue ; fi
+
+get_value_from_string "${line}"
+STRING="$VAL"
+
+# Get the size of this partition
+SIZE=`echo $STRING | tr -s '\t' ' ' | cut -d ' ' -f 2` 
+if [ $SIZE -eq 0 ] ; then continue ; fi
+_aSize=`expr $_aSize - $SIZE`
+  done <${CFGF}
+
+  # Pad the size a bit
+  _aSize=`expr $_aSize - 2`
+
+  VAL="$_aSize"
+  export VAL
+};
+
 # Function to setup partitions using gpart
 setup_gpart_partitions()
 {
@@ -173,6 +205,7 @@ setup_gpart_partitions()
   local _sNum="$4"
   local _pType="$5"
   FOUNDPARTS="1"
+  USEDAUTOSIZE=0
 
   # Lets read in the config file now and setup our partitions
   if [ "${_pType}" = "gpt" ] ; then
@@ -245,7 +278,15 @@ setup_gpart_partitions()
 
   if [ "$SIZE" = "0" ]
   then
-SOUT=""
+   if [ $USEDAUTOSIZE -eq 1 ] ; then
+  exit_err "ERROR: You can not have two partitions with a size of 0 
specified!"
+   fi
+case ${_pType} in
+ gpt|apm) get_autosize "${_dTag}" "$_pDisk" ;;
+   *) get_autosize "${_dTag}" "$_wSlice" ;;
+esac
+SOUT="-s ${VAL}M"
+   USEDAUTOSIZE=1
   else
 SOUT="-s ${SIZE}M"
   fi

Modified: stable/9/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh
==
--- stable/9/usr.sbin/pc-sysinstall/backend/functions-cleanup.shMon Sep 
10 13:50:34 2012(r240314)
+++ stable/9/usr.sbin/pc-sysinstall/backend/functions-cleanup.shMon Sep 
10 14:10:10 2012(r240315)
@@ -49,7 +49,7 @@ zfs_cleanup_unmount()
   # Creating a dedicated "/boot" partition
   cat ${FSMNT}/boot/loader.conf 2>/dev/null | grep -q 
"vfs.root.mountfrom=" 2>/dev/null
   if [ $? -ne 0 ] ; then
-echo "vfs.root.mountfrom=\"zfs:${ZPOOLNAME}\"" >> 
${FSMNT}/boot/loader.conf
+echo "vfs.root.mountfrom=\"zfs:${ZPOOLNAME}/ROOT/default\"" >> 
${FSMNT}/boot/loader.conf
   fi
   export FOUNDZFSROOT="${ZPOOLNAME}"
 fi
@@ -195,8 +195,8 @@ setup_fstab()
 if [ $? -eq 0 ] ; then
   if [ "${PARTFS}" = "ZFS" ] ; then
 ROOTFSTYPE="zfs"
-XPOOLNAME=$(get_zpool_name "${PARTDEV}")
-ROOTFS="${ZPOOLNAME}"
+ZPOOLNAME=$(get_zpool_name "${PARTDEV}")
+ROOTFS="${ZPOOLNAME}/ROOT/default"
   else
 ROOTFS="${DEVICE}"
 ROOTFSTYPE="ufs"

Modified: stable/9/usr.sbin/pc-sysinstall/backend/functions-disk.sh
==
--- stable/9/usr.sbin/pc-sysinstall/backend/functions-disk.sh   Mon Sep 10 
13:50:34 2012(r240314)
+++ stable/9/usr.sbin/pc-sysinstall/backend/functions-disk.sh   Mon Sep 10 
14:10:10 2012(r240315)
@@ -224,6 +224,15 @@ get_disk_mediasize()
   export VAL="${mediasize}"
 };
 
+# Function which returns a target disks mediasize in megabytes
+get_disk_mediasize_mb()
+{
+  mediasize=`diskinfo -v ${1} | grep "# mediasize in bytes" | tr -s ' ' | cut 
-f 2`
+  mediasize=`expr $mediasize / 1024`
+  mediasize=`expr $mediasize / 1024`
+  export VAL="${mediasize}"
+};
+
 # Function to delete all gparts before starting an install
 delete_all_gpart()
 {

Modified: stable/9/usr.sbin/pc-sysinstall/backend/functions-installcomponents.sh

svn commit: r240316 - head

2012-09-10 Thread Eitan Adler
Author: eadler
Date: Mon Sep 10 14:11:10 2012
New Revision: 240316
URL: http://svn.freebsd.org/changeset/base/240316

Log:
  We moved to subversion ages ago.
  
  Approved by:  cperciva
  MFC after:3 days

Modified:
  head/MAINTAINERS

Modified: head/MAINTAINERS
==
--- head/MAINTAINERSMon Sep 10 14:10:10 2012(r240315)
+++ head/MAINTAINERSMon Sep 10 14:11:10 2012(r240316)
@@ -3,7 +3,7 @@ $FreeBSD$
 Please note that the content of this file is strictly advisory.
 No locks listed here are valid.  The only strict review requirements
 are granted by core.  These are documented in head/LOCKS and enforced
-by CVSROOT/approvers.
+by svnadmin/conf/approvers.
 
 The source tree is a community effort.  However, some folks go to the
 trouble of looking after particular areas of the tree.  In return 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"


Re: svn commit: r240309 - in stable/9/sys: net netinet netinet6

2012-09-10 Thread Bjoern A. Zeeb

On Mon, 10 Sep 2012, Gleb Smirnoff wrote:


Author: glebius
Date: Mon Sep 10 12:02:58 2012
New Revision: 240309
URL: http://svn.freebsd.org/changeset/base/240309

Log:
 Merge r232054 by kmacy:
   When using flowtable llentrys can outlive the interface with
   which they're associated at which the lle_tbl pointer points
   to freed memory and the llt_free pointer is no longer valid.

   Move the free pointer in to the llentry itself and update the
   initalization sites.


This breaks the KBI.



Modified:
 stable/9/sys/net/if_llatbl.h
 stable/9/sys/netinet/in.c
 stable/9/sys/netinet6/in6.c
Directory Properties:
 stable/9/sys/   (props changed)

Modified: stable/9/sys/net/if_llatbl.h
==
--- stable/9/sys/net/if_llatbl.hMon Sep 10 11:50:42 2012
(r240308)
+++ stable/9/sys/net/if_llatbl.hMon Sep 10 12:02:58 2012
(r240309)
@@ -106,7 +106,6 @@ struct llentry {
("negative refcnt %d", (lle)->lle_refcnt));\
(lle)->lle_refcnt++; \
} while (0)
-
#define LLE_REMREF(lle) do {\
LLE_WLOCK_ASSERT(lle);  \
KASSERT((lle)->lle_refcnt > 1,\
@@ -116,7 +115,7 @@ struct llentry {

#define LLE_FREE_LOCKED(lle) do {   \
if ((lle)->lle_refcnt <= 1)   \
-   (lle)->lle_tbl->llt_free((lle)->lle_tbl, (lle));\
+   (lle)->lle_free((lle)->lle_tbl, (lle));\
else {  \
(lle)->lle_refcnt--; \
LLE_WUNLOCK(lle);   \
@@ -152,7 +151,6 @@ struct lltable {
int llt_af;
struct ifnet*llt_ifp;

-   void(*llt_free)(struct lltable *, struct llentry *);
void(*llt_prefix_free)(struct lltable *,
const struct sockaddr *prefix,
const struct sockaddr *mask,

Modified: stable/9/sys/netinet/in.c
==
--- stable/9/sys/netinet/in.c   Mon Sep 10 11:50:42 2012(r240308)
+++ stable/9/sys/netinet/in.c   Mon Sep 10 12:02:58 2012(r240309)
@@ -1323,6 +1323,20 @@ struct in_llentry {
struct sockaddr_in  l3_addr4;
};

+/*
+ * Deletes an address from the address table.
+ * This function is called by the timer functions
+ * such as arptimer() and nd6_llinfo_timer(), and
+ * the caller does the locking.
+ */
+static void
+in_lltable_free(struct lltable *llt, struct llentry *lle)
+{
+   LLE_WUNLOCK(lle);
+   LLE_LOCK_DESTROY(lle);
+   free(lle, M_LLTABLE);
+}
+
static struct llentry *
in_lltable_new(const struct sockaddr *l3addr, u_int flags)
{
@@ -1340,25 +1354,11 @@ in_lltable_new(const struct sockaddr *l3
lle->base.la_expire = time_uptime; /* mark expired */
lle->l3_addr4 = *(const struct sockaddr_in *)l3addr;
lle->base.lle_refcnt = 1;
+   lle->base.lle_free = in_lltable_free;
LLE_LOCK_INIT(&lle->base);
return &lle->base;
}

-/*
- * Deletes an address from the address table.
- * This function is called by the timer functions
- * such as arptimer() and nd6_llinfo_timer(), and
- * the caller does the locking.
- */
-static void
-in_lltable_free(struct lltable *llt, struct llentry *lle)
-{
-   LLE_WUNLOCK(lle);
-   LLE_LOCK_DESTROY(lle);
-   free(lle, M_LLTABLE);
-}
-
-
#define IN_ARE_MASKED_ADDR_EQUAL(d, a, m)   (   \
(((ntohl((d)->sin_addr.s_addr) ^ (a)->sin_addr.s_addr) & 
(m)->sin_addr.s_addr)) == 0 )

@@ -1640,7 +1640,6 @@ in_domifattach(struct ifnet *ifp)

llt = lltable_init(ifp, AF_INET);
if (llt != NULL) {
-   llt->llt_free = in_lltable_free;
llt->llt_prefix_free = in_lltable_prefix_free;
llt->llt_lookup = in_lltable_lookup;
llt->llt_dump = in_lltable_dump;

Modified: stable/9/sys/netinet6/in6.c
==
--- stable/9/sys/netinet6/in6.c Mon Sep 10 11:50:42 2012(r240308)
+++ stable/9/sys/netinet6/in6.c Mon Sep 10 12:02:58 2012(r240309)
@@ -2421,6 +2421,20 @@ struct in6_llentry {
struct sockaddr_in6 l3_addr6;
};

+/*
+ * Deletes an address from the address table.
+ * This function is called by the timer functions
+ * such as arptimer() and nd6_llinfo_timer(), and
+ * the caller does the locking.
+ */
+static void
+in6_lltable_free(struct lltable *llt, struct llentry *lle)
+{
+   LLE_WUNLOCK(lle);
+   LLE_LOCK_DESTROY(lle);
+   free(lle, M_LLTABLE);
+}
+
static struct llentry *
in6_lltable_new(const struct sockaddr *l3ad

svn commit: r240317 - in head/sys: amd64/amd64 i386/i386 i386/xen mips/mips

2012-09-10 Thread Alan Cox
Author: alc
Date: Mon Sep 10 16:11:29 2012
New Revision: 240317
URL: http://svn.freebsd.org/changeset/base/240317

Log:
  Simplify pmap_unmapdev().  Since kmem_free() eventually calls pmap_remove(),
  pmap_unmapdev()'s own direct efforts to destroy the page table entries are
  redundant, so eliminate them.
  
  Don't set PTE_W on the page table entry in pmap_kenter{,_attr}() on MIPS.
  Setting PTE_W on MIPS is inconsistent with the implementation of this
  function on other architectures.  Moreover, PTE_W should not be set, unless
  the pmap's wired mapping count is incremented, which pmap_kenter{,_attr}()
  doesn't do.
  
  MFC after:10 days

Modified:
  head/sys/amd64/amd64/pmap.c
  head/sys/i386/i386/pmap.c
  head/sys/i386/xen/pmap.c
  head/sys/mips/mips/pmap.c

Modified: head/sys/amd64/amd64/pmap.c
==
--- head/sys/amd64/amd64/pmap.c Mon Sep 10 14:11:10 2012(r240316)
+++ head/sys/amd64/amd64/pmap.c Mon Sep 10 16:11:29 2012(r240317)
@@ -4998,7 +4998,7 @@ pmap_mapbios(vm_paddr_t pa, vm_size_t si
 void
 pmap_unmapdev(vm_offset_t va, vm_size_t size)
 {
-   vm_offset_t base, offset, tmpva;
+   vm_offset_t base, offset;
 
/* If we gave a direct map region in pmap_mapdev, do nothing */
if (va >= DMAP_MIN_ADDRESS && va < DMAP_MAX_ADDRESS)
@@ -5006,9 +5006,6 @@ pmap_unmapdev(vm_offset_t va, vm_size_t 
base = trunc_page(va);
offset = va & PAGE_MASK;
size = roundup(offset + size, PAGE_SIZE);
-   for (tmpva = base; tmpva < (base + size); tmpva += PAGE_SIZE)
-   pmap_kremove(tmpva);
-   pmap_invalidate_range(kernel_pmap, va, tmpva);
kmem_free(kernel_map, base, size);
 }
 

Modified: head/sys/i386/i386/pmap.c
==
--- head/sys/i386/i386/pmap.c   Mon Sep 10 14:11:10 2012(r240316)
+++ head/sys/i386/i386/pmap.c   Mon Sep 10 16:11:29 2012(r240317)
@@ -5011,16 +5011,13 @@ pmap_mapbios(vm_paddr_t pa, vm_size_t si
 void
 pmap_unmapdev(vm_offset_t va, vm_size_t size)
 {
-   vm_offset_t base, offset, tmpva;
+   vm_offset_t base, offset;
 
if (va >= KERNBASE && va + size <= KERNBASE + KERNLOAD)
return;
base = trunc_page(va);
offset = va & PAGE_MASK;
size = roundup(offset + size, PAGE_SIZE);
-   for (tmpva = base; tmpva < (base + size); tmpva += PAGE_SIZE)
-   pmap_kremove(tmpva);
-   pmap_invalidate_range(kernel_pmap, va, tmpva);
kmem_free(kernel_map, base, size);
 }
 

Modified: head/sys/i386/xen/pmap.c
==
--- head/sys/i386/xen/pmap.cMon Sep 10 14:11:10 2012(r240316)
+++ head/sys/i386/xen/pmap.cMon Sep 10 16:11:29 2012(r240317)
@@ -3989,18 +3989,13 @@ pmap_mapbios(vm_paddr_t pa, vm_size_t si
 void
 pmap_unmapdev(vm_offset_t va, vm_size_t size)
 {
-   vm_offset_t base, offset, tmpva;
+   vm_offset_t base, offset;
 
if (va >= KERNBASE && va + size <= KERNBASE + KERNLOAD)
return;
base = trunc_page(va);
offset = va & PAGE_MASK;
size = roundup(offset + size, PAGE_SIZE);
-   critical_enter();
-   for (tmpva = base; tmpva < (base + size); tmpva += PAGE_SIZE)
-   pmap_kremove(tmpva);
-   pmap_invalidate_range(kernel_pmap, va, tmpva);
-   critical_exit();
kmem_free(kernel_map, base, size);
 }
 

Modified: head/sys/mips/mips/pmap.c
==
--- head/sys/mips/mips/pmap.c   Mon Sep 10 14:11:10 2012(r240316)
+++ head/sys/mips/mips/pmap.c   Mon Sep 10 16:11:29 2012(r240317)
@@ -814,10 +814,10 @@ pmap_kenter_attr(vm_offset_t va, vm_padd
 #ifdef PMAP_DEBUG
printf("pmap_kenter:  va: %p -> pa: %p\n", (void *)va, (void *)pa);
 #endif
-   npte = TLBLO_PA_TO_PFN(pa) | PTE_D | PTE_V | PTE_G | PTE_W | attr;
 
pte = pmap_pte(kernel_pmap, va);
opte = *pte;
+   npte = TLBLO_PA_TO_PFN(pa) | attr | PTE_D | PTE_V | PTE_G;
*pte = npte;
if (pte_test(&opte, PTE_V) && opte != npte)
pmap_update_page(kernel_pmap, va, npte);
@@ -2946,7 +2946,7 @@ void
 pmap_unmapdev(vm_offset_t va, vm_size_t size)
 {
 #ifndef __mips_n64
-   vm_offset_t base, offset, tmpva;
+   vm_offset_t base, offset;
 
/* If the address is within KSEG1 then there is nothing to do */
if (va >= MIPS_KSEG1_START && va <= MIPS_KSEG1_END)
@@ -2955,8 +2955,6 @@ pmap_unmapdev(vm_offset_t va, vm_size_t 
base = trunc_page(va);
offset = va & PAGE_MASK;
size = roundup(size + offset, PAGE_SIZE);
-   for (tmpva = base; tmpva < base + size; tmpva += PAGE_SIZE)
-   pmap_kremove(tmpva);
kmem_free(kernel_map, base, size);
 #endif
 }
___

svn commit: r240318 - head/share/misc

2012-09-10 Thread Eitan Adler
Author: eadler
Date: Mon Sep 10 16:19:12 2012
New Revision: 240318
URL: http://svn.freebsd.org/changeset/base/240318

Log:
  Update a few more teams and hats with new members.
  
  Remove explicit re${arch} teams as they are not listed anywhere else.
  MFC after:3 days
  X-MFC-With:   r240294

Modified:
  head/share/misc/organization.dot

Modified: head/share/misc/organization.dot
==
--- head/share/misc/organization.dotMon Sep 10 16:11:29 2012
(r240317)
+++ head/share/misc/organization.dotMon Sep 10 16:19:12 2012
(r240318)
@@ -26,22 +26,15 @@ _misc [label="Miscellaneous Hats"]
 # Development teams go here alphabetically sorted
 
 core [label="Core Team\nc...@freebsd.org\ntabthorpe, gavin, jhb, 
kib,\ntheraven, attilio, hrs,\npeter, miwi"]
-coresecretary [label="Core Team Secretary\ncore-secret...@freebsd.org\ngavin"]
+coresecretary [label="Core Team Secretary\ncore-secret...@freebsd.org\npgj"]
 doccommitters [label="Doc/www Committers\ndoc-committ...@freebsd.org"]
 doceng [label="Documentation Engineering Team\ndoc...@freebsd.org\ngjb, 
blackend,\ngabor, hrs"]
 portscommitters [label="Ports Committers\nports-committ...@freebsd.org"]
 portmgr [label="Port Management Team\nport...@freebsd.org\ntabthorpe, marcus, 
bapt, beat,\nerwin, linimon, pav,\nitetcu, miwi"]
 portmgrsecretary [label="Port Management Team 
Secretary\nportmgr-secret...@freebsd.org\ntabthorpe"]
-re [label="Primary Release Engineering Team\n...@freebsd.org\nmux, bmah, hrs, 
kensmith,\nmurray, rwatson, dwhite"]
-realpha [label="FreeBSD/alpha Release Engineering 
Team\nre-al...@freebsd.org\nwilko, murray, rwatson"]
-reamd64 [label="FreeBSD/amd64 Release Engineering 
Team\nre-am...@freebsd.org\nobrien"]
-rei386 [label="FreeBSD/i386 Release Engineering 
Team\nre-i...@freebsd.org\nmurray, rwatson"]
-reia64 [label="FreeBSD/ia64 Release Engineering 
Team\nre-i...@freebsd.org\nmarcel"]
-repc98 [label="FreeBSD/pc98 Release Engineering 
Team\nre-p...@freebsd.org\nnyan"]
-reppc [label="FreeBSD/ppc Release Engineering 
Team\nre-...@freebsd.org\ngrehan"]
-resparc64 [label="FreeBSD/sparc64 Release Engineering 
Team\nre-spar...@freebsd.org\njake, phk, tmm, obrien,\nkensmith, murray, 
rwatson"]
+re [label="Primary Release Engineering Team\n...@freebsd.org\nkib, blackend, 
jpaetzel, hrs, hrs, kensmith,\nrwatson, bz"]
 secteam [label="Security Team\nsect...@freebsd.org\nsimon, qingli, 
delphij,\nremko, philip, stas, cperciva,\ncsjp, rwatson, miwi, bz"]
-portssecteam [label="Ports Security Team\nports-sect...@freebsd.org\n"]
+portssecteam [label="Ports Security Team\nports-sect...@freebsd.org\nmiwi, 
rea, swills, wxs,\njgh, sbz, eadler, zi, remko, simon"]
 secteamsecretary [label="Security Team 
Secretary\nsecteam-secret...@freebsd.org\nremko"]
 securityofficer [label="Security Officer 
Team\nsecurity-offi...@freebsd.org\ncperciva, simon, nectar"]
 srccommitters [label="Src Committers\nsrc-committ...@freebsd.org"]
@@ -105,14 +98,6 @@ doceng -> doccommitters
 portmgr -> portmgrsecretary
 portmgr -> portscommitters
 
-re -> realpha
-re -> reamd64
-re -> rei386
-re -> reia64
-re -> repc98
-re -> reppc
-re -> resparc64
-
 securityofficer -> secteam
 securityofficer -> portssecteam
 
___
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: r240319 - stable/9/usr.sbin/lpr/common_source

2012-09-10 Thread Jaakko Heinonen
Author: jh
Date: Mon Sep 10 16:24:16 2012
New Revision: 240319
URL: http://svn.freebsd.org/changeset/base/240319

Log:
  MFC r238546: Remove trailing whitespace.

Modified:
  stable/9/usr.sbin/lpr/common_source/common.c
Directory Properties:
  stable/9/usr.sbin/lpr/   (props changed)
  stable/9/usr.sbin/lpr/filters/   (props changed)
  stable/9/usr.sbin/lpr/lpd/   (props changed)

Modified: stable/9/usr.sbin/lpr/common_source/common.c
==
--- stable/9/usr.sbin/lpr/common_source/common.cMon Sep 10 16:19:12 
2012(r240318)
+++ stable/9/usr.sbin/lpr/common_source/common.cMon Sep 10 16:24:16 
2012(r240319)
@@ -136,7 +136,7 @@ getq(const struct printer *pp, struct jo
 
/*
 * Estimate the array size by taking the size of the directory file
-* and dividing it by a multiple of the minimum size entry. 
+* and dividing it by a multiple of the minimum size entry.
 */
arraysz = (stbuf.st_size / 24);
queue = (struct jobqueue **)malloc(arraysz * sizeof(struct jobqueue *));
@@ -641,7 +641,7 @@ trstat_write(struct printer *pp, tr_send
 *   secs=  - seconds it took to transfer the file
 *   bytes= - number of bytes transfered (ie, "bytecount")
 *   bps=e - Bytes/sec (if the transfer was "big enough"
-*   for this to be useful) 
+*   for this to be useful)
 * ! top= - type of printer (if the type is defined in
 *   printcap, and if this statline is for sending
 *   a file to that ptr)
@@ -719,7 +719,7 @@ trstat_write(struct printer *pp, tr_send
if (remspace > 1) {
strcpy(eostat, "\n");
} else {
-   /* probably should back up to just before the final " x=".. */  
+   /* probably should back up to just before the final " x=".. */
strcpy(statline+STATLINE_SIZE-2, "\n");
}
statfile = open(statfname, O_WRONLY|O_APPEND, 0664);
@@ -732,7 +732,7 @@ trstat_write(struct printer *pp, tr_send
close(statfile);
 
return;
-#undef UPD_EOSTAT  
+#undef UPD_EOSTAT
 }
 
 #include 
___
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: r240320 - releng/9.1/usr.sbin/pc-sysinstall/backend

2012-09-10 Thread Josh Paetzel
Author: jpaetzel
Date: Mon Sep 10 16:25:52 2012
New Revision: 240320
URL: http://svn.freebsd.org/changeset/base/240320

Log:
  MFC r240315:
  
  Add TRIM support, enabled by default.
  Fix a bug installing components from a localPath.
  Allow autosizing of any partition, not just the last partition.
  Adjust how ZFS is laid out to work with Boot Environments.
  
  Submitted by: kmoore
  Approved by:  re (kib)
  Obtained from:PC-BSD

Modified:
  releng/9.1/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh
  releng/9.1/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh
  releng/9.1/usr.sbin/pc-sysinstall/backend/functions-disk.sh
  releng/9.1/usr.sbin/pc-sysinstall/backend/functions-installcomponents.sh
  releng/9.1/usr.sbin/pc-sysinstall/backend/functions-mountdisk.sh
  releng/9.1/usr.sbin/pc-sysinstall/backend/functions-newfs.sh
Directory Properties:
  releng/9.1/usr.sbin/pc-sysinstall/   (props changed)

Modified: releng/9.1/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh
==
--- releng/9.1/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Mon Sep 
10 16:24:16 2012(r240319)
+++ releng/9.1/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Mon Sep 
10 16:25:52 2012(r240320)
@@ -164,6 +164,38 @@ gen_glabel_name()
   export VAL="${NAME}${NUM}" 
 };
 
+# Function to determine the size we can safely use when 0 is specified
+get_autosize()
+{
+  # Disk tag to look for
+  dTag="$1"
+
+  # Total MB Avail
+  get_disk_mediasize_mb "$2"
+  local _aSize=$VAL
+
+  while read line
+  do
+# Check for data on this slice
+echo $line | grep -q "^${_dTag}-part=" 2>/dev/null
+if [ $? -ne 0 ] ; then continue ; fi
+
+get_value_from_string "${line}"
+STRING="$VAL"
+
+# Get the size of this partition
+SIZE=`echo $STRING | tr -s '\t' ' ' | cut -d ' ' -f 2` 
+if [ $SIZE -eq 0 ] ; then continue ; fi
+_aSize=`expr $_aSize - $SIZE`
+  done <${CFGF}
+
+  # Pad the size a bit
+  _aSize=`expr $_aSize - 2`
+
+  VAL="$_aSize"
+  export VAL
+};
+
 # Function to setup partitions using gpart
 setup_gpart_partitions()
 {
@@ -173,6 +205,7 @@ setup_gpart_partitions()
   local _sNum="$4"
   local _pType="$5"
   FOUNDPARTS="1"
+  USEDAUTOSIZE=0
 
   # Lets read in the config file now and setup our partitions
   if [ "${_pType}" = "gpt" ] ; then
@@ -245,7 +278,15 @@ setup_gpart_partitions()
 
   if [ "$SIZE" = "0" ]
   then
-SOUT=""
+   if [ $USEDAUTOSIZE -eq 1 ] ; then
+  exit_err "ERROR: You can not have two partitions with a size of 0 
specified!"
+   fi
+case ${_pType} in
+ gpt|apm) get_autosize "${_dTag}" "$_pDisk" ;;
+   *) get_autosize "${_dTag}" "$_wSlice" ;;
+esac
+SOUT="-s ${VAL}M"
+   USEDAUTOSIZE=1
   else
 SOUT="-s ${SIZE}M"
   fi

Modified: releng/9.1/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh
==
--- releng/9.1/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh  Mon Sep 
10 16:24:16 2012(r240319)
+++ releng/9.1/usr.sbin/pc-sysinstall/backend/functions-cleanup.sh  Mon Sep 
10 16:25:52 2012(r240320)
@@ -49,7 +49,7 @@ zfs_cleanup_unmount()
   # Creating a dedicated "/boot" partition
   cat ${FSMNT}/boot/loader.conf 2>/dev/null | grep -q 
"vfs.root.mountfrom=" 2>/dev/null
   if [ $? -ne 0 ] ; then
-echo "vfs.root.mountfrom=\"zfs:${ZPOOLNAME}\"" >> 
${FSMNT}/boot/loader.conf
+echo "vfs.root.mountfrom=\"zfs:${ZPOOLNAME}/ROOT/default\"" >> 
${FSMNT}/boot/loader.conf
   fi
   export FOUNDZFSROOT="${ZPOOLNAME}"
 fi
@@ -195,8 +195,8 @@ setup_fstab()
 if [ $? -eq 0 ] ; then
   if [ "${PARTFS}" = "ZFS" ] ; then
 ROOTFSTYPE="zfs"
-XPOOLNAME=$(get_zpool_name "${PARTDEV}")
-ROOTFS="${ZPOOLNAME}"
+ZPOOLNAME=$(get_zpool_name "${PARTDEV}")
+ROOTFS="${ZPOOLNAME}/ROOT/default"
   else
 ROOTFS="${DEVICE}"
 ROOTFSTYPE="ufs"

Modified: releng/9.1/usr.sbin/pc-sysinstall/backend/functions-disk.sh
==
--- releng/9.1/usr.sbin/pc-sysinstall/backend/functions-disk.sh Mon Sep 10 
16:24:16 2012(r240319)
+++ releng/9.1/usr.sbin/pc-sysinstall/backend/functions-disk.sh Mon Sep 10 
16:25:52 2012(r240320)
@@ -224,6 +224,15 @@ get_disk_mediasize()
   export VAL="${mediasize}"
 };
 
+# Function which returns a target disks mediasize in megabytes
+get_disk_mediasize_mb()
+{
+  mediasize=`diskinfo -v ${1} | grep "# mediasize in bytes" | tr -s ' ' | cut 
-f 2`
+  mediasize=`expr $mediasize / 1024`
+  mediasize=`expr $mediasize / 1024`
+  export VAL="${mediasize}"
+};
+
 # Function to delete all gparts before starting an install
 delete_all_gpart()
 {

Modified: 
releng/9.1/usr.sbin/pc-sysins

svn commit: r240321 - head/sys/arm/arm

2012-09-10 Thread Alan Cox
Author: alc
Date: Mon Sep 10 16:27:19 2012
New Revision: 240321
URL: http://svn.freebsd.org/changeset/base/240321

Log:
  Replace all uses of the vm page queues lock by a r/w lock that is private
  to this pmap.
  
  Revise some comments.
  
  The file vm/vm_param.h includes the file machine/vmparam.h, so there is no
  need to directly include it.
  
  Tested by:andrew

Modified:
  head/sys/arm/arm/pmap-v6.c

Modified: head/sys/arm/arm/pmap-v6.c
==
--- head/sys/arm/arm/pmap-v6.c  Mon Sep 10 16:25:52 2012(r240320)
+++ head/sys/arm/arm/pmap-v6.c  Mon Sep 10 16:27:19 2012(r240321)
@@ -153,10 +153,12 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -164,12 +166,10 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -400,6 +400,7 @@ static vm_offset_t pmap_kernel_l2ptp_kva
 static vm_paddr_t pmap_kernel_l2ptp_phys;
 static struct vm_object pvzone_obj;
 static int pv_entry_count=0, pv_entry_max=0, pv_entry_high_water=0;
+static struct rwlock pvh_global_lock;
 
 int l1_mem_types[] = {
ARM_L1S_STRONG_ORD,
@@ -613,7 +614,7 @@ pmap_alloc_l2_bucket(pmap_t pm, vm_offse
l1idx = L1_IDX(va);
 
PMAP_ASSERT_LOCKED(pm);
-   mtx_assert(&vm_page_queue_mtx, MA_OWNED);
+   rw_assert(&pvh_global_lock, RA_WLOCKED);
if ((l2 = pm->pm_l2[L2_IDX(l1idx)]) == NULL) {
/*
 * No mapping at this address, as there is
@@ -622,19 +623,19 @@ pmap_alloc_l2_bucket(pmap_t pm, vm_offse
 */
 again_l2table:
PMAP_UNLOCK(pm);
-   vm_page_unlock_queues();
+   rw_wunlock(&pvh_global_lock);
if ((l2 = pmap_alloc_l2_dtable()) == NULL) {
-   vm_page_lock_queues();
+   rw_wlock(&pvh_global_lock);
PMAP_LOCK(pm);
return (NULL);
}
-   vm_page_lock_queues();
+   rw_wlock(&pvh_global_lock);
PMAP_LOCK(pm);
if (pm->pm_l2[L2_IDX(l1idx)] != NULL) {
PMAP_UNLOCK(pm);
-   vm_page_unlock_queues();
+   rw_wunlock(&pvh_global_lock);
uma_zfree(l2table_zone, l2);
-   vm_page_lock_queues();
+   rw_wlock(&pvh_global_lock);
PMAP_LOCK(pm);
l2 = pm->pm_l2[L2_IDX(l1idx)];
if (l2 == NULL)
@@ -666,16 +667,16 @@ again_l2table:
 */
 again_ptep:
PMAP_UNLOCK(pm);
-   vm_page_unlock_queues();
+   rw_wunlock(&pvh_global_lock);
ptep = (void*)uma_zalloc(l2zone, M_NOWAIT|M_USE_RESERVE);
-   vm_page_lock_queues();
+   rw_wlock(&pvh_global_lock);
PMAP_LOCK(pm);
if (l2b->l2b_kva != 0) {
/* We lost the race. */
PMAP_UNLOCK(pm);
-   vm_page_unlock_queues();
+   rw_wunlock(&pvh_global_lock);
uma_zfree(l2zone, ptep);
-   vm_page_lock_queues();
+   rw_wlock(&pvh_global_lock);
PMAP_LOCK(pm);
if (l2b->l2b_kva == 0)
goto again_ptep;
@@ -851,7 +852,7 @@ pmap_clearbit(struct vm_page *pg, u_int 
u_int oflags;
int count = 0;
 
-   vm_page_lock_queues();
+   rw_wlock(&pvh_global_lock);
 
if (maskbits & PVF_WRITE)
maskbits |= PVF_MOD;
@@ -861,7 +862,7 @@ pmap_clearbit(struct vm_page *pg, u_int 
pg->md.pvh_attrs &= ~(maskbits & (PVF_MOD | PVF_REF));
 
if (TAILQ_EMPTY(&pg->md.pv_list)) {
-   vm_page_unlock_queues();
+   rw_wunlock(&pvh_global_lock);
return (0);
}
 
@@ -917,7 +918,7 @@ pmap_clearbit(struct vm_page *pg, u_int 
 
if (maskbits & PVF_WRITE)
vm_page_aflag_clear(pg, PGA_WRITEABLE);
-   vm_page_unlock_queues();
+   rw_wunlock(&pvh_global_lock);
return (count);
 }
 
@@ -927,15 +928,15 @@ pmap_clearbit(struct vm_page *pg, u_int 
  *   pmap_remove_pv: remove a mappiing from a vm_page list
  *
  * NOTE: pmap_enter_pv expects to lock the pvh itself
- *   pmap_remove_pv expects te caller to lock the pvh before calling
+ *   pmap_remove_pv expects the caller to lock the pvh before calling
  */
 
 /*
- * pmap_enter_pv: enter a mapping onto a vm_page lst
+ * pmap_enter_pv: enter a mapping onto a vm_page's PV list
  *
- * => caller should hold the proper lock on pmap_main_lock
+ * => caller should hold th

svn commit: r240322 - stable/9/usr.sbin/lpr/common_source

2012-09-10 Thread Jaakko Heinonen
Author: jh
Date: Mon Sep 10 16:28:45 2012
New Revision: 240322
URL: http://svn.freebsd.org/changeset/base/240322

Log:
  MFC r238547:
  
  Make sure that arraysz is initialized to a value larger than zero.
  arraysz could get initialized to zero on ZFS because ZFS reports
  directory sizes differently compared to UFS.
  
  PR:   bin/169493

Modified:
  stable/9/usr.sbin/lpr/common_source/common.c
Directory Properties:
  stable/9/usr.sbin/lpr/   (props changed)
  stable/9/usr.sbin/lpr/filters/   (props changed)
  stable/9/usr.sbin/lpr/lpd/   (props changed)

Modified: stable/9/usr.sbin/lpr/common_source/common.c
==
--- stable/9/usr.sbin/lpr/common_source/common.cMon Sep 10 16:27:19 
2012(r240321)
+++ stable/9/usr.sbin/lpr/common_source/common.cMon Sep 10 16:28:45 
2012(r240322)
@@ -139,6 +139,8 @@ getq(const struct printer *pp, struct jo
 * and dividing it by a multiple of the minimum size entry.
 */
arraysz = (stbuf.st_size / 24);
+   if (arraysz < 16)
+   arraysz = 16;
queue = (struct jobqueue **)malloc(arraysz * sizeof(struct jobqueue *));
if (queue == NULL)
goto errdone;
___
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: r240323 - head/tools/test/hwpmc

2012-09-10 Thread Fabien Thomas
Author: fabient
Date: Mon Sep 10 16:32:28 2012
New Revision: 240323
URL: http://svn.freebsd.org/changeset/base/240323

Log:
  Add SOFT as a possible section to exclude from counter list.

Modified:
  head/tools/test/hwpmc/pmctest.py

Modified: head/tools/test/hwpmc/pmctest.py
==
--- head/tools/test/hwpmc/pmctest.pyMon Sep 10 16:28:45 2012
(r240322)
+++ head/tools/test/hwpmc/pmctest.pyMon Sep 10 16:32:28 2012
(r240323)
@@ -53,7 +53,7 @@ from subprocess import PIPE
 
 # A list of strings that are not really counters, just
 # name tags that are output by pmccontrol -L
-notcounter = ["IAF", "IAP", "TSC", "UNC", "UCF", "UCP"]
+notcounter = ["IAF", "IAP", "TSC", "UNC", "UCF", "UCP", "SOFT" ]
 
 def main():
 
___
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: r240324 - head/share/misc

2012-09-10 Thread Eitan Adler
Author: eadler
Date: Mon Sep 10 16:51:43 2012
New Revision: 240324
URL: http://svn.freebsd.org/changeset/base/240324

Log:
  hrs has yet to create clones of himself
  
  MFC after:3 days
  X-MFC-With:   r240318, r240294

Modified:
  head/share/misc/organization.dot

Modified: head/share/misc/organization.dot
==
--- head/share/misc/organization.dotMon Sep 10 16:32:28 2012
(r240323)
+++ head/share/misc/organization.dotMon Sep 10 16:51:43 2012
(r240324)
@@ -32,7 +32,7 @@ doceng [label="Documentation Engineering
 portscommitters [label="Ports Committers\nports-committ...@freebsd.org"]
 portmgr [label="Port Management Team\nport...@freebsd.org\ntabthorpe, marcus, 
bapt, beat,\nerwin, linimon, pav,\nitetcu, miwi"]
 portmgrsecretary [label="Port Management Team 
Secretary\nportmgr-secret...@freebsd.org\ntabthorpe"]
-re [label="Primary Release Engineering Team\n...@freebsd.org\nkib, blackend, 
jpaetzel, hrs, hrs, kensmith,\nrwatson, bz"]
+re [label="Primary Release Engineering Team\n...@freebsd.org\nkib, blackend, 
jpaetzel, hrs, kensmith,\nrwatson, bz"]
 secteam [label="Security Team\nsect...@freebsd.org\nsimon, qingli, 
delphij,\nremko, philip, stas, cperciva,\ncsjp, rwatson, miwi, bz"]
 portssecteam [label="Ports Security Team\nports-sect...@freebsd.org\nmiwi, 
rea, swills, wxs,\njgh, sbz, eadler, zi, remko, simon"]
 secteamsecretary [label="Security Team 
Secretary\nsecteam-secret...@freebsd.org\nremko"]
___
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: r240325 - in head/sys: cam/scsi compat/netbsd conf dev/ct dev/ncv dev/nsp dev/stg

2012-09-10 Thread John Baldwin
Author: jhb
Date: Mon Sep 10 18:49:49 2012
New Revision: 240325
URL: http://svn.freebsd.org/changeset/base/240325

Log:
  Remove some more NetBSD compat shims and other unused bits from these
  drivers:
  - Remove scsi_low_pisa.*, they were unused.
  - Remove  and calls to the stubs in that
header.  They were empty nops.
  - Retire sl_xname and use device_get_nameunit() and device_printf() with
the underlying device_t instead.
  - Remove unused {ct,ncv,nsp,stg}print() functions.
  - Remove empty SOFT_INTR_REQUIRED() macro and the unused sl_irq member.

Deleted:
  head/sys/cam/scsi/scsi_low_pisa.c
  head/sys/cam/scsi/scsi_low_pisa.h
  head/sys/compat/netbsd/physio_proc.h
Modified:
  head/sys/cam/scsi/scsi_low.c
  head/sys/cam/scsi/scsi_low.h
  head/sys/conf/files
  head/sys/dev/ct/bshw_machdep.c
  head/sys/dev/ct/ct.c
  head/sys/dev/ct/ct_isa.c
  head/sys/dev/ct/ct_machdep.h
  head/sys/dev/ct/ctvar.h
  head/sys/dev/ncv/ncr53c500.c
  head/sys/dev/ncv/ncr53c500_pccard.c
  head/sys/dev/ncv/ncr53c500hw.h
  head/sys/dev/ncv/ncr53c500var.h
  head/sys/dev/nsp/nsp.c
  head/sys/dev/nsp/nsp_pccard.c
  head/sys/dev/nsp/nspvar.h
  head/sys/dev/stg/tmc18c30.c
  head/sys/dev/stg/tmc18c30_isa.c
  head/sys/dev/stg/tmc18c30_pccard.c
  head/sys/dev/stg/tmc18c30_pci.c
  head/sys/dev/stg/tmc18c30_subr.c
  head/sys/dev/stg/tmc18c30var.h

Modified: head/sys/cam/scsi/scsi_low.c
==
--- head/sys/cam/scsi/scsi_low.cMon Sep 10 16:51:43 2012
(r240324)
+++ head/sys/cam/scsi/scsi_low.cMon Sep 10 18:49:49 2012
(r240325)
@@ -157,7 +157,7 @@ static struct scsi_low_softc_tab sl_tab 
 #ifdef SCSI_LOW_INFO_DETAIL
 #defineSCSI_LOW_INFO(slp, ti, s) scsi_low_info((slp), (ti), (s))
 #else  /* !SCSI_LOW_INFO_DETAIL */
-#defineSCSI_LOW_INFO(slp, ti, s) printf("%s: %s\n", (slp)->sl_xname, 
(s))
+#defineSCSI_LOW_INFO(slp, ti, s) device_printf((slp)->sl_dev, "%s\n", 
(s))
 #endif /* !SCSI_LOW_INFO_DETAIL */
 
 #ifdef SCSI_LOW_STATICS
@@ -439,8 +439,9 @@ scsi_low_scsi_action_cam(sim, ccb)
 #ifdef SCSI_LOW_DEBUG
if (SCSI_LOW_DEBUG_GO(SCSI_LOW_DEBUG_ACTION, target) != 0)
{
-   printf("%s: cam_action: func code 0x%x target: %d, lun: %d\n",
-   slp->sl_xname, ccb->ccb_h.func_code, target, lun);
+   device_printf(slp->sl_dev,
+   "cam_action: func code 0x%x target: %d, lun: %d\n",
+   ccb->ccb_h.func_code, target, lun);
}
 #endif /* SCSI_LOW_DEBUG */
 
@@ -449,7 +450,7 @@ scsi_low_scsi_action_cam(sim, ccb)
 #ifdef SCSI_LOW_DIAGNOSTIC
if (target == CAM_TARGET_WILDCARD || lun == CAM_LUN_WILDCARD)
{
-   printf("%s: invalid target/lun\n", slp->sl_xname);
+   device_printf(slp->sl_dev, "invalid target/lun\n");
ccb->ccb_h.status = CAM_REQ_INVALID;
xpt_done(ccb);
return;
@@ -502,7 +503,7 @@ scsi_low_scsi_action_cam(sim, ccb)
 #ifdef SCSI_LOW_DIAGNOSTIC
if (target == CAM_TARGET_WILDCARD || lun == CAM_LUN_WILDCARD)
{
-   printf("%s: invalid target/lun\n", slp->sl_xname);
+   device_printf(slp->sl_dev, "invalid target/lun\n");
ccb->ccb_h.status = CAM_REQ_INVALID;
xpt_done(ccb);
return;
@@ -530,7 +531,7 @@ scsi_low_scsi_action_cam(sim, ccb)
 #ifdef SCSI_LOW_DIAGNOSTIC
if (target == CAM_TARGET_WILDCARD)
{
-   printf("%s: invalid target\n", slp->sl_xname);
+   device_printf(slp->sl_dev, "invalid target\n");
ccb->ccb_h.status = CAM_REQ_INVALID;
xpt_done(ccb);
return;
@@ -603,7 +604,7 @@ scsi_low_scsi_action_cam(sim, ccb)
 #ifdef SCSI_LOW_DIAGNOSTIC
if (target == CAM_TARGET_WILDCARD)
{
-   printf("%s: invalid target\n", slp->sl_xname);
+   device_printf(slp->sl_dev, "invalid target\n");
ccb->ccb_h.status = CAM_REQ_INVALID;
xpt_done(ccb);
return;
@@ -624,8 +625,8 @@ scsi_low_scsi_action_cam(sim, ccb)
if (li->li_flags_valid != SCSI_LOW_LUN_FLAGS_ALL_VALID)
{
ccb->ccb_h.status = CAM_FUNC_NOTAVAIL;
-   printf("%s: invalid GET_TRANS_CURRENT_SETTINGS 
call\n",
-   slp->sl_xname);
+   device_printf(slp->sl_dev,
+   "invalid GET_TRANS_CURRENT_SETTINGS 
call\n");
goto settings_out;
}
 #endif /* SCSI_LOW_DIAGNOSTIC */
@@ -687,

svn commit: r240326 - in vendor/illumos/dist: cmd/zfs lib/libzfs/common

2012-09-10 Thread Martin Matuska
Author: mm
Date: Mon Sep 10 21:24:41 2012
New Revision: 240326
URL: http://svn.freebsd.org/changeset/base/240326

Log:
  Update vendor/illumos/dist to illumos-gate 13810:4b38a0c01186
  (zfs changes, illumos issue #3098)

Modified:
  vendor/illumos/dist/cmd/zfs/zfs_main.c
  vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c

Modified: vendor/illumos/dist/cmd/zfs/zfs_main.c
==
--- vendor/illumos/dist/cmd/zfs/zfs_main.c  Mon Sep 10 18:49:49 2012
(r240325)
+++ vendor/illumos/dist/cmd/zfs/zfs_main.c  Mon Sep 10 21:24:41 2012
(r240326)
@@ -2288,10 +2288,8 @@ userspace_cb(void *arg, const char *doma
if (!cb->cb_sid2posix) {
e = directory_name_from_sid(NULL, sid, &name,
&classes);
-   if (e != NULL) {
+   if (e != NULL)
directory_error_free(e);
-   return (1);
-   }
if (name == NULL)
name = sid;
}
@@ -2534,7 +2532,7 @@ zfs_do_userspace(int argc, char **argv)
boolean_t prtnum = B_FALSE;
boolean_t parsable = B_FALSE;
boolean_t sid2posix = B_FALSE;
-   int error = 0;
+   int ret = 0;
int c;
zfs_sort_column_t *sortcol = NULL;
int types = USTYPE_PSX_USR | USTYPE_SMB_USR;
@@ -2679,18 +2677,19 @@ zfs_do_userspace(int argc, char **argv)
!(types & (USTYPE_PSX_GRP | USTYPE_SMB_GRP
continue;
cb.cb_prop = p;
-   error = zfs_userspace(zhp, p, userspace_cb, &cb);
-   if (error)
-   break;
+   if ((ret = zfs_userspace(zhp, p, userspace_cb, &cb)) != 0)
+   return (ret);
}
 
/* Sort the list */
+   if ((node = uu_avl_first(avl_tree)) == NULL)
+   return (0);
+
us_populated = B_TRUE;
+
listpool = uu_list_pool_create("tmplist", sizeof (us_node_t),
offsetof(us_node_t, usn_listnode), NULL, UU_DEFAULT);
list = uu_list_create(listpool, NULL, UU_DEFAULT);
-
-   node = uu_avl_first(avl_tree);
uu_list_node_init(node, &node->usn_listnode, listpool);
 
while (node != NULL) {
@@ -2731,7 +2730,7 @@ zfs_do_userspace(int argc, char **argv)
uu_avl_destroy(avl_tree);
uu_avl_pool_destroy(avl_pool);
 
-   return (error);
+   return (ret);
 }
 
 /*

Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c
==
--- vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c  Mon Sep 10 
18:49:49 2012(r240325)
+++ vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c  Mon Sep 10 
21:24:41 2012(r240326)
@@ -21,9 +21,9 @@
 
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2010 Nexenta Systems, Inc. All rights reserved.
  * Copyright (c) 2012 by Delphix. All rights reserved.
  * Copyright (c) 2012 DEY Storage Systems, Inc.  All rights reserved.
+ * Copyright 2012 Nexenta Systems, Inc. All rights reserved.
  */
 
 #include 
@@ -4023,35 +4023,40 @@ zfs_userspace(zfs_handle_t *zhp, zfs_use
 zfs_userspace_cb_t func, void *arg)
 {
zfs_cmd_t zc = { 0 };
-   int error;
zfs_useracct_t buf[100];
+   libzfs_handle_t *hdl = zhp->zfs_hdl;
+   int ret;
 
(void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name));
 
zc.zc_objset_type = type;
zc.zc_nvlist_dst = (uintptr_t)buf;
 
-   /* CONSTCOND */
-   while (1) {
+   for (;;) {
zfs_useracct_t *zua = buf;
 
zc.zc_nvlist_dst_size = sizeof (buf);
-   error = ioctl(zhp->zfs_hdl->libzfs_fd,
-   ZFS_IOC_USERSPACE_MANY, &zc);
-   if (error || zc.zc_nvlist_dst_size == 0)
+   if (zfs_ioctl(hdl, ZFS_IOC_USERSPACE_MANY, &zc) != 0) {
+   char errbuf[ZFS_MAXNAMELEN + 32];
+
+   (void) snprintf(errbuf, sizeof (errbuf),
+   dgettext(TEXT_DOMAIN,
+   "cannot get used/quota for %s"), zc.zc_name);
+   return (zfs_standard_error_fmt(hdl, errno, errbuf));
+   }
+   if (zc.zc_nvlist_dst_size == 0)
break;
 
while (zc.zc_nvlist_dst_size > 0) {
-   error = func(arg, zua->zu_domain, zua->zu_rid,
-   zua->zu_space);
-   if (error != 0)
-   return (error);
+   if ((ret = func(arg, zua->zu_domain, zua->zu_rid,
+ 

svn commit: r240327 - head/sys/modules/scsi_low

2012-09-10 Thread George V. Neville-Neil
Author: gnn
Date: Mon Sep 10 21:57:40 2012
New Revision: 240327
URL: http://svn.freebsd.org/changeset/base/240327

Log:
  Remove scsi_low_pisa.c from the module Makefile to keep in line
  with r240325.

Modified:
  head/sys/modules/scsi_low/Makefile

Modified: head/sys/modules/scsi_low/Makefile
==
--- head/sys/modules/scsi_low/Makefile  Mon Sep 10 21:24:41 2012
(r240326)
+++ head/sys/modules/scsi_low/Makefile  Mon Sep 10 21:57:40 2012
(r240327)
@@ -2,7 +2,7 @@
 
 .PATH: ${.CURDIR}/../../cam/scsi
 KMOD=  scsi_low
-SRCS=  scsi_low.c scsi_low_pisa.c 
+SRCS=  scsi_low.c 
 SRCS+=  opt_ddb.h opt_scsi.h opt_cam.h bus_if.h device_if.h
 
 EXPORT_SYMS=   scsi_low_attach \
___
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: r240327 - head/sys/modules/scsi_low

2012-09-10 Thread Kim Culhan
On Mon, September 10, 2012 5:57 pm, George V. Neville-Neil wrote:
> Log:
>   Remove scsi_low_pisa.c from the module Makefile to keep in line
>   with r240325.

buildworld complains:

===> scsi_low (depend)
@ -> /usr/src/sys
machine -> /usr/src/sys/amd64/include
x86 -> /usr/src/sys/x86/include
make: don't know how to make scsi_low_pisa.c. Stop

thanks
-kim
___
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: r239382 - in head/etc: defaults rc.d

2012-09-10 Thread Bryan Drewery
On 8/19/2012 3:15 AM, Jun Kuriyama wrote:
> Author: kuriyama
> Date: Sun Aug 19 08:15:32 2012
> New Revision: 239382
> URL: http://svn.freebsd.org/changeset/base/239382
> 
> Log:
>   - Allow to pass extra parameters for each jails.
>   - To achieve above, convert jail(8) invocation to use new style
> command line "-c" flag.
>   
>   Reviewed at:freebsd-jail@

Do you plan to MFC this to stable/9?

I'm using it on 9.1-RC1 and having good results. Considering switching
to 9-STABLE.

> 
> Modified:
>   head/etc/defaults/rc.conf
>   head/etc/rc.d/jail
> 
> Modified: head/etc/defaults/rc.conf
> ==
> --- head/etc/defaults/rc.conf Sun Aug 19 02:22:16 2012(r239381)
> +++ head/etc/defaults/rc.conf Sun Aug 19 08:15:32 2012(r239382)
> @@ -705,6 +705,7 @@ jail_sysvipc_allow="NO"   # Allow SystemV 
>  #jail_example_mount_enable="NO"  # mount/umount jail's fs
>  #jail_example_fstab=""   # fstab(5) for 
> mount/umount
>  #jail_example_flags="-l -U root" # flags for jail(8)
> +#jail_example_parameters="allow.raw_sockets=1"   # extra parameters for 
> this jail
>  
>  ##
>  ### Define source_rc_confs, the mechanism used by /etc/rc.* ##
> 
> Modified: head/etc/rc.d/jail
> ==
> --- head/etc/rc.d/jailSun Aug 19 02:22:16 2012(r239381)
> +++ head/etc/rc.d/jailSun Aug 19 08:15:32 2012(r239382)
> @@ -115,6 +115,8 @@ init_variables()
>   [ -z "${_flags}" ] && _flags="-l -U root"
>   eval _consolelog=\"\${jail_${_j}_consolelog:-${jail_consolelog}}\"
>   [ -z "${_consolelog}" ] && _consolelog="/var/log/jail_${_j}_console.log"
> + eval _parameters=\"\${jail_${_j}_parameters:-${jail_parameters}}\"
> + [ -z "${_parameters}" ] && _parameters=""
>   eval _fib=\"\${jail_${_j}_fib:-${jail_fib}}\"
>  
>   # Debugging aid
> @@ -193,6 +195,7 @@ init_variables()
>  
>   debug "$_j flags: $_flags"
>   debug "$_j consolelog: $_consolelog"
> + debug "$_j parameters: $_parameters"
>  
>   if [ -z "${_hostname}" ]; then
>   err 3 "$name: No hostname has been defined for ${_j}"
> @@ -484,9 +487,19 @@ jail_handle_ips_option()
>   esac
>  
>   # Append address to list of addresses for the jail command.
> - case "${_addrl}" in
> - "") _addrl="${_addr}" ;;
> - *)  _addrl="${_addrl},${_addr}" ;;
> + case "${_type}" in
> + inet)
> + case "${_addrl}" in
> + "") _addrl="${_addr}" ;;
> + *)  _addrl="${_addrl},${_addr}" ;;
> + esac
> + ;;
> + inet6)
> + case "${_addr6l}" in
> + "") _addr6l="${_addr}" ;;
> + *)  _addr6l="${_addr6l},${_addr}" ;;
> + esac
> + ;;
>   esac
>  
>   # Configure interface alias if requested by a given interface
> @@ -576,6 +589,7 @@ jail_start()
>   continue;
>   fi
>   _addrl=""
> + _addr6l=""
>   jail_ips "add"
>   if [ -n "${_fib}" ]; then
>   _setfib="setfib -F '${_fib}'"
> @@ -641,8 +655,8 @@ jail_start()
>   i=$((i + 1))
>   done
>  
> - eval ${_setfib} jail -n ${_jail} ${_flags} -i ${_rootdir} 
> ${_hostname} \
> - \"${_addrl}\" ${_exec_start} > ${_tmp_jail} 2>&1 \
> + eval ${_setfib} jail -n ${_jail} ${_flags} -i -c 
> path=${_rootdir} host.hostname=${_hostname} \
> + ip4.addr=\"${_addrl}\" ip6.addr=\"${_addr6l}\" 
> ${_parameters} command=${_exec_start} > ${_tmp_jail} 2>&1 \
> 
>   if [ "$?" -eq 0 ] ; then
> ___
> 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"
> 


-- 
Regards,
Bryan Drewery
bdrewery@freenode/EFNet
___
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: r240328 - head/share/misc

2012-09-10 Thread Eitan Adler
Author: eadler
Date: Tue Sep 11 02:29:36 2012
New Revision: 240328
URL: http://svn.freebsd.org/changeset/base/240328

Log:
  Follow up to doc r39516:
  
Update the Vendor Relations Team information to reflect that
incoming email is now handled by core@ and the Foundation.
  
  Reviewed by:  gjb
  MFC after:3 days

Modified:
  head/share/misc/organization.dot

Modified: head/share/misc/organization.dot
==
--- head/share/misc/organization.dotMon Sep 10 21:57:40 2012
(r240327)
+++ head/share/misc/organization.dotTue Sep 11 02:29:36 2012
(r240328)
@@ -59,7 +59,7 @@ webmaster [label="Webmaster Team\nwebmas
 
 donations [label="Donations Team\ndonati...@freebsd.org\ngjb, wilko, gahr, 
pgolluci,\nobrien, trhodes, ds,\nrwatson"]
 marketing [label="Marketing Team\nmarket...@freebsd.org\nSteven Beedle, Denise 
Ebery, deb,\njkoshy, Dru Lavigne, mwlucas, imp,\nKris Moore, murray, 
mattt,\nJeremy C. Reed, rwatson"]
-vendorrelations [label="Vendor Relations 
Team\nvendor-relati...@freebsd.org\ngioria, jmg, rik,\nphilip, hmp, 
marks,\nmurray"]
+vendorrelations [label="Vendor Relations\nvendor-relati...@freebsd.org\ncore, 
FreeBSD Foundation"]
 
 # Here are the team relationships.
 # Group together all the entries for the superior team.
___
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: r240329 - vendor/NetBSD/bmake/20120831

2012-09-10 Thread Marcel Moolenaar
Author: marcel
Date: Tue Sep 11 02:41:18 2012
New Revision: 240329
URL: http://svn.freebsd.org/changeset/base/240329

Log:
  "Tag" the 20120831 Portable BSD make import.

Added:
  vendor/NetBSD/bmake/20120831/
 - copied from r240328, vendor/NetBSD/bmake/dist/
___
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: r240330 - vendor/NetBSD/bmake/dist

2012-09-10 Thread Marcel Moolenaar
Author: marcel
Date: Tue Sep 11 02:56:02 2012
New Revision: 240330
URL: http://svn.freebsd.org/changeset/base/240330

Log:
  Import the 20120831 release of the "Portable" BSD make tool (from NetBSD).
  
  Submitted by:   Simon Gerraty 

Modified:
  vendor/NetBSD/bmake/dist/ChangeLog
  vendor/NetBSD/bmake/dist/Makefile.in
  vendor/NetBSD/bmake/dist/bmake.1
  vendor/NetBSD/bmake/dist/bmake.cat1
  vendor/NetBSD/bmake/dist/bsd.after-import.mk
  vendor/NetBSD/bmake/dist/main.c
  vendor/NetBSD/bmake/dist/make.1
  vendor/NetBSD/bmake/dist/nonints.h

Modified: vendor/NetBSD/bmake/dist/ChangeLog
==
--- vendor/NetBSD/bmake/dist/ChangeLog  Tue Sep 11 02:41:18 2012
(r240329)
+++ vendor/NetBSD/bmake/dist/ChangeLog  Tue Sep 11 02:56:02 2012
(r240330)
@@ -1,3 +1,22 @@
+2012-08-31  Simon J. Gerraty  
+
+   * Makefile.in (MAKE_VERSION): bump version to 20120831
+ Merge with NetBSD make, pick up
+ o cast sizeof() to int for comparison
+ o minor make.1 tweak
+
+2012-08-30  Simon J. Gerraty  
+
+   * Makefile.in (MAKE_VERSION): bump version to 20120830
+ Merge with NetBSD make, pick up
+ o .MAKE.EXPAND_VARIABLES knob can control default behavior of -V
+ o debug flag -dV causes -V to show raw value regardless.
+   
+2012-07-05  Simon J. Gerraty  
+
+   * bsd.after-import.mk (after-import): ensure unit-tests/Makefile
+ gets SRCTOP set.
+
 2012-07-04  Simon J. Gerraty  
 
* Makefile.in (MAKE_VERSION): bump version to 20120704

Modified: vendor/NetBSD/bmake/dist/Makefile.in
==
--- vendor/NetBSD/bmake/dist/Makefile.inTue Sep 11 02:41:18 2012
(r240329)
+++ vendor/NetBSD/bmake/dist/Makefile.inTue Sep 11 02:56:02 2012
(r240330)
@@ -1,7 +1,7 @@
 #  $NetBSD: Makefile,v 1.56 2012/05/30 21:54:23 sjg Exp $
 #  @(#)Makefile5.2 (Berkeley) 12/28/90
 
-#  $Id: Makefile.in,v 1.168 2012/07/05 04:10:23 sjg Exp $
+#  $Id: Makefile.in,v 1.170 2012/08/31 06:46:22 sjg Exp $
 
 PROG=  bmake
 SRCS=  arch.c buf.c compat.c cond.c dir.c for.c hash.c job.c main.c \
@@ -21,7 +21,7 @@ srcdir= @srcdir@
 CC?= @CC@
 
 # Base version on src date
-MAKE_VERSION= 20120704
+MAKE_VERSION= 20120831
 MACHINE=@machine@
 MACHINE_ARCH=@machine_arch@
 DEFAULT_SYS_PATH = @default_sys_path@

Modified: vendor/NetBSD/bmake/dist/bmake.1
==
--- vendor/NetBSD/bmake/dist/bmake.1Tue Sep 11 02:41:18 2012
(r240329)
+++ vendor/NetBSD/bmake/dist/bmake.1Tue Sep 11 02:56:02 2012
(r240330)
@@ -1,4 +1,4 @@
-.\"$NetBSD: make.1,v 1.204 2012/04/24 20:12:16 sjg Exp $
+.\"$NetBSD: make.1,v 1.206 2012/08/30 22:35:37 wiz Exp $
 .\"
 .\" Copyright (c) 1990, 1993
 .\"The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"from: @(#)make.18.4 (Berkeley) 3/19/94
 .\"
-.Dd April 24, 2012
+.Dd August 30, 2012
 .Dt MAKE 1
 .Os
 .Sh NAME
@@ -203,6 +203,10 @@ Print debugging information about makefi
 Print debugging information about suffix-transformation rules.
 .It Ar t
 Print debugging information about target list maintenance.
+.It Ar V
+Force the
+.Fl V
+option to print raw values of variables.
 .It Ar v
 Print debugging information about variable assignment.
 .It Ar x
@@ -675,6 +679,10 @@ and cannot be confused with the special 
 Names the makefile (default
 .Ql Pa .depend )
 from which generated dependencies are read.
+.It Va .MAKE.EXPAND_VARIABLES
+A boolean that controls the default behavior of the
+.Fl V
+option.
 .It Va .MAKE.EXPORTED
 The list of variables exported by
 .Nm .

Modified: vendor/NetBSD/bmake/dist/bmake.cat1
==
--- vendor/NetBSD/bmake/dist/bmake.cat1 Tue Sep 11 02:41:18 2012
(r240329)
+++ vendor/NetBSD/bmake/dist/bmake.cat1 Tue Sep 11 02:56:02 2012
(r240330)
@@ -118,6 +118,1318 @@ DDEESSCCRRIIPPTTIIOONN
  _t   Print debugging information about target list mainte-
  nance.
 
+ _V   Force the --VV option to print raw values of 
variables.
+
+ _v   Print debugging information about variable assignment.
+
+ _x   Run shell commands with --xx so the actual commands 
are
+ printed as they are executed.
+
+ --ee  Specify that environment variables override macro assignments
+ within makefiles.
+
+ --ff _m_a_k_e_f_i_l_e
+ Specify a makefile to read instead of the default 
`_m_a_k_e_f_i_l_e'.  If
+ _m_a_k_e_f_i_l_e is `--', standard input is read.  
Multiple makefiles may
+ be specified, and are read in the order specified.
+
+ --II

svn commit: r240331 - vendor/NetBSD/bmake/20120831

2012-09-10 Thread Marcel Moolenaar
Author: marcel
Date: Tue Sep 11 03:01:48 2012
New Revision: 240331
URL: http://svn.freebsd.org/changeset/base/240331

Log:
  Remove bad tag.

Deleted:
  vendor/NetBSD/bmake/20120831/
___
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: r240332 - vendor/NetBSD/bmake/20120831

2012-09-10 Thread Marcel Moolenaar
Author: marcel
Date: Tue Sep 11 03:02:40 2012
New Revision: 240332
URL: http://svn.freebsd.org/changeset/base/240332

Log:
  "Tag" the 20120831 Portable BSD make import.

Added:
  vendor/NetBSD/bmake/20120831/
 - copied from r240331, vendor/NetBSD/bmake/dist/
___
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: r240333 - head/sys/dev/ath

2012-09-10 Thread Adrian Chadd
Author: adrian
Date: Tue Sep 11 04:11:42 2012
New Revision: 240333
URL: http://svn.freebsd.org/changeset/base/240333

Log:
  Clear the correct descriptor when going through the chained together
  gather DMA descriptor list.
  
  Pointy hat to: adrian@, for even USING bf->bf_desc here instead of 'ds'.

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

Modified: head/sys/dev/ath/if_ath_tx.c
==
--- head/sys/dev/ath/if_ath_tx.cTue Sep 11 03:02:40 2012
(r240332)
+++ head/sys/dev/ath/if_ath_tx.cTue Sep 11 04:11:42 2012
(r240333)
@@ -380,7 +380,7 @@ ath_tx_chaindesclist(struct ath_softc *s
 
/* Make sure the 11n aggregate fields are cleared */
if (ath_tx_is_11n(sc))
-   ath_hal_clr11n_aggr(sc->sc_ah, bf->bf_desc);
+   ath_hal_clr11n_aggr(sc->sc_ah, (struct ath_desc *) ds);
 
isFirstDesc = 0;
 #ifdef ATH_DEBUG
___
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: r240334 - head/etc/rc.d

2012-09-10 Thread David E. O'Brien
Author: obrien
Date: Tue Sep 11 04:53:32 2012
New Revision: 240334
URL: http://svn.freebsd.org/changeset/base/240334

Log:
  Add postrandom.

Modified:
  head/etc/rc.d/Makefile

Modified: head/etc/rc.d/Makefile
==
--- head/etc/rc.d/Makefile  Tue Sep 11 04:11:42 2012(r240333)
+++ head/etc/rc.d/Makefile  Tue Sep 11 04:53:32 2012(r240334)
@@ -107,6 +107,7 @@ FILES=  DAEMON \
pf \
pflog \
pfsync \
+   postrandom \
powerd \
power_profile \
ppp \
___
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: r240335 - in head/sys/boot: i386/loader sparc64/loader

2012-09-10 Thread Andrey V. Elsukov
Author: ae
Date: Tue Sep 11 04:54:44 2012
New Revision: 240335
URL: http://svn.freebsd.org/changeset/base/240335

Log:
  Slightly reduce an overhead for the open() call in the zfsloader.
  libstand(3) tries to detect file system in the predefined order,
  but zfsloader usually is used for the booting from ZFS, and there is
  no need to try detect several file system types for each open() call.

Modified:
  head/sys/boot/i386/loader/conf.c
  head/sys/boot/sparc64/loader/main.c

Modified: head/sys/boot/i386/loader/conf.c
==
--- head/sys/boot/i386/loader/conf.cTue Sep 11 04:53:32 2012
(r240334)
+++ head/sys/boot/i386/loader/conf.cTue Sep 11 04:54:44 2012
(r240335)
@@ -70,6 +70,9 @@ struct devsw *devsw[] = {
 };
 
 struct fs_ops *file_system[] = {
+#if defined(LOADER_ZFS_SUPPORT)
+&zfs_fsops,
+#endif
 &ufs_fsops,
 &ext2fs_fsops,
 &dosfs_fsops,
@@ -78,9 +81,6 @@ struct fs_ops *file_system[] = {
 &nandfs_fsops,
 #endif
 &splitfs_fsops,
-#if defined(LOADER_ZFS_SUPPORT)
-&zfs_fsops,
-#endif
 #ifdef LOADER_GZIP_SUPPORT
 &gzipfs_fsops,
 #endif

Modified: head/sys/boot/sparc64/loader/main.c
==
--- head/sys/boot/sparc64/loader/main.c Tue Sep 11 04:53:32 2012
(r240334)
+++ head/sys/boot/sparc64/loader/main.c Tue Sep 11 04:54:44 2012
(r240335)
@@ -170,15 +170,15 @@ struct file_format *file_formats[] = {
 };
 
 struct fs_ops *file_system[] = {
+#ifdef LOADER_ZFS_SUPPORT
+   &zfs_fsops,
+#endif
 #ifdef LOADER_UFS_SUPPORT
&ufs_fsops,
 #endif
 #ifdef LOADER_CD9660_SUPPORT
&cd9660_fsops,
 #endif
-#ifdef LOADER_ZFS_SUPPORT
-   &zfs_fsops,
-#endif
 #ifdef LOADER_ZIP_SUPPORT
&zipfs_fsops,
 #endif
___
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: r240336 - head/etc/rc.d

2012-09-10 Thread David E. O'Brien
Author: obrien
Date: Tue Sep 11 05:04:59 2012
New Revision: 240336
URL: http://svn.freebsd.org/changeset/base/240336

Log:
  Simply things so that "#REQUIRE: FILESYSTEMS" means the file
  systems are fully "ready to go".
  
  'FILESYSTEMS' states: "This is a dummy dependency, for services which
  require file systems to be mounted before starting."  However, we have
  'var' which is was run after 'FILESYSTEMS' and can mount /var if it
  already isn't mounted.  Furthermore, several scripts cannot use /var
  until 'cleanvar' has done its thing.  Thus "FILESYSTEMS" hasn't really
  meant all critical file systems are fully usable.

Modified:
  head/etc/rc.d/FILESYSTEMS
  head/etc/rc.d/addswap
  head/etc/rc.d/amd
  head/etc/rc.d/cleanvar
  head/etc/rc.d/cron
  head/etc/rc.d/dmesg
  head/etc/rc.d/ftpd
  head/etc/rc.d/inetd
  head/etc/rc.d/ipmon
  head/etc/rc.d/jail
  head/etc/rc.d/ldconfig
  head/etc/rc.d/mixer
  head/etc/rc.d/mountcritremote
  head/etc/rc.d/moused
  head/etc/rc.d/mrouted
  head/etc/rc.d/named
  head/etc/rc.d/netif
  head/etc/rc.d/newsyslog
  head/etc/rc.d/ntpd
  head/etc/rc.d/pflog
  head/etc/rc.d/postrandom
  head/etc/rc.d/random
  head/etc/rc.d/rarpd
  head/etc/rc.d/resolv
  head/etc/rc.d/sendmail
  head/etc/rc.d/sshd
  head/etc/rc.d/syslogd
  head/etc/rc.d/utx
  head/etc/rc.d/var
  head/etc/rc.d/watchdogd

Modified: head/etc/rc.d/FILESYSTEMS
==
--- head/etc/rc.d/FILESYSTEMS   Tue Sep 11 04:54:44 2012(r240335)
+++ head/etc/rc.d/FILESYSTEMS   Tue Sep 11 05:04:59 2012(r240336)
@@ -4,7 +4,7 @@
 #
 
 # PROVIDE: FILESYSTEMS
-# REQUIRE: root mountcritlocal zfs
+# REQUIRE: root mountcritlocal cleanvar zfs
 
 #  This is a dummy dependency, for services which require file systems
 #  to be mounted before starting.  It also serves as the default early /

Modified: head/etc/rc.d/addswap
==
--- head/etc/rc.d/addswap   Tue Sep 11 04:54:44 2012(r240335)
+++ head/etc/rc.d/addswap   Tue Sep 11 05:04:59 2012(r240336)
@@ -7,6 +7,7 @@
 
 # PROVIDE: addswap
 # REQUIRE: FILESYSTEMS kld
+# BEFORE:  netif
 # KEYWORD: nojail
 
 . /etc/rc.subr

Modified: head/etc/rc.d/amd
==
--- head/etc/rc.d/amd   Tue Sep 11 04:54:44 2012(r240335)
+++ head/etc/rc.d/amd   Tue Sep 11 05:04:59 2012(r240336)
@@ -4,7 +4,7 @@
 #
 
 # PROVIDE: amd
-# REQUIRE: rpcbind ypset nfsclient cleanvar ldconfig
+# REQUIRE: rpcbind ypset nfsclient FILESYSTEMS ldconfig
 # BEFORE: DAEMON
 # KEYWORD: nojail shutdown
 

Modified: head/etc/rc.d/cleanvar
==
--- head/etc/rc.d/cleanvar  Tue Sep 11 04:54:44 2012(r240335)
+++ head/etc/rc.d/cleanvar  Tue Sep 11 05:04:59 2012(r240336)
@@ -4,7 +4,7 @@
 #
 
 # PROVIDE: cleanvar
-# REQUIRE: FILESYSTEMS var
+# REQUIRE: var
 
 . /etc/rc.subr
 

Modified: head/etc/rc.d/cron
==
--- head/etc/rc.d/cron  Tue Sep 11 04:54:44 2012(r240335)
+++ head/etc/rc.d/cron  Tue Sep 11 05:04:59 2012(r240336)
@@ -4,7 +4,7 @@
 #
 
 # PROVIDE: cron
-# REQUIRE: LOGIN cleanvar
+# REQUIRE: LOGIN FILESYSTEMS
 # BEFORE: securelevel
 # KEYWORD: shutdown
 

Modified: head/etc/rc.d/dmesg
==
--- head/etc/rc.d/dmesg Tue Sep 11 04:54:44 2012(r240335)
+++ head/etc/rc.d/dmesg Tue Sep 11 05:04:59 2012(r240336)
@@ -4,7 +4,7 @@
 #
 
 # PROVIDE: dmesg
-# REQUIRE: mountcritremote cleanvar
+# REQUIRE: mountcritremote FILESYSTEMS
 # BEFORE:  DAEMON
 # KEYWORD: nojail
 

Modified: head/etc/rc.d/ftpd
==
--- head/etc/rc.d/ftpd  Tue Sep 11 04:54:44 2012(r240335)
+++ head/etc/rc.d/ftpd  Tue Sep 11 05:04:59 2012(r240336)
@@ -4,7 +4,7 @@
 #
 
 # PROVIDE: ftpd
-# REQUIRE: LOGIN cleanvar
+# REQUIRE: LOGIN FILESYSTEMS
 # KEYWORD: shutdown
 
 . /etc/rc.subr

Modified: head/etc/rc.d/inetd
==
--- head/etc/rc.d/inetd Tue Sep 11 04:54:44 2012(r240335)
+++ head/etc/rc.d/inetd Tue Sep 11 05:04:59 2012(r240336)
@@ -4,7 +4,7 @@
 #
 
 # PROVIDE: inetd
-# REQUIRE: DAEMON LOGIN cleanvar
+# REQUIRE: DAEMON LOGIN FILESYSTEMS
 # KEYWORD: shutdown
 
 . /etc/rc.subr

Modified: head/etc/rc.d/ipmon
==
--- head/etc/rc.d/ipmon Tue Sep 11 04:54:44 2012(r240335)
+++ head/etc/rc.d/ipmon Tue Sep 11 05:04:59 2012(r240336)
@@ -4,7 +4,7 @@
 #
 
 # PROVIDE: ipmon
-# REQUIRE: FILESYSTEMS hostname sysctl cleanvar ipfilter
+# REQUIRE: FILESYSTEMS hostname sysctl FI

svn commit: r240337 - stable/9/sys/kern

2012-09-10 Thread Andriy Gapon
Author: avg
Date: Tue Sep 11 05:58:32 2012
New Revision: 240337
URL: http://svn.freebsd.org/changeset/base/240337

Log:
  MFC r235777: Make dumptid non-static. It is used by libkvm.
  
  PR:   kern/167671
  MFC slacker:  harti

Modified:
  stable/9/sys/kern/kern_shutdown.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/kern/kern_shutdown.c
==
--- stable/9/sys/kern/kern_shutdown.c   Tue Sep 11 05:04:59 2012
(r240336)
+++ stable/9/sys/kern/kern_shutdown.c   Tue Sep 11 05:58:32 2012
(r240337)
@@ -148,7 +148,7 @@ static struct dumperinfo dumper;/* our 
 
 /* Context information for dump-debuggers. */
 static struct pcb dumppcb; /* Registers. */
-static lwpid_t dumptid;/* Thread ID. */
+lwpid_t dumptid;   /* Thread ID. */
 
 static void poweroff_wait(void *, int);
 static void shutdown_halt(void *junk, int howto);
___
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: r240338 - stable/8/sys/kern

2012-09-10 Thread Andriy Gapon
Author: avg
Date: Tue Sep 11 05:59:19 2012
New Revision: 240338
URL: http://svn.freebsd.org/changeset/base/240338

Log:
  MFC r235777: Make dumptid non-static. It is used by libkvm.
  
  PR:   kern/167671
  MFC slacker:  harti

Modified:
  stable/8/sys/kern/kern_shutdown.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/kern/   (props changed)

Modified: stable/8/sys/kern/kern_shutdown.c
==
--- stable/8/sys/kern/kern_shutdown.c   Tue Sep 11 05:58:32 2012
(r240337)
+++ stable/8/sys/kern/kern_shutdown.c   Tue Sep 11 05:59:19 2012
(r240338)
@@ -146,7 +146,7 @@ static struct dumperinfo dumper;/* our 
 
 /* Context information for dump-debuggers. */
 static struct pcb dumppcb; /* Registers. */
-static lwpid_t dumptid;/* Thread ID. */
+lwpid_t dumptid;   /* Thread ID. */
 
 static void boot(int) __dead2;
 static void poweroff_wait(void *, 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: r240339 - head/crypto/openssl/crypto

2012-09-10 Thread Andriy Gapon
Author: avg
Date: Tue Sep 11 06:10:49 2012
New Revision: 240339
URL: http://svn.freebsd.org/changeset/base/240339

Log:
  openssl: change SHLIB_VERSION_NUMBER to reflect the reality
  
  Note: I timed out waiting for an exp-run for this change but I survived
  having it locally for quite a long time.
  
  MFC after:1 month
  X-MFC note:   SHLIB_MAJOR is 6 in stable/8 and stable/9

Modified:
  head/crypto/openssl/crypto/opensslv.h

Modified: head/crypto/openssl/crypto/opensslv.h
==
--- head/crypto/openssl/crypto/opensslv.h   Tue Sep 11 05:59:19 2012
(r240338)
+++ head/crypto/openssl/crypto/opensslv.h   Tue Sep 11 06:10:49 2012
(r240339)
@@ -83,7 +83,7 @@
  * should only keep the versions that are binary compatible with the current.
  */
 #define SHLIB_VERSION_HISTORY ""
-#define SHLIB_VERSION_NUMBER "1.0.0"
+#define SHLIB_VERSION_NUMBER "7"
 
 
 #endif /* HEADER_OPENSSLV_H */
___
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: r240340 - head/share/man/man4

2012-09-10 Thread Andriy Gapon
Author: avg
Date: Tue Sep 11 06:14:03 2012
New Revision: 240340
URL: http://svn.freebsd.org/changeset/base/240340

Log:
  acpi.4: machdep.cpu_idle_hlt no longer exists
  
  MFC after:1 week

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

Modified: head/share/man/man4/acpi.4
==
--- head/share/man/man4/acpi.4  Tue Sep 11 06:10:49 2012(r240339)
+++ head/share/man/man4/acpi.4  Tue Sep 11 06:14:03 2012(r240340)
@@ -80,8 +80,12 @@ A scheduling algorithm will select state
 and this setting
 as system load dictates.
 To enable ACPI CPU idling control,
-.Va machdep.cpu_idle_hlt
-must be set to 1.
+.Va machdep.idle
+should be set to
+.Li acpi
+if it is listed in
+.Va machdep.idle_available
+.
 .It Va hw.acpi.cpu.cx_supported
 List of supported CPU idle states and their transition latency
 in microseconds.
___
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: r240341 - head/sys/boot/i386/loader

2012-09-10 Thread Andriy Gapon
Author: avg
Date: Tue Sep 11 06:15:55 2012
New Revision: 240341
URL: http://svn.freebsd.org/changeset/base/240341

Log:
  a bit of trailing whitespace cleanup
  
  MFC after:1 week

Modified:
  head/sys/boot/i386/loader/main.c

Modified: head/sys/boot/i386/loader/main.c
==
--- head/sys/boot/i386/loader/main.cTue Sep 11 06:14:03 2012
(r240340)
+++ head/sys/boot/i386/loader/main.cTue Sep 11 06:15:55 2012
(r240341)
@@ -322,13 +322,13 @@ command_heap(int argc, char *argv[])
 }
 
 /* ISA bus access functions for PnP, derived from  */
-static int 
+static int
 isa_inb(int port)
 {
 u_char data;
-
-if (__builtin_constant_p(port) && 
-   (((port) & 0x) < 0x100) && 
+
+if (__builtin_constant_p(port) &&
+   (((port) & 0x) < 0x100) &&
((port) < 0x1)) {
__asm __volatile("inb %1,%0" : "=a" (data) : "id" ((u_short)(port)));
 } else {
@@ -341,9 +341,9 @@ static void
 isa_outb(int port, int value)
 {
 u_char al = value;
-
-if (__builtin_constant_p(port) && 
-   (((port) & 0x) < 0x100) && 
+
+if (__builtin_constant_p(port) &&
+   (((port) & 0x) < 0x100) &&
((port) < 0x1)) {
__asm __volatile("outb %0,%1" : : "a" (al), "id" ((u_short)(port)));
 } else {
___
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: r240342 - head/sys/boot/common

2012-09-10 Thread Andriy Gapon
Author: avg
Date: Tue Sep 11 06:18:36 2012
New Revision: 240342
URL: http://svn.freebsd.org/changeset/base/240342

Log:
  boot: file_loadraw should strdup name argument
  
  ... the same way it's done for type argument.
  
  MFC after:2 weeks

Modified:
  head/sys/boot/common/module.c

Modified: head/sys/boot/common/module.c
==
--- head/sys/boot/common/module.c   Tue Sep 11 06:15:55 2012
(r240341)
+++ head/sys/boot/common/module.c   Tue Sep 11 06:18:36 2012
(r240342)
@@ -396,7 +396,7 @@ file_loadraw(char *type, char *name)
 
 /* Looks OK so far; create & populate control structure */
 fp = file_alloc();
-fp->f_name = name;
+fp->f_name = strdup(name);
 fp->f_type = strdup(type);
 fp->f_args = NULL;
 fp->f_metadata = 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: r240343 - head/etc/rc.d

2012-09-10 Thread Andriy Gapon
Author: avg
Date: Tue Sep 11 06:25:10 2012
New Revision: 240343
URL: http://svn.freebsd.org/changeset/base/240343

Log:
  rc.d/power_profile: use recently added Cmax for cx_lowest
  
  Trying to determine current lowest C-state after an AC event is racy
  with C-states actually being changed by ACPI platform and kernel driver.
  
  MFC after:3 weeks

Modified:
  head/etc/rc.d/power_profile

Modified: head/etc/rc.d/power_profile
==
--- head/etc/rc.d/power_profile Tue Sep 11 06:18:36 2012(r240342)
+++ head/etc/rc.d/power_profile Tue Sep 11 06:25:10 2012(r240343)
@@ -81,8 +81,7 @@ esac
 # Set the various sysctls based on the profile's values.
 node="hw.acpi.cpu.cx_lowest"
 highest_value="C1"
-lowest_value="`(sysctl -n dev.cpu.0.cx_supported | \
-   awk '{ print "C" split($0, a) }' -) 2> /dev/null`"
+lowest_value="Cmax"
 eval value=\$${profile}_cx_lowest
 sysctl_set
 
___
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: r240344 - head/sys/dev/acpica

2012-09-10 Thread Andriy Gapon
Author: avg
Date: Tue Sep 11 06:26:20 2012
New Revision: 240344
URL: http://svn.freebsd.org/changeset/base/240344

Log:
  acpi_cpu: free result of device_get_children
  
  MFC after:1 week

Modified:
  head/sys/dev/acpica/acpi_cpu.c

Modified: head/sys/dev/acpica/acpi_cpu.c
==
--- head/sys/dev/acpica/acpi_cpu.c  Tue Sep 11 06:25:10 2012
(r240343)
+++ head/sys/dev/acpica/acpi_cpu.c  Tue Sep 11 06:26:20 2012
(r240344)
@@ -862,6 +862,7 @@ acpi_cpu_startup(void *arg)
 cpu_cx_lowest_lim = 0;
 cpu_disable_idle = FALSE;
 cpu_idle_hook = acpi_cpu_idle;
+free(cpu_devices, M_TEMP);
 }
 
 static void
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"