svn commit: r244989 - in head/sys: netinet netinet6

2013-01-03 Thread Peter Wemm
Author: peter
Date: Thu Jan  3 10:21:28 2013
New Revision: 244989
URL: http://svnweb.freebsd.org/changeset/base/244989

Log:
  Temporarily revert rev 244678.  This is causing loopback problems with
  the lo (loopback) interfaces.

Modified:
  head/sys/netinet/in.c
  head/sys/netinet6/in6.c

Modified: head/sys/netinet/in.c
==
--- head/sys/netinet/in.c   Thu Jan  3 07:25:30 2013(r244988)
+++ head/sys/netinet/in.c   Thu Jan  3 10:21:28 2013(r244989)
@@ -819,19 +819,14 @@ in_ifinit(struct ifnet *ifp, struct in_i
return (error);
 
/*
-* Give the interface a chance to initialize if this is its first
-* address, and to validate the address if necessary.
-*
-* Historically, drivers managed IFF_UP flag theirselves, so we
-* need to check whether driver did that.
+* Give the interface a chance to initialize
+* if this is its first address,
+* and to validate the address if necessary.
 */
-   flags = ifp->if_flags;
if (ifp->if_ioctl != NULL &&
(error = (*ifp->if_ioctl)(ifp, SIOCSIFADDR, (caddr_t)ia)) != 0)
/* LIST_REMOVE(ia, ia_hash) is done in in_control */
return (error);
-   if ((ifp->if_flags & IFF_UP) && (flags & IFF_UP) == 0)
-   if_up(ifp);
 
/*
 * Be compatible with network classes, if netmask isn't supplied,

Modified: head/sys/netinet6/in6.c
==
--- head/sys/netinet6/in6.c Thu Jan  3 07:25:30 2013(r244988)
+++ head/sys/netinet6/in6.c Thu Jan  3 10:21:28 2013(r244989)
@@ -1874,18 +1874,9 @@ in6_ifinit(struct ifnet *ifp, struct in6
ia->ia_addr = *sin6;
 
if (ifacount <= 1 && ifp->if_ioctl) {
-   int flags;
-
-   /*
-* Historically, drivers managed IFF_UP flag theirselves, so we
-* need to check whether driver did that.
-*/
-   flags = ifp->if_flags;
error = (*ifp->if_ioctl)(ifp, SIOCSIFADDR, (caddr_t)ia);
if (error)
return (error);
-   if ((ifp->if_flags & IFF_UP) && (flags & IFF_UP) == 0)
-   if_up(ifp);
}
 
ia->ia_ifa.ifa_metric = ifp->if_metric;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r244990 - head/sys/dev/xen/control

2013-01-03 Thread Marius Strobl
Author: marius
Date: Thu Jan  3 13:42:45 2013
New Revision: 244990
URL: http://svnweb.freebsd.org/changeset/base/244990

Log:
  - Fix !SMP build.
  - Replace incorrect function names in printf(9) strings with __func__.
  - Make xctrl_shutdown_reasons table const.
  - Use nitems() rather than rolling an own version.
  - Use DEVMETHOD_END.
  - Use NULL rather than 0 for pointers.
  
  MFC after:3 days

Modified:
  head/sys/dev/xen/control/control.c

Modified: head/sys/dev/xen/control/control.c
==
--- head/sys/dev/xen/control/control.c  Thu Jan  3 10:21:28 2013
(r244989)
+++ head/sys/dev/xen/control/control.c  Thu Jan  3 13:42:45 2013
(r244990)
@@ -125,7 +125,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #endif
 
-
 #include 
 
 #include 
@@ -145,8 +144,6 @@ __FBSDID("$FreeBSD$");
 
 #include 
 
-#define NUM_ELEMENTS(x) (sizeof(x) / sizeof(*(x)))
-
 /*--- Forward Declarations --*/
 /** Function signature for shutdown event handlers. */
 typedefvoid (xctrl_shutdown_handler_t)(void);
@@ -165,7 +162,7 @@ struct xctrl_shutdown_reason {
 };
 
 /** Lookup table for shutdown event name to handler. */
-static struct xctrl_shutdown_reason xctrl_shutdown_reasons[] = {
+static const struct xctrl_shutdown_reason xctrl_shutdown_reasons[] = {
{ "poweroff", xctrl_poweroff },
{ "reboot",   xctrl_reboot   },
{ "suspend",  xctrl_suspend  },
@@ -198,7 +195,6 @@ extern void xencons_resume(void);
 static void
 xctrl_suspend()
 {
-   u_int cpuid;
int i, j, k, fpp;
unsigned long max_pfn, start_info_mfn;
 
@@ -207,6 +203,8 @@ xctrl_suspend()
 #ifdef SMP
struct thread *td;
cpuset_t map;
+   u_int cpuid;
+
/*
 * Bind us to CPU 0 and stop any other VCPUs.
 */
@@ -231,7 +229,7 @@ xctrl_suspend()
mtx_lock(&Giant);
if (DEVICE_SUSPEND(root_bus) != 0) {
mtx_unlock(&Giant);
-   printf("xen_suspend: device_suspend failed\n");
+   printf("%s: device_suspend failed\n", __func__);
 #ifdef SMP
if (!CPU_EMPTY(&map))
restart_cpus(map);
@@ -343,9 +341,9 @@ xctrl_suspend()
 * drivers need this.
 */
mtx_lock(&Giant);
-   if (DEVICE_SUSPEND(root_bus)) {
+   if (DEVICE_SUSPEND(root_bus) != 0) {
mtx_unlock(&Giant);
-   printf("xen_suspend: device_suspend failed\n");
+   printf("%s: device_suspend failed\n", __func__);
return;
}
mtx_unlock(&Giant);
@@ -396,8 +394,8 @@ xctrl_halt()
 static void
 xctrl_on_watch_event(struct xs_watch *watch, const char **vec, unsigned int 
len)
 {
-   struct xctrl_shutdown_reason *reason;
-   struct xctrl_shutdown_reason *last_reason;
+   const struct xctrl_shutdown_reason *reason;
+   const struct xctrl_shutdown_reason *last_reason;
char *result;
int   error;
int   result_len;
@@ -408,7 +406,7 @@ xctrl_on_watch_event(struct xs_watch *wa
return;
 
reason = xctrl_shutdown_reasons;
-   last_reason = reason + NUM_ELEMENTS(xctrl_shutdown_reasons);
+   last_reason = reason + nitems(xctrl_shutdown_reasons);
while (reason < last_reason) {
 
if (!strcmp(result, reason->name)) {
@@ -511,10 +509,10 @@ static device_method_t xctrl_methods[] =
DEVMETHOD(device_attach,xctrl_attach), 
DEVMETHOD(device_detach,xctrl_detach), 
  
-   { 0, 0 } 
+   DEVMETHOD_END
 }; 
 
 DEFINE_CLASS_0(xctrl, xctrl_driver, xctrl_methods, sizeof(struct xctrl_softc));
 devclass_t xctrl_devclass; 
  
-DRIVER_MODULE(xctrl, xenstore, xctrl_driver, xctrl_devclass, 0, 0);
+DRIVER_MODULE(xctrl, xenstore, xctrl_driver, xctrl_devclass, NULL, NULL);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r244991 - head/sys/dev/xen/netfront

2013-01-03 Thread Marius Strobl
Author: marius
Date: Thu Jan  3 13:44:25 2013
New Revision: 244991
URL: http://svnweb.freebsd.org/changeset/base/244991

Log:
  - Replace partially incorrect function names in panic(9) strings with
__func__ and add some missing ones.
  - Remove a stale comment.
  - Remove unused NUM_ELEMENTS macro.
  - Remove extra empty lines.
  - Use DEVMETHOD_END.
  - Use NULL rather than 0 for pointers.
  
  MFC after:3 days

Modified:
  head/sys/dev/xen/netfront/netfront.c

Modified: head/sys/dev/xen/netfront/netfront.c
==
--- head/sys/dev/xen/netfront/netfront.cThu Jan  3 13:42:45 2013
(r244990)
+++ head/sys/dev/xen/netfront/netfront.cThu Jan  3 13:44:25 2013
(r244991)
@@ -24,7 +24,6 @@
  * SUCH DAMAGE.
  */
 
-
 #include 
 __FBSDID("$FreeBSD$");
 
@@ -208,8 +207,6 @@ struct xn_chain_data {
struct mbuf*xn_rx_chain[NET_RX_RING_SIZE+1];
 };
 
-#define NUM_ELEMENTS(x) (sizeof(x)/sizeof(*x))
-
 struct net_device_stats
 {
u_long  rx_packets; /* total packets received   */
@@ -244,7 +241,6 @@ struct net_device_stats
 };
 
 struct netfront_info {
-   
struct ifnet *xn_ifp;
 #if __FreeBSD_version >= 70
struct lro_ctrl xn_lro;
@@ -329,12 +325,6 @@ struct netfront_rx_info {
 
 /* Access macros for acquiring freeing slots in xn_free_{tx,rx}_idxs[]. */
 
-
-
-/*
- * Access macros for acquiring freeing slots in tx_skbs[].
- */
-
 static inline void
 add_id_to_freelist(struct mbuf **list, uintptr_t id)
 {
@@ -517,7 +507,6 @@ netfront_resume(device_t dev)
return (0);
 }
 
-
 /* Common code used when first setting up, and when resuming. */
 static int 
 talk_to_backend(device_t dev, struct netfront_info *info)
@@ -605,7 +594,6 @@ talk_to_backend(device_t dev, struct net
return err;
 }
 
-
 static int 
 setup_device(device_t dev, struct netfront_info *info)
 {
@@ -794,7 +782,7 @@ netif_release_tx_bufs(struct netfront_in
add_id_to_freelist(np->tx_mbufs, i);
np->xn_cdata.xn_tx_chain_cnt--;
if (np->xn_cdata.xn_tx_chain_cnt < 0) {
-   panic("netif_release_tx_bufs: tx_chain_cnt must be >= 
0");
+   panic("%s: tx_chain_cnt must be >= 0", __func__);
}
m_free(m);
}
@@ -946,7 +934,6 @@ refill:
reservation.domid= DOMID_SELF;
 
if (!xen_feature(XENFEAT_auto_translated_physmap)) {
-
/* After all PTEs have been zapped, flush the TLB. */
sc->rx_mcl[i-1].args[MULTI_UVMFLAGS_INDEX] =
UVMF_TLB_FLUSH|UVMF_ALL;
@@ -958,15 +945,11 @@ refill:
/* Zap PTEs and give away pages in one big multicall. */
(void)HYPERVISOR_multicall(sc->rx_mcl, i+1);
 
-   /* Check return status of HYPERVISOR_dom_mem_op(). */
-   if (unlikely(sc->rx_mcl[i].result != i))
-   panic("Unable to reduce memory reservation\n");
-   } else {
-   if (HYPERVISOR_memory_op(
-   XENMEM_decrease_reservation, &reservation)
-   != i)
-   panic("Unable to reduce memory "
-   "reservation\n");
+   if (unlikely(sc->rx_mcl[i].result != i ||
+   HYPERVISOR_memory_op(XENMEM_decrease_reservation,
+   &reservation) != i))
+   panic("%s: unable to reduce memory "
+   "reservation\n", __func__);
}
} else {
wmb();
@@ -1169,8 +1152,8 @@ xn_txeof(struct netfront_info *np)
ifp->if_opackets++;
if (unlikely(gnttab_query_foreign_access(
np->grant_tx_ref[id]) != 0)) {
-   panic("grant id %u still in use by the backend",
- id);
+   panic("%s: grant id %u still in use by the "
+   "backend", __func__, id);
}
gnttab_end_foreign_access_ref(
np->grant_tx_ref[id]);
@@ -1210,7 +1193,6 @@ xn_txeof(struct netfront_info *np)
netif_wake_queue(dev);
 #endif
}
-
 }
 
 static void
@@ -1240,7 +1222,6 @@ xn_intr(void *xsc)
xn_start(ifp);
 }
 
-
 static void
 xennet_move_rx_slot(struct netfront_info *np, struct mbuf *m,
grant_ref_t ref)
@@ -1319,17 +1300,15 @@ xennet_get_responses(struct netfront_inf
 
m0 = m = m_prev = xennet_get_rx_mbuf(np, *cons);
 
-   
if (rx->flags &

svn commit: r244992 - in head/sys: amd64/conf i386/conf ia64/conf pc98/conf powerpc/conf sparc64/conf

2013-01-03 Thread Dag-Erling Smørgrav
Author: des
Date: Thu Jan  3 14:30:24 2013
New Revision: 244992
URL: http://svnweb.freebsd.org/changeset/base/244992

Log:
  As discussed on -current last October, remove the firewire drivers from
  GENERIC.

Modified:
  head/sys/amd64/conf/GENERIC
  head/sys/i386/conf/GENERIC
  head/sys/ia64/conf/GENERIC
  head/sys/pc98/conf/GENERIC
  head/sys/powerpc/conf/GENERIC
  head/sys/sparc64/conf/GENERIC

Modified: head/sys/amd64/conf/GENERIC
==
--- head/sys/amd64/conf/GENERIC Thu Jan  3 13:44:25 2013(r244991)
+++ head/sys/amd64/conf/GENERIC Thu Jan  3 14:30:24 2013(r244992)
@@ -317,15 +317,6 @@ device usb # USB Bus (required)
 device ukbd# Keyboard
 device umass   # Disks/Mass storage - Requires scbus and da
 
-# FireWire support
-device firewire# FireWire bus code
-# sbp(4) works for some systems but causes boot failure on others
-#devicesbp # SCSI over FireWire (Requires scbus 
and da)
-device fwe # Ethernet over FireWire (non-standard!)
-device fwip# IP over FireWire (RFC 2734,3146)
-device dcons   # Dumb console driver
-device dcons_crom  # Configuration ROM for dcons
-
 # Sound support
 device sound   # Generic sound driver (required)
 device snd_cmi # CMedia CMI8338/CMI8738

Modified: head/sys/i386/conf/GENERIC
==
--- head/sys/i386/conf/GENERIC  Thu Jan  3 13:44:25 2013(r244991)
+++ head/sys/i386/conf/GENERIC  Thu Jan  3 14:30:24 2013(r244992)
@@ -331,15 +331,6 @@ device usb # USB Bus (required)
 device ukbd# Keyboard
 device umass   # Disks/Mass storage - Requires scbus and da
 
-# FireWire support
-device firewire# FireWire bus code
-# sbp(4) works for some systems but causes boot failure on others
-#devicesbp # SCSI over FireWire (Requires scbus 
and da)
-device fwe # Ethernet over FireWire (non-standard!)
-device fwip# IP over FireWire (RFC 2734,3146)
-device dcons   # Dumb console driver
-device dcons_crom  # Configuration ROM for dcons
-
 # Sound support
 device sound   # Generic sound driver (required)
 device snd_cmi # CMedia CMI8338/CMI8738

Modified: head/sys/ia64/conf/GENERIC
==
--- head/sys/ia64/conf/GENERIC  Thu Jan  3 13:44:25 2013(r244991)
+++ head/sys/ia64/conf/GENERIC  Thu Jan  3 14:30:24 2013(r244992)
@@ -77,7 +77,6 @@ options   WITNESS_SKIPSPIN # Don't run wi
 optionsMALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones
 
 # Various "busses"
-device firewire# FireWire bus code
 device miibus  # MII bus support (Ethernet)
 device pci # PCI bus support
 device scbus   # SCSI bus (required for ATA/SCSI)

Modified: head/sys/pc98/conf/GENERIC
==
--- head/sys/pc98/conf/GENERIC  Thu Jan  3 13:44:25 2013(r244991)
+++ head/sys/pc98/conf/GENERIC  Thu Jan  3 14:30:24 2013(r244992)
@@ -270,7 +270,6 @@ device  bpf # Berkeley packet filter
 #devicezyd # ZyDAS zd1211/zd1211b wireless NICs
 
 # FireWire support
-#devicefirewire# FireWire bus code
 #devicesbp # SCSI over FireWire (Requires scbus 
and da)
 #devicefwe # Ethernet over FireWire (non-standard!)
 

Modified: head/sys/powerpc/conf/GENERIC
==
--- head/sys/powerpc/conf/GENERIC   Thu Jan  3 13:44:25 2013
(r244991)
+++ head/sys/powerpc/conf/GENERIC   Thu Jan  3 14:30:24 2013
(r244992)
@@ -183,12 +183,6 @@ device kue # Kawasaki LSI USB 
Ethernet
 optionsIEEE80211_SUPPORT_MESH
 optionsAH_SUPPORT_AR5416
 
-# FireWire support
-device firewire# FireWire bus code
-# sbp(4) works for some systems but causes boot failure on others
-device sbp # SCSI over FireWire (Requires scbus and da)
-device fwe # Ethernet over FireWire (non-standard!)
-
 # Misc
 device iicbus  # I2C bus code
 device kiic# Keywest I2C

Modified: head/sys/sparc64/conf/GENERIC
==
--- head/sys/sparc64/conf/GENERIC   Thu Jan  3 13:44:25 2013
(r244991)
+++ head/sys/sparc64/conf/GENERIC   Thu J

svn commit: r244993 - in head/sys/dev/xen: evtchn xenpci

2013-01-03 Thread Marius Strobl
Author: marius
Date: Thu Jan  3 15:31:23 2013
New Revision: 244993
URL: http://svnweb.freebsd.org/changeset/base/244993

Log:
  Remove files not connected to the build. It's confusing enough that
  we still have two not quite the same evtchn.c left over.
  
  MFC after:3 day

Deleted:
  head/sys/dev/xen/evtchn/
  head/sys/dev/xen/xenpci/machine_reboot.c
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r244994 - head/usr.sbin/bsdconfig/share

2013-01-03 Thread Devin Teske
Author: dteske
Date: Thu Jan  3 15:48:00 2013
New Revision: 244994
URL: http://svnweb.freebsd.org/changeset/base/244994

Log:
  Comments.

Modified:
  head/usr.sbin/bsdconfig/share/common.subr

Modified: head/usr.sbin/bsdconfig/share/common.subr
==
--- head/usr.sbin/bsdconfig/share/common.subr   Thu Jan  3 15:31:23 2013
(r244993)
+++ head/usr.sbin/bsdconfig/share/common.subr   Thu Jan  3 15:48:00 2013
(r244994)
@@ -64,10 +64,16 @@ export UNAME_R="$(uname -r)" # Release L
 
  FUNCTIONS
 
+# f_dprintf $fmt [ $opts ... ]
 #
 # Sensible debug function. Override in ~/.bsdconfigrc if desired.
 # See /usr/share/examples/bsdconfig/bsdconfigrc for example.
 #
+# If $debug is set and non-NULL, prints DEBUG info using printf(1) syntax:
+#  + To $debugFile, if set and non-NULL
+#  + To standard output if $debugFile is either NULL or unset
+#  + To both if $debugFile begins with a single plus-sign (`+')
+#
 f_dprintf()
 {
[ "$debug" ] || return $SUCCESS
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r244995 - head/usr.sbin/newsyslog

2013-01-03 Thread Mark Johnston
Author: markj
Date: Thu Jan  3 16:11:24 2013
New Revision: 244995
URL: http://svnweb.freebsd.org/changeset/base/244995

Log:
  Fix a typo in an error message.
  
  Approved by:  rstone (co-mentor)
  MFC after:1 week

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

Modified: head/usr.sbin/newsyslog/newsyslog.c
==
--- head/usr.sbin/newsyslog/newsyslog.c Thu Jan  3 15:48:00 2013
(r244994)
+++ head/usr.sbin/newsyslog/newsyslog.c Thu Jan  3 16:11:24 2013
(r244995)
@@ -1582,7 +1582,7 @@ delete_oldest_timelog(const struct conf_
oldlogs[i].fname);
else if (unlinkat(dir_fd, oldlogs[i].fname, 0) != 0) {
snprintf(errbuf, sizeof(errbuf),
-   "Could not delet old logfile '%s'",
+   "Could not delete old logfile '%s'",
oldlogs[i].fname);
perror(errbuf);
}
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r244996 - head/usr.sbin/newsyslog

2013-01-03 Thread Mark Johnston
Author: markj
Date: Thu Jan  3 16:12:48 2013
New Revision: 244996
URL: http://svnweb.freebsd.org/changeset/base/244996

Log:
  Have -n imply -r, since dry-run mode obviously doesn't require root
  privileges.
  
  Approved by:  rstone (co-mentor)
  MFC after:1 week

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

Modified: head/usr.sbin/newsyslog/newsyslog.8
==
--- head/usr.sbin/newsyslog/newsyslog.8 Thu Jan  3 16:11:24 2013
(r244995)
+++ head/usr.sbin/newsyslog/newsyslog.8 Thu Jan  3 16:12:48 2013
(r244996)
@@ -125,7 +125,9 @@ reasons for either trimming that log or 
 Cause
 .Nm
 not to trim the logs, but to print out what it would do if this option
-were not specified.
+were not specified. This option implies the
+.Fl r
+option.
 .It Fl r
 Remove the restriction that
 .Nm

Modified: head/usr.sbin/newsyslog/newsyslog.c
==
--- head/usr.sbin/newsyslog/newsyslog.c Thu Jan  3 16:11:24 2013
(r244995)
+++ head/usr.sbin/newsyslog/newsyslog.c Thu Jan  3 16:12:48 2013
(r244996)
@@ -644,7 +644,7 @@ parse_args(int argc, char **argv)
break;
case 'n':
noaction++;
-   break;
+   /* FALLTHROUGH */
case 'r':
needroot = 0;
break;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r244997 - head/usr.sbin/newsyslog

2013-01-03 Thread Mark Johnston
Author: markj
Date: Thu Jan  3 16:14:51 2013
New Revision: 244997
URL: http://svnweb.freebsd.org/changeset/base/244997

Log:
  Make sure to update the mtime of a logfile after archiving it. This
  ensures that the next rotation happens at the correct time when using
  interval-based rotations.
  
  PR:   bin/174438
  Reviewed by:  gad
  Approved by:  rstone (co-mentor)
  MFC after:1 week

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

Modified: head/usr.sbin/newsyslog/newsyslog.c
==
--- head/usr.sbin/newsyslog/newsyslog.c Thu Jan  3 16:12:48 2013
(r244996)
+++ head/usr.sbin/newsyslog/newsyslog.c Thu Jan  3 16:14:51 2013
(r244997)
@@ -1814,12 +1814,21 @@ do_rotate(const struct conf_entry *ent)
printf("\tcp %s %s\n", ent->log, file1);
else
printf("\tln %s %s\n", ent->log, file1);
+   printf("\ttouch %s\t\t"
+   "# Update mtime for 'when'-interval processing\n",
+   file1);
} else {
if (!(flags & CE_BINARY)) {
/* Report the trimming to the old log */
log_trim(ent->log, ent);
}
savelog(ent->log, file1);
+   /*
+* Interval-based rotations are done using the mtime of
+* the most recently archived log, so make sure it gets
+* updated during a rotation.
+*/
+   utimes(file1, NULL);
}
change_attrs(file1, ent);
}
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r244998 - in head/share/examples: . cvsup

2013-01-03 Thread Peter Wemm
Author: peter
Date: Thu Jan  3 16:15:35 2013
New Revision: 244998
URL: http://svnweb.freebsd.org/changeset/base/244998

Log:
  Tone down the encouragement to use cvsup.  Add directions to the handbook
  pages that cover the more current methods and bring closer to reality.

Deleted:
  head/share/examples/cvsup/gnats-supfile
Modified:
  head/share/examples/Makefile
  head/share/examples/cvsup/README
  head/share/examples/cvsup/cvs-supfile
  head/share/examples/cvsup/ports-supfile
  head/share/examples/cvsup/stable-supfile
  head/share/examples/cvsup/standard-supfile

Modified: head/share/examples/Makefile
==
--- head/share/examples/MakefileThu Jan  3 16:14:51 2013
(r244997)
+++ head/share/examples/MakefileThu Jan  3 16:15:35 2013
(r244998)
@@ -52,7 +52,6 @@ XFILES=   BSD_daemon/FreeBSD.pfa \
csh/dot.cshrc \
cvsup/README \
cvsup/cvs-supfile \
-   cvsup/gnats-supfile \
cvsup/ports-supfile \
cvsup/refuse \
cvsup/refuse.README \

Modified: head/share/examples/cvsup/README
==
--- head/share/examples/cvsup/READMEThu Jan  3 16:14:51 2013
(r244997)
+++ head/share/examples/cvsup/READMEThu Jan  3 16:15:35 2013
(r244998)
@@ -1,5 +1,15 @@
 # $FreeBSD$
 
+BEWARE, CVS is deprecated and no longer supported by the FreeBSD project.
+
+The primary development work happens in Subversion and is temporarily
+exported to the legacy CVS system with significant time delays.
+
+You should NOT set up a new consumer of FreeBSD source code via CVS.
+Please see:
+http://www.freebsd.org/doc/handbook/svn.html
+http://www.freebsd.org/doc/handbook/svn-mirrors.html
+
 This directory contains sample "supfiles" for obtaining and updating
 the FreeBSD sources via the Internet.  These supfiles will work
 with CVSup version 14.0 or later.  For general information on CVSup
@@ -20,10 +30,6 @@ FreeBSD, use:
 
 cvs-supfileMain source tree and ports collection
 
-To maintain a copy of the FreeBSD bug database, use the file:
-
-gnats-supfile   FreeBSD bug database
-
 IMPORTANT: Before you use any of the supfiles in this directory,
 you will need to edit in an appropriate "host" setting.  See:
 

Modified: head/share/examples/cvsup/cvs-supfile
==
--- head/share/examples/cvsup/cvs-supfile   Thu Jan  3 16:14:51 2013
(r244997)
+++ head/share/examples/cvsup/cvs-supfile   Thu Jan  3 16:15:35 2013
(r244998)
@@ -1,7 +1,14 @@
 # $FreeBSD$
 #
-# This file contains all of the "CVSup collections" that make up the
-# CVS development tree of the FreeBSD system.
+# BEWARE, CVS is deprecated and no longer supported by the FreeBSD project.
+#
+# The primary development work happens in Subversion and is temporarily
+# exported to the legacy CVS system with significant time delays.
+#
+# You should NOT set up a new consumer of FreeBSD source code via CVS.
+# Please see:
+# http://www.freebsd.org/doc/handbook/svn.html
+# http://www.freebsd.org/doc/handbook/svn-mirrors.html
 #
 # csup (CVS Update Protocol) allows you to download the latest CVS
 # tree (or any branch of development therefrom) to your system easily
@@ -61,36 +68,6 @@
 # mega-collection.  It includes all of the individual "src-*" collections.
 src-all
 
-# These are the individual collections that make up "src-all".  If you
-# use these, be sure to comment out "src-all" above.
-#src-base
-#src-bin
-#src-cddl
-#src-contrib
-#src-etc
-#src-games
-#src-gnu
-#src-include
-#src-kerberos5
-#src-kerberosIV
-#src-lib
-#src-libexec
-#src-release
-#src-rescue
-#src-sbin
-#src-share
-#src-sys
-#src-tools
-#src-usrbin
-#src-usrsbin
-# These are the individual collections that make up FreeBSD's crypto
-# collection. They are no longer export-restricted and are a part of
-# src-all
-#src-crypto
-#src-eBones
-#src-secure
-#src-sys-crypto
-
 ## Ports Collection.
 #
 # The easiest way to get the ports tree is to use the "ports-all"
@@ -98,77 +75,6 @@ src-all
 # collections,
 ports-all
 
-# These are the individual collections that make up "ports-all".  If you
-# use these, be sure to comment out "ports-all" above and always include
-# "ports-base" if you use any of the other individual collections below.
-# Your ports may not build correctly without an up-to-date "ports-base".
-#
-#ports-base
-#
-#ports-accessibility
-#ports-arabic
-#ports-archivers
-#ports-astro
-#ports-audio
-#ports-benchmarks
-#ports-biology
-#ports-cad
-#ports-chinese
-#ports-comms
-#ports-converters
-#ports-databases
-#ports-deskutils
-#ports-devel
-#ports-dns
-#ports-editors
-#ports-emulators
-#ports-finance
-#ports-french
-#ports-ftp
-#ports-games
-#ports-german
-#ports-graphics
-#ports-hebrew
-#ports-hungarian
-#ports-irc
-#ports-japanese
-#ports-jav

Re: svn commit: r244899 - head/sys/mips/beri

2013-01-03 Thread Robert N. M. Watson

On 2 Jan 2013, at 21:02, Andrew Turner wrote:

>> This seemed to do the trick; what do you think of the attached? This
>> isn't a board-specific change, so I dropped it into the common
>> fdt_mips.c code. On the other hand, this left it a bit open as to
>> what the right compatible= line to use was, so feedback there most
>> welcome.
> 
> The patch looks good. From my reading of [1] the compatible value
> should be something like "mips,mips4k" as it's value is of the form
> ",".
> 
> I have been thinking the best way of merging these almost identical
> decode functions. Linux appears to do it by providing a per-controller
> function that can translate between the interrupt spec and the
> configuration allowing them to have a generic parsing function that
> doesn't need to check if the controller is compatible. I would like us
> to have something similar as it will remove the duplicate function.

Sounds good on tweaking the compatible value -- I'll do that my local tree and 
merge to head fairly soon. I've now finished adapting our current suite of 
device drivers to use FDT, which took a couple of days but was fairly painless.

On combining countless overlapping implementations: sounds reasonable to me. 
Having a single implementation of a default parsing function certainly wouldn't 
hurt -- or a single implementation of a generic one.

Thanks,

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


svn commit: r245000 - head/sys/fs/nandfs

2013-01-03 Thread Konstantin Belousov
Author: kib
Date: Thu Jan  3 19:01:56 2013
New Revision: 245000
URL: http://svnweb.freebsd.org/changeset/base/245000

Log:
  Remove the last use of the deprecated MNT_VNODE_FOREACH interface in
  the tree.
  
  With the help from:   mjg
  Tested by:Ronald Klop 
  MFC after:2 weeks

Modified:
  head/sys/fs/nandfs/nandfs_segment.c

Modified: head/sys/fs/nandfs/nandfs_segment.c
==
--- head/sys/fs/nandfs/nandfs_segment.c Thu Jan  3 18:50:27 2013
(r244999)
+++ head/sys/fs/nandfs/nandfs_segment.c Thu Jan  3 19:01:56 2013
(r245000)
@@ -478,39 +478,19 @@ nandfs_iterate_dirty_vnodes(struct mount
struct nandfs_node *nandfs_node;
struct vnode *vp, *mvp;
struct thread *td;
-   int error, lockreq, update;
+   int error, update;
 
td = curthread;
-   lockreq = LK_EXCLUSIVE | LK_INTERLOCK | LK_RETRY;
 
-   MNT_ILOCK(mp);
-
-   MNT_VNODE_FOREACH(vp, mp, mvp) {
+   MNT_VNODE_FOREACH_ACTIVE(vp, mp, mvp) {
update = 0;
 
-   if (mp->mnt_syncer == vp)
-   continue;
-   if (VOP_ISLOCKED(vp))
-   continue;
-
-   VI_LOCK(vp);
-   MNT_IUNLOCK(mp);
-   if (vp->v_iflag & VI_DOOMED) {
+   if (mp->mnt_syncer == vp || VOP_ISLOCKED(vp)) {
VI_UNLOCK(vp);
-   MNT_ILOCK(mp);
-   continue;
-   }
-
-   if ((error = vget(vp, lockreq, td)) != 0) {
-   MNT_ILOCK(mp);
continue;
}
-
-   if (vp->v_iflag & VI_DOOMED) {
-   vput(vp);
-   MNT_ILOCK(mp);
+   if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK | LK_NOWAIT, td) != 0)
continue;
-   }
 
nandfs_node = VTON(vp);
if (nandfs_node->nn_flags & IN_MODIFIED) {
@@ -532,12 +512,8 @@ nandfs_iterate_dirty_vnodes(struct mount
 
if (update)
nandfs_node_update(nandfs_node);
-
-   MNT_ILOCK(mp);
}
 
-   MNT_IUNLOCK(mp);
-
return (0);
 }
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r245001 - in head/sys: kern sys

2013-01-03 Thread Konstantin Belousov
Author: kib
Date: Thu Jan  3 19:02:52 2013
New Revision: 245001
URL: http://svnweb.freebsd.org/changeset/base/245001

Log:
  Remove the deprecated MNT_VNODE_FOREACH interface.  Use the
  MNT_VNODE_FOREACH_ALL instead.

Modified:
  head/sys/kern/vfs_mount.c
  head/sys/sys/mount.h

Modified: head/sys/kern/vfs_mount.c
==
--- head/sys/kern/vfs_mount.c   Thu Jan  3 19:01:56 2013(r245000)
+++ head/sys/kern/vfs_mount.c   Thu Jan  3 19:02:52 2013(r245001)
@@ -1705,103 +1705,6 @@ vfs_copyopt(opts, name, dest, len)
return (ENOENT);
 }
 
-/*
- * These are helper functions for filesystems to traverse all
- * their vnodes.  See MNT_VNODE_FOREACH() in sys/mount.h.
- *
- * This interface has been deprecated in favor of MNT_VNODE_FOREACH_ALL.
- */
-
-MALLOC_DECLARE(M_VNODE_MARKER);
-
-struct vnode *
-__mnt_vnode_next(struct vnode **mvp, struct mount *mp)
-{
-   struct vnode *vp;
-
-   mtx_assert(MNT_MTX(mp), MA_OWNED);
-
-   KASSERT((*mvp)->v_mount == mp, ("marker vnode mount list mismatch"));
-   if (should_yield()) {
-   MNT_IUNLOCK(mp);
-   kern_yield(PRI_USER);
-   MNT_ILOCK(mp);
-   }
-   vp = TAILQ_NEXT(*mvp, v_nmntvnodes);
-   while (vp != NULL && vp->v_type == VMARKER)
-   vp = TAILQ_NEXT(vp, v_nmntvnodes);
-
-   /* Check if we are done */
-   if (vp == NULL) {
-   __mnt_vnode_markerfree(mvp, mp);
-   return (NULL);
-   }
-   TAILQ_REMOVE(&mp->mnt_nvnodelist, *mvp, v_nmntvnodes);
-   TAILQ_INSERT_AFTER(&mp->mnt_nvnodelist, vp, *mvp, v_nmntvnodes);
-   return (vp);
-}
-
-struct vnode *
-__mnt_vnode_first(struct vnode **mvp, struct mount *mp)
-{
-   struct vnode *vp;
-
-   mtx_assert(MNT_MTX(mp), MA_OWNED);
-
-   vp = TAILQ_FIRST(&mp->mnt_nvnodelist);
-   while (vp != NULL && vp->v_type == VMARKER)
-   vp = TAILQ_NEXT(vp, v_nmntvnodes);
-
-   /* Check if we are done */
-   if (vp == NULL) {
-   *mvp = NULL;
-   return (NULL);
-   }
-   MNT_REF(mp);
-   MNT_IUNLOCK(mp);
-   *mvp = (struct vnode *) malloc(sizeof(struct vnode),
-  M_VNODE_MARKER,
-  M_WAITOK | M_ZERO);
-   MNT_ILOCK(mp);
-   (*mvp)->v_type = VMARKER;
-
-   vp = TAILQ_FIRST(&mp->mnt_nvnodelist);
-   while (vp != NULL && vp->v_type == VMARKER)
-   vp = TAILQ_NEXT(vp, v_nmntvnodes);
-
-   /* Check if we are done */
-   if (vp == NULL) {
-   MNT_IUNLOCK(mp);
-   free(*mvp, M_VNODE_MARKER);
-   MNT_ILOCK(mp);
-   *mvp = NULL;
-   MNT_REL(mp);
-   return (NULL);
-   }
-   (*mvp)->v_mount = mp;
-   TAILQ_INSERT_AFTER(&mp->mnt_nvnodelist, vp, *mvp, v_nmntvnodes);
-   return (vp);
-}
-
-
-void
-__mnt_vnode_markerfree(struct vnode **mvp, struct mount *mp)
-{
-
-   if (*mvp == NULL)
-   return;
-
-   mtx_assert(MNT_MTX(mp), MA_OWNED);
-
-   KASSERT((*mvp)->v_mount == mp, ("marker vnode mount list mismatch"));
-   TAILQ_REMOVE(&mp->mnt_nvnodelist, *mvp, v_nmntvnodes);
-   MNT_IUNLOCK(mp);
-   free(*mvp, M_VNODE_MARKER);
-   MNT_ILOCK(mp);
-   *mvp = NULL;
-   MNT_REL(mp);
-}
-
 int
 __vfs_statfs(struct mount *mp, struct statfs *sbp)
 {

Modified: head/sys/sys/mount.h
==
--- head/sys/sys/mount.hThu Jan  3 19:01:56 2013(r245000)
+++ head/sys/sys/mount.hThu Jan  3 19:02:52 2013(r245001)
@@ -225,29 +225,6 @@ void  __mnt_vnode_markerfree_act
 #define MNT_VNODE_FOREACH_ACTIVE_ABORT(mp, mvp)
\
__mnt_vnode_markerfree_active(&(mvp), (mp))
 
-/*
- * Definitions for MNT_VNODE_FOREACH.
- *
- * This interface has been deprecated in favor of MNT_VNODE_FOREACH_ALL.
- */
-struct vnode *__mnt_vnode_next(struct vnode **mvp, struct mount *mp);
-struct vnode *__mnt_vnode_first(struct vnode **mvp, struct mount *mp);
-void  __mnt_vnode_markerfree(struct vnode **mvp, struct mount *mp);
-
-#define MNT_VNODE_FOREACH(vp, mp, mvp) \
-   for (vp = __mnt_vnode_first(&(mvp), (mp)); \
-   (vp) != NULL; vp = __mnt_vnode_next(&(mvp), (mp)))
-
-#define MNT_VNODE_FOREACH_ABORT_ILOCKED(mp, mvp)   \
-   __mnt_vnode_markerfree(&(mvp), (mp))
-
-#define MNT_VNODE_FOREACH_ABORT(mp, mvp)   \
-   do {\
-   MNT_ILOCK(mp);  \
-   MNT_VNODE_FOREACH_ABORT_ILOCKED(mp, mvp);   \
-   MNT_IUNLOCK(mp);\
-   } while (0)
-
 #defineMNT_ILOCK(mp)   mtx_lock(

svn commit: r245002 - head/sys/dev/ath

2013-01-03 Thread Adrian Chadd
Author: adrian
Date: Thu Jan  3 19:03:03 2013
New Revision: 245002
URL: http://svnweb.freebsd.org/changeset/base/245002

Log:
  Don't call the spectral methods for NICS that don't implement them.

Modified:
  head/sys/dev/ath/if_ath_spectral.c
  head/sys/dev/ath/if_athvar.h

Modified: head/sys/dev/ath/if_ath_spectral.c
==
--- head/sys/dev/ath/if_ath_spectral.c  Thu Jan  3 19:02:52 2013
(r245001)
+++ head/sys/dev/ath/if_ath_spectral.c  Thu Jan  3 19:03:03 2013
(r245002)
@@ -82,13 +82,20 @@ struct ath_spectral_state {
  */
 
 /*
- * Attach DFS to the given interface
+ * Attach spectral to the given interface
  */
 int
 ath_spectral_attach(struct ath_softc *sc)
 {
struct ath_spectral_state *ss;
 
+   /*
+* If spectral isn't supported, don't error - just
+* quietly complete.
+*/
+   if (! ath_hal_spectral_supported(sc->sc_ah))
+   return (0);
+
ss = malloc(sizeof(struct ath_spectral_state),
M_TEMP, M_WAITOK | M_ZERO);
 
@@ -106,11 +113,15 @@ ath_spectral_attach(struct ath_softc *sc
 }
 
 /*
- * Detach DFS from the given interface
+ * Detach spectral from the given interface
  */
 int
 ath_spectral_detach(struct ath_softc *sc)
 {
+
+   if (! ath_hal_spectral_supported(sc->sc_ah))
+   return (0);
+
if (sc->sc_spectral != NULL) {
free(sc->sc_spectral, M_TEMP);
}
@@ -148,6 +159,9 @@ ath_ioctl_spectral(struct ath_softc *sc,
HAL_SPECTRAL_PARAM *pe;
struct ath_spectral_state *ss = sc->sc_spectral;
 
+   if (! ath_hal_spectral_supported(sc->sc_ah))
+   return (EINVAL);
+
if (ad->ad_id & ATH_DIAG_IN) {
/*
 * Copy in data.

Modified: head/sys/dev/ath/if_athvar.h
==
--- head/sys/dev/ath/if_athvar.hThu Jan  3 19:02:52 2013
(r245001)
+++ head/sys/dev/ath/if_athvar.hThu Jan  3 19:03:03 2013
(r245002)
@@ -1303,6 +1303,8 @@ void  ath_intr(void *);
 #defineath_hal_get_chan_ext_busy(_ah) \
((*(_ah)->ah_get11nExtBusy)((_ah)))
 
+#defineath_hal_spectral_supported(_ah) \
+   (ath_hal_getcapability(_ah, HAL_CAP_SPECTRAL_SCAN, 0, NULL) == HAL_OK)
 #defineath_hal_spectral_get_config(_ah, _p) \
((*(_ah)->ah_spectralGetConfig)((_ah), (_p)))
 #defineath_hal_spectral_configure(_ah, _p) \
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r245003 - in head/sys: amd64/conf i386/conf ia64/conf powerpc/conf sparc64/conf

2013-01-03 Thread Konstantin Belousov
Author: kib
Date: Thu Jan  3 19:03:41 2013
New Revision: 245003
URL: http://svnweb.freebsd.org/changeset/base/245003

Log:
  Enable the UFS quotas for big-iron GENERIC kernels.
  
  Discussed with: mckusick
  MFC after:  2 weeks

Modified:
  head/sys/amd64/conf/GENERIC
  head/sys/i386/conf/GENERIC
  head/sys/ia64/conf/GENERIC
  head/sys/powerpc/conf/GENERIC
  head/sys/powerpc/conf/GENERIC64
  head/sys/sparc64/conf/GENERIC

Modified: head/sys/amd64/conf/GENERIC
==
--- head/sys/amd64/conf/GENERIC Thu Jan  3 19:03:03 2013(r245002)
+++ head/sys/amd64/conf/GENERIC Thu Jan  3 19:03:41 2013(r245003)
@@ -35,6 +35,7 @@ options   SOFTUPDATES # Enable FFS soft 
 optionsUFS_ACL # Support for access control lists
 optionsUFS_DIRHASH # Improve performance on big directories
 optionsUFS_GJOURNAL# Enable gjournal-based UFS journaling
+optionsQUOTA   # Enable disk quotas for UFS
 optionsMD_ROOT # MD is a potential root device
 optionsNFSCL   # New Network Filesystem Client
 optionsNFSD# New Network Filesystem Server

Modified: head/sys/i386/conf/GENERIC
==
--- head/sys/i386/conf/GENERIC  Thu Jan  3 19:03:03 2013(r245002)
+++ head/sys/i386/conf/GENERIC  Thu Jan  3 19:03:41 2013(r245003)
@@ -37,6 +37,7 @@ options   SOFTUPDATES # Enable FFS soft 
 optionsUFS_ACL # Support for access control lists
 optionsUFS_DIRHASH # Improve performance on big directories
 optionsUFS_GJOURNAL# Enable gjournal-based UFS journaling
+optionsQUOTA   # Enable disk quotas for UFS
 optionsMD_ROOT # MD is a potential root device
 optionsNFSCL   # New Network Filesystem Client
 optionsNFSD# New Network Filesystem Server

Modified: head/sys/ia64/conf/GENERIC
==
--- head/sys/ia64/conf/GENERIC  Thu Jan  3 19:03:03 2013(r245002)
+++ head/sys/ia64/conf/GENERIC  Thu Jan  3 19:03:41 2013(r245003)
@@ -60,6 +60,7 @@ options   SYSVSHM # SYSV-style shared me
 optionsUFS_ACL # Support for access control lists
 optionsUFS_DIRHASH # Hash-based directory lookup scheme
 optionsUFS_GJOURNAL# Enable gjournal-based UFS journaling
+optionsQUOTA   # Enable disk quotas for UFS
 options_KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B RT extensions
 
 # Debugging support.  Always need this:

Modified: head/sys/powerpc/conf/GENERIC
==
--- head/sys/powerpc/conf/GENERIC   Thu Jan  3 19:03:03 2013
(r245002)
+++ head/sys/powerpc/conf/GENERIC   Thu Jan  3 19:03:41 2013
(r245003)
@@ -41,6 +41,7 @@ options   SOFTUPDATES #Enable FFS soft u
 optionsUFS_ACL #Support for access control lists
 optionsUFS_DIRHASH #Improve performance on big directories
 optionsUFS_GJOURNAL#Enable gjournal-based UFS journaling
+optionsQUOTA   #Enable disk quotas for UFS
 optionsMD_ROOT #MD is a potential root device
 optionsNFSCL   #New Network Filesystem Client
 optionsNFSD#New Network Filesystem Server

Modified: head/sys/powerpc/conf/GENERIC64
==
--- head/sys/powerpc/conf/GENERIC64 Thu Jan  3 19:03:03 2013
(r245002)
+++ head/sys/powerpc/conf/GENERIC64 Thu Jan  3 19:03:41 2013
(r245003)
@@ -40,6 +40,7 @@ options   SOFTUPDATES #Enable FFS soft u
 optionsUFS_ACL #Support for access control lists
 optionsUFS_DIRHASH #Improve performance on big directories
 optionsUFS_GJOURNAL#Enable gjournal-based UFS journaling
+optionsQUOTA   #Enable disk quotas for UFS
 optionsMD_ROOT #MD is a potential root device
 optionsNFSCL   #New Network Filesystem Client
 optionsNFSD#New Network Filesystem Server

Modified: head/sys/sparc64/conf/GENERIC
==
--- head/sys/sparc64/conf/GENERIC   Thu Jan  3 19:03:03 2013
(r245002)
+++ head/sys/sparc64/conf/GENERIC   Thu Jan  3 19:03:41 2013
(r245003)
@@ -36,6 +36,7 @@ options   SOFTUPDATES # Enable FFS s

svn commit: r245004 - head/sys/fs/nullfs

2013-01-03 Thread Konstantin Belousov
Author: kib
Date: Thu Jan  3 19:17:57 2013
New Revision: 245004
URL: http://svnweb.freebsd.org/changeset/base/245004

Log:
  Add the "nocache" nullfs mount option, which disables the caching of
  the free nullfs vnodes, switching nullfs behaviour to pre-r240285.
  The option is mostly intended as the last-resort when higher pressure
  on the vnode cache due to doubling of the vnode counts is not
  desirable.
  
  Note that disabling the cache costs more than 2x wall time in the
  metadata-hungry scenarious.  The default is "cache".
  
  Tested and benchmarked by:pho (previous version)
  MFC after:2 weeks

Modified:
  head/sys/fs/nullfs/null.h
  head/sys/fs/nullfs/null_subr.c
  head/sys/fs/nullfs/null_vfsops.c
  head/sys/fs/nullfs/null_vnops.c

Modified: head/sys/fs/nullfs/null.h
==
--- head/sys/fs/nullfs/null.h   Thu Jan  3 19:03:41 2013(r245003)
+++ head/sys/fs/nullfs/null.h   Thu Jan  3 19:17:57 2013(r245004)
@@ -34,9 +34,15 @@
  * $FreeBSD$
  */
 
+#ifndefFS_NULL_H
+#defineFS_NULL_H
+
+#defineNULLM_CACHE 0x0001
+
 struct null_mount {
struct mount*nullm_vfs;
struct vnode*nullm_rootvp;  /* Reference to root null_node */
+   uint64_tnullm_flags;
 };
 
 #ifdef _KERNEL
@@ -80,3 +86,5 @@ MALLOC_DECLARE(M_NULLFSNODE);
 #endif /* NULLFS_DEBUG */
 
 #endif /* _KERNEL */
+
+#endif

Modified: head/sys/fs/nullfs/null_subr.c
==
--- head/sys/fs/nullfs/null_subr.c  Thu Jan  3 19:03:41 2013
(r245003)
+++ head/sys/fs/nullfs/null_subr.c  Thu Jan  3 19:17:57 2013
(r245004)
@@ -224,6 +224,9 @@ null_nodeget(mp, lowervp, vpp)
 * provide ready to use vnode.
 */
if (VOP_ISLOCKED(lowervp) != LK_EXCLUSIVE) {
+   KASSERT((MOUNTTONULLMOUNT(mp)->nullm_flags & NULLM_CACHE) == 0,
+   ("lowervp %p is not excl locked and cache is disabled",
+   lowervp));
vn_lock(lowervp, LK_UPGRADE | LK_RETRY);
if ((lowervp->v_iflag & VI_DOOMED) != 0) {
vput(lowervp);

Modified: head/sys/fs/nullfs/null_vfsops.c
==
--- head/sys/fs/nullfs/null_vfsops.cThu Jan  3 19:03:41 2013
(r245003)
+++ head/sys/fs/nullfs/null_vfsops.cThu Jan  3 19:17:57 2013
(r245004)
@@ -67,6 +67,15 @@ static vfs_vget_tnullfs_vget;
 static vfs_extattrctl_tnullfs_extattrctl;
 static vfs_reclaim_lowervp_t nullfs_reclaim_lowervp;
 
+/* Mount options that we support. */
+static const char *nullfs_opts[] = {
+   "cache",
+   "export",
+   "from",
+   "target",
+   NULL
+};
+
 /*
  * Mount null layer
  */
@@ -86,9 +95,11 @@ nullfs_mount(struct mount *mp)
 
if (!prison_allow(td->td_ucred, PR_ALLOW_MOUNT_NULLFS))
return (EPERM);
-
if (mp->mnt_flag & MNT_ROOTFS)
return (EOPNOTSUPP);
+   if (vfs_filteropt(mp->mnt_optnew, nullfs_opts))
+   return (EINVAL);
+
/*
 * Update is a no-op
 */
@@ -149,7 +160,7 @@ nullfs_mount(struct mount *mp)
}
 
xmp = (struct null_mount *) malloc(sizeof(struct null_mount),
-   M_NULLFSMNT, M_WAITOK);
+   M_NULLFSMNT, M_WAITOK | M_ZERO);
 
/*
 * Save reference to underlying FS
@@ -187,16 +198,27 @@ nullfs_mount(struct mount *mp)
mp->mnt_flag |= MNT_LOCAL;
MNT_IUNLOCK(mp);
}
+
+   xmp->nullm_flags |= NULLM_CACHE;
+   if (vfs_getopt(mp->mnt_optnew, "nocache", NULL, NULL) == 0)
+   xmp->nullm_flags &= ~NULLM_CACHE;
+
MNT_ILOCK(mp);
-   mp->mnt_kern_flag |= lowerrootvp->v_mount->mnt_kern_flag &
-   (MNTK_SHARED_WRITES | MNTK_LOOKUP_SHARED | MNTK_EXTENDED_SHARED);
+   if ((xmp->nullm_flags & NULLM_CACHE) != 0) {
+   mp->mnt_kern_flag |= lowerrootvp->v_mount->mnt_kern_flag &
+   (MNTK_SHARED_WRITES | MNTK_LOOKUP_SHARED |
+   MNTK_EXTENDED_SHARED);
+   }
mp->mnt_kern_flag |= MNTK_LOOKUP_EXCL_DOTDOT;
MNT_IUNLOCK(mp);
mp->mnt_data = xmp;
vfs_getnewfsid(mp);
-   MNT_ILOCK(xmp->nullm_vfs);
-   TAILQ_INSERT_TAIL(&xmp->nullm_vfs->mnt_uppers, mp, mnt_upper_link);
-   MNT_IUNLOCK(xmp->nullm_vfs);
+   if ((xmp->nullm_flags & NULLM_CACHE) != 0) {
+   MNT_ILOCK(xmp->nullm_vfs);
+   TAILQ_INSERT_TAIL(&xmp->nullm_vfs->mnt_uppers, mp,
+   mnt_upper_link);
+   MNT_IUNLOCK(xmp->nullm_vfs);
+   }
 
vfs_mountedfrom(mp, target);
 
@@ -234,13 +256,15 @@ nullfs_unmount(mp, mntflags)
 */
mntdata = mp->mnt_data;
ump = mntdata->nullm_vfs;
-   MNT_ILOCK(ump);
-   while ((ump->mnt_ker

svn commit: r245005 - head/sbin/mount_nullfs

2013-01-03 Thread Konstantin Belousov
Author: kib
Date: Thu Jan  3 19:18:46 2013
New Revision: 245005
URL: http://svnweb.freebsd.org/changeset/base/245005

Log:
  Allow to specify "cache" and "nocache" as an option for
  mount_nullfs(8).
  
  Tested by:pho
  MFC after:2 weeks

Modified:
  head/sbin/mount_nullfs/mount_nullfs.c

Modified: head/sbin/mount_nullfs/mount_nullfs.c
==
--- head/sbin/mount_nullfs/mount_nullfs.c   Thu Jan  3 19:17:57 2013
(r245004)
+++ head/sbin/mount_nullfs/mount_nullfs.c   Thu Jan  3 19:18:46 2013
(r245005)
@@ -57,27 +57,35 @@ static const char rcsid[] =
 
 #include "mntopts.h"
 
-static struct mntopt mopts[] = {
-   MOPT_STDOPTS,
-   MOPT_END
-};
-
 intsubdir(const char *, const char *);
 static voidusage(void) __dead2;
 
 int
 main(int argc, char *argv[])
 {
-   struct iovec iov[6];
-   int ch, mntflags;
+   struct iovec *iov;
+   char *p, *val;
char source[MAXPATHLEN];
char target[MAXPATHLEN];
+   char errmsg[255];
+   int ch, mntflags, iovlen;
+   char nullfs[] = "nullfs";
 
+   iov = NULL;
+   iovlen = 0;
mntflags = 0;
+   errmsg[0] = '\0';
while ((ch = getopt(argc, argv, "o:")) != -1)
switch(ch) {
case 'o':
-   getmntopts(optarg, mopts, &mntflags, 0);
+   val = strdup("");
+   p = strchr(optarg, '=');
+   if (p != NULL) {
+   free(val);
+   *p = '\0';
+   val = p + 1;
+   }
+   build_iovec(&iov, &iovlen, optarg, val, (size_t)-1);
break;
case '?':
default:
@@ -99,21 +107,16 @@ main(int argc, char *argv[])
errx(EX_USAGE, "%s (%s) and %s are not distinct paths",
argv[0], target, argv[1]);
 
-   iov[0].iov_base = strdup("fstype");
-   iov[0].iov_len = sizeof("fstype");
-   iov[1].iov_base = strdup("nullfs");
-   iov[1].iov_len = strlen(iov[1].iov_base) + 1;
-   iov[2].iov_base = strdup("fspath");
-   iov[2].iov_len = sizeof("fspath");
-   iov[3].iov_base = source;
-   iov[3].iov_len = strlen(source) + 1;
-   iov[4].iov_base = strdup("target");
-   iov[4].iov_len = sizeof("target");
-   iov[5].iov_base = target;
-   iov[5].iov_len = strlen(target) + 1;
-
-   if (nmount(iov, 6, mntflags))
-   err(1, NULL);
+   build_iovec(&iov, &iovlen, "fstype", nullfs, (size_t)-1);
+   build_iovec(&iov, &iovlen, "fspath", source, (size_t)-1);
+   build_iovec(&iov, &iovlen, "target", target, (size_t)-1);
+   build_iovec(&iov, &iovlen, "errmsg", errmsg, sizeof(errmsg));
+   if (nmount(iov, iovlen, mntflags) < 0) {
+   if (errmsg[0] != 0)
+   err(1, "%s: %s", source, errmsg);
+   else
+   err(1, "%s", source);
+   }
exit(0);
 }
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


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

2013-01-03 Thread Xin LI
Author: delphij
Date: Thu Jan  3 20:31:45 2013
New Revision: 245006
URL: http://svnweb.freebsd.org/changeset/base/245006

Log:
  Sync with driver.
  
  MFC after:2 weeks

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

Modified: head/share/man/man4/mps.4
==
--- head/share/man/man4/mps.4   Thu Jan  3 19:18:46 2013(r245005)
+++ head/share/man/man4/mps.4   Thu Jan  3 20:31:45 2013(r245006)
@@ -34,7 +34,7 @@
 .\" $Id: //depot/SpectraBSD/head/share/man/man4/mps.4#6 $
 .\" $FreeBSD$
 .\"
-.Dd June 30, 2012
+.Dd January 3, 2013
 .Dt MPS 4
 .Os
 .Sh NAME
@@ -62,7 +62,7 @@ controllers and WarpDrive solid state st
 .Sh HARDWARE
 The
 .Nm
-driver supports the following controllers:
+driver supports the following hardware:
 .Pp
 .Bl -bullet -compact
 .It
@@ -80,6 +80,19 @@ LSI Logic SAS2116 (16 Port
 .It
 LSI Logic SAS2208 (8 Port
 .Tn SAS )
+.It
+LSI Logic SAS2308 (8 Port
+.Tn SAS )
+.It
+LSI Logic SSS6200 Solid State Storage
+.It
+Intel Integrated RAID Module RMS25JB040
+.It
+Intel Integrated RAID Module RMS25JB080
+.It
+Intel Integrated RAID Module RMS25KB040
+.It
+Intel Integrated RAID Module RMS25KB080
 .El
 .Sh CONFIGURATION
 To disable MSI interrupts for all
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r244549 - head/sys/dev/nvme

2013-01-03 Thread John Baldwin
On Friday, December 21, 2012 04:49:13 PM Jim Harris wrote:
> On Fri, Dec 21, 2012 at 12:24 PM, John Baldwin  wrote:
> > On Friday, December 21, 2012 2:13:48 pm Jim Harris wrote:
> > > Author: jimharris
> > > Date: Fri Dec 21 19:13:48 2012
> > > New Revision: 244549
> > > URL: http://svnweb.freebsd.org/changeset/base/244549
> > > 
> > > Log:
> > >   Put kthreads under curproc so they are attached to nvmecontrol rather
> > >   than pid 0.
> > >   
> > >   Sponsored by:   Intel
> > 
> > Hmm, is this really wise?  I'm not sure how well the kernel would handle
> > a kthread belonging to a userland process.  You could just have each
> > test create a new kproc that holds the associated threads for that test
> > instead perhaps?
> 
> Just so I'm aware, what sorts of problems might you expect if a kthread
> belongs to a userland process?  I'm not opposed to changing this as you
> suggest, but would like to know for my own understanding since I haven't
> observed any problems with it on my system.

I'm not sure what might break. :(  I just know that I have always expected
a kthread to belong to a kernel process, and it wouldn't surprise me if
there wasn't some code somewhere that assumed TDP_KTHREAD implied that the
associated process as a kernel process (P_SYSTEM).  Perhaps it would work,
but I don't think many folks have considered that edge case or coded for it.

OTOH, it might be an interesting way to implement aio (though I think aio
should be implemented directly in userland using user threads, though
possibly not pthreads so a single-threaded application doesn't pay a
penalty).

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


svn commit: r245012 - head/sbin/geom/class/part

2013-01-03 Thread Warren Block
Author: wblock (doc committer)
Date: Thu Jan  3 21:58:28 2013
New Revision: 245012
URL: http://svnweb.freebsd.org/changeset/base/245012

Log:
  Document the output of the show command.  Modified version of patch
  provided by Bas Smeelen .  Use of 'gpart list'
  suggested by by Andrey V. Elsukov .
  
  PR:   docs/174270
  Submitted by: Ronald F.Guilmette 
  Reviewed by:  ae (block sizes)
  MFC after:1 week

Modified:
  head/sbin/geom/class/part/gpart.8

Modified: head/sbin/geom/class/part/gpart.8
==
--- head/sbin/geom/class/part/gpart.8   Thu Jan  3 21:54:44 2013
(r245011)
+++ head/sbin/geom/class/part/gpart.8   Thu Jan  3 21:58:28 2013
(r245012)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 19, 2012
+.Dd January 3, 2013
 .Dt GPART 8
 .Os
 .Sh NAME
@@ -453,8 +453,14 @@ about its use.
 .El
 .\"  SHOW 
 .It Cm show
-Show the current partition information of the specified geoms
-or all geoms if none are specified.
+Show current partition information for the specified geoms, or all
+geoms if none are specified.
+The default output includes the logical starting block of each
+partition, the partition size in blocks, the partition index number,
+the partition type, and a human readable partition size.
+Block sizes and locations are based on the device's Sectorsize
+as shown by
+.Cm gpart list .
 Additional options include:
 .Bl -tag -width 10n
 .It Fl l
@@ -919,7 +925,7 @@ and
 .Cm list
 will report about corrupt tables.
 .Pp
-If the size of the device has changed (e.g.\& volume expansion) the
+If the size of the device has changed (e.g.,\& volume expansion) the
 secondary GPT header will no longer be located in the last sector.
 This is not a metadata corruption, but it is dangerous because any
 corruption of the primary GPT will lead to loss of the partition table.
@@ -979,14 +985,14 @@ This may break a mirrored volume and lea
 Exit status is 0 on success, and 1 if the command fails.
 .Sh EXAMPLES
 Create a GPT scheme on
-.Pa ad0 :
+.Pa ada0 :
 .Bd -literal -offset indent
-/sbin/gpart create -s GPT ad0
+/sbin/gpart create -s GPT ada0
 .Ed
 .Pp
 Embed GPT bootstrap code into a protective MBR:
 .Bd -literal -offset indent
-/sbin/gpart bootcode -b /boot/pmbr ad0
+/sbin/gpart bootcode -b /boot/pmbr ada0
 .Ed
 .Pp
 Create a dedicated
@@ -1011,15 +1017,15 @@ aligned on a 64 kB boundary without the 
 offset or alignment.
 The boot partition itself is aligned on a 4 kB boundary.
 .Bd -literal -offset indent
-/sbin/gpart add -b 40 -s 88 -t freebsd-boot ad0
-/sbin/gpart bootcode -p /boot/gptboot -i 1 ad0
+/sbin/gpart add -b 40 -s 88 -t freebsd-boot ada0
+/sbin/gpart bootcode -p /boot/gptboot -i 1 ada0
 .Ed
 .Pp
 Create a 512MB-sized
 .Cm freebsd-ufs
 partition to contain a UFS filesystem from which the system can boot.
 .Bd -literal -offset indent
-/sbin/gpart add -s 512M -t freebsd-ufs ad0
+/sbin/gpart add -s 512M -t freebsd-ufs ada0
 .Ed
 .Pp
 Create an MBR scheme on
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r245013 - head/share/misc

2013-01-03 Thread Marius Strobl
Author: marius
Date: Thu Jan  3 22:05:20 2013
New Revision: 245013
URL: http://svnweb.freebsd.org/changeset/base/245013

Log:
  Record my ports commit bit.

Modified:
  head/share/misc/committers-ports.dot

Modified: head/share/misc/committers-ports.dot
==
--- head/share/misc/committers-ports.dotThu Jan  3 21:58:28 2013
(r245012)
+++ head/share/misc/committers-ports.dotThu Jan  3 22:05:20 2013
(r245013)
@@ -140,6 +140,7 @@ maho [label="Maho Nakata\nmaho@FreeBSD.o
 makc [label="Max Brazhnikov\nm...@freebsd.org\n2008/08/25"]
 mandree [label="Matthias Andree\nmand...@freebsd.org\n2009/11/18"]
 marcus [label="Joe Marcus Clarke\nmar...@freebsd.org\n2002/04/05"]
+marius [label="Marius Strobl\nmar...@freebsd.org\n2012/12/29"]
 markus [label="Markus Brueffer\nmar...@freebsd.org\n2004/02/21"]
 martymac [label="Ganael Laplanche\nmarty...@freebsd.org\n2010/09/24"]
 mat [label="Mathieu Arnold\n...@freebsd.org\n2003/08/15"]
@@ -235,8 +236,10 @@ avilla -> rakuco
 bapt -> bdrewery
 bapt -> eadler
 bapt -> jlaffaye
+bapt -> marius
 
 beat -> decke
+beat -> marius
 beat -> sperber
 beat -> uqs
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r245014 - head/usr.sbin/gssd

2013-01-03 Thread Rick Macklem
Author: rmacklem
Date: Thu Jan  3 22:24:39 2013
New Revision: 245014
URL: http://svnweb.freebsd.org/changeset/base/245014

Log:
  Fix r244604 so that it builds when MK_KERBEROS_SUPPORT == "no".
  
  Reported by:  bf
  Tested by:bf
  Reviewed by:  gcooper
  MFC after:3 days

Modified:
  head/usr.sbin/gssd/Makefile
  head/usr.sbin/gssd/gssd.c

Modified: head/usr.sbin/gssd/Makefile
==
--- head/usr.sbin/gssd/Makefile Thu Jan  3 22:05:20 2013(r245013)
+++ head/usr.sbin/gssd/Makefile Thu Jan  3 22:24:39 2013(r245014)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include 
+
 PROG=  gssd
 MAN=   gssd.8
 SRCS=  gssd.c gssd.h gssd_svc.c gssd_xdr.c gssd_prot.c
@@ -7,8 +9,14 @@ SRCS=  gssd.c gssd.h gssd_svc.c gssd_xdr.
 CFLAGS+= -I.
 WARNS?= 1
 
-DPADD= ${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBASN1} ${LIBROKEN} 
${LIBCOM_ERR} ${LIBCRYPT} ${LIBCRYPTO}
-LDADD= -lgssapi -lkrb5 -lhx509 -lasn1 -lroken -lcom_err -lcrypt -lcrypto
+DPADD= ${LIBGSSAPI}
+LDADD= -lgssapi
+.if ${MK_KERBEROS_SUPPORT} != "no"
+DPADD+=${LIBKRB5} ${LIBHX509} ${LIBASN1} ${LIBROKEN} ${LIBCOM_ERR} 
${LIBCRYPT} ${LIBCRYPTO}
+LDADD+=-lkrb5 -lhx509 -lasn1 -lroken -lcom_err -lcrypt -lcrypto
+.else
+CFLAGS+= -DWITHOUT_KERBEROS
+.endif
 
 CLEANFILES= gssd_svc.c gssd.h
 

Modified: head/usr.sbin/gssd/gssd.c
==
--- head/usr.sbin/gssd/gssd.c   Thu Jan  3 22:05:20 2013(r245013)
+++ head/usr.sbin/gssd/gssd.c   Thu Jan  3 22:24:39 2013(r245014)
@@ -37,7 +37,9 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#ifndef WITHOUT_KERBEROS
 #include 
+#endif
 #include 
 #include 
 #include 
@@ -102,12 +104,17 @@ main(int argc, char **argv)
debug_level++;
break;
case 's':
+#ifndef WITHOUT_KERBEROS
/*
 * Set the directory search list. This enables use of
 * find_ccache_file() to search the directories for a
 * suitable credentials cache file.
 */
strlcpy(ccfile_dirlist, optarg, sizeof(ccfile_dirlist));
+#else
+   errx(1, "This option not available when built"
+   " without MK_KERBEROS\n");
+#endif
break;
case 'c':
/*
@@ -814,6 +821,7 @@ static int
 is_a_valid_tgt_cache(const char *filepath, uid_t uid, int *retrating,
 time_t *retexptime)
 {
+#ifndef WITHOUT_KERBEROS
krb5_context context;
krb5_principal princ;
krb5_ccache ccache;
@@ -913,5 +921,8 @@ is_a_valid_tgt_cache(const char *filepat
*retexptime = exptime;
}
return (ret);
+#else /* WITHOUT_KERBEROS */
+   return (0);
+#endif /* !WITHOUT_KERBEROS */
 }
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r245015 - head/usr.sbin/ifmcstat

2013-01-03 Thread Hiroki Sato
Author: hrs
Date: Thu Jan  3 22:27:57 2013
New Revision: 245015
URL: http://svnweb.freebsd.org/changeset/base/245015

Log:
  - Print scopeid for link-local scope addresses.
  - Do not print the flags= part when flags == 0.

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

Modified: head/usr.sbin/ifmcstat/ifmcstat.c
==
--- head/usr.sbin/ifmcstat/ifmcstat.c   Thu Jan  3 22:24:39 2013
(r245014)
+++ head/usr.sbin/ifmcstat/ifmcstat.c   Thu Jan  3 22:27:57 2013
(r245015)
@@ -296,7 +296,8 @@ in_ifinfo(struct igmp_ifinfo *igi)
printf("igmpv?(%d)", igi->igi_version);
break;
}
-   printb(" flags", igi->igi_flags, "\020\1SILENT\2LOOPBACK");
+   if (igi->igi_flags)
+   printb(" flags", igi->igi_flags, "\020\1SILENT\2LOOPBACK");
if (igi->igi_version == IGMP_VERSION_3) {
printf(" rv %u qi %u qri %u uri %u",
igi->igi_rv, igi->igi_qi, igi->igi_qri, igi->igi_uri);
@@ -752,7 +753,8 @@ in6_ifinfo(struct mld_ifinfo *mli)
printf("mldv?(%d)", mli->mli_version);
break;
}
-   printb(" flags", mli->mli_flags, "\020\1SILENT\2USEALLOW");
+   if (mli->mli_flags)
+   printb(" flags", mli->mli_flags, "\020\1SILENT\2USEALLOW");
if (mli->mli_version == MLD_VERSION_2) {
printf(" rv %u qi %u qri %u uri %u",
mli->mli_rv, mli->mli_qi, mli->mli_qri, mli->mli_uri);
@@ -1129,7 +1131,14 @@ ifmcstat_getifmaddrs(void)
break;
}
 
-   fprintf(stdout, "\t%s %s\n", pafname, addrbuf);
+   fprintf(stdout, "\t%s %s", pafname, addrbuf);
+#ifdef INET6
+   if (pifasa->sa.sa_family == AF_INET6 &&
+   pifasa->sin6.sin6_scope_id)
+   fprintf(stdout, " scopeid 0x%x",
+   pifasa->sin6.sin6_scope_id);
+#endif
+   fprintf(stdout, "\n");
 #ifdef INET
/*
 * Print per-link IGMP information, if available.
@@ -1202,6 +1211,12 @@ next_ifnet:
}
 
fprintf(stdout, "\t\tgroup %s", addrbuf);
+#ifdef INET6
+   if (pgsa->sa.sa_family == AF_INET6 &&
+   pgsa->sin6.sin6_scope_id)
+   fprintf(stdout, " scopeid 0x%x",
+   pgsa->sin6.sin6_scope_id);
+#endif
 #ifdef INET
if (pgsa->sa.sa_family == AF_INET) {
inm_print_sources_sysctl(thisifindex,
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r245017 - head/sys/sparc64/sparc64

2013-01-03 Thread Marius Strobl
Author: marius
Date: Thu Jan  3 23:12:08 2013
New Revision: 245017
URL: http://svnweb.freebsd.org/changeset/base/245017

Log:
  Revert bogus part of r241740.
  Reported by:  Michael Moll
  
  MFC after:3 days

Modified:
  head/sys/sparc64/sparc64/interrupt.S

Modified: head/sys/sparc64/sparc64/interrupt.S
==
--- head/sys/sparc64/sparc64/interrupt.SThu Jan  3 23:09:16 2013
(r245016)
+++ head/sys/sparc64/sparc64/interrupt.SThu Jan  3 23:12:08 2013
(r245017)
@@ -83,13 +83,13 @@ ENTRY(intr_vector)
 * The 2nd word points to code to execute and the 3rd is an argument
 * to pass.  Jump to it.
 */
-   brnz,a,pt %g3, 1f
-srlx   %g3, 60, %g6
+   brnz,pt %g3, 1f
/*
 * NB: Zeus CPUs set some undocumented bits in the first data word.
 */
-   jmpl%g4, %g0
 and%g3, IV_MAX - 1, %g3
+   jmpl%g4, %g0
+nop
/* NOTREACHED */
 
/*
@@ -98,7 +98,8 @@ ENTRY(intr_vector)
 * 4 bits of the 1st data word specify a priority, and the 2nd and
 * 3rd a function and argument.
 */
-1: brnz,a,pn %g6, 2f
+1: srlx%g3, 60, %g6
+   brnz,a,pn %g6, 2f
 clr%g3
 
/*
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r245031 - head/sys/dev/ath

2013-01-03 Thread Adrian Chadd
Author: adrian
Date: Fri Jan  4 06:28:34 2013
New Revision: 245031
URL: http://svnweb.freebsd.org/changeset/base/245031

Log:
  For PHY error frames, populate the configured channel flags rather than
  based on the received frame.
  
  PHY errors don't have the relevant HT or 40MHz MCS flag set.

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

Modified: head/sys/dev/ath/if_ath_rx.c
==
--- head/sys/dev/ath/if_ath_rx.cFri Jan  4 05:53:17 2013
(r245030)
+++ head/sys/dev/ath/if_ath_rx.cFri Jan  4 06:28:34 2013
(r245031)
@@ -423,7 +423,21 @@ ath_rx_tap(struct ifnet *ifp, struct mbu
sc->sc_rx_th.wr_flags = sc->sc_hwmap[rix].rxflags;
 #ifdef AH_SUPPORT_AR5416
sc->sc_rx_th.wr_chan_flags &= ~CHAN_HT;
-   if (sc->sc_rx_th.wr_rate & IEEE80211_RATE_MCS) {/* HT rate */
+   if (rs->rs_status & HAL_RXERR_PHY) {
+   struct ieee80211com *ic = ifp->if_l2com;
+
+   /*
+* PHY error - make sure the channel flags
+* reflect the actual channel configuration,
+* not the received frame.
+*/
+   if (IEEE80211_IS_CHAN_HT40U(ic->ic_curchan))
+   sc->sc_rx_th.wr_chan_flags |= CHAN_HT40U;
+   else if (IEEE80211_IS_CHAN_HT40D(ic->ic_curchan))
+   sc->sc_rx_th.wr_chan_flags |= CHAN_HT40D;
+   else if (IEEE80211_IS_CHAN_HT20(ic->ic_curchan))
+   sc->sc_rx_th.wr_chan_flags |= CHAN_HT20;
+   } else if (sc->sc_rx_th.wr_rate & IEEE80211_RATE_MCS) { /* HT rate */
struct ieee80211com *ic = ifp->if_l2com;
 
if ((rs->rs_flags & HAL_RX_2040) == 0)
@@ -435,6 +449,7 @@ ath_rx_tap(struct ifnet *ifp, struct mbu
if ((rs->rs_flags & HAL_RX_GI) == 0)
sc->sc_rx_th.wr_flags |= IEEE80211_RADIOTAP_F_SHORTGI;
}
+
 #endif
sc->sc_rx_th.wr_tsf = htole64(ath_extend_tsf(sc, rs->rs_tstamp, tsf));
if (rs->rs_status & HAL_RXERR_CRC)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r245033 - head/sys/fs/nullfs

2013-01-03 Thread Konstantin Belousov
Author: kib
Date: Fri Jan  4 07:52:47 2013
New Revision: 245033
URL: http://svnweb.freebsd.org/changeset/base/245033

Log:
  Fix reversed condition in the assertion.
  
  Pointy hat to:kib
  MFC after:13 days

Modified:
  head/sys/fs/nullfs/null_subr.c

Modified: head/sys/fs/nullfs/null_subr.c
==
--- head/sys/fs/nullfs/null_subr.c  Fri Jan  4 06:29:52 2013
(r245032)
+++ head/sys/fs/nullfs/null_subr.c  Fri Jan  4 07:52:47 2013
(r245033)
@@ -224,7 +224,7 @@ null_nodeget(mp, lowervp, vpp)
 * provide ready to use vnode.
 */
if (VOP_ISLOCKED(lowervp) != LK_EXCLUSIVE) {
-   KASSERT((MOUNTTONULLMOUNT(mp)->nullm_flags & NULLM_CACHE) == 0,
+   KASSERT((MOUNTTONULLMOUNT(mp)->nullm_flags & NULLM_CACHE) != 0,
("lowervp %p is not excl locked and cache is disabled",
lowervp));
vn_lock(lowervp, LK_UPGRADE | LK_RETRY);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"