svn commit: r193205 - in head/sys/dev/ata: . chipsets

2009-06-01 Thread Xin LI
Author: delphij
Date: Mon Jun  1 07:05:52 2009
New Revision: 193205
URL: http://svn.freebsd.org/changeset/base/193205

Log:
  According to Intel documentation (307013), 3Gbps mode is supported on
  Desktop chipsets only for ICH7 series, so mark all ICH7M as ATA_SA150
  instead of ATA_SA300.

Modified:
  head/sys/dev/ata/   (props changed)
  head/sys/dev/ata/chipsets/ata-intel.c

Modified: head/sys/dev/ata/chipsets/ata-intel.c
==
--- head/sys/dev/ata/chipsets/ata-intel.c   Mon Jun  1 06:52:03 2009
(r193204)
+++ head/sys/dev/ata/chipsets/ata-intel.c   Mon Jun  1 07:05:52 2009
(r193205)
@@ -104,9 +104,9 @@ ata_intel_probe(device_t dev)
  { ATA_I82801GB_S1,  0, INTEL_AHCI, 0, ATA_SA300, "ICH7" },
  { ATA_I82801GB_R1,  0, INTEL_AHCI, 0, ATA_SA300, "ICH7" },
  { ATA_I82801GB_AH,  0, INTEL_AHCI, 0, ATA_SA300, "ICH7" },
- { ATA_I82801GBM_S1, 0, INTEL_AHCI, 0, ATA_SA300, "ICH7M" },
- { ATA_I82801GBM_R1, 0, INTEL_AHCI, 0, ATA_SA300, "ICH7M" },
- { ATA_I82801GBM_AH, 0, INTEL_AHCI, 0, ATA_SA300, "ICH7M" },
+ { ATA_I82801GBM_S1, 0, INTEL_AHCI, 0, ATA_SA150, "ICH7M" },
+ { ATA_I82801GBM_R1, 0, INTEL_AHCI, 0, ATA_SA150, "ICH7M" },
+ { ATA_I82801GBM_AH, 0, INTEL_AHCI, 0, ATA_SA150, "ICH7M" },
  { ATA_I63XXESB2,0,  0, 1, ATA_UDMA5, "63XXESB2" },
  { ATA_I63XXESB2_S1, 0, INTEL_AHCI, 0, ATA_SA300, "63XXESB2" },
  { ATA_I63XXESB2_S2, 0, INTEL_AHCI, 0, ATA_SA300, "63XXESB2" },
___
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: r193206 - head/share/man/man9

2009-06-01 Thread Edward Tomasz Napierala
Author: trasz
Date: Mon Jun  1 07:48:27 2009
New Revision: 193206
URL: http://svn.freebsd.org/changeset/base/193206

Log:
  Use the "flag" word consistently.
  
  Submitted by: Ben Kaduk 

Modified:
  head/share/man/man9/VOP_ACCESS.9

Modified: head/share/man/man9/VOP_ACCESS.9
==
--- head/share/man/man9/VOP_ACCESS.9Mon Jun  1 07:05:52 2009
(r193205)
+++ head/share/man/man9/VOP_ACCESS.9Mon Jun  1 07:48:27 2009
(r193206)
@@ -29,7 +29,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd May 30, 2009
+.Dd June 1, 2009
 .Os
 .Dt VOP_ACCESS 9
 .Sh NAME
@@ -77,7 +77,7 @@ are
 .Dv VADMIN
 and
 .Dv VAPPEND .
-To check for other bits, one has to use
+To check for other flags, one has to use
 .Fn VOP_ACCESSX
 instead.
 .Sh LOCKS
___
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: r193213 - head/contrib/csup

2009-06-01 Thread Ulf Lilleengen
Author: lulf
Date: Mon Jun  1 09:25:32 2009
New Revision: 193213
URL: http://svn.freebsd.org/changeset/base/193213

Log:
  - Add missing data argument to printf.
  
  Submitted by: Pawel Worach 
  MFC after:1 week

Modified:
  head/contrib/csup/updater.c

Modified: head/contrib/csup/updater.c
==
--- head/contrib/csup/updater.c Mon Jun  1 09:03:55 2009(r193212)
+++ head/contrib/csup/updater.c Mon Jun  1 09:25:32 2009(r193213)
@@ -1858,7 +1858,7 @@ updater_append_file(struct updater *up, 
goto bad;
}
if (nread == -1) {
-   xasprintf(&up->errmsg, "%s: Error reading: %s",
+   xasprintf(&up->errmsg, "%s: Error reading: %s", fup->destpath,
strerror(errno));
return (UPDATER_ERR_MSG);
}
___
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: r193214 - head/lib/libc/sys

2009-06-01 Thread Pawel Jakub Dawidek
Author: pjd
Date: Mon Jun  1 09:32:12 2009
New Revision: 193214
URL: http://svn.freebsd.org/changeset/base/193214

Log:
  Document EINVAL for bind(2).
  
  Reviewed by:  rwatson
  Obtained from:SuSv3

Modified:
  head/lib/libc/sys/bind.2

Modified: head/lib/libc/sys/bind.2
==
--- head/lib/libc/sys/bind.2Mon Jun  1 09:25:32 2009(r193213)
+++ head/lib/libc/sys/bind.2Mon Jun  1 09:32:12 2009(r193214)
@@ -82,6 +82,9 @@ The
 .Fa s
 argument
 is not a valid descriptor.
+.It Bq Er EINVAL
+The socket is already bound to an address, and the protocol does not support
+binding to a new address; or the socket has been shut down.
 .It Bq Er ENOTSOCK
 The
 .Fa s
___
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: r192925 - in head/sys/dev/usb: . input

2009-06-01 Thread Rui Paulo

Hi,

On 1 Jun 2009, at 06:49, Hans Petter Selasky wrote:


On Monday 01 June 2009, Rui Paulo wrote:

http://wiki.freebsd.org/AppleMacbook#head-7eab3730c3bf3d04bdfb0d1d3649eaddf
2fed595


Hi Rui Paulo,

Regarding the eject button, can you have a look at:

/sys/dev/usb/input/ukbd.c

And provide a patch that masks this key the way you want?


I'm not sure what you mean. I'm proposing to remove the key handling  
code from the kernel. See the attached patch.


Thanks,
--
Rui Paulo


rem-eject.diff
Description: Binary data


PGP.sig
Description: This is a digitally signed message part


svn commit: r193217 - in head/sys: conf netinet netinet6 sys

2009-06-01 Thread Pawel Jakub Dawidek
Author: pjd
Date: Mon Jun  1 10:30:00 2009
New Revision: 193217
URL: http://svn.freebsd.org/changeset/base/193217

Log:
  - Rename IP_NONLOCALOK IP socket option to IP_BINDANY, to be more consistent
with OpenBSD (and BSD/OS originally). We can't easly do it SOL_SOCKET option
as there is no more space for more SOL_SOCKET options, but this option also
fits better as an IP socket option, it seems.
  - Implement this functionality also for IPv6 and RAW IP sockets.
  - Always compile it in (don't use additional kernel options).
  - Remove sysctl to turn this functionality on and off.
  - Introduce new privilege - PRIV_NETINET_BINDANY, which allows to use this
functionality (currently only unjail root can use it).
  
  Discussed with:   julian, adrian, jhb, rwatson, kmacy

Modified:
  head/sys/conf/NOTES
  head/sys/conf/options
  head/sys/netinet/in.h
  head/sys/netinet/in_pcb.c
  head/sys/netinet/in_pcb.h
  head/sys/netinet/ip_output.c
  head/sys/netinet/raw_ip.c
  head/sys/netinet6/in6.h
  head/sys/netinet6/in6_pcb.c
  head/sys/netinet6/ip6_output.c
  head/sys/sys/priv.h

Modified: head/sys/conf/NOTES
==
--- head/sys/conf/NOTES Mon Jun  1 10:04:37 2009(r193216)
+++ head/sys/conf/NOTES Mon Jun  1 10:30:00 2009(r193217)
@@ -639,14 +639,6 @@ optionsALTQ_PRIQ   # Priority Queueing
 optionsALTQ_NOPCC  # Required if the TSC is unusable
 optionsALTQ_DEBUG
 
-# IP optional behaviour.
-# IP_NONLOCALBIND disables the check that bind() usually makes that the
-# address is one that is assigned to an interface on this machine.
-# It allows transparent proxies to pretend to be other machines.
-# How the packet GET to that machine is a problem solved elsewhere,
-# smart routers, ipfw fwd, etc.
-optionsIP_NONLOCALBIND # Allow impersonation for proxies.
-
 # netgraph(4). Enable the base netgraph code with the NETGRAPH option.
 # Individual node types can be enabled with the corresponding option
 # listed below; however, this is not strictly necessary as netgraph

Modified: head/sys/conf/options
==
--- head/sys/conf/options   Mon Jun  1 10:04:37 2009(r193216)
+++ head/sys/conf/options   Mon Jun  1 10:30:00 2009(r193217)
@@ -400,7 +400,6 @@ IPFIREWALL_VERBOSE  opt_ipfw.h
 IPFIREWALL_VERBOSE_LIMIT   opt_ipfw.h
 IPSEC  opt_ipsec.h
 IPSEC_DEBUGopt_ipsec.h
-IP_NONLOCALBINDopt_inet.h
 IPSEC_FILTERTUNNEL opt_ipsec.h
 IPSTEALTH
 IPX

Modified: head/sys/netinet/in.h
==
--- head/sys/netinet/in.h   Mon Jun  1 10:04:37 2009(r193216)
+++ head/sys/netinet/in.h   Mon Jun  1 10:30:00 2009(r193217)
@@ -441,8 +441,7 @@ __END_DECLS
 #defineIP_FAITH22   /* bool; accept FAITH'ed 
connections */
 
 #defineIP_ONESBCAST23   /* bool: send all-ones broadcast */
-#defineIP_NONLOCALOK   24   /* bool: allow bind to spoof 
non-local addresses;
-   requires kernel compile option 
IP_NONLOCALBIND */
+#defineIP_BINDANY  24   /* bool: allow bind to any address 
*/
 
 #defineIP_FW_TABLE_ADD 40   /* add entry */
 #defineIP_FW_TABLE_DEL 41   /* delete entry */

Modified: head/sys/netinet/in_pcb.c
==
--- head/sys/netinet/in_pcb.c   Mon Jun  1 10:04:37 2009(r193216)
+++ head/sys/netinet/in_pcb.c   Mon Jun  1 10:30:00 2009(r193217)
@@ -35,7 +35,6 @@
 __FBSDID("$FreeBSD$");
 
 #include "opt_ddb.h"
-#include "opt_inet.h"
 #include "opt_ipsec.h"
 #include "opt_inet6.h"
 #include "opt_mac.h"
@@ -357,14 +356,11 @@ in_pcbbind_setup(struct inpcb *inp, stru
bzero(&sin->sin_zero, sizeof(sin->sin_zero));
/*
 * Is the address a local IP address? 
-* If INP_NONLOCALOK is set, then the socket may be 
bound
+* If INP_BINDANY is set, then the socket may be bound
 * to any endpoint address, local or not.
 */
-   if (
-#if defined(IP_NONLOCALBIND)
-   ((inp->inp_flags & INP_NONLOCALOK) == 0) &&
-#endif
-   (ifa_ifwithaddr((struct sockaddr *)sin) == 0))
+   if ((inp->inp_flags & INP_BINDANY) == 0 &&
+   ifa_ifwithaddr((struct sockaddr *)sin) == NULL)
return (EADDRNOTAVAIL);
}
laddr = sin->sin_addr;

Modified: head/sys/netinet/in_pcb.h
==

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

2009-06-01 Thread Pawel Jakub Dawidek
Author: pjd
Date: Mon Jun  1 10:30:52 2009
New Revision: 193218
URL: http://svn.freebsd.org/changeset/base/193218

Log:
  Document IP_BINDANY IP socket option.
  
  Reviewed by:  brueffer

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

Modified: head/share/man/man4/ip.4
==
--- head/share/man/man4/ip.4Mon Jun  1 10:30:00 2009(r193217)
+++ head/share/man/man4/ip.4Mon Jun  1 10:30:52 2009(r193218)
@@ -32,7 +32,7 @@
 .\" @(#)ip.4   8.2 (Berkeley) 11/30/93
 .\" $FreeBSD$
 .\"
-.Dd March 9, 2009
+.Dd June 1, 2009
 .Dt IP 4
 .Os
 .Sh NAME
@@ -243,6 +243,23 @@ socket level option, otherwise the
 .Dv IP_ONESBCAST option has no effect.
 .Pp
 If the
+.Dv IP_BINDANY
+option is enabled on a
+.Dv SOCK_STREAM ,
+.Dv SOCK_DGRAM
+or a
+.Dv SOCK_RAW
+socket, one can
+.Xr bind 2
+to any address, even one not bound to any available network interface in the
+system.
+This functionality (in conjunction with special firewall rules) can be used for
+implementing a transparent proxy.
+The
+.Dv PRIV_NETINET_BINDANY
+privilege is needed to set this option.
+.Pp
+If the
 .Dv IP_RECVTTL
 option is enabled on a
 .Dv SOCK_DGRAM
___
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: r193219 - in head/sys: kern net netatalk netinet netinet6 netipsec netipx netnatm sys

2009-06-01 Thread Robert Watson
Author: rwatson
Date: Mon Jun  1 10:41:38 2009
New Revision: 193219
URL: http://svn.freebsd.org/changeset/base/193219

Log:
  Reimplement the netisr framework in order to support parallel netisr
  threads:
  
  - Support up to one netisr thread per CPU, each processings its own
workstream, or set of per-protocol queues.  Threads may be bound
to specific CPUs, or allowed to migrate, based on a global policy.
  
In the future it would be desirable to support topology-centric
policies, such as "one netisr per package".
  
  - Allow each protocol to advertise an ordering policy, which can
currently be one of:
  
NETISR_POLICY_SOURCE: packets must maintain ordering with respect to
  an implicit or explicit source (such as an interface or socket).
  
NETISR_POLICY_FLOW: make use of mbuf flow identifiers to place work,
  as well as allowing protocols to provide a flow generation function
  for mbufs without flow identifers (m2flow).  Falls back on
  NETISR_POLICY_SOURCE if now flow ID is available.
  
NETISR_POLICY_CPU: allow protocols to inspect and assign a CPU for
  each packet handled by netisr (m2cpuid).
  
  - Provide utility functions for querying the number of workstreams
being used, as well as a mapping function from workstream to CPU ID,
which protocols may use in work placement decisions.
  
  - Add explicit interfaces to get and set per-protocol queue limits, and
get and clear drop counters, which query data or apply changes across
all workstreams.
  
  - Add a more extensible netisr registration interface, in which
protocols declare 'struct netisr_handler' structures for each
registered NETISR_ type.  These include name, handler function,
optional mbuf to flow ID function, optional mbuf to CPU ID function,
queue limit, and ordering policy.  Padding is present to allow these
to be expanded in the future.  If no queue limit is declared, then
a default is used.
  
  - Queue limits are now per-workstream, and raised from the previous
IFQ_MAXLEN default of 50 to 256.
  
  - All protocols are updated to use the new registration interface, and
with the exception of netnatm, default queue limits.  Most protocols
register as NETISR_POLICY_SOURCE, except IPv4 and IPv6, which use
NETISR_POLICY_FLOW, and will therefore take advantage of driver-
generated flow IDs if present.
  
  - Formalize a non-packet based interface between interface polling and
the netisr, rather than having polling pretend to be two protocols.
Provide two explicit hooks in the netisr worker for start and end
events for runs: netisr_poll() and netisr_pollmore(), as well as a
function, netisr_sched_poll(), to allow the polling code to schedule
netisr execution.  DEVICE_POLLING still embeds single-netisr
assumptions in its implementation, so for now if it is compiled into
the kernel, a single and un-bound netisr thread is enforced
regardless of tunable configuration.
  
  In the default configuration, the new netisr implementation maintains
  the same basic assumptions as the previous implementation: a single,
  un-bound worker thread processes all deferred work, and direct dispatch
  is enabled by default wherever possible.
  
  Performance measurement shows a marginal performance improvement over
  the old implementation due to the use of batched dequeue.
  
  An rmlock is used to synchronize use and registration/unregistration
  using the framework; currently, synchronized use is disabled
  (replicating current netisr policy) due to a measurable 3%-6% hit in
  ping-pong micro-benchmarking.  It will be enabled once further rmlock
  optimization has taken place.  However, in practice, netisrs are
  rarely registered or unregistered at runtime.
  
  A new man page for netisr will follow, but since one doesn't currently
  exist, it hasn't been updated.
  
  This change is not appropriate for MFC, although the polling shutdown
  handler should be merged to 7-STABLE.
  
  Bump __FreeBSD_version.
  
  Reviewed by:  bz

Modified:
  head/sys/kern/kern_poll.c
  head/sys/net/netisr.c
  head/sys/net/netisr.h
  head/sys/net/rtsock.c
  head/sys/netatalk/ddp_usrreq.c
  head/sys/netinet/if_ether.c
  head/sys/netinet/igmp.c
  head/sys/netinet/ip_divert.c
  head/sys/netinet/ip_input.c
  head/sys/netinet6/ip6_input.c
  head/sys/netinet6/vinet6.h
  head/sys/netipsec/ipsec_input.c
  head/sys/netipx/ipx_input.c
  head/sys/netnatm/natm_proto.c
  head/sys/sys/param.h
  head/sys/sys/pcpu.h

Modified: head/sys/kern/kern_poll.c
==
--- head/sys/kern/kern_poll.c   Mon Jun  1 10:30:52 2009(r193218)
+++ head/sys/kern/kern_poll.c   Mon Jun  1 10:41:38 2009(r193219)
@@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include /* needed by net/if.h   
*/
 #include 

svn commit: r193220 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/bce dev/cxgb

2009-06-01 Thread Xin LI
Author: delphij
Date: Mon Jun  1 10:49:08 2009
New Revision: 193220
URL: http://svn.freebsd.org/changeset/base/193220

Log:
  DMA synchronization fixes:
  
   - In bce_rx_intr(), use BUS_DMASYNC_POSTREAD instead of
 BUS_DMASYNC_POSTWRITE, as we want to "read" from the
 rx page chain pages.
   - Document why we need to do PREWRITE after we have updated
 the rx page chain pages.
   - In bce_intr(), use BUS_DMASYNC_POSTREAD and
 BUS_DMASYNC_PREREAD when before and after CPU "reading"
 the status block.
   - Adjust some nearby style mismatches/etc.
  
  Pointed out by:   yongari
  Approved by:  davidch (no objection) but bugs are mine :)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/bce/if_bce.c
  stable/7/sys/dev/cxgb/   (props changed)

Modified: stable/7/sys/dev/bce/if_bce.c
==
--- stable/7/sys/dev/bce/if_bce.c   Mon Jun  1 10:41:38 2009
(r193219)
+++ stable/7/sys/dev/bce/if_bce.c   Mon Jun  1 10:49:08 2009
(r193220)
@@ -4884,7 +4884,7 @@ bce_get_rx_buf(struct bce_softc *sc, str
KASSERT(nsegs == 1, ("%s(): Too many segments returned (%d)!",
 __FUNCTION__, nsegs));
 
-   /* ToDo: Do we need bus_dmamap_sync(,,BUS_DMASYNC_PREWRITE) here? */
+   /* ToDo: Do we need bus_dmamap_sync(,,BUS_DMASYNC_PREREAD) here? */
 
/* Setup the rx_bd for the segment. */
rxbd = &sc->rx_bd_chain[RX_PAGE(*chain_prod)][RX_IDX(*chain_prod)];
@@ -4993,7 +4993,7 @@ bce_get_pg_buf(struct bce_softc *sc, str
goto bce_get_pg_buf_exit;
}
 
-   /* ToDo: Do we need bus_dmamap_sync(,,BUS_DMASYNC_PREWRITE) here? */
+   /* ToDo: Do we need bus_dmamap_sync(,,BUS_DMASYNC_PREREAD) here? */
 
/*
 * The page chain uses the same rx_bd data structure
@@ -5270,13 +5270,11 @@ bce_init_rx_chain(struct bce_softc *sc)
rxbd->rx_bd_haddr_lo = 
htole32(BCE_ADDR_LO(sc->rx_bd_chain_paddr[j]));
}
 
-/* Fill up the RX chain. */
+   /* Fill up the RX chain. */
bce_fill_rx_chain(sc);
 
for (i = 0; i < RX_PAGES; i++) {
-   bus_dmamap_sync(
-   sc->rx_bd_chain_tag,
-   sc->rx_bd_chain_map[i],
+   bus_dmamap_sync(sc->rx_bd_chain_tag, sc->rx_bd_chain_map[i],
BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
}
 
@@ -5447,9 +5445,7 @@ bce_init_pg_chain(struct bce_softc *sc)
bce_fill_pg_chain(sc);
 
for (i = 0; i < PG_PAGES; i++) {
-   bus_dmamap_sync(
-   sc->pg_bd_chain_tag,
-   sc->pg_bd_chain_map[i],
+   bus_dmamap_sync(sc->pg_bd_chain_tag, sc->pg_bd_chain_map[i],
BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
}
 
@@ -5732,13 +5728,13 @@ bce_rx_intr(struct bce_softc *sc)
/* Prepare the RX chain pages to be accessed by the host CPU. */
for (int i = 0; i < RX_PAGES; i++)
bus_dmamap_sync(sc->rx_bd_chain_tag,
-   sc->rx_bd_chain_map[i], BUS_DMASYNC_POSTWRITE);
+   sc->rx_bd_chain_map[i], BUS_DMASYNC_POSTREAD);
 
 #ifdef ZERO_COPY_SOCKETS
/* Prepare the page chain pages to be accessed by the host CPU. */
for (int i = 0; i < PG_PAGES; i++)
bus_dmamap_sync(sc->pg_bd_chain_tag,
-   sc->pg_bd_chain_map[i], BUS_DMASYNC_POSTWRITE);
+   sc->pg_bd_chain_map[i], BUS_DMASYNC_POSTREAD);
 #endif
 
/* Get the hardware's view of the RX consumer index. */
@@ -5765,9 +5761,8 @@ bce_rx_intr(struct bce_softc *sc)
sw_rx_cons_idx = RX_CHAIN_IDX(sw_rx_cons);
 
/* Unmap the mbuf from DMA space. */
-   bus_dmamap_sync(sc->rx_mbuf_tag,
-   sc->rx_mbuf_map[sw_rx_cons_idx],
-   BUS_DMASYNC_POSTREAD);
+   bus_dmamap_sync(sc->rx_mbuf_tag, 
sc->rx_mbuf_map[sw_rx_cons_idx],
+   BUS_DMASYNC_POSTREAD);
bus_dmamap_unload(sc->rx_mbuf_tag,
sc->rx_mbuf_map[sw_rx_cons_idx]);
 
@@ -6011,6 +6006,7 @@ bce_rx_int_next_rx:
sc->rx_cons = sw_rx_cons;
bce_fill_rx_chain(sc);
 
+   /* Prepare the page chain pages to be accessed by the NIC. */
for (int i = 0; i < RX_PAGES; i++)
bus_dmamap_sync(sc->rx_bd_chain_tag,
sc->rx_bd_chain_map[i], BUS_DMASYNC_PREWRITE);
@@ -7023,8 +7019,9 @@ bce_intr(void *xsc)
 
DBRUN(sc->interrupts_generated++);
 
+   /* Synchnorize before we read from interface's status block */
bus_dmamap_sync(sc->status_tag, sc->status_map,
-   BUS_DMASYNC_POSTWRITE);
+   BUS_DMASYNC_POSTREAD);
 
/*
 * If the hardware status block index
@@ -7112,7 +7109,7 @@ bce_intr(void *xsc)
   

svn commit: r193221 - head/bin/sh

2009-06-01 Thread Ralf S. Engelschall
Author: rse
Date: Mon Jun  1 10:50:17 2009
New Revision: 193221
URL: http://svn.freebsd.org/changeset/base/193221

Log:
  be more type correct and align local ckmalloc() with its underlying malloc(3) 
by using a "size_t" instead of an "int" argument

Modified:
  head/bin/sh/alias.c
  head/bin/sh/memalloc.c
  head/bin/sh/memalloc.h
  head/bin/sh/mkinit.c

Modified: head/bin/sh/alias.c
==
--- head/bin/sh/alias.c Mon Jun  1 10:49:08 2009(r193220)
+++ head/bin/sh/alias.c Mon Jun  1 10:50:17 2009(r193221)
@@ -97,7 +97,7 @@ setalias(char *name, char *val)
ap->val = savestr(val);
 #else /* hack */
{
-   int len = strlen(val);
+   size_t len = strlen(val);
ap->val = ckmalloc(len + 2);
memcpy(ap->val, val, len);
ap->val[len] = ' '; /* fluff */

Modified: head/bin/sh/memalloc.c
==
--- head/bin/sh/memalloc.c  Mon Jun  1 10:49:08 2009(r193220)
+++ head/bin/sh/memalloc.c  Mon Jun  1 10:50:17 2009(r193221)
@@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$");
  */
 
 pointer
-ckmalloc(int nbytes)
+ckmalloc(size_t nbytes)
 {
pointer p;
 

Modified: head/bin/sh/memalloc.h
==
--- head/bin/sh/memalloc.h  Mon Jun  1 10:49:08 2009(r193220)
+++ head/bin/sh/memalloc.h  Mon Jun  1 10:50:17 2009(r193221)
@@ -33,6 +33,8 @@
  * $FreeBSD$
  */
 
+#include 
+
 struct stackmark {
struct stack_block *stackp;
char *stacknxt;
@@ -46,7 +48,7 @@ extern int stacknleft;
 extern int sstrnleft;
 extern int herefd;
 
-pointer ckmalloc(int);
+pointer ckmalloc(size_t);
 pointer ckrealloc(pointer, int);
 void ckfree(pointer);
 char *savestr(char *);

Modified: head/bin/sh/mkinit.c
==
--- head/bin/sh/mkinit.cMon Jun  1 10:49:08 2009(r193220)
+++ head/bin/sh/mkinit.cMon Jun  1 10:50:17 2009(r193221)
@@ -159,7 +159,7 @@ void addstr(char *, struct text *);
 void addchar(int, struct text *);
 void writetext(struct text *, FILE *);
 FILE *ckfopen(char *, char *);
-void *ckmalloc(int);
+void *ckmalloc(size_t);
 char *savestr(char *);
 void error(char *);
 
@@ -464,7 +464,7 @@ ckfopen(char *file, char *mode)
 }
 
 void *
-ckmalloc(int nbytes)
+ckmalloc(size_t nbytes)
 {
char *p;
 
___
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: r193222 - head/bin/sh

2009-06-01 Thread Ralf S. Engelschall
Author: rse
Date: Mon Jun  1 11:02:09 2009
New Revision: 193222
URL: http://svn.freebsd.org/changeset/base/193222

Log:
  correctly test for __GNUC__ macro (non-GCC compilers do not have it defined 
at all)

Modified:
  head/bin/sh/eval.c
  head/bin/sh/parser.c
  head/bin/sh/var.c

Modified: head/bin/sh/eval.c
==
--- head/bin/sh/eval.c  Mon Jun  1 10:50:17 2009(r193221)
+++ head/bin/sh/eval.c  Mon Jun  1 11:02:09 2009(r193222)
@@ -594,7 +594,7 @@ evalcommand(union node *cmd, int flags, 
char *lastarg;
int realstatus;
int do_clearcmdentry;
-#if __GNUC__
+#ifdef __GNUC__
/* Avoid longjmp clobbering */
(void) &argv;
(void) &argc;

Modified: head/bin/sh/parser.c
==
--- head/bin/sh/parser.cMon Jun  1 10:50:17 2009(r193221)
+++ head/bin/sh/parser.cMon Jun  1 11:02:09 2009(r193222)
@@ -898,7 +898,7 @@ readtoken1(int firstc, char const *synta
int oldstyle;
char const *prevsyntax; /* syntax before arithmetic */
int synentry;
-#if __GNUC__
+#ifdef __GNUC__
/* Avoid longjmp clobbering */
(void) &out;
(void) "ef;
@@ -1323,7 +1323,7 @@ parsebackq: {
struct jmploc *volatile savehandler;
int savelen;
int saveprompt;
-#if __GNUC__
+#ifdef __GNUC__
/* Avoid longjmp clobbering */
(void) &saveprompt;
 #endif

Modified: head/bin/sh/var.c
==
--- head/bin/sh/var.c   Mon Jun  1 10:50:17 2009(r193221)
+++ head/bin/sh/var.c   Mon Jun  1 11:02:09 2009(r193222)
@@ -195,7 +195,7 @@ setvarsafe(char *name, char *val, int fl
struct jmploc jmploc;
struct jmploc *volatile savehandler = handler;
int err = 0;
-#if __GNUC__
+#ifdef __GNUC__
/* Avoid longjmp clobbering */
(void) &err;
 #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: r193223 - head/bin/sh

2009-06-01 Thread Ralf S. Engelschall
Author: rse
Date: Mon Jun  1 11:11:46 2009
New Revision: 193223
URL: http://svn.freebsd.org/changeset/base/193223

Log:
  align coding style with style(9) to avoid misunderstandings

Modified:
  head/bin/sh/exec.c

Modified: head/bin/sh/exec.c
==
--- head/bin/sh/exec.c  Mon Jun  1 11:02:09 2009(r193222)
+++ head/bin/sh/exec.c  Mon Jun  1 11:11:46 2009(r193223)
@@ -187,7 +187,8 @@ padvance(char **path, char *name)
if (*path == NULL)
return NULL;
start = *path;
-   for (p = start ; *p && *p != ':' && *p != '%' ; p++);
+   for (p = start; *p && *p != ':' && *p != '%'; p++)
+   ; /* nothing */
len = p - start + strlen(name) + 2; /* "2" is for '/' and '\0' */
while (stackblocksize() < len)
growstackblock();
___
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: r193225 - head/bin/sh

2009-06-01 Thread Ralf S. Engelschall
Author: rse
Date: Mon Jun  1 11:38:38 2009
New Revision: 193225
URL: http://svn.freebsd.org/changeset/base/193225

Log:
  use explicit 'unsigned int' instead of just the implicit-style 'unsigned' to 
make linting tools (e.g. FlexeLint) happy, too

Modified:
  head/bin/sh/mksyntax.c

Modified: head/bin/sh/mksyntax.c
==
--- head/bin/sh/mksyntax.c  Mon Jun  1 11:15:54 2009(r193224)
+++ head/bin/sh/mksyntax.c  Mon Jun  1 11:38:38 2009(r193225)
@@ -354,7 +354,7 @@ output_type_macros(void)
char **pp;
 
if (digit_contig)
-   macro[0] = "#define is_digit(c)\t((unsigned)((c) - '0') <= 9)";
+   macro[0] = "#define is_digit(c)\t((unsigned int)((c) - '0') <= 
9)";
for (pp = macro ; *pp ; pp++)
fprintf(hfile, "%s\n", *pp);
if (digit_contig)
___
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: r193228 - head/sys/dev/sound/pci/hda

2009-06-01 Thread Alexander Motin
Author: mav
Date: Mon Jun  1 13:13:47 2009
New Revision: 193228
URL: http://svn.freebsd.org/changeset/base/193228

Log:
  Comment out old Realtek ALC883 quirk, that was disabling phantop power on
  mic inputs. I have no idea what for it was made that time, but now I have
  several reports that it should be removed to make microphones work. If
  this quirk is still required for some systems then they should be identified
  and specified explicitly.

Modified:
  head/sys/dev/sound/pci/hda/hdac.c

Modified: head/sys/dev/sound/pci/hda/hdac.c
==
--- head/sys/dev/sound/pci/hda/hdac.c   Mon Jun  1 12:29:27 2009
(r193227)
+++ head/sys/dev/sound/pci/hda/hdac.c   Mon Jun  1 13:13:47 2009
(r193228)
@@ -83,7 +83,7 @@
 
 #include "mixer_if.h"
 
-#define HDA_DRV_TEST_REV   "20090401_0132"
+#define HDA_DRV_TEST_REV   "20090601_0133"
 
 SND_DECLARE_FILE("$FreeBSD$");
 
@@ -4657,6 +4657,7 @@ hdac_vendor_patch_parse(struct hdac_devi
}
 
switch (id) {
+#if 0
case HDA_CODEC_ALC883:
/*
 * nid: 24/25 = External (jack) or Internal (fixed) Mic.
@@ -4686,6 +4687,7 @@ hdac_vendor_patch_parse(struct hdac_devi
 * nid: 26 = Line-in, leave it alone.
 */
break;
+#endif
case HDA_CODEC_AD1983:
/*
 * This codec has several possible usages, but none
___
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: r193229 - head/sys/boot/i386/libi386

2009-06-01 Thread John Baldwin
Author: jhb
Date: Mon Jun  1 14:20:13 2009
New Revision: 193229
URL: http://svn.freebsd.org/changeset/base/193229

Log:
  Add a missing parameter when displaying GPT partitions with an unknown
  UUID.
  
  Submitted by: Pawel Worach  pawel.worach | gmail
  MFC after:1 week

Modified:
  head/sys/boot/i386/libi386/biosdisk.c

Modified: head/sys/boot/i386/libi386/biosdisk.c
==
--- head/sys/boot/i386/libi386/biosdisk.c   Mon Jun  1 13:13:47 2009
(r193228)
+++ head/sys/boot/i386/libi386/biosdisk.c   Mon Jun  1 14:20:13 2009
(r193229)
@@ -387,6 +387,7 @@ bd_printgptpart(struct open_disk *od, st
sprintf(line, "%s: FreeBSD swap%s\n", prefix, stats);
 else
sprintf(line, "%s: 
%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x%s\n",
+   prefix,
gp->gp_type.time_low, gp->gp_type.time_mid,
gp->gp_type.time_hi_and_version,
gp->gp_type.clock_seq_hi_and_reserved, gp->gp_type.clock_seq_low,
___
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: r193159 - head/sys/powerpc/powermac

2009-06-01 Thread John Baldwin
On Sunday 31 May 2009 6:02:20 am Nathan Whitehorn wrote:
> Author: nwhitehorn
> Date: Sun May 31 10:02:20 2009
> New Revision: 193159
> URL: http://svn.freebsd.org/changeset/base/193159
> 
> Log:
>   Provide an analogous sysctl to hw.acpi.acline (dev.pmu.0.acline) to
>   determine whether the computer is plugged in to mains power.

I wonder if it would be a good idea to introduce a 
platform-independent 'acline' sysctl?  Something like 'hw.acline'?  For now 
we could simply have these devices create it.  We could do something fancier 
where AC adapter drivers register with a centralized thingie at some point 
and it exports a global setting that is true so long as at least one adapter 
is online.  I'm not sure that level of complexity is warranted until we have 
platforms with multiple AC lines exposed to the OS though.

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


Re: svn commit: r193199 - head/etc

2009-06-01 Thread Bruce Simpson

Doug Barton wrote:

Log:
  Eliminate the warning that "Values of network_interfaces other than
  AUTO are deprecated.' There is no good reason to deprecate them, and
  setting this to different values can be useful for custom solutions
  and/or one-off configuration problems.
  


Thanks, I wasn't sure what the alternative to this functionality was 
going to be, and was relying on this mechanism for a product.


___
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: r193230 - head/sys/net

2009-06-01 Thread Robert Watson
Author: rwatson
Date: Mon Jun  1 15:03:58 2009
New Revision: 193230
URL: http://svn.freebsd.org/changeset/base/193230

Log:
  Garbage collect NETISR_POLL and NETISR_POLLMORE, which are no longer
  required for options DEVICE_POLLING.
  
  De-fragment the NETISR_ constant space and lower NETISR_MAXPROT from
  32 to 16 -- when sizing queue arrays using this compile-time constant,
  significant amounts of memory are saved.
  
  Warn on the console when tunable values for netisr are automatically
  adjusted during boot due to exceeding limits, invalid values, or as a
  result of DEVICE_POLLING.

Modified:
  head/sys/net/netisr.c
  head/sys/net/netisr.h

Modified: head/sys/net/netisr.c
==
--- head/sys/net/netisr.c   Mon Jun  1 14:20:13 2009(r193229)
+++ head/sys/net/netisr.c   Mon Jun  1 15:03:58 2009(r193230)
@@ -201,7 +201,7 @@ struct netisr_proto {
u_intnp_policy; /* Work placement policy. */
 };
 
-#defineNETISR_MAXPROT  32  /* Compile-time limit. 
*/
+#defineNETISR_MAXPROT  16  /* Compile-time limit. 
*/
 
 /*
  * The np array describes all registered protocols, indexed by protocol
@@ -1045,20 +1045,31 @@ netisr_init(void *arg)
KASSERT(curcpu == 0, ("%s: not on CPU 0", __func__));
 
NETISR_LOCK_INIT();
-   if (netisr_maxthreads < 1)
+   if (netisr_maxthreads < 1) {
+   printf("netisr2: forcing maxthreads to 1\n");
netisr_maxthreads = 1;
-   if (netisr_maxthreads > MAXCPU)
+   }
+   if (netisr_maxthreads > MAXCPU) {
+   printf("netisr2: forcing maxthreads to %d\n", MAXCPU);
netisr_maxthreads = MAXCPU;
-   if (netisr_defaultqlimit > netisr_maxqlimit)
+   }
+   if (netisr_defaultqlimit > netisr_maxqlimit) {
+   printf("netisr2: forcing defaultqlimit to %d\n",
+   netisr_maxqlimit);
netisr_defaultqlimit = netisr_maxqlimit;
+   }
 #ifdef DEVICE_POLLING
/*
 * The device polling code is not yet aware of how to deal with
 * multiple netisr threads, so for the time being compiling in device
 * polling disables parallel netisr workers.
 */
-   netisr_maxthreads = 1;
-   netisr_bindthreads = 0;
+   if (netisr_maxthreads != 1 || netisr_bindthreads != 0) {
+   printf("netisr2: forcing maxthreads to 1 and bindthreads to "
+   "0 for device polling\n");
+   netisr_maxthreads = 1;
+   netisr_bindthreads = 0;
+   }
 #endif
 
netisr_start_swi(curcpu, pcpu_find(curcpu));

Modified: head/sys/net/netisr.h
==
--- head/sys/net/netisr.h   Mon Jun  1 14:20:13 2009(r193229)
+++ head/sys/net/netisr.h   Mon Jun  1 15:03:58 2009(r193230)
@@ -39,19 +39,17 @@
  * Historically, this was implemented by the BSD software ISR facility; it is
  * now implemented via a software ithread (SWI).
  */
-#defineNETISR_POLL 0   /* polling callback, must be 
first */
-#defineNETISR_IP   2   /* same as AF_INET */
-#defineNETISR_IGMP 3   /* IGMPv3 output queue */
-#defineNETISR_ROUTE14  /* routing socket */
-#defineNETISR_AARP 15  /* Appletalk ARP */
-#defineNETISR_ATALK2   16  /* Appletalk phase 2 */
-#defineNETISR_ATALK1   17  /* Appletalk phase 1 */
-#defineNETISR_ARP  18  /* same as AF_LINK */
-#defineNETISR_IPX  23  /* same as AF_IPX */
-#defineNETISR_ETHER24  /* ethernet input */
-#defineNETISR_IPV6 27
-#defineNETISR_NATM 28
-#defineNETISR_POLLMORE 31  /* polling callback, must be 
last */
+#defineNETISR_IP   1
+#defineNETISR_IGMP 2   /* IGMPv3 output queue */
+#defineNETISR_ROUTE3   /* routing socket */
+#defineNETISR_AARP 4   /* Appletalk ARP */
+#defineNETISR_ATALK2   5   /* Appletalk phase 2 */
+#defineNETISR_ATALK1   6   /* Appletalk phase 1 */
+#defineNETISR_ARP  7   /* same as AF_LINK */
+#defineNETISR_IPX  8   /* same as AF_IPX */
+#defineNETISR_ETHER9   /* ethernet input */
+#defineNETISR_IPV6 10
+#defineNETISR_NATM 11
 
 /*-
  * Protocols express ordering constraints and affinity preferences by
___
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: r192800 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/common/acl cddl/contrib/opensolaris/uts/common/fs/zfs cddl/contrib/opensolaris/

2009-06-01 Thread Tom Evans
On Tue, 2009-05-26 at 15:09 -0500, Brooks Davis wrote:
> On Tue, May 26, 2009 at 03:24:05PM +0200, Ivan Voras wrote:
> > 2009/5/26 Robert Watson :
> > > On Tue, 26 May 2009, Edward Tomasz Napierala wrote:
> > >
> > >> +/*-
> > >> + * Copyright (c) 2008, 2009 Edward Tomasz Napiera??a 
> > >> + * 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.
> > >> + *
> > >> + * ALTHOUGH THIS SOFTWARE IS MADE OF WIN AND SCIENCE, IT IS PROVIDED BY
> > >> THE
> > >
> > > Cute though this BSD license variation is, I'm pretty sure it's not on the
> > > approved license list. ??Sticking to the standard license templates
> > > potentially saves significant trouble later -- especially when people
> > 
> > Hmm, I'm sure that there exists some SVN magic which would allow
> > authors to enter something
> > 
> > $BSDL2 Charlie Root 2008,2009$
> > 
> > and it expands to a perfect boilerplate on checkout :)
> 
> Such a change would result in a repository filled without license blocks.
> This might be appropriate in a corporate setting, but isn't worth
> considering here since copies of the repo would lack correct
> attributions.
> 
> -- Brooks

It could also be written as a pre-commit hook, rather than as a property
expansion, which would assuage those concerns. 

Of course you then get a whole bunch of other concerns, like what is
checked by the committer is not what is actually checked in.

Cheers

Tom

___
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: r193231 - head/sys/netinet

2009-06-01 Thread Bruce M Simpson
Author: bms
Date: Mon Jun  1 15:30:18 2009
New Revision: 193231
URL: http://svn.freebsd.org/changeset/base/193231

Log:
  Merge fixes from p4:
   * Tighten v1 query input processing.
   * Borrow changes from MLDv2 for how general queries are processed.
 * Do address field validation upfront before accepting input.
 * Do NOT switch protocol version if old querier present timer active.
   * Always clear IGMPv3 state in igmp_v3_cancel_link_timers().
   * Update comments.
  
  Tested by:deeptech71 at gmail dot com

Modified:
  head/sys/netinet/igmp.c

Modified: head/sys/netinet/igmp.c
==
--- head/sys/netinet/igmp.c Mon Jun  1 15:03:58 2009(r193230)
+++ head/sys/netinet/igmp.c Mon Jun  1 15:30:18 2009(r193231)
@@ -98,7 +98,8 @@ static void   igmp_final_leave(struct in_m
 static int igmp_handle_state_change(struct in_multi *,
struct igmp_ifinfo *);
 static int igmp_initial_join(struct in_multi *, struct igmp_ifinfo *);
-static int igmp_input_v1_query(struct ifnet *, const struct ip *);
+static int igmp_input_v1_query(struct ifnet *, const struct ip *,
+   const struct igmp *);
 static int igmp_input_v2_query(struct ifnet *, const struct ip *,
const struct igmp *);
 static int igmp_input_v3_query(struct ifnet *, const struct ip *,
@@ -702,7 +703,8 @@ igi_delete_locked(const struct ifnet *if
  * VIMAGE: The curvnet pointer is derived from the input ifp.
  */
 static int
-igmp_input_v1_query(struct ifnet *ifp, const struct ip *ip)
+igmp_input_v1_query(struct ifnet *ifp, const struct ip *ip,
+const struct igmp *igmp)
 {
INIT_VNET_INET(ifp->if_vnet);
struct ifmultiaddr  *ifma;
@@ -710,20 +712,18 @@ igmp_input_v1_query(struct ifnet *ifp, c
struct in_multi *inm;
 
/*
-* IGMPv1 General Queries SHOULD always addressed to 224.0.0.1.
+* IGMPv1 Host Mmembership Queries SHOULD always be addressed to
+* 224.0.0.1. They are always treated as General Queries.
 * igmp_group is always ignored. Do not drop it as a userland
 * daemon may wish to see it.
+* XXX SMPng: unlocked increments in igmpstat assumed atomic.
 */
-   if (!in_allhosts(ip->ip_dst)) {
+   if (!in_allhosts(ip->ip_dst) || !in_nullhost(igmp->igmp_group)) {
IGMPSTAT_INC(igps_rcv_badqueries);
return (0);
}
-
IGMPSTAT_INC(igps_rcv_gen_queries);
 
-   /*
-* Switch to IGMPv1 host compatibility mode.
-*/
IN_MULTI_LOCK();
IGMP_LOCK();
 
@@ -736,6 +736,9 @@ igmp_input_v1_query(struct ifnet *ifp, c
goto out_locked;
}
 
+   /*
+* Switch to IGMPv1 host compatibility mode.
+*/
igmp_set_version(igi, IGMP_VERSION_1);
 
CTR2(KTR_IGMPV3, "process v1 query on ifp %p(%s)", ifp, ifp->if_xname);
@@ -793,12 +796,29 @@ igmp_input_v2_query(struct ifnet *ifp, c
struct ifmultiaddr  *ifma;
struct igmp_ifinfo  *igi;
struct in_multi *inm;
+   int  is_general_query;
uint16_t timer;
 
+   is_general_query = 0;
+
/*
-* Perform lazy allocation of IGMP link info if required,
-* and switch to IGMPv2 host compatibility mode.
+* Validate address fields upfront.
+* XXX SMPng: unlocked increments in igmpstat assumed atomic.
 */
+   if (in_nullhost(igmp->igmp_group)) {
+   /*
+* IGMPv2 General Query.
+* If this was not sent to the all-hosts group, ignore it.
+*/
+   if (!in_allhosts(ip->ip_dst))
+   return (0);
+   IGMPSTAT_INC(igps_rcv_gen_queries);
+   is_general_query = 1;
+   } else {
+   /* IGMPv2 Group-Specific Query. */
+   IGMPSTAT_INC(igps_rcv_group_queries);
+   }
+
IN_MULTI_LOCK();
IGMP_LOCK();
 
@@ -811,16 +831,37 @@ igmp_input_v2_query(struct ifnet *ifp, c
goto out_locked;
}
 
+   /*
+* Ignore v2 query if in v1 Compatibility Mode.
+*/
+   if (igi->igi_version == IGMP_VERSION_1)
+   goto out_locked;
+
igmp_set_version(igi, IGMP_VERSION_2);
 
timer = igmp->igmp_code * PR_FASTHZ / IGMP_TIMER_SCALE;
if (timer == 0)
timer = 1;
 
-   if (!in_nullhost(igmp->igmp_group)) {
+   if (is_general_query) {
/*
-* IGMPv2 Group-Specific Query.
-* If this is a group-specific IGMPv2 query, we need only
+* For each reporting group joined on this
+* interface, kick the report timer.
+*/
+   CTR2(KTR_IGMPV3, "process v2 general query on ifp %p(%s)",
+ 

svn commit: r193232 - in head: . sys/net sys/netinet sys/netinet6 sys/nfsclient sys/sys usr.bin/netstat

2009-06-01 Thread Bjoern A. Zeeb
Author: bz
Date: Mon Jun  1 15:49:42 2009
New Revision: 193232
URL: http://svn.freebsd.org/changeset/base/193232

Log:
  Convert the two dimensional array to be malloced and introduce
  an accessor function to get the correct rnh pointer back.
  
  Update netstat to get the correct pointer using kvm_read()
  as well.
  
  This not only fixes the ABI problem depending on the kernel
  option but also permits the tunable to overwrite the kernel
  option at boot time up to MAXFIBS, enlarging the number of
  FIBs without having to recompile. So people could just use
  GENERIC now.
  
  Reviewed by:  julian, rwatson, zec
  X-MFC:not possible

Modified:
  head/UPDATING
  head/sys/net/if.c
  head/sys/net/route.c
  head/sys/net/route.h
  head/sys/net/rtsock.c
  head/sys/net/vnet.h
  head/sys/netinet/in_rmx.c
  head/sys/netinet6/in6_ifattach.c
  head/sys/netinet6/in6_rmx.c
  head/sys/netinet6/nd6_rtr.c
  head/sys/nfsclient/bootp_subr.c
  head/sys/sys/param.h
  head/usr.bin/netstat/route.c

Modified: head/UPDATING
==
--- head/UPDATING   Mon Jun  1 15:30:18 2009(r193231)
+++ head/UPDATING   Mon Jun  1 15:49:42 2009(r193232)
@@ -22,6 +22,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.
to maximize performance.  (To disable malloc debugging, run
ln -s aj /etc/malloc.conf.)
 
+20090601:
+   The way we are storing and accessing `routeing table' entries
+   has changed. Programs reading the FIB, like netstat, need to
+   be re-compiled.
+   Bump __FreeBSD_version to 800097.
+
 20090530:
Remove the tunable/sysctl debug.mpsafevfs as its initial purpose
is no more valid.

Modified: head/sys/net/if.c
==
--- head/sys/net/if.c   Mon Jun  1 15:30:18 2009(r193231)
+++ head/sys/net/if.c   Mon Jun  1 15:49:42 2009(r193232)
@@ -1001,7 +1001,8 @@ if_detach_internal(struct ifnet *ifp, in
 */
for (i = 1; i <= AF_MAX; i++) {
for (j = 0; j < rt_numfibs; j++) {
-   if ((rnh = V_rt_tables[j][i]) == NULL)
+   rnh = rt_tables_get_rnh(j, i);
+   if (rnh == NULL)
continue;
RADIX_NODE_HEAD_LOCK(rnh);
(void) rnh->rnh_walktree(rnh, if_rtdel, ifp);

Modified: head/sys/net/route.c
==
--- head/sys/net/route.cMon Jun  1 15:30:18 2009(r193231)
+++ head/sys/net/route.cMon Jun  1 15:49:42 2009(r193232)
@@ -91,15 +91,7 @@ TUNABLE_INT("net.add_addr_allfibs", &rt_
 
 #ifdef VIMAGE_GLOBALS
 static struct rtstat rtstat;
-
-/* by default only the first 'row' of tables will be accessed. */
-/* 
- * XXXMRT When we fix netstat, and do this differnetly,
- * we can allocate this dynamically. As long as we are keeping
- * things backwards compaitble we need to allocate this 
- * statically.
- */
-struct radix_node_head *rt_tables[RT_MAXFIBS][AF_MAX+1];
+struct radix_node_head *rt_tables;
 
 static int rttrash;/* routes not in table but not freed */
 #endif
@@ -158,6 +150,32 @@ sysctl_my_fibnum(SYSCTL_HANDLER_ARGS)
 SYSCTL_PROC(_net, OID_AUTO, my_fibnum, CTLTYPE_INT|CTLFLAG_RD,
 NULL, 0, &sysctl_my_fibnum, "I", "default FIB of caller");
 
+static __inline struct radix_node_head **
+rt_tables_get_rnh_ptr(int table, int fam)
+{
+   INIT_VNET_NET(curvnet);
+   struct radix_node_head **rnh;
+
+   KASSERT(table >= 0 && table < rt_numfibs, ("%s: table out of bounds.",
+   __func__));
+   KASSERT(fam >= 0 && fam < (AF_MAX+1), ("%s: fam out of bounds.",
+   __func__));
+
+   /* rnh is [fib=0][af=0]. */
+   rnh = (struct radix_node_head **)V_rt_tables;
+   /* Get the offset to the requested table and fam. */
+   rnh += table * (AF_MAX+1) + fam;
+
+   return (rnh);
+}
+
+struct radix_node_head *
+rt_tables_get_rnh(int table, int fam)
+{
+
+   return (*rt_tables_get_rnh_ptr(table, fam));
+}
+
 static void
 route_init(void)
 {
@@ -179,10 +197,14 @@ route_init(void)
 static int vnet_route_iattach(const void *unused __unused)
 {
INIT_VNET_NET(curvnet);
-   int table;
struct domain *dom;
+   struct radix_node_head **rnh;
+   int table;
int fam;
 
+   V_rt_tables = malloc(rt_numfibs * (AF_MAX+1) *
+   sizeof(struct radix_node_head *), M_RTABLE, M_WAITOK|M_ZERO);
+
V_rtzone = uma_zcreate("rtentry", sizeof(struct rtentry), NULL, NULL,
NULL, NULL, UMA_ALIGN_PTR, 0);
for (dom = domains; dom; dom = dom->dom_next) {
@@ -198,8 +220,10 @@ static int vnet_route_iattach(const void
 

Re: svn commit: r192925 - in head/sys/dev/usb: . input

2009-06-01 Thread Hans Petter Selasky
On Monday 01 June 2009, Rui Paulo wrote:
> Hi,
>
> On 1 Jun 2009, at 06:49, Hans Petter Selasky wrote:
> > On Monday 01 June 2009, Rui Paulo wrote:
> >> http://wiki.freebsd.org/AppleMacbook#head-7eab3730c3bf3d04bdfb0d1d3649ea
> >>ddf 2fed595
> >
> > Hi Rui Paulo,
> >
> > Regarding the eject button, can you have a look at:
> >
> > /sys/dev/usb/input/ukbd.c
> >
> > And provide a patch that masks this key the way you want?
>
> I'm not sure what you mean. I'm proposing to remove the key handling
> code from the kernel. See the attached patch.

Your patch looks OK. Make sure you test it before committing.

--HPS
___
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: r193232 - in head: . sys/net sys/netinet sys/netinet6 sys/nfsclient sys/sys usr.bin/netstat

2009-06-01 Thread Bjoern A. Zeeb

On Mon, 1 Jun 2009, Bjoern A. Zeeb wrote:


Author: bz
Date: Mon Jun  1 15:49:42 2009
New Revision: 193232
URL: http://svn.freebsd.org/changeset/base/193232

Log:
 Convert the two dimensional array to be malloced and introduce
 an accessor function to get the correct rnh pointer back.

 Update netstat to get the correct pointer using kvm_read()
 as well.

 This not only fixes the ABI problem depending on the kernel
 option but also permits the tunable to overwrite the kernel
 option at boot time up to MAXFIBS, enlarging the number of
 FIBs without having to recompile. So people could just use
 GENERIC now.

 Reviewed by:   julian, rwatson, zec
 X-MFC: not possible


The solution is not ideal but will help FreeBSD 8.x.

Julian has suggested a cleaner way but I considered that to be to
late and intrusive for 8.x; this way we will have enough time for
9.x to convert this io per AF/domain handler routines.


Note: I will garbage collect a lot of opt_route.h dependencies by the
end of the week as that option no longer has to be visible to most of
the tree.


PS: I cannot spell 'routing' correctly usually so whoever touches
UPDATING next please fix the spelling;-)

--
Bjoern A. Zeeb  The greatest risk is not taking one.
___
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: r193233 - head

2009-06-01 Thread Robert Watson
Author: rwatson
Date: Mon Jun  1 16:00:36 2009
New Revision: 193233
URL: http://svn.freebsd.org/changeset/base/193233

Log:
  Update UPDATING for NETISR2 merge, fix a typo in another UPDATING entry.

Modified:
  head/UPDATING

Modified: head/UPDATING
==
--- head/UPDATING   Mon Jun  1 15:49:42 2009(r193232)
+++ head/UPDATING   Mon Jun  1 16:00:36 2009(r193233)
@@ -23,11 +23,17 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.
ln -s aj /etc/malloc.conf.)
 
 20090601:
-   The way we are storing and accessing `routeing table' entries
+   The way we are storing and accessing `routing table' entries
has changed. Programs reading the FIB, like netstat, need to
be re-compiled.
Bump __FreeBSD_version to 800097.
 
+20090601:
+   A new netisr implementation has been added for FreeBSD 8.  Network
+   file system modules, such as igmp, ipdivert, and others, should be
+   rebuilt.
+   Bump __FreeBSD_version to 800096.
+
 20090530:
Remove the tunable/sysctl debug.mpsafevfs as its initial purpose
is no more valid.
___
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: r193159 - head/sys/powerpc/powermac

2009-06-01 Thread Nathan Whitehorn

John Baldwin wrote:

On Sunday 31 May 2009 6:02:20 am Nathan Whitehorn wrote:
  

Author: nwhitehorn
Date: Sun May 31 10:02:20 2009
New Revision: 193159
URL: http://svn.freebsd.org/changeset/base/193159

Log:
  Provide an analogous sysctl to hw.acpi.acline (dev.pmu.0.acline) to
  determine whether the computer is plugged in to mains power.



I wonder if it would be a good idea to introduce a 
platform-independent 'acline' sysctl?  Something like 'hw.acline'?  For now 
we could simply have these devices create it.  We could do something fancier 
where AC adapter drivers register with a centralized thingie at some point 
and it exports a global setting that is true so long as at least one adapter 
is online.  I'm not sure that level of complexity is warranted until we have 
platforms with multiple AC lines exposed to the OS though.
  
That would be nice, and easy to implement, though the existing one 
should be kept for a while for compatibility. In the longer term, pmu(4) 
also provides an ACPI-alike interface to battery status under dev.pmu.*, 
which it would likewise be good to report in a platform-independent way.

-Nathan
___
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: r193234 - in head/sys: kern sys

2009-06-01 Thread Robert Watson
Author: rwatson
Date: Mon Jun  1 16:13:06 2009
New Revision: 193234
URL: http://svn.freebsd.org/changeset/base/193234

Log:
  Add 'sy_flags', a currently unused per-syscall entry flags field that will
  see future use in 9-CURRENT and 8-STABLE for features such as the
  capability-mode enable flag and pay-as-you-audit.
  
  Discussed with:   jhb, sson

Modified:
  head/sys/kern/makesyscalls.sh
  head/sys/sys/sysent.h

Modified: head/sys/kern/makesyscalls.sh
==
--- head/sys/kern/makesyscalls.sh   Mon Jun  1 16:00:36 2009
(r193233)
+++ head/sys/kern/makesyscalls.sh   Mon Jun  1 16:13:06 2009
(r193234)
@@ -318,6 +318,13 @@ s/\$//g
auditev = $2;
}
 
+   #
+   # The currently-empty flags field.
+   #
+   {
+   flags = "0";
+   }
+
$3 == "STD" || $3 == "NODEF" || $3 == "NOARGS"  || $3 == "NOPROTO" \
|| $3 == "NOIMPL" || $3 == "NOSTD" {
parseline()
@@ -369,14 +376,14 @@ s/\$//g
printf("\t{ %s, (sy_call_t *)", argssize) > sysent
column = 8 + 2 + length(argssize) + 15
if ($3 == "NOIMPL") {
-   printf("%s },", "nosys, AUE_NULL, NULL, 0, 0") > sysent
-   column = column + length("nosys") + 3
+   printf("%s },", "nosys, AUE_NULL, NULL, 0, 0, 0") > 
sysent
+   column = column + length("nosys") + length("AUE_NULL") 
+ 3
} else if ($3 == "NOSTD") {
-   printf("%s },", "lkmressys, AUE_NULL, NULL, 0, 0") > 
sysent
-   column = column + length("lkmressys") + 3
+   printf("%s },", "lkmressys, AUE_NULL, NULL, 0, 0, 0") > 
sysent
+   column = column + length("lkmressys") + 
length("AUE_NULL") + 3
} else {
-   printf("%s, %s, NULL, 0, 0 },", funcname, auditev) > 
sysent
-   column = column + length(funcname) + length(auditev) + 3
+   printf("%s, %s, NULL, 0, 0, %s },", funcname, auditev, 
flags) > sysent
+   column = column + length(funcname) + length(auditev) + 
length(flags) + 3
} 
align_sysent_comment(column)
printf("/* %d = %s */\n", syscall, funcalias) > sysent
@@ -426,10 +433,10 @@ s/\$//g
argalias) > sysarg
printf("%s\t%s%s(struct thread *, struct %s *);\n",
rettype, prefix, funcname, argalias) > outdcl
-   printf("\t{ %s(%s,%s), %s, NULL, 0, 0 },",
-   wrap, argssize, funcname, auditev) > sysent
+   printf("\t{ %s(%s,%s), %s, NULL, 0, 0, %s },",
+   wrap, argssize, funcname, auditev, flags) > sysent
align_sysent_comment(8 + 9 + \
-   length(argssize) + 1 + length(funcname) + length(auditev) + 
4)
+   length(argssize) + 1 + length(funcname) + length(auditev) + 
length(flags) + 4)
printf("/* %d = old %s */\n", syscall, funcalias) > sysent
printf("\t\"%s.%s\",\t\t/* %d = old %s */\n",
wrap, funcalias, syscall, funcalias) > sysnames
@@ -448,10 +455,10 @@ s/\$//g
ncompat++
parseline()
printf("%s\to%s();\n", rettype, funcname) > syscompatdcl
-   printf("\t{ compat(%s,%s), %s, NULL, 0, 0 },",
-   argssize, funcname, auditev) > sysent
+   printf("\t{ compat(%s,%s), %s, NULL, 0, 0, %s },",
+   argssize, funcname, auditev, flags) > sysent
align_sysent_comment(8 + 9 + \
-   length(argssize) + 1 + length(funcname) + length(auditev) + 
4)
+   length(argssize) + 1 + length(funcname) + length(auditev) + 
length(flags) + 4)
printf("/* %d = old %s */\n", syscall, funcalias) > sysent
printf("\t\"old.%s\",\t\t/* %d = old %s */\n",
funcalias, syscall, funcalias) > sysnames
@@ -462,7 +469,7 @@ s/\$//g
next
}
$3 == "OBSOL" {
-   printf("\t{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 },") > 
sysent
+   printf("\t{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 },") 
> sysent
align_sysent_comment(34)
printf("/* %d = obsolete %s */\n", syscall, comment) > sysent
printf("\t\"obs_%s\",\t\t\t/* %d = obsolete %s */\n",
@@ -473,7 +480,7 @@ s/\$//g
next
}
$3 == "UNIMPL" {
-   printf("\t{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 
},\t\t\t/* %d = %s */\n",
+   printf("\t{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 
},\t\t\t/* %d = %s */\n",
syscall, comment) > sysent
printf("\t\"#%d\

Re: svn commit: r193220 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/bce dev/cxgb

2009-06-01 Thread Gavin Atkinson
On Mon, 2009-06-01 at 10:49 +, Xin LI wrote:
> Author: delphij
> Date: Mon Jun  1 10:49:08 2009
> New Revision: 193220
> URL: http://svn.freebsd.org/changeset/base/193220
> 
> Log:
>   DMA synchronization fixes:
>   
[snip]
>- In bce_intr(), use BUS_DMASYNC_POSTREAD and
>  BUS_DMASYNC_PREREAD when before and after CPU "reading"
>  the status block.
>- Adjust some nearby style mismatches/etc.

Is it possible that these changes will fix the issues reported with
bce(4) on amd64?  For example, amd64/134788?

Thanks,

Gavin
___
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: r193236 - head/sys/dev/bwi

2009-06-01 Thread Warner Losh
Author: imp
Date: Mon Jun  1 16:22:01 2009
New Revision: 193236
URL: http://svn.freebsd.org/changeset/base/193236

Log:
  Add a comment about what may be happening when we get certain
  messages.  No change to actual code.

Modified:
  head/sys/dev/bwi/if_bwi.c

Modified: head/sys/dev/bwi/if_bwi.c
==
--- head/sys/dev/bwi/if_bwi.c   Mon Jun  1 16:14:38 2009(r193235)
+++ head/sys/dev/bwi/if_bwi.c   Mon Jun  1 16:22:01 2009(r193236)
@@ -1628,6 +1628,23 @@ bwi_intr(void *xsc)
/* Disable all interrupts */
bwi_disable_intrs(sc, BWI_ALL_INTRS);
 
+   /*
+* http://bcm-specs.sipsolutions.net/Interrupts
+* Says for this bit (0x800):
+* "Fatal Error
+*
+* We got this one while testing things when by accident the
+* template ram wasn't set to big endian when it should have
+* been after writing the initial values. It keeps on being
+* triggered, the only way to stop it seems to shut down the
+* chip."
+*
+* Suggesting that we should never get it and if we do we're not
+* feeding TX packets into the MAC correctly if we do...  Apparently,
+* it is valid only on mac version 5 and higher, but I couldn't
+* find a reference for that...  Since I see them from time to time
+* on my card, this suggests an error in the tx path still...
+*/
if (intr_status & BWI_INTR_PHY_TXERR) {
if (mac->mac_flags & BWI_MAC_F_PHYE_RESET) {
if_printf(ifp, "%s: intr PHY TX error\n", __func__);
___
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: r193237 - head/sys/dev/bwi

2009-06-01 Thread Warner Losh
Author: imp
Date: Mon Jun  1 16:27:13 2009
New Revision: 193237
URL: http://svn.freebsd.org/changeset/base/193237

Log:
  Make sure that we drain the LED blinking callout on detach.
  
  Submitted by: Paul B. Mahol

Modified:
  head/sys/dev/bwi/if_bwi.c

Modified: head/sys/dev/bwi/if_bwi.c
==
--- head/sys/dev/bwi/if_bwi.c   Mon Jun  1 16:22:01 2009(r193236)
+++ head/sys/dev/bwi/if_bwi.c   Mon Jun  1 16:27:13 2009(r193237)
@@ -579,6 +579,7 @@ bwi_detach(struct bwi_softc *sc)
int i;
 
bwi_stop(sc, 1);
+   callout_drain(&sc->sc_led_blink_ch);
callout_drain(&sc->sc_calib_ch);
ieee80211_ifdetach(ic);
 
___
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: r193238 - head/sys/dev/bwi

2009-06-01 Thread Warner Losh
Author: imp
Date: Mon Jun  1 16:29:03 2009
New Revision: 193238
URL: http://svn.freebsd.org/changeset/base/193238

Log:
  Move the unlock to after the ifdef (maybe the right fix is to remove
  the ifdef) since it calls bwi_start_locked, which expects to the lock
  to be held...

Modified:
  head/sys/dev/bwi/if_bwi.c

Modified: head/sys/dev/bwi/if_bwi.c
==
--- head/sys/dev/bwi/if_bwi.c   Mon Jun  1 16:27:13 2009(r193237)
+++ head/sys/dev/bwi/if_bwi.c   Mon Jun  1 16:29:03 2009(r193238)
@@ -4069,8 +4069,8 @@ bwi_restart(void *xsc, int pending)
if_printf(ifp, "%s begin, help!\n", __func__);
BWI_LOCK(sc);
bwi_init_statechg(xsc, 0);
-   BWI_UNLOCK(sc);
 #if 0
bwi_start_locked(ifp);
 #endif
+   BWI_UNLOCK(sc);
 }
___
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: r193239 - head/sys/net80211

2009-06-01 Thread Sam Leffler
Author: sam
Date: Mon Jun  1 16:36:28 2009
New Revision: 193239
URL: http://svn.freebsd.org/changeset/base/193239

Log:
  pad data structures to enable integration of future features w/o abi breakage

Modified:
  head/sys/net80211/ieee80211_ht.h
  head/sys/net80211/ieee80211_ioctl.h
  head/sys/net80211/ieee80211_node.h
  head/sys/net80211/ieee80211_proto.h
  head/sys/net80211/ieee80211_scan.h
  head/sys/net80211/ieee80211_var.h

Modified: head/sys/net80211/ieee80211_ht.h
==
--- head/sys/net80211/ieee80211_ht.hMon Jun  1 16:29:03 2009
(r193238)
+++ head/sys/net80211/ieee80211_ht.hMon Jun  1 16:36:28 2009
(r193239)
@@ -58,6 +58,7 @@ struct ieee80211_tx_ampdu {
int txa_nextrequest;/* soonest to make next request */
struct callout  txa_timer;
void*txa_private;   /* driver-private storage */
+   uint64_ttxa_pad[4];
 };
 
 /* return non-zero if AMPDU tx for the TID is running */
@@ -141,6 +142,7 @@ struct ieee80211_rx_ampdu {
int rxa_age;/* age of oldest frame in window */
int rxa_nframes;/* frames since ADDBA */
struct mbuf *rxa_m[IEEE80211_AGGR_BAWMAX];
+   uint64_trxa_pad[4];
 };
 
 void   ieee80211_ht_attach(struct ieee80211com *);

Modified: head/sys/net80211/ieee80211_ioctl.h
==
--- head/sys/net80211/ieee80211_ioctl.h Mon Jun  1 16:29:03 2009
(r193238)
+++ head/sys/net80211/ieee80211_ioctl.h Mon Jun  1 16:36:28 2009
(r193239)
@@ -64,6 +64,7 @@ struct ieee80211_nodestats {
 
uint32_tns_tx_data; /* tx data frames */
uint32_tns_tx_mgmt; /* tx management frames */
+   uint32_tns_tx_ctrl; /* tx control frames */
uint32_tns_tx_ucast;/* tx unicast frames */
uint32_tns_tx_mcast;/* tx multi/broadcast frames */
uint64_tns_tx_bytes;/* tx data count (bytes) */
@@ -83,6 +84,7 @@ struct ieee80211_nodestats {
uint32_tns_tx_deauth_code;  /* last deauth reason */
uint32_tns_tx_disassoc; /* disassociations */
uint32_tns_tx_disassoc_code;/* last disassociation reason */
+   uint32_tns_spare[8];
 };
 
 /*
@@ -101,7 +103,7 @@ struct ieee80211_stats {
uint32_tis_rx_wepfail;  /* rx wep processing failed */
uint32_tis_rx_decap;/* rx decapsulation failed */
uint32_tis_rx_mgtdiscard;   /* rx discard mgt frames */
-   uint32_tis_rx_ctl;  /* rx discard ctrl frames */
+   uint32_tis_rx_ctl;  /* rx ctrl frames */
uint32_tis_rx_beacon;   /* rx beacon frames */
uint32_tis_rx_rstoobig; /* rx rate set truncated */
uint32_tis_rx_elem_missing; /* rx required element missing*/
@@ -218,7 +220,10 @@ struct ieee80211_stats {
uint32_tis_beacon_miss; /* beacon miss notification */
uint32_tis_rx_badstate; /* rx discard state != RUN */
uint32_tis_ff_flush;/* ff's flush'd from stageq */
-   uint32_tis_spare[11];
+   uint32_tis_tx_ctl;  /* tx ctrl frames */
+   uint32_tis_ampdu_rexmt; /* A-MPDU frames rexmt ok */
+   uint32_tis_ampdu_rexmt_fail;/* A-MPDU frames rexmt fail */
+   uint32_tis_spare[16];
 };
 
 /*

Modified: head/sys/net80211/ieee80211_node.h
==
--- head/sys/net80211/ieee80211_node.h  Mon Jun  1 16:29:03 2009
(r193238)
+++ head/sys/net80211/ieee80211_node.h  Mon Jun  1 16:36:28 2009
(r193239)
@@ -81,6 +81,7 @@ struct ieee80211_ies {
uint8_t *htcap_ie;  /* captured HTCAP ie */
uint8_t *htinfo_ie; /* captured HTINFO ie */
uint8_t *tdma_ie;   /* captured TDMA ie */
+   uint8_t *spare[4];
/* NB: these must be the last members of this structure */
uint8_t *data;  /* frame data > 802.11 header */
int len;/* data size in bytes */
@@ -192,6 +193,7 @@ struct ieee80211_node {
struct ieee80211vap *ni_wdsvap; /* associated WDS vap */
/* XXX move to vap? */
struct ifqueue  ni_wdsq;/* wds pending queue */
+   uint64_tni_spare[4];
 };
 MALLOC_DECLARE(M_80211_NODE);
 MALLOC_DECLARE(M_80211_NODE_IE);

Modified: head/sys/net80211/ieee80211_proto.h
==
--- head/sys/net80211/ieee80211_proto.h Mon Jun  1 16:29:03 2009
(r193238)
+++ head/sys

Re: svn commit: r193223 - head/bin/sh

2009-06-01 Thread M. Warner Losh
In message: <20090601.n51bbkzt077...@svn.freebsd.org>
"Ralf S. Engelschall"  writes:
: Author: rse
: Date: Mon Jun  1 11:11:46 2009
: New Revision: 193223
: URL: http://svn.freebsd.org/changeset/base/193223
: 
: Log:
:   align coding style with style(9) to avoid misunderstandings
: 
: Modified:
:   head/bin/sh/exec.c
: 
: Modified: head/bin/sh/exec.c
: ==
: --- head/bin/sh/exec.cMon Jun  1 11:02:09 2009(r193222)
: +++ head/bin/sh/exec.cMon Jun  1 11:11:46 2009(r193223)
: @@ -187,7 +187,8 @@ padvance(char **path, char *name)
:   if (*path == NULL)
:   return NULL;
:   start = *path;
: - for (p = start ; *p && *p != ':' && *p != '%' ; p++);
: + for (p = start; *p && *p != ':' && *p != '%'; p++)
: + ; /* nothing */

C already has a way of saying this:

for (p = start; *p && *p != ':' && *p != '%'; p++)
contionue;

Warner
___
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: r193159 - head/sys/powerpc/powermac

2009-06-01 Thread M. Warner Losh
In message: <200906010822.19951@freebsd.org>
John Baldwin  writes:
: On Sunday 31 May 2009 6:02:20 am Nathan Whitehorn wrote:
: > Author: nwhitehorn
: > Date: Sun May 31 10:02:20 2009
: > New Revision: 193159
: > URL: http://svn.freebsd.org/changeset/base/193159
: > 
: > Log:
: >   Provide an analogous sysctl to hw.acpi.acline (dev.pmu.0.acline) to
: >   determine whether the computer is plugged in to mains power.
: 
: I wonder if it would be a good idea to introduce a 
: platform-independent 'acline' sysctl?  Something like 'hw.acline'?  For now 
: we could simply have these devices create it.  We could do something fancier 
: where AC adapter drivers register with a centralized thingie at some point 
: and it exports a global setting that is true so long as at least one adapter 
: is online.  I'm not sure that level of complexity is warranted until we have 
: platforms with multiple AC lines exposed to the OS though.

We'll likely need some additional interface to the power system as
well.  acline is likely to be just the first one...

Warner
___
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: r193223 - head/bin/sh

2009-06-01 Thread Andriy Gapon
on 01/06/2009 19:43 M. Warner Losh said the following:
> In message: <20090601.n51bbkzt077...@svn.freebsd.org>
> "Ralf S. Engelschall"  writes:
> : +   for (p = start; *p && *p != ':' && *p != '%'; p++)
> : +   ; /* nothing */
> 
> C already has a way of saying this:
> 
>   for (p = start; *p && *p != ':' && *p != '%'; p++)
>   contionue;

But style(9) is holy, must never been changed or deviated from.
Sorry about that :-)
P.S. the typo doesn't deserve any mentioning but just in case :-)


-- 
Andriy Gapon
___
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: r193199 - head/etc

2009-06-01 Thread Doug Barton
Bjoern A. Zeeb wrote:
> On Mon, 1 Jun 2009, Doug Barton wrote:
> 
>> Author: dougb
>> Date: Mon Jun  1 05:37:13 2009
>> New Revision: 193199
>> URL: http://svn.freebsd.org/changeset/base/193199
>>
>> Log:
>>  Eliminate the warning that "Values of network_interfaces other than
>>  AUTO are deprecated.' There is no good reason to deprecate them, and
>>  setting this to different values can be useful for custom solutions
>>  and/or one-off configuration problems.
> 
> There used to be adisucssion about this last year.
> 
> I think you would have wanted to talk to brooks before who had put
> this in:
> 
> http://lists.freebsd.org/pipermail/cvs-all/2008-July/thread.html#263409

The discussion has come up several times on the -rc list from various
users who like the functionality and didn't want to see it go away.
I'm aware of the argument brooks has put forth in the past that it
adds "needless complexity" however I actually use the existing
feature, as do other users. FWIW, I also sent an "I am going to remove
this if I don't hear an objection" message to the -rc list, although
given the impending freeze I didn't wait as long as I usually would have.

Leaving the code "as is" costs us nothing in the common case since the
default is AUTO and the code to generate the list of interfaces is
super-trivial. Removing the existing feature however would be
problematic for at least a vocal subset of our user base.

hth,

Doug
___
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: r193159 - head/sys/powerpc/powermac

2009-06-01 Thread John Baldwin
On Monday 01 June 2009 12:01:04 pm Nathan Whitehorn wrote:
> John Baldwin wrote:
> > On Sunday 31 May 2009 6:02:20 am Nathan Whitehorn wrote:
> >   
> >> Author: nwhitehorn
> >> Date: Sun May 31 10:02:20 2009
> >> New Revision: 193159
> >> URL: http://svn.freebsd.org/changeset/base/193159
> >>
> >> Log:
> >>   Provide an analogous sysctl to hw.acpi.acline (dev.pmu.0.acline) to
> >>   determine whether the computer is plugged in to mains power.
> >> 
> >
> > I wonder if it would be a good idea to introduce a 
> > platform-independent 'acline' sysctl?  Something like 'hw.acline'?  For now 
> > we could simply have these devices create it.  We could do something 
> > fancier 
> > where AC adapter drivers register with a centralized thingie at some point 
> > and it exports a global setting that is true so long as at least one 
> > adapter 
> > is online.  I'm not sure that level of complexity is warranted until we 
> > have 
> > platforms with multiple AC lines exposed to the OS though.
> >   
> That would be nice, and easy to implement, though the existing one 
> should be kept for a while for compatibility. In the longer term, pmu(4) 
> also provides an ACPI-alike interface to battery status under dev.pmu.*, 
> which it would likewise be good to report in a platform-independent way.

Yes, the existing names would have to stay around for a while for compatability.

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


Re: svn commit: r193198 - head/etc/rc.d

2009-06-01 Thread Doug Barton
Bjoern A. Zeeb wrote:
> On Mon, 1 Jun 2009, Doug Barton wrote:
> 
>> Author: dougb Date: Mon Jun  1 05:35:03 2009 New Revision: 193198
>>  URL: http://svn.freebsd.org/changeset/base/193198
>> 
>> Log: Make the pf and ipfw firewalls start before netif, just like
>>  ipfilter already does. This eliminates a logical inconsistency, 
>> and a small window where the system is open after the network 
>> comes up.
> 
> Unfortunetaly this is contrary to a lot of PRs and requests on 
> mailing lists out there that actually want the netif/network_ipv6 
> to be run _before_ things come up.

Can you provide links to some of those PRs? I'd love to learn more
about this issue.

> Espescially pf really needs this to avoid rules that needs to do 
> per paket lookups of the interface address.

Not sure what you mean here.

> Further ipfw has a default option being setaable at compile time 
> and as TUNABLE to handle this window.

And what happens if someone sets the default to accept? You could
argue that they are knowingly opening a window of vulnerability but I
would argue that the right thing to do is to have the firewall rules
loaded before the network comes up regardless of the default. That way
you avoid both the potential window of vulnerability AND the window of
time between the network being loaded and the firewall allowing access
to the box.

To give a little more history, this patch was discussed and reviewed a
while back and someone told me that they would incorporate it into
some overall work they were doing to improve the way that rc.d handles
networking, so I stopped paying attention to it. Last night a user
pointed out to me that another patch that this same person said they
would handle never got in, so I reviewed other outstanding work and
found that this one had not been done either.

Obviously if this change breaks something it will have to be reverted.
However from the security standpoint (primary concern) it would seem
to be the right thing to do, and the previous rcorder was not
logically consistent in any case.

Max Laier wrote:
> Can you please add a note about this in UPDATING?

Yes. I was on the fence about this anyways, so now you've pushed me
over. :)

> It might be a slight POLA violation for people who rely on the
> interfaces being configured to setup the firewall.  For instance
> when one doesn't use dynamic address rules in pf i.e. "from/to ifX"
> instead of "from/to (ifX)".

I don't understand what you've written here. It seems to me that if
the interfaces are always the same then the firewall rules will be
fine, but if they are using dynamic rules it doesn't matter if it
starts before or after the network is up.

Doug
___
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: r193232 - in head: . sys/net sys/netinet sys/netinet6 sys/nfsclient sys/sys usr.bin/netstat

2009-06-01 Thread Julian Elischer

Bjoern A. Zeeb wrote:

On Mon, 1 Jun 2009, Bjoern A. Zeeb wrote:


Author: bz
Date: Mon Jun  1 15:49:42 2009
New Revision: 193232
URL: http://svn.freebsd.org/changeset/base/193232

Log:
 Convert the two dimensional array to be malloced and introduce
 an accessor function to get the correct rnh pointer back.

 Update netstat to get the correct pointer using kvm_read()
 as well.

 This not only fixes the ABI problem depending on the kernel
 option but also permits the tunable to overwrite the kernel
 option at boot time up to MAXFIBS, enlarging the number of
 FIBs without having to recompile. So people could just use
 GENERIC now.

 Reviewed by:julian, rwatson, zec
 X-MFC:not possible


The solution is not ideal but will help FreeBSD 8.x.


The previous code was needed for 7.0 and 6.0 compatibility.
8 can break that ABI so this is an excellent step in the right direction.

we could look at making multiple fibs not need any compile option
but always be enabled and control it purely through NUMFIB -> 1




Julian has suggested a cleaner way but I considered that to be to
late and intrusive for 8.x; this way we will have enough time for
9.x to convert this to per AF/domain handler routines.


Note: I will garbage collect a lot of opt_route.h dependencies by the
end of the week as that option no longer has to be visible to most of
the tree.


PS: I cannot spell 'routing' correctly usually so whoever touches
UPDATING next please fix the spelling;-)



___
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: r193198 - head/etc/rc.d

2009-06-01 Thread Bjoern A. Zeeb

On Mon, 1 Jun 2009, Doug Barton wrote:


Bjoern A. Zeeb wrote:

On Mon, 1 Jun 2009, Doug Barton wrote:


Author: dougb Date: Mon Jun  1 05:35:03 2009 New Revision: 193198
 URL: http://svn.freebsd.org/changeset/base/193198

Log: Make the pf and ipfw firewalls start before netif, just like
 ipfilter already does. This eliminates a logical inconsistency,
and a small window where the system is open after the network
comes up.


Unfortunetaly this is contrary to a lot of PRs and requests on
mailing lists out there that actually want the netif/network_ipv6
to be run _before_ things come up.


Can you provide links to some of those PRs? I'd love to learn more
about this issue.


PR 130381 has one report and I had added another link to a freebsd-rc
post at one point.


--
Bjoern A. Zeeb  The greatest risk is not taking one.
___
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: r193223 - head/bin/sh

2009-06-01 Thread Dag-Erling Smørgrav
"M. Warner Losh"  writes:
> : @@ -187,7 +187,8 @@ padvance(char **path, char *name)
> : if (*path == NULL)
> : return NULL;
> : start = *path;
> : -   for (p = start ; *p && *p != ':' && *p != '%' ; p++);
> : +   for (p = start; *p && *p != ':' && *p != '%'; p++)
> : +   ; /* nothing */
>
> C already has a way of saying this:
>
>   for (p = start; *p && *p != ':' && *p != '%'; p++)
>   contionue;

It's a matter of taste.  There is plenty of precedent for

/* nothing */ ;

and some for

; /* nothing */

(for varying spellings of "nothing") in the tree.

DES
-- 
Dag-Erling Smørgrav - d...@des.no
___
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: r193223 - head/bin/sh

2009-06-01 Thread Julian Elischer

Dag-Erling Smørgrav wrote:

"M. Warner Losh"  writes:

: @@ -187,7 +187,8 @@ padvance(char **path, char *name)
:   if (*path == NULL)
:   return NULL;
:   start = *path;
: - for (p = start ; *p && *p != ':' && *p != '%' ; p++);
: + for (p = start; *p && *p != ':' && *p != '%'; p++)
: + ; /* nothing */

C already has a way of saying this:

for (p = start; *p && *p != ':' && *p != '%'; p++)
contionue;


It's a matter of taste.  There is plenty of precedent for

/* nothing */ ;

and some for

; /* nothing */

(for varying spellings of "nothing") in the tree.

DES



and just for bikeshed's sake, In non BSD code I prefer
for (p = start; *p && *p != ':' && *p != '%'; p++)
{ /* Nothing */ }

for (p = start; *p && *p != ':' && *p != '%'; p++) {
 /* Nothing extra */
}
___
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: r193241 - in head: . sys/sys

2009-06-01 Thread Bjoern A. Zeeb
Author: bz
Date: Mon Jun  1 18:07:38 2009
New Revision: 193241
URL: http://svn.freebsd.org/changeset/base/193241

Log:
  Decrement __FreeBSD_version again to 96 as we are runing out of digits
  and want to be conservative - so not more than one version bump per day.
  
  Discussed with:   jhb, kensmith

Modified:
  head/UPDATING
  head/sys/sys/param.h

Modified: head/UPDATING
==
--- head/UPDATING   Mon Jun  1 18:07:01 2009(r193240)
+++ head/UPDATING   Mon Jun  1 18:07:38 2009(r193241)
@@ -26,7 +26,6 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.
The way we are storing and accessing `routing table' entries
has changed. Programs reading the FIB, like netstat, need to
be re-compiled.
-   Bump __FreeBSD_version to 800097.
 
 20090601:
A new netisr implementation has been added for FreeBSD 8.  Network

Modified: head/sys/sys/param.h
==
--- head/sys/sys/param.hMon Jun  1 18:07:01 2009(r193240)
+++ head/sys/sys/param.hMon Jun  1 18:07:38 2009(r193241)
@@ -57,7 +57,7 @@
  * is created, otherwise 1.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 800097   /* Master, propagated to newvers */
+#define __FreeBSD_version 800096   /* Master, propagated to newvers */
 
 #ifndef LOCORE
 #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"


Re: svn commit: r193241 - in head: . sys/sys

2009-06-01 Thread Ken Smith
On Mon, 2009-06-01 at 18:07 +, Bjoern A. Zeeb wrote:
> Author: bz
> Date: Mon Jun  1 18:07:38 2009
> New Revision: 193241
> URL: http://svn.freebsd.org/changeset/base/193241
> 
> Log:
>   Decrement __FreeBSD_version again to 96 as we are runing out of digits
>   and want to be conservative - so not more than one version bump per day.
>   
>   Discussed with: jhb, kensmith
> 
> Modified:
>   head/UPDATING
>   head/sys/sys/param.h
> 
> Modified: head/UPDATING
> ==
> --- head/UPDATING Mon Jun  1 18:07:01 2009(r193240)
> +++ head/UPDATING Mon Jun  1 18:07:38 2009(r193241)
> @@ -26,7 +26,6 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.
>   The way we are storing and accessing `routing table' entries
>   has changed. Programs reading the FIB, like netstat, need to
>   be re-compiled.
> - Bump __FreeBSD_version to 800097.
>  
>  20090601:
>   A new netisr implementation has been added for FreeBSD 8.  Network
> 
> Modified: head/sys/sys/param.h
> ==
> --- head/sys/sys/param.h  Mon Jun  1 18:07:01 2009(r193240)
> +++ head/sys/sys/param.h  Mon Jun  1 18:07:38 2009(r193241)
> @@ -57,7 +57,7 @@
>   *   is created, otherwise 1.
>   */
>  #undef __FreeBSD_version
> -#define __FreeBSD_version 800097 /* Master, propagated to newvers */
> +#define __FreeBSD_version 800096 /* Master, propagated to newvers */
>  
>  #ifndef LOCORE
>  #include 

It was noted we're close to running out of numbers we can use before we
hit code freeze and the branch for the release.  Since we're entering
code slush at the end of today in theory all changes that would warrant
a bump in __FreeBSD_version are supposed to be done.  But it wouldn't
surprise me if we have one or two or so things that come along between
now and when we hit code freeze and the branch.  So we need to be a bit
conservative with this.  Please be sure to coordinate anything that
might require a bump in __FreeBSD_version with re@ from now on.  If it
turns out things do come along that require bumps we'll need to "batch
them up" having one bump represent several changes.

Thanks.

-- 
Ken Smith
- From there to here, from here to  |   kensm...@cse.buffalo.edu
  there, funny things are everywhere.   |
  - Theodore Geisel |



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


Re: svn commit: r193223 - head/bin/sh

2009-06-01 Thread M. Warner Losh
In message: <86vdnfq1t3@ds4.des.no>
Dag-Erling_Smørgrav  writes:
: "M. Warner Losh"  writes:
: > : @@ -187,7 +187,8 @@ padvance(char **path, char *name)
: > :   if (*path == NULL)
: > :   return NULL;
: > :   start = *path;
: > : - for (p = start ; *p && *p != ':' && *p != '%' ; p++);
: > : + for (p = start; *p && *p != ':' && *p != '%'; p++)
: > : + ; /* nothing */
: >
: > C already has a way of saying this:
: >
: > for (p = start; *p && *p != ':' && *p != '%'; p++)
: > continue;
: 
: It's a matter of taste.  There is plenty of precedent for
: 
: /* nothing */ ;
: 
: and some for
: 
: ; /* nothing */
: 
: (for varying spellings of "nothing") in the tree.

True.  I had some experience with early static analysis tools
preferred the continue form because for them it was clear that you
indented to do nothing.  I suppose that the state of the art has
progressed since then (this was like mid 1990's).

Warner
___
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: r193242 - in head/tools/tools: . mwl mwl/mwldebug mwl/mwlstats

2009-06-01 Thread Sam Leffler
Author: sam
Date: Mon Jun  1 18:27:16 2009
New Revision: 193242
URL: http://svn.freebsd.org/changeset/base/193242

Log:
  tools for mwl driver

Added:
  head/tools/tools/mwl/
  head/tools/tools/mwl/Makefile   (contents, props changed)
  head/tools/tools/mwl/mwldebug/
  head/tools/tools/mwl/mwldebug/Makefile   (contents, props changed)
  head/tools/tools/mwl/mwldebug/mwldebug.c   (contents, props changed)
  head/tools/tools/mwl/mwlstats/
  head/tools/tools/mwl/mwlstats/Makefile   (contents, props changed)
  head/tools/tools/mwl/mwlstats/main.c   (contents, props changed)
  head/tools/tools/mwl/mwlstats/mwlstats.c   (contents, props changed)
  head/tools/tools/mwl/mwlstats/mwlstats.h   (contents, props changed)
  head/tools/tools/mwl/mwlstats/statfoo.c   (contents, props changed)
  head/tools/tools/mwl/mwlstats/statfoo.h   (contents, props changed)
Modified:
  head/tools/tools/README

Modified: head/tools/tools/README
==
--- head/tools/tools/README Mon Jun  1 18:07:38 2009(r193241)
+++ head/tools/tools/README Mon Jun  1 18:27:16 2009(r193242)
@@ -46,6 +46,7 @@ mctestA multicast test program
 mfcMerge a directory from HEAD to a branch where it does not
already exist and other MFC related script(s).
 midCreate a Message-ID database for mailing lists.
+mwlTools specific to the Marvell 88W8363 support
 ncpus  Count the number of processors
 npeTools specific to the Intel IXP4XXX NPE device
 nxge   A diagnostic tool for the nxge(4) driver

Added: head/tools/tools/mwl/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/tools/mwl/Makefile   Mon Jun  1 18:27:16 2009
(r193242)
@@ -0,0 +1,5 @@
+#  $FreeBSD$
+
+SUBDIR=mwlstats mwldebug
+
+.include 

Added: head/tools/tools/mwl/mwldebug/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/tools/mwl/mwldebug/Makefile  Mon Jun  1 18:27:16 2009
(r193242)
@@ -0,0 +1,7 @@
+# $FreeBSD$
+
+PROG=  mwldebug
+BINDIR=/usr/local/bin
+NO_MAN=
+
+.include 

Added: head/tools/tools/mwl/mwldebug/mwldebug.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/tools/mwl/mwldebug/mwldebug.cMon Jun  1 18:27:16 2009
(r193242)
@@ -0,0 +1,212 @@
+/*-
+ * Copyright (c) 2007 Sam Leffler, Errno Consulting
+ * 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,
+ *without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ *similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
+ *redistribution must be conditioned upon including a substantially
+ *similar Disclaimer requirement for further binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
+ *
+ * $FreeBSD$
+ */
+
+/*
+ * mwldebug [-i interface] flags
+ * (default interface is mwl0).
+ */
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#defineN(a)(sizeof(a)/sizeof(a[0]))
+
+const char *progname;
+
+enum {
+   MWL_DEBUG_XMIT  = 0x0001,   /* basic xmit operation */
+   MWL_DEBUG_XMIT_DESC = 0x0002,   /* xmit descriptors */
+   MWL_DEBUG_RECV  = 0x0004,   /* basic recv operation */
+   MWL_DEBUG_RECV_DESC = 0x0008,   /* recv descriptors */
+   MWL_DEBUG_RESET = 0x0010,   /* reset processing */
+   MWL_DEBUG_BEACON= 0x0020,   /* beacon handling */
+   MWL_DEBUG_INTR  

svn commit: r193243 - head/sys/net

2009-06-01 Thread Robert Watson
Author: rwatson
Date: Mon Jun  1 18:38:36 2009
New Revision: 193243
URL: http://svn.freebsd.org/changeset/base/193243

Log:
  Revert a recent netisr2 change: when billing packets to the current
  CPU, don't lock the workstream, as its mutexes may not have been
  initialized if there are fewer workstreams than CPUs.
  
  Run into by:  hps, ps

Modified:
  head/sys/net/netisr.c

Modified: head/sys/net/netisr.c
==
--- head/sys/net/netisr.c   Mon Jun  1 18:27:16 2009(r193242)
+++ head/sys/net/netisr.c   Mon Jun  1 18:38:36 2009(r193243)
@@ -893,10 +893,8 @@ netisr_dispatch_src(u_int proto, uintptr
if (netisr_direct_force) {
nwsp = &nws[curcpu];
npwp = &nwsp->nws_work[proto];
-   NWS_LOCK(nwsp);
npwp->nw_dispatched++;
npwp->nw_handled++;
-   NWS_UNLOCK(nwsp);
np[proto].np_handler(m);
error = 0;
goto out_unlock;
___
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: r193241 - in head: . sys/sys

2009-06-01 Thread Bjoern A. Zeeb

On Mon, 1 Jun 2009, Ken Smith wrote:


On Mon, 2009-06-01 at 18:07 +, Bjoern A. Zeeb wrote:

Author: bz
Date: Mon Jun  1 18:07:38 2009
New Revision: 193241
URL: http://svn.freebsd.org/changeset/base/193241

Log:
  Decrement __FreeBSD_version again to 96 as we are runing out of digits
  and want to be conservative - so not more than one version bump per day.

  Discussed with:   jhb, kensmith


It was noted we're close to running out of numbers we can use before we
hit code freeze and the branch for the release.  Since we're entering
code slush at the end of today in theory all changes that would warrant
a bump in __FreeBSD_version are supposed to be done.  But it wouldn't
surprise me if we have one or two or so things that come along between
now and when we hit code freeze and the branch.  So we need to be a bit
conservative with this.  Please be sure to coordinate anything that
might require a bump in __FreeBSD_version with re@ from now on.  If it
turns out things do come along that require bumps we'll need to "batch
them up" having one bump represent several changes.



Talking about "padding of structures", as this will be one of those
changes most likely,  I had suggested previously in private email:

Can't we start collecting all those somewhere, perhaps on the wiki,
and do one big padding day, one commit for all and everything?

This would have several advantages:

1) no ABI breakage in HEAD as v-structs would possibly change in size
2) actual documentation of A|KB|PI relevant structures which would be
   good to have them written down finally after I heard people talking
   about this for multiple releases now.
3) a list of things we might need to work on in the future to reduce
   the problem and also a list for the time 9.x would come;-)


just my 0.01$
/bz

--
Bjoern A. Zeeb  The greatest risk is not taking one.
___
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: r193244 - head/sys/dev/aic7xxx/aicasm

2009-06-01 Thread Xin LI
Author: delphij
Date: Mon Jun  1 18:42:16 2009
New Revision: 193244
URL: http://svn.freebsd.org/changeset/base/193244

Log:
  Code cleanups to make this WARNS=6 clean.
  
  PR:   bin/96128

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

Modified: head/sys/dev/aic7xxx/aicasm/aicasm.c
==
--- head/sys/dev/aic7xxx/aicasm/aicasm.cMon Jun  1 18:38:36 2009
(r193243)
+++ head/sys/dev/aic7xxx/aicasm/aicasm.cMon Jun  1 18:42:16 2009
(r193244)
@@ -79,8 +79,8 @@ static void output_code(void);
 static void output_listing(char *ifilename);
 static void dump_scope(scope_t *scope);
 static void emit_patch(scope_t *scope, int patch);
-static int check_patch(patch_t **start_patch, int start_instr,
-  int *skip_addr, int *func_vals);
+static int check_patch(patch_t **start_patch, unsigned int start_instr,
+  unsigned int *skip_addr, int *func_vals);
 
 struct path_list search_path;
 int includes_search_curdir;
@@ -116,8 +116,6 @@ int main(int argc, char *argv[]);
 int
 main(int argc, char *argv[])
 {
-   extern char *optarg;
-   extern int optind;
int  ch;
int  retval;
char *inputfilename;
@@ -530,7 +528,7 @@ output_listing(char *ifilename)
int *func_values;
int instrcount;
int instrptr;
-   int line;
+   unsigned int line;
int func_count;
int skip_addr;
 
@@ -649,8 +647,8 @@ output_listing(char *ifilename)
 }
 
 static int
-check_patch(patch_t **start_patch, int start_instr,
-   int *skip_addr, int *func_vals)
+check_patch(patch_t **start_patch, unsigned int start_instr,
+   unsigned int *skip_addr, int *func_vals)
 {
patch_t *cur_patch;
 

Modified: head/sys/dev/aic7xxx/aicasm/aicasm_gram.y
==
--- head/sys/dev/aic7xxx/aicasm/aicasm_gram.y   Mon Jun  1 18:38:36 2009
(r193243)
+++ head/sys/dev/aic7xxx/aicasm/aicasm_gram.y   Mon Jun  1 18:42:16 2009
(r193244)
@@ -88,7 +88,7 @@ static int in_critical_section;
 static u_int enum_increment;
 static u_int enum_next_value;
 
-static void process_field(int field_type, symbol_t *sym, int mask);
+static void process_field(unsigned int field_type, symbol_t *sym, int mask);
 static void initialize_symbol(symbol_t *symbol);
 static void add_macro_arg(const char *argtext, int position);
 static void add_macro_body(const char *bodytext);
@@ -107,6 +107,9 @@ static void add_conditional(symbol_t *sy
 static void add_version(const char *verstring);
 static int  is_download_const(expression_t *immed);
 
+extern int yylex (void);
+extern int yyparse (void);
+
 #define SRAM_SYMNAME "SRAM_BASE"
 #define SCB_SYMNAME "SCB_BASE"
 %}
@@ -867,7 +870,7 @@ reg_symbol:
stop("register offset must be a constant", EX_DATAERR);
/* NOTREACHED */
}
-   if (($3->info.cinfo->value + 1) > $1->info.rinfo->size) {
+   if (($3->info.cinfo->value + 1) > 
(unsigned)$1->info.rinfo->size) {
stop("Accessing offset beyond range of register",
 EX_DATAERR);
/* NOTREACHED */
@@ -878,7 +881,7 @@ reg_symbol:
 |  T_SYMBOL '[' T_NUMBER ']'
{
process_register(&$1);
-   if (($3 + 1) > $1->info.rinfo->size) {
+   if (($3 + 1) > (unsigned)$1->info.rinfo->size) {
stop("Accessing offset beyond range of register",
 EX_DATAERR);
/* NOTREACHED */
@@ -1379,7 +1382,7 @@ code:
 %%
 
 static void
-process_field(int field_type, symbol_t *sym, int value)
+process_field(unsigned int field_type, symbol_t *sym, int value)
 {
/*
 * Add the current register to its
@@ -1531,10 +1534,9 @@ initialize_symbol(symbol_t *symbol)
 }
 
 static void
-add_macro_arg(const char *argtext, int argnum)
+add_macro_arg(const char *argtext, int argnum __unused)
 {
struct macro_arg *marg;
-   int i;
int retval;

 
@@ -1553,7 +1555,7 @@ add_macro_arg(const char *argtext, int a
retval = snprintf(regex_pattern, sizeof(regex_pattern),
  "[^-/A-Za-z0-9_](%s)([^-/A-Za-z0-9_]|$)",
  argtext);
-   if (retval >= sizeof(regex_pattern)) {
+   if (retval >= (int)sizeof(regex_pattern)) {
stop("Regex text buffer too small for arg",
 EX_SOFTWARE);
/* NOTREACHED */
@@ -1911,24 +1913,24 @@ add_conditional(symb

svn commit: r193245 - head/sys/dev/aic7xxx/aicasm

2009-06-01 Thread Xin LI
Author: delphij
Date: Mon Jun  1 18:43:33 2009
New Revision: 193245
URL: http://svn.freebsd.org/changeset/base/193245

Log:
  Mark as WARNS=6.

Modified:
  head/sys/dev/aic7xxx/aicasm/Makefile

Modified: head/sys/dev/aic7xxx/aicasm/Makefile
==
--- head/sys/dev/aic7xxx/aicasm/MakefileMon Jun  1 18:42:16 2009
(r193244)
+++ head/sys/dev/aic7xxx/aicasm/MakefileMon Jun  1 18:43:33 2009
(r193245)
@@ -15,6 +15,7 @@ SRCS= ${GENHDRS} ${CSRCS} ${YSRCS} ${LSR
 CLEANFILES+= ${GENHDRS} ${YSRCS:R:C/(.*)/\1.output/g}
 DPADD= ${LIBL}
 LDADD= -ll
+WARNS?=6
 
 # Correct path for kernel builds
 # Don't rely on the kernel's .depend file
___
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: r193245 - head/sys/dev/aic7xxx/aicasm

2009-06-01 Thread Roman Divacky
On Mon, Jun 01, 2009 at 11:48:34AM -0700, Doug Barton wrote:
> Xin LI wrote:
> > Author: delphij
> > Date: Mon Jun  1 18:43:33 2009
> > New Revision: 193245
> > URL: http://svn.freebsd.org/changeset/base/193245
> > 
> > Log:
> >   Mark as WARNS=6.
> > 
> > Modified:
> >   head/sys/dev/aic7xxx/aicasm/Makefile
> > 
> > Modified: head/sys/dev/aic7xxx/aicasm/Makefile
> > ==
> > --- head/sys/dev/aic7xxx/aicasm/MakefileMon Jun  1 18:42:16 2009
> > (r193244)
> > +++ head/sys/dev/aic7xxx/aicasm/MakefileMon Jun  1 18:43:33 2009
> > (r193245)
> > @@ -15,6 +15,7 @@ SRCS= ${GENHDRS} ${CSRCS} ${YSRCS} ${LSR
> >  CLEANFILES+= ${GENHDRS} ${YSRCS:R:C/(.*)/\1.output/g}
> >  DPADD= ${LIBL}
> >  LDADD= -ll
> > +WARNS?=6
> >  
> >  # Correct path for kernel builds
> >  # Don't rely on the kernel's .depend file
> > 
> 
> Is there more coming?
> 
> cc -O2 -pipe -ggdb -nostdinc -I/usr/include -I.
> -I/usr/local/src/sys/dev/aic7xxx/aicasm -ggdb -std=gnu99
^^

how did you get this? this should be used for userland compilation,
kernel is done with -std=c99, can you show me how you got this?

thnx

roman


pgpwNsIL7x1MN.pgp
Description: PGP signature


Re: svn commit: r193245 - head/sys/dev/aic7xxx/aicasm

2009-06-01 Thread Doug Barton
Xin LI wrote:
> Author: delphij
> Date: Mon Jun  1 18:43:33 2009
> New Revision: 193245
> URL: http://svn.freebsd.org/changeset/base/193245
> 
> Log:
>   Mark as WARNS=6.
> 
> Modified:
>   head/sys/dev/aic7xxx/aicasm/Makefile
> 
> Modified: head/sys/dev/aic7xxx/aicasm/Makefile
> ==
> --- head/sys/dev/aic7xxx/aicasm/Makefile  Mon Jun  1 18:42:16 2009
> (r193244)
> +++ head/sys/dev/aic7xxx/aicasm/Makefile  Mon Jun  1 18:43:33 2009
> (r193245)
> @@ -15,6 +15,7 @@ SRCS=   ${GENHDRS} ${CSRCS} ${YSRCS} ${LSR
>  CLEANFILES+= ${GENHDRS} ${YSRCS:R:C/(.*)/\1.output/g}
>  DPADD=   ${LIBL}
>  LDADD=   -ll
> +WARNS?=  6
>  
>  # Correct path for kernel builds
>  # Don't rely on the kernel's .depend file
> 

Is there more coming?

cc -O2 -pipe -ggdb -nostdinc -I/usr/include -I.
-I/usr/local/src/sys/dev/aic7xxx/aicasm -ggdb -std=gnu99
-Wsystem-headers -Werror -Wall -Wno-format-y2k -W
-Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes
-Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch
-Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline
-Wnested-externs -Wredundant-decls -Wno-pointer-sign -c aicasm_scan.c
cc1: warnings being treated as errors
/usr/local/src/sys/dev/aic7xxx/aicasm/aicasm_scan.l: In function
'expand_macro':
/usr/local/src/sys/dev/aic7xxx/aicasm/aicasm_scan.l:528: warning:
'match.rm_eo' may be used uninitialized in this function
/usr/local/src/sys/dev/aic7xxx/aicasm/aicasm_scan.l:528: warning:
'match.rm_so' may be used uninitialized in this function
*** Error code 1

Stop in /usr/local/obj/usr/local/src/sys/LAP.
*** Error code 1


-- 

This .signature sanitized for your protection

___
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: r193245 - head/sys/dev/aic7xxx/aicasm

2009-06-01 Thread Roman Divacky
On Mon, Jun 01, 2009 at 08:49:37PM +0200, Roman Divacky wrote:
> On Mon, Jun 01, 2009 at 11:48:34AM -0700, Doug Barton wrote:
> > Xin LI wrote:
> > > Author: delphij
> > > Date: Mon Jun  1 18:43:33 2009
> > > New Revision: 193245
> > > URL: http://svn.freebsd.org/changeset/base/193245
> > > 
> > > Log:
> > >   Mark as WARNS=6.
> > > 
> > > Modified:
> > >   head/sys/dev/aic7xxx/aicasm/Makefile
> > > 
> > > Modified: head/sys/dev/aic7xxx/aicasm/Makefile
> > > ==
> > > --- head/sys/dev/aic7xxx/aicasm/Makefile  Mon Jun  1 18:42:16 2009
> > > (r193244)
> > > +++ head/sys/dev/aic7xxx/aicasm/Makefile  Mon Jun  1 18:43:33 2009
> > > (r193245)
> > > @@ -15,6 +15,7 @@ SRCS=   ${GENHDRS} ${CSRCS} ${YSRCS} ${LSR
> > >  CLEANFILES+= ${GENHDRS} ${YSRCS:R:C/(.*)/\1.output/g}
> > >  DPADD=   ${LIBL}
> > >  LDADD=   -ll
> > > +WARNS?=  6
> > >  
> > >  # Correct path for kernel builds
> > >  # Don't rely on the kernel's .depend file
> > > 
> > 
> > Is there more coming?
> > 
> > cc -O2 -pipe -ggdb -nostdinc -I/usr/include -I.
> > -I/usr/local/src/sys/dev/aic7xxx/aicasm -ggdb -std=gnu99
> ^^
> 
> how did you get this? this should be used for userland compilation,
> kernel is done with -std=c99, can you show me how you got this?

ok.. when you

cd /usr/src
make

you build the kernel with -std=gnu99 instead of -std=c99. which is a bug. I am
trying to fix this. if anyone has any idea please mail me..

roman
___
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: r193246 - head/share/man/man4

2009-06-01 Thread Joel Dahl
Author: joel (doc committer)
Date: Mon Jun  1 18:58:46 2009
New Revision: 193246
URL: http://svn.freebsd.org/changeset/base/193246

Log:
  -  Remove obsolete and confusing comment about renaming "sound" to "snd".
 We will look at renaming stuff for 9.0, but it's far from certain that we
 will do it this way.
  -  Sort sysctl's alphabetically.  I'll add a bunch of new sysctl's once
 ariff's next mega-patch goes in, and having everything sorted makes my
 job easier.

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

Modified: head/share/man/man4/pcm.4
==
--- head/share/man/man4/pcm.4   Mon Jun  1 18:43:33 2009(r193245)
+++ head/share/man/man4/pcm.4   Mon Jun  1 18:58:46 2009(r193246)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 23, 2007
+.Dd June 1, 2009
 .Dt SOUND 4
 .Os
 .Sh NAME
@@ -51,16 +51,6 @@ hint.pcm.0.drq="1"
 hint.pcm.0.flags="0x0"
 .Ed
 .Sh DESCRIPTION
-.Bf -emphasis
-Note: There exists some ambiguity in the naming at the moment
-.Pq Nm sound , pcm , snd .
-It will be resolved soon by renaming
-.Cd "device sound"
-to
-.Cd "device snd" ,
-and doing associated changes.
-.Ef
-.Pp
 The
 .Nm
 driver provides support for
@@ -170,14 +160,34 @@ tunables are global settings and
 .Va dev.pcm.*
 are device specific.
 .Bl -tag -width ".Va hw.snd.report_soft_formats" -offset indent
-.It Va hw.snd.latency_profile
-Define sets of buffering latency conversion tables for the
-.Va hw.snd.latency
-tunable.
-A value of 0 will use a low and aggressive latency profile which can result
-in possible underruns if the application cannot keep up with a rapid irq
-rate, especially during high workload.
-The default value is 1, which is considered a moderate/safe latency profile.
+.It Va hw.snd.compat_linux_mmap
+Enable to allow PROT_EXEC page mappings.
+All Linux applications using sound and
+.Xr mmap 2
+require this.
+.It Va hw.snd.default_auto
+Enable to automatically assign default sound unit to the most recent
+attached device.
+.It Va hw.snd.default_unit
+Default sound card for systems with multiple sound cards.
+When using
+.Xr devfs 5 ,
+the default device for
+.Pa /dev/dsp .
+Equivalent to a symlink from
+.Pa /dev/dsp
+to
+.Pa /dev/dsp Ns Va ${hw.snd.default_unit} .
+.It Va hw.snd.feeder_rate_max
+Maximum allowable sample rate.
+.It Va hw.snd.feeder_rate_min
+Minimum allowable sample rate.
+.It Va hw.snd.feeder_rate_round
+Sample rate rounding threshold, to avoid large prime division at the
+cost of accuracy.
+All requested sample rates will be rounded to the nearest threshold value.
+Possible values range between 0 (disabled) and 500.
+Default is 25.
 .It Va hw.snd.latency
 Configure the buffering latency.
 Only affects applications that do not explicitly request
@@ -186,26 +196,31 @@ This tunable provides finer granularity 
 .Va hw.snd.latency_profile
 tunable.
 Possible values range between 0 (lowest latency) and 10 (highest latency).
+.It Va hw.snd.latency_profile
+Define sets of buffering latency conversion tables for the
+.Va hw.snd.latency
+tunable.
+A value of 0 will use a low and aggressive latency profile which can result
+in possible underruns if the application cannot keep up with a rapid irq
+rate, especially during high workload.
+The default value is 1, which is considered a moderate/safe latency profile.
+.It Va hw.snd.maxautovchans
+Global
+.Tn VCHAN
+setting that only affects devices with at least one playback or recording 
channel available.
+The sound system will dynamically create up this many
+.Tn VCHANs .
+Set to
+.Dq 0
+if no
+.Tn VCHANS
+are desired.
+Maximum value is 256.
 .It Va hw.snd.report_soft_formats
 Controls the internal format conversion if it is
 available transparently to the application software.
 When disabled or not available, the application will
 only be able to select formats the device natively supports.
-.It Va hw.snd.compat_linux_mmap
-Enable to allow PROT_EXEC page mappings.
-All Linux applications using sound and
-.Xr mmap 2
-require this.
-.It Va hw.snd.feeder_rate_round
-Sample rate rounding threshold, to avoid large prime division at the
-cost of accuracy.
-All requested sample rates will be rounded to the nearest threshold value.
-Possible values range between 0 (disabled) and 500.
-Default is 25.
-.It Va hw.snd.feeder_rate_max
-Maximum allowable sample rate.
-.It Va hw.snd.feeder_rate_min
-Minimum allowable sample rate.
 .It Va hw.snd.verbose
 Level of verbosity for the
 .Pa /dev/sndstat
@@ -228,31 +243,6 @@ File names and versions of the currently
 .It 4
 Various messages intended for debugging.
 .El
-.It Va hw.snd.maxautovchans
-Global
-.Tn VCHAN
-setting that only affects devices with at least one playback or recording 
channel available.
-The sound system will dynamically create up this many
-.Tn VCHANs .
-Set to
-.Dq 0
-if no
-.Tn VCHANS
-are desired.
-Maximum value is 256.
-.It Va hw.snd.default_unit
-Default sound card for systems with multiple sound car

svn commit: r193247 - head/sys/dev/aic7xxx/aicasm

2009-06-01 Thread Xin LI
Author: delphij
Date: Mon Jun  1 19:06:08 2009
New Revision: 193247
URL: http://svn.freebsd.org/changeset/base/193247

Log:
  Revert the WARNS change for now, need some time to fix the real problem.

Modified:
  head/sys/dev/aic7xxx/aicasm/Makefile

Modified: head/sys/dev/aic7xxx/aicasm/Makefile
==
--- head/sys/dev/aic7xxx/aicasm/MakefileMon Jun  1 18:58:46 2009
(r193246)
+++ head/sys/dev/aic7xxx/aicasm/MakefileMon Jun  1 19:06:08 2009
(r193247)
@@ -15,7 +15,6 @@ SRCS= ${GENHDRS} ${CSRCS} ${YSRCS} ${LSR
 CLEANFILES+= ${GENHDRS} ${YSRCS:R:C/(.*)/\1.output/g}
 DPADD= ${LIBL}
 LDADD= -ll
-WARNS?=6
 
 # Correct path for kernel builds
 # Don't rely on the kernel's .depend file
___
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: r193248 - svnadmin/conf

2009-06-01 Thread Jung-uk Kim
Author: jkim
Date: Mon Jun  1 19:10:17 2009
New Revision: 193248
URL: http://svn.freebsd.org/changeset/base/193248

Log:
  Add myself for ACPICA import preparation.

Modified:
  svnadmin/conf/sizelimit.conf

Modified: svnadmin/conf/sizelimit.conf
==
--- svnadmin/conf/sizelimit.confMon Jun  1 19:06:08 2009
(r193247)
+++ svnadmin/conf/sizelimit.confMon Jun  1 19:10:17 2009
(r193248)
@@ -21,6 +21,7 @@ brooks
 des
 dougb
 imp
+jkim
 lstewart
 #lulf
 obrien
___
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: r193245 - head/sys/dev/aic7xxx/aicasm

2009-06-01 Thread Xin LI
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Roman Divacky wrote:
> On Mon, Jun 01, 2009 at 08:49:37PM +0200, Roman Divacky wrote:
>> On Mon, Jun 01, 2009 at 11:48:34AM -0700, Doug Barton wrote:
>>> Xin LI wrote:
 Author: delphij
 Date: Mon Jun  1 18:43:33 2009
 New Revision: 193245
 URL: http://svn.freebsd.org/changeset/base/193245

 Log:
   Mark as WARNS=6.

 Modified:
   head/sys/dev/aic7xxx/aicasm/Makefile

 Modified: head/sys/dev/aic7xxx/aicasm/Makefile
 ==
 --- head/sys/dev/aic7xxx/aicasm/Makefile   Mon Jun  1 18:42:16 2009
 (r193244)
 +++ head/sys/dev/aic7xxx/aicasm/Makefile   Mon Jun  1 18:43:33 2009
 (r193245)
 @@ -15,6 +15,7 @@ SRCS=${GENHDRS} ${CSRCS} ${YSRCS} ${LSR
  CLEANFILES+= ${GENHDRS} ${YSRCS:R:C/(.*)/\1.output/g}
  DPADD=${LIBL}
  LDADD=-ll
 +WARNS?=   6
  
  # Correct path for kernel builds
  # Don't rely on the kernel's .depend file

>>> Is there more coming?
>>>
>>> cc -O2 -pipe -ggdb -nostdinc -I/usr/include -I.
>>> -I/usr/local/src/sys/dev/aic7xxx/aicasm -ggdb -std=gnu99
>> ^^
>>
>> how did you get this? this should be used for userland compilation,
>> kernel is done with -std=c99, can you show me how you got this?
> 
> ok.. when you
> 
> cd /usr/src
> make
> 
> you build the kernel with -std=gnu99 instead of -std=c99. which is a bug. I am
> trying to fix this. if anyone has any idea please mail me..

This is strange...  Let me take a look at this, I have reverted the
WARNS?=6 change for now.

Cheers,
- --
Xin LI http://www.delphij.net/
FreeBSD - The Power to Serve!
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.11 (FreeBSD)

iEYEARECAAYFAkokJ3EACgkQi+vbBBjt66AnHACfXXyxcoKUsfCORzcOv4Nz8X3D
IJoAn2dXFSLAq/HzO+S0XXuFbFFTJuhJ
=3Uqo
-END PGP SIGNATURE-
___
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: r193250 - head/sys/dev/mxge

2009-06-01 Thread Andrew Gallatin
Author: gallatin
Date: Mon Jun  1 19:16:57 2009
New Revision: 193250
URL: http://svn.freebsd.org/changeset/base/193250

Log:
  Set an rx jumbo cluster to the correct size before
  using bus_dmamap_load_mbuf_sg() on it. This
  prevents data corruption when the mxge MTU is
  between 4076 and 8172 on machines with 4KB
  pages and MXGE_VIRT_JUMBOS is in use (which it
  isn't, in -current or -stable)

Modified:
  head/sys/dev/mxge/if_mxge.c
  head/sys/dev/mxge/if_mxge_var.h

Modified: head/sys/dev/mxge/if_mxge.c
==
--- head/sys/dev/mxge/if_mxge.c Mon Jun  1 19:16:31 2009(r193249)
+++ head/sys/dev/mxge/if_mxge.c Mon Jun  1 19:16:57 2009(r193250)
@@ -2351,7 +2351,7 @@ mxge_get_buf_big(struct mxge_slice_state
err = ENOBUFS;
goto done;
}
-   m->m_len = rx->cl_size;
+   m->m_len = rx->mlen;
err = bus_dmamap_load_mbuf_sg(rx->dmat, map, m, 
  seg, &cnt, BUS_DMA_NOWAIT);
if (err != 0) {
@@ -3432,6 +3432,8 @@ mxge_slice_open(struct mxge_slice_state 
}
ss->rx_big.nbufs = nbufs;
ss->rx_big.cl_size = cl_size;
+   ss->rx_big.mlen = ss->sc->ifp->if_mtu + ETHER_HDR_LEN +
+   ETHER_VLAN_ENCAP_LEN + MXGEFW_PAD;
for (i = 0; i <= ss->rx_big.mask; i += ss->rx_big.nbufs) {
map = ss->rx_big.info[i].map;
err = mxge_get_buf_big(ss, map, i);

Modified: head/sys/dev/mxge/if_mxge_var.h
==
--- head/sys/dev/mxge/if_mxge_var.h Mon Jun  1 19:16:31 2009
(r193249)
+++ head/sys/dev/mxge/if_mxge_var.h Mon Jun  1 19:16:57 2009
(r193250)
@@ -120,6 +120,7 @@ typedef struct
int cl_size;
int alloc_fail;
int mask;   /* number of rx slots -1 */
+   int mlen;
 } mxge_rx_ring_t;
 
 typedef struct
___
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: r193251 - in vendor-sys/acpica/dist: . common compiler debugger disassembler events hardware include include/platform interpreter/dispatcher interpreter/executer interpreter/parser name...

2009-06-01 Thread Jung-uk Kim
Author: jkim
Date: Mon Jun  1 19:24:26 2009
New Revision: 193251
URL: http://svn.freebsd.org/changeset/base/193251

Log:
  Temporarily revert system includes fixups to make future import easier.

Modified:
  vendor-sys/acpica/dist/common/adfile.c
  vendor-sys/acpica/dist/common/adisasm.c
  vendor-sys/acpica/dist/common/adwalk.c
  vendor-sys/acpica/dist/common/dmrestag.c
  vendor-sys/acpica/dist/common/dmtable.c
  vendor-sys/acpica/dist/common/dmtbdump.c
  vendor-sys/acpica/dist/common/dmtbinfo.c
  vendor-sys/acpica/dist/compiler/aslanalyze.c
  vendor-sys/acpica/dist/compiler/aslcodegen.c
  vendor-sys/acpica/dist/compiler/aslcompile.c
  vendor-sys/acpica/dist/compiler/aslcompiler.h
  vendor-sys/acpica/dist/compiler/aslcompiler.l
  vendor-sys/acpica/dist/compiler/aslcompiler.y
  vendor-sys/acpica/dist/compiler/aslerror.c
  vendor-sys/acpica/dist/compiler/aslfiles.c
  vendor-sys/acpica/dist/compiler/aslfold.c
  vendor-sys/acpica/dist/compiler/asllength.c
  vendor-sys/acpica/dist/compiler/asllisting.c
  vendor-sys/acpica/dist/compiler/aslload.c
  vendor-sys/acpica/dist/compiler/asllookup.c
  vendor-sys/acpica/dist/compiler/aslmain.c
  vendor-sys/acpica/dist/compiler/aslmap.c
  vendor-sys/acpica/dist/compiler/aslopcodes.c
  vendor-sys/acpica/dist/compiler/asloperands.c
  vendor-sys/acpica/dist/compiler/aslopt.c
  vendor-sys/acpica/dist/compiler/aslresource.c
  vendor-sys/acpica/dist/compiler/aslrestype1.c
  vendor-sys/acpica/dist/compiler/aslrestype2.c
  vendor-sys/acpica/dist/compiler/aslstubs.c
  vendor-sys/acpica/dist/compiler/asltransform.c
  vendor-sys/acpica/dist/compiler/asltree.c
  vendor-sys/acpica/dist/compiler/aslutils.c
  vendor-sys/acpica/dist/debugger/dbcmds.c
  vendor-sys/acpica/dist/debugger/dbdisply.c
  vendor-sys/acpica/dist/debugger/dbexec.c
  vendor-sys/acpica/dist/debugger/dbfileio.c
  vendor-sys/acpica/dist/debugger/dbhistry.c
  vendor-sys/acpica/dist/debugger/dbinput.c
  vendor-sys/acpica/dist/debugger/dbstats.c
  vendor-sys/acpica/dist/debugger/dbutils.c
  vendor-sys/acpica/dist/debugger/dbxface.c
  vendor-sys/acpica/dist/disassembler/dmbuffer.c
  vendor-sys/acpica/dist/disassembler/dmnames.c
  vendor-sys/acpica/dist/disassembler/dmobject.c
  vendor-sys/acpica/dist/disassembler/dmopcode.c
  vendor-sys/acpica/dist/disassembler/dmresrc.c
  vendor-sys/acpica/dist/disassembler/dmresrcl.c
  vendor-sys/acpica/dist/disassembler/dmresrcs.c
  vendor-sys/acpica/dist/disassembler/dmutils.c
  vendor-sys/acpica/dist/disassembler/dmwalk.c
  vendor-sys/acpica/dist/events/evevent.c
  vendor-sys/acpica/dist/events/evgpe.c
  vendor-sys/acpica/dist/events/evgpeblk.c
  vendor-sys/acpica/dist/events/evmisc.c
  vendor-sys/acpica/dist/events/evregion.c
  vendor-sys/acpica/dist/events/evrgnini.c
  vendor-sys/acpica/dist/events/evsci.c
  vendor-sys/acpica/dist/events/evxface.c
  vendor-sys/acpica/dist/events/evxfevnt.c
  vendor-sys/acpica/dist/events/evxfregn.c
  vendor-sys/acpica/dist/hardware/hwacpi.c
  vendor-sys/acpica/dist/hardware/hwgpe.c
  vendor-sys/acpica/dist/hardware/hwregs.c
  vendor-sys/acpica/dist/hardware/hwsleep.c
  vendor-sys/acpica/dist/hardware/hwtimer.c
  vendor-sys/acpica/dist/include/acdisasm.h
  vendor-sys/acpica/dist/include/acpi.h
  vendor-sys/acpica/dist/include/acpiosxf.h
  vendor-sys/acpica/dist/include/acpixf.h
  vendor-sys/acpica/dist/include/acresrc.h
  vendor-sys/acpica/dist/include/actbl.h
  vendor-sys/acpica/dist/include/platform/acenv.h
  vendor-sys/acpica/dist/include/platform/acfreebsd.h
  vendor-sys/acpica/dist/interpreter/dispatcher/dsfield.c
  vendor-sys/acpica/dist/interpreter/dispatcher/dsinit.c
  vendor-sys/acpica/dist/interpreter/dispatcher/dsmethod.c
  vendor-sys/acpica/dist/interpreter/dispatcher/dsmthdat.c
  vendor-sys/acpica/dist/interpreter/dispatcher/dsobject.c
  vendor-sys/acpica/dist/interpreter/dispatcher/dsopcode.c
  vendor-sys/acpica/dist/interpreter/dispatcher/dsutils.c
  vendor-sys/acpica/dist/interpreter/dispatcher/dswexec.c
  vendor-sys/acpica/dist/interpreter/dispatcher/dswload.c
  vendor-sys/acpica/dist/interpreter/dispatcher/dswscope.c
  vendor-sys/acpica/dist/interpreter/dispatcher/dswstate.c
  vendor-sys/acpica/dist/interpreter/executer/exconfig.c
  vendor-sys/acpica/dist/interpreter/executer/exconvrt.c
  vendor-sys/acpica/dist/interpreter/executer/excreate.c
  vendor-sys/acpica/dist/interpreter/executer/exdump.c
  vendor-sys/acpica/dist/interpreter/executer/exfield.c
  vendor-sys/acpica/dist/interpreter/executer/exfldio.c
  vendor-sys/acpica/dist/interpreter/executer/exmisc.c
  vendor-sys/acpica/dist/interpreter/executer/exmutex.c
  vendor-sys/acpica/dist/interpreter/executer/exnames.c
  vendor-sys/acpica/dist/interpreter/executer/exoparg1.c
  vendor-sys/acpica/dist/interpreter/executer/exoparg2.c
  vendor-sys/acpica/dist/interpreter/executer/exoparg3.c
  vendor-sys/acpica/dist/interpreter/executer/exoparg6.c
  vendor-sys/acpica/dist/interpreter/executer/exprep.c
  vendor-sys/acpica/dist/interpreter/executer/exregion.c
  vendor-sys/acpica/dist/inte

svn commit: r193251 - in vendor-sys/acpica/dist: . common compiler debugger disassembler events hardware include include/platform interpreter/dispatcher interpreter/executer interpreter/parser name...

2009-06-01 Thread Jung-uk Kim
Author: jkim
Date: Mon Jun  1 19:24:26 2009
New Revision: 193251
URL: http://svn.freebsd.org/changeset/base/193251

Log:
  Temporarily revert system includes fixups to make future import easier.

Modified:
  vendor-sys/acpica/dist/common/adfile.c
  vendor-sys/acpica/dist/common/adisasm.c
  vendor-sys/acpica/dist/common/adwalk.c
  vendor-sys/acpica/dist/common/dmrestag.c
  vendor-sys/acpica/dist/common/dmtable.c
  vendor-sys/acpica/dist/common/dmtbdump.c
  vendor-sys/acpica/dist/common/dmtbinfo.c
  vendor-sys/acpica/dist/compiler/aslanalyze.c
  vendor-sys/acpica/dist/compiler/aslcodegen.c
  vendor-sys/acpica/dist/compiler/aslcompile.c
  vendor-sys/acpica/dist/compiler/aslcompiler.h
  vendor-sys/acpica/dist/compiler/aslcompiler.l
  vendor-sys/acpica/dist/compiler/aslcompiler.y
  vendor-sys/acpica/dist/compiler/aslerror.c
  vendor-sys/acpica/dist/compiler/aslfiles.c
  vendor-sys/acpica/dist/compiler/aslfold.c
  vendor-sys/acpica/dist/compiler/asllength.c
  vendor-sys/acpica/dist/compiler/asllisting.c
  vendor-sys/acpica/dist/compiler/aslload.c
  vendor-sys/acpica/dist/compiler/asllookup.c
  vendor-sys/acpica/dist/compiler/aslmain.c
  vendor-sys/acpica/dist/compiler/aslmap.c
  vendor-sys/acpica/dist/compiler/aslopcodes.c
  vendor-sys/acpica/dist/compiler/asloperands.c
  vendor-sys/acpica/dist/compiler/aslopt.c
  vendor-sys/acpica/dist/compiler/aslresource.c
  vendor-sys/acpica/dist/compiler/aslrestype1.c
  vendor-sys/acpica/dist/compiler/aslrestype2.c
  vendor-sys/acpica/dist/compiler/aslstubs.c
  vendor-sys/acpica/dist/compiler/asltransform.c
  vendor-sys/acpica/dist/compiler/asltree.c
  vendor-sys/acpica/dist/compiler/aslutils.c
  vendor-sys/acpica/dist/debugger/dbcmds.c
  vendor-sys/acpica/dist/debugger/dbdisply.c
  vendor-sys/acpica/dist/debugger/dbexec.c
  vendor-sys/acpica/dist/debugger/dbfileio.c
  vendor-sys/acpica/dist/debugger/dbhistry.c
  vendor-sys/acpica/dist/debugger/dbinput.c
  vendor-sys/acpica/dist/debugger/dbstats.c
  vendor-sys/acpica/dist/debugger/dbutils.c
  vendor-sys/acpica/dist/debugger/dbxface.c
  vendor-sys/acpica/dist/disassembler/dmbuffer.c
  vendor-sys/acpica/dist/disassembler/dmnames.c
  vendor-sys/acpica/dist/disassembler/dmobject.c
  vendor-sys/acpica/dist/disassembler/dmopcode.c
  vendor-sys/acpica/dist/disassembler/dmresrc.c
  vendor-sys/acpica/dist/disassembler/dmresrcl.c
  vendor-sys/acpica/dist/disassembler/dmresrcs.c
  vendor-sys/acpica/dist/disassembler/dmutils.c
  vendor-sys/acpica/dist/disassembler/dmwalk.c
  vendor-sys/acpica/dist/events/evevent.c
  vendor-sys/acpica/dist/events/evgpe.c
  vendor-sys/acpica/dist/events/evgpeblk.c
  vendor-sys/acpica/dist/events/evmisc.c
  vendor-sys/acpica/dist/events/evregion.c
  vendor-sys/acpica/dist/events/evrgnini.c
  vendor-sys/acpica/dist/events/evsci.c
  vendor-sys/acpica/dist/events/evxface.c
  vendor-sys/acpica/dist/events/evxfevnt.c
  vendor-sys/acpica/dist/events/evxfregn.c
  vendor-sys/acpica/dist/hardware/hwacpi.c
  vendor-sys/acpica/dist/hardware/hwgpe.c
  vendor-sys/acpica/dist/hardware/hwregs.c
  vendor-sys/acpica/dist/hardware/hwsleep.c
  vendor-sys/acpica/dist/hardware/hwtimer.c
  vendor-sys/acpica/dist/include/acdisasm.h
  vendor-sys/acpica/dist/include/acpi.h
  vendor-sys/acpica/dist/include/acpiosxf.h
  vendor-sys/acpica/dist/include/acpixf.h
  vendor-sys/acpica/dist/include/acresrc.h
  vendor-sys/acpica/dist/include/actbl.h
  vendor-sys/acpica/dist/include/platform/acenv.h
  vendor-sys/acpica/dist/include/platform/acfreebsd.h
  vendor-sys/acpica/dist/interpreter/dispatcher/dsfield.c
  vendor-sys/acpica/dist/interpreter/dispatcher/dsinit.c
  vendor-sys/acpica/dist/interpreter/dispatcher/dsmethod.c
  vendor-sys/acpica/dist/interpreter/dispatcher/dsmthdat.c
  vendor-sys/acpica/dist/interpreter/dispatcher/dsobject.c
  vendor-sys/acpica/dist/interpreter/dispatcher/dsopcode.c
  vendor-sys/acpica/dist/interpreter/dispatcher/dsutils.c
  vendor-sys/acpica/dist/interpreter/dispatcher/dswexec.c
  vendor-sys/acpica/dist/interpreter/dispatcher/dswload.c
  vendor-sys/acpica/dist/interpreter/dispatcher/dswscope.c
  vendor-sys/acpica/dist/interpreter/dispatcher/dswstate.c
  vendor-sys/acpica/dist/interpreter/executer/exconfig.c
  vendor-sys/acpica/dist/interpreter/executer/exconvrt.c
  vendor-sys/acpica/dist/interpreter/executer/excreate.c
  vendor-sys/acpica/dist/interpreter/executer/exdump.c
  vendor-sys/acpica/dist/interpreter/executer/exfield.c
  vendor-sys/acpica/dist/interpreter/executer/exfldio.c
  vendor-sys/acpica/dist/interpreter/executer/exmisc.c
  vendor-sys/acpica/dist/interpreter/executer/exmutex.c
  vendor-sys/acpica/dist/interpreter/executer/exnames.c
  vendor-sys/acpica/dist/interpreter/executer/exoparg1.c
  vendor-sys/acpica/dist/interpreter/executer/exoparg2.c
  vendor-sys/acpica/dist/interpreter/executer/exoparg3.c
  vendor-sys/acpica/dist/interpreter/executer/exoparg6.c
  vendor-sys/acpica/dist/interpreter/executer/exprep.c
  vendor-sys/acpica/dist/interpreter/executer/exregion.c
  vendor-sys/acpica/dist/inte

svn commit: r193252 - svnadmin/conf

2009-06-01 Thread Doug Barton
Author: dougb
Date: Mon Jun  1 20:00:39 2009
New Revision: 193252
URL: http://svn.freebsd.org/changeset/base/193252

Log:
  Remove myself now that the BIND 9.6 drama is over

Modified:
  svnadmin/conf/sizelimit.conf

Modified: svnadmin/conf/sizelimit.conf
==
--- svnadmin/conf/sizelimit.confMon Jun  1 19:24:26 2009
(r193251)
+++ svnadmin/conf/sizelimit.confMon Jun  1 20:00:39 2009
(r193252)
@@ -19,7 +19,6 @@
 #kan
 brooks
 des
-dougb
 imp
 jkim
 lstewart
___
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: r193253 - vendor/bind9/dist

2009-06-01 Thread Doug Barton
Author: dougb
Date: Mon Jun  1 20:14:05 2009
New Revision: 193253
URL: http://svn.freebsd.org/changeset/base/193253

Log:
  Add a comment about the new dist-9.4 directory and using it for 7-stable

Modified:
  vendor/bind9/dist/FREEBSD-Upgrade

Modified: vendor/bind9/dist/FREEBSD-Upgrade
==
--- vendor/bind9/dist/FREEBSD-Upgrade   Mon Jun  1 20:00:39 2009
(r193252)
+++ vendor/bind9/dist/FREEBSD-Upgrade   Mon Jun  1 20:14:05 2009
(r193253)
@@ -10,6 +10,7 @@
svn co $REPO/vendor/bind9/dist
 
NOTE: For RELENG_6 (BIND 9.3.x) s/dist/dist-9.3/ throughout this file
+ For RELENG_7 (BIND 9.4.x) s/dist/dist-9.4/ throughout this file
 
 3) Unpack the tarball in a suitable directory:
 
___
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: r193245 - head/sys/dev/aic7xxx/aicasm

2009-06-01 Thread Roman Divacky
On Mon, Jun 01, 2009 at 12:09:37PM -0700, Xin LI wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Roman Divacky wrote:
> > On Mon, Jun 01, 2009 at 08:49:37PM +0200, Roman Divacky wrote:
> >> On Mon, Jun 01, 2009 at 11:48:34AM -0700, Doug Barton wrote:
> >>> Xin LI wrote:
>  Author: delphij
>  Date: Mon Jun  1 18:43:33 2009
>  New Revision: 193245
>  URL: http://svn.freebsd.org/changeset/base/193245
> 
>  Log:
>    Mark as WARNS=6.
> 
>  Modified:
>    head/sys/dev/aic7xxx/aicasm/Makefile
> 
>  Modified: head/sys/dev/aic7xxx/aicasm/Makefile
>  ==
>  --- head/sys/dev/aic7xxx/aicasm/Makefile Mon Jun  1 18:42:16 2009
>  (r193244)
>  +++ head/sys/dev/aic7xxx/aicasm/Makefile Mon Jun  1 18:43:33 2009
>  (r193245)
>  @@ -15,6 +15,7 @@ SRCS=  ${GENHDRS} ${CSRCS} ${YSRCS} ${LSR
>   CLEANFILES+= ${GENHDRS} ${YSRCS:R:C/(.*)/\1.output/g}
>   DPADD=  ${LIBL}
>   LDADD=  -ll
>  +WARNS?= 6
>   
>   # Correct path for kernel builds
>   # Don't rely on the kernel's .depend file
> 
> >>> Is there more coming?
> >>>
> >>> cc -O2 -pipe -ggdb -nostdinc -I/usr/include -I.
> >>> -I/usr/local/src/sys/dev/aic7xxx/aicasm -ggdb -std=gnu99
> >> ^^
> >>
> >> how did you get this? this should be used for userland compilation,
> >> kernel is done with -std=c99, can you show me how you got this?
> > 
> > ok.. when you
> > 
> > cd /usr/src
> > make
> > 
> > you build the kernel with -std=gnu99 instead of -std=c99. which is a bug. I 
> > am
> > trying to fix this. if anyone has any idea please mail me..
> 
> This is strange...  Let me take a look at this, I have reverted the
> WARNS?=6 change for now.

oh.. sorry. this has nothing to do with this commit. I just noticed it in
doug's reply..
___
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: r193254 - vendor-sys/acpica/20070320resync

2009-06-01 Thread Jung-uk Kim
Author: jkim
Date: Mon Jun  1 20:21:13 2009
New Revision: 193254
URL: http://svn.freebsd.org/changeset/base/193254

Log:
  Re-tag ACPI-CA 20070320.
  
  This is not really pristine vendor distribution but close enough.

Added:
  vendor-sys/acpica/20070320resync/
 - copied from r193253, vendor-sys/acpica/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: r193254 - vendor-sys/acpica/20070320resync

2009-06-01 Thread Jung-uk Kim
Author: jkim
Date: Mon Jun  1 20:21:13 2009
New Revision: 193254
URL: http://svn.freebsd.org/changeset/base/193254

Log:
  Re-tag ACPI-CA 20070320.
  
  This is not really pristine vendor distribution but close enough.

Added:
  vendor-sys/acpica/20070320resync/
 - copied from r193253, vendor-sys/acpica/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: r193255 - in head/sys: kern sys

2009-06-01 Thread Robert Watson
Author: rwatson
Date: Mon Jun  1 20:26:51 2009
New Revision: 193255
URL: http://svn.freebsd.org/changeset/base/193255

Log:
  Add a flags field to struct ucred, and export that via kinfo_proc,
  consuming one of its spare fields.  The cr_flags field is currently
  unused, but will be used for features, including capability mode and
  pay-as-you-go audit.
  
  Discussed with:   jhb, sson

Modified:
  head/sys/kern/kern_proc.c
  head/sys/sys/ucred.h
  head/sys/sys/user.h

Modified: head/sys/kern/kern_proc.c
==
--- head/sys/kern/kern_proc.c   Mon Jun  1 20:21:13 2009(r193254)
+++ head/sys/kern/kern_proc.c   Mon Jun  1 20:26:51 2009(r193255)
@@ -736,6 +736,7 @@ fill_kinfo_proc_only(struct proc *p, str
kp->ki_ngroups * sizeof(gid_t));
kp->ki_rgid = cred->cr_rgid;
kp->ki_svgid = cred->cr_svgid;
+   kp->ki_cr_flags = cred->cr_flags;
/* If jailed(cred), emulate the old P_JAILED flag. */
if (jailed(cred)) {
kp->ki_flag |= P_JAILED;

Modified: head/sys/sys/ucred.h
==
--- head/sys/sys/ucred.hMon Jun  1 20:21:13 2009(r193254)
+++ head/sys/sys/ucred.hMon Jun  1 20:26:51 2009(r193255)
@@ -56,6 +56,7 @@ struct ucred {
struct uidinfo  *cr_ruidinfo;   /* per ruid resource consumption */
struct prison   *cr_prison; /* jail(2) */
struct vimage   *cr_vimage; /* vimage */
+   u_int   cr_flags;   /* credential flags */
void*cr_pspare[2];  /* general use 2 */
 #definecr_endcopy  cr_label
struct label*cr_label;  /* MAC label */

Modified: head/sys/sys/user.h
==
--- head/sys/sys/user.h Mon Jun  1 20:21:13 2009(r193254)
+++ head/sys/sys/user.h Mon Jun  1 20:26:51 2009(r193255)
@@ -83,7 +83,7 @@
  * it in two places: function fill_kinfo_proc in sys/kern/kern_proc.c and
  * function kvm_proclist in lib/libkvm/kvm_proc.c .
  */
-#defineKI_NSPARE_INT   10
+#defineKI_NSPARE_INT   9
 #defineKI_NSPARE_LONG  12
 #defineKI_NSPARE_PTR   7
 
@@ -190,6 +190,7 @@ struct kinfo_proc {
 */
charki_sparestrings[68];/* spare string space */
int ki_spareints[KI_NSPARE_INT];/* spare room for growth */
+   u_int   ki_cr_flags;/* Credential flags */
int ki_jid; /* Process jail ID */
int ki_numthreads;  /* XXXKSE number of threads in total */
lwpid_t ki_tid; /* XXXKSE thread id */
___
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: r193256 - head/sys/dev/pci

2009-06-01 Thread John Baldwin
Author: jhb
Date: Mon Jun  1 20:27:14 2009
New Revision: 193256
URL: http://svn.freebsd.org/changeset/base/193256

Log:
  Adjust some comments.

Modified:
  head/sys/dev/pci/pcivar.h

Modified: head/sys/dev/pci/pcivar.h
==
--- head/sys/dev/pci/pcivar.h   Mon Jun  1 20:26:51 2009(r193255)
+++ head/sys/dev/pci/pcivar.h   Mon Jun  1 20:27:14 2009(r193256)
@@ -159,10 +159,10 @@ typedef struct pcicfg {
 uint8_tslot;   /* config space slot address */
 uint8_tfunc;   /* config space function number */
 
-struct pcicfg_pp pp;   /* pci power management */
-struct pcicfg_vpd vpd; /* pci vital product data */
-struct pcicfg_msi msi; /* pci msi */
-struct pcicfg_msix msix;   /* pci msi-x */
+struct pcicfg_pp pp;   /* Power management */
+struct pcicfg_vpd vpd; /* Vital product data */
+struct pcicfg_msi msi; /* PCI MSI */
+struct pcicfg_msix msix;   /* PCI MSI-X */
 struct pcicfg_ht ht;   /* HyperTransport */
 } pcicfgregs;
 
___
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: r193257 - head/sys/dev/pci

2009-06-01 Thread John Baldwin
Author: jhb
Date: Mon Jun  1 20:30:00 2009
New Revision: 193257
URL: http://svn.freebsd.org/changeset/base/193257

Log:
  Add an internal pci_printf() routine similar to device_printf() except
  that it prefixes the output with 'pci '.

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

Modified: head/sys/dev/pci/pci.c
==
--- head/sys/dev/pci/pci.c  Mon Jun  1 20:27:14 2009(r193256)
+++ head/sys/dev/pci/pci.c  Mon Jun  1 20:30:00 2009(r193257)
@@ -76,6 +76,7 @@ static const char *pci_maptype(uint64_t 
 static int pci_mapsize(uint64_t testval);
 static int pci_maprange(uint64_t mapreg);
 static voidpci_fixancient(pcicfgregs *cfg);
+static int pci_printf(pcicfgregs *cfg, const char *fmt, ...);
 
 static int pci_porten(device_t dev);
 static int pci_memen(device_t dev);
@@ -313,6 +314,20 @@ pci_find_device(uint16_t vendor, uint16_
return (NULL);
 }
 
+static int
+pci_printf(pcicfgregs *cfg, const char *fmt, ...)
+{
+   va_list ap;
+   int retval;
+
+   retval = printf("pci%d:%d:%d:%d: ", cfg->domain, cfg->bus, cfg->slot,
+   cfg->func);
+   va_start(ap, fmt);
+   retval += vprintf(fmt, ap);
+   va_end(ap);
+   return (retval);
+}
+
 /* return base address of memory or port map */
 
 static pci_addr_t
@@ -2049,10 +2064,8 @@ pci_set_powerstate_method(device_t dev, 
}
 
if (bootverbose)
-   printf(
-   "pci%d:%d:%d:%d: Transition from D%d to D%d\n",
-   dinfo->cfg.domain, dinfo->cfg.bus, dinfo->cfg.slot,
-   dinfo->cfg.func, oldstate, state);
+   pci_printf(cfg, "Transition from D%d to D%d\n", oldstate,
+   state);
 
PCI_WRITE_CONFIG(dev, child, cfg->pp.pp_status, status, 2);
if (delay)
@@ -2815,9 +2828,7 @@ pci_driver_added(device_t dev, driver_t 
dinfo = device_get_ivars(child);
pci_print_verbose(dinfo);
if (bootverbose)
-   printf("pci%d:%d:%d:%d: reprobing on driver added\n",
-   dinfo->cfg.domain, dinfo->cfg.bus, dinfo->cfg.slot,
-   dinfo->cfg.func);
+   pci_printf(&dinfo->cfg, "reprobing on driver added\n");
pci_cfg_restore(child, dinfo);
if (device_probe_and_attach(child) != 0)
pci_cfg_save(child, dinfo, 1);
___
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: r193258 - head/usr.bin/nfsstat

2009-06-01 Thread Rick Macklem
Author: rmacklem
Date: Mon Jun  1 20:34:00 2009
New Revision: 193258
URL: http://svn.freebsd.org/changeset/base/193258

Log:
  Change the "-4" option flag to "-e" since it does not refer to IPv4
  and to make it consistent with the flag used by nfsd and mountd.
  
  Approved by:  kib (mentor)

Modified:
  head/usr.bin/nfsstat/nfsstat.1
  head/usr.bin/nfsstat/nfsstat.c

Modified: head/usr.bin/nfsstat/nfsstat.1
==
--- head/usr.bin/nfsstat/nfsstat.1  Mon Jun  1 20:30:00 2009
(r193257)
+++ head/usr.bin/nfsstat/nfsstat.1  Mon Jun  1 20:34:00 2009
(r193258)
@@ -42,7 +42,7 @@
 statistics
 .Sh SYNOPSIS
 .Nm
-.Op Fl cszW4
+.Op Fl ceszW
 .Op Fl M Ar core
 .Op Fl N Ar system
 .Op Fl w Ar wait
@@ -83,7 +83,7 @@ second intervals.
 .It Fl z
 Reset statistics after displaying them.
 (Not currently supported by the experimental nfs subsystem.)
-.It Fl 4
+.It Fl e
 Gather statistics from the experimental nfs subsystem that includes
 support for NFSv4 instead of the regular nfs subsystem.
 .El

Modified: head/usr.bin/nfsstat/nfsstat.c
==
--- head/usr.bin/nfsstat/nfsstat.c  Mon Jun  1 20:30:00 2009
(r193257)
+++ head/usr.bin/nfsstat/nfsstat.c  Mon Jun  1 20:34:00 2009
(r193258)
@@ -113,7 +113,7 @@ main(int argc, char **argv)
 
interval = 0;
memf = nlistf = NULL;
-   while ((ch = getopt(argc, argv, "csWM:N:w:z4")) != -1)
+   while ((ch = getopt(argc, argv, "cesWM:N:w:z")) != -1)
switch(ch) {
case 'M':
memf = optarg;
@@ -140,7 +140,7 @@ main(int argc, char **argv)
case 'z':
zflag = 1;
break;
-   case '4':
+   case 'e':
run_v4 = 1;
break;
case '?':
@@ -505,7 +505,7 @@ void
 usage(void)
 {
(void)fprintf(stderr,
-   "usage: nfsstat [-cszW] [-M core] [-N system] [-w interval]\n");
+   "usage: nfsstat [-ceszW] [-M core] [-N system] [-w interval]\n");
exit(1);
 }
 
___
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: r193259 - in vendor-sys/acpica/dist: dispatcher executer interpreter/dispatcher interpreter/executer interpreter/parser parser

2009-06-01 Thread Jung-uk Kim
Author: jkim
Date: Mon Jun  1 20:35:09 2009
New Revision: 193259
URL: http://svn.freebsd.org/changeset/base/193259

Log:
  Move subdirectoies of interpreter one level up as it is done in the vendor
  distribution tarball since 20080514.

Added:
  vendor-sys/acpica/dist/dispatcher/
 - copied from r193252, vendor-sys/acpica/dist/interpreter/dispatcher/
  vendor-sys/acpica/dist/executer/
 - copied from r193252, vendor-sys/acpica/dist/interpreter/executer/
  vendor-sys/acpica/dist/parser/
 - copied from r193252, vendor-sys/acpica/dist/interpreter/parser/
Deleted:
  vendor-sys/acpica/dist/interpreter/dispatcher/
  vendor-sys/acpica/dist/interpreter/executer/
  vendor-sys/acpica/dist/interpreter/parser/
___
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: r193259 - in vendor-sys/acpica/dist: dispatcher executer interpreter/dispatcher interpreter/executer interpreter/parser parser

2009-06-01 Thread Jung-uk Kim
Author: jkim
Date: Mon Jun  1 20:35:09 2009
New Revision: 193259
URL: http://svn.freebsd.org/changeset/base/193259

Log:
  Move subdirectoies of interpreter one level up as it is done in the vendor
  distribution tarball since 20080514.

Added:
  vendor-sys/acpica/dist/dispatcher/
 - copied from r193252, vendor-sys/acpica/dist/interpreter/dispatcher/
  vendor-sys/acpica/dist/executer/
 - copied from r193252, vendor-sys/acpica/dist/interpreter/executer/
  vendor-sys/acpica/dist/parser/
 - copied from r193252, vendor-sys/acpica/dist/interpreter/parser/
Deleted:
  vendor-sys/acpica/dist/interpreter/dispatcher/
  vendor-sys/acpica/dist/interpreter/executer/
  vendor-sys/acpica/dist/interpreter/parser/
___
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: r193260 - in head: share/man/man9 sys/conf sys/kern sys/sys

2009-06-01 Thread John Baldwin
Author: jhb
Date: Mon Jun  1 20:35:39 2009
New Revision: 193260
URL: http://svn.freebsd.org/changeset/base/193260

Log:
  Add a simple API to manage scatter/gather lists of phyiscal addresses.
  Each list describes a logical memory object that is backed by one or more
  physical address ranges.  To minimize locking, the sglist objects
  themselves are immutable once they are shared.
  
  These objects may be used in the future to facilitate I/O requests using
  physically-addressed buffers.  For the immediate future I plan to use them
  to implement a new type of VM object and pager.
  
  Reviewed by:  jeff, scottl
  MFC after:1 month

Added:
  head/share/man/man9/sglist.9   (contents, props changed)
  head/sys/kern/subr_sglist.c   (contents, props changed)
  head/sys/sys/sglist.h   (contents, props changed)
Modified:
  head/share/man/man9/Makefile
  head/sys/conf/files

Modified: head/share/man/man9/Makefile
==
--- head/share/man/man9/MakefileMon Jun  1 20:35:09 2009
(r193259)
+++ head/share/man/man9/MakefileMon Jun  1 20:35:39 2009
(r193260)
@@ -218,6 +218,7 @@ MAN=accept_filter.9 \
selrecord.9 \
sema.9 \
sf_buf.9 \
+   sglist.9 \
signal.9 \
sleep.9 \
sleepqueue.9 \
@@ -1022,6 +1023,24 @@ MLINKS+=sf_buf.9 sf_buf_alloc.9 \
sf_buf.9 sf_buf_free.9 \
sf_buf.9 sf_buf_kva.9 \
sf_buf.9 sf_buf_page.9
+MLINKS+=sglist.9 sglist_alloc.9 \
+   sglist.9 sglist_append.9 \
+   sglist.9 sglist_append_mbuf.9 \
+   sglist.9 sglist_append_phys.9 \
+   sglist.9 sglist_append_uio.9 \
+   sglist.9 sglist_append_user.9 \
+   sglist.9 sglist_build.9 \
+   sglist.9 sglist_clone.9 \
+   sglist.9 sglist_consume_uio.9 \
+   sglist.9 sglist_count.9 \
+   sglist.9 sglist_free.9 \
+   sglist.9 sglist_hold.9 \
+   sglist.9 sglist_init.9 \
+   sglist.9 sglist_join.9 \
+   sglist.9 sglist_length.9 \
+   sglist.9 sglist_reset.9 \
+   sglist.9 sglist_slice.9 \
+   sglist.9 sglist_split.9
 MLINKS+=signal.9 cursig.9 \
signal.9 execsigs.9 \
signal.9 issignal.9 \

Added: head/share/man/man9/sglist.9
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/man/man9/sglist.9Mon Jun  1 20:35:39 2009
(r193260)
@@ -0,0 +1,503 @@
+.\"
+.\" Copyright (c) 2009 Advanced Computing Technologies LLC
+.\" Written by: John H. Baldwin 
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"notice, this list of conditions and the following disclaimer in the
+.\"documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 15, 2009
+.Dt SGLIST 9
+.Os
+.Sh NAME
+.Nm sglist ,
+.Nm sglist_alloc ,
+.Nm sglist_append ,
+.Nm sglist_append_mbuf ,
+.Nm sglist_append_phys ,
+.Nm sglist_append_uio ,
+.Nm sglist_append_user ,
+.Nm sglist_build ,
+.Nm sglist_clone ,
+.Nm sglist_consume_uio ,
+.Nm sglist_count ,
+.Nm sglist_free ,
+.Nm sglist_hold ,
+.Nm sglist_init ,
+.Nm sglist_join ,
+.Nm sglist_length ,
+.Nm sglist_reset ,
+.Nm sglist_slice ,
+.Nm sglist_split
+.Nd manage a scatter/gather list of physical memory addresses
+.Sh SYNOPSIS
+.In sys/types.h
+.In sys/sglist.h
+.Ft struct sglist *
+.Fn sglist_alloc "int nsegs" "int mflags"
+.Ft int
+.Fn sglist_append "struct sglist *sg" "void *buf" "size_t len"
+.Ft int
+.Fn sglist_append_mbuf "struct sglist *sg" "struct mbuf *m"
+.Ft int
+.Fn sglist_append_phys "struct sglist *sg" "vm_paddr_t paddr" "size_t len"
+.Ft int
+.Fn sglist_append_uio "struct sglist *sg" "struct uio *uio"
+.Ft int
+.Fn sglist_append_user "struct sglist *sg" "void *buf" "size_t le

svn commit: r193262 - head/sys/compat/linux

2009-06-01 Thread Dmitry Chagin
Author: dchagin
Date: Mon Jun  1 20:42:27 2009
New Revision: 193262
URL: http://svn.freebsd.org/changeset/base/193262

Log:
  Split linux_accept() syscall onto linux_accept_common() which should
  be used by linuxulator and linux_accept() itself.
  
  Approved by:  kib (mentor)
  MFC after:1 month

Modified:
  head/sys/compat/linux/linux_socket.c

Modified: head/sys/compat/linux/linux_socket.c
==
--- head/sys/compat/linux/linux_socket.cMon Jun  1 20:41:33 2009
(r193261)
+++ head/sys/compat/linux/linux_socket.cMon Jun  1 20:42:27 2009
(r193262)
@@ -763,14 +763,9 @@ linux_listen(struct thread *td, struct l
return (listen(td, &bsd_args));
 }
 
-struct linux_accept_args {
-   int s;
-   l_uintptr_t addr;
-   l_uintptr_t namelen;
-};
-
 static int
-linux_accept(struct thread *td, struct linux_accept_args *args)
+linux_accept_common(struct thread *td, int s, l_uintptr_t addr,
+l_uintptr_t namelen)
 {
struct accept_args /* {
int s;
@@ -779,19 +774,19 @@ linux_accept(struct thread *td, struct l
} */ bsd_args;
int error, fd;
 
-   bsd_args.s = args->s;
+   bsd_args.s = s;
/* XXX: */
-   bsd_args.name = (struct sockaddr * __restrict)PTRIN(args->addr);
-   bsd_args.anamelen = PTRIN(args->namelen);/* XXX */
+   bsd_args.name = (struct sockaddr * __restrict)PTRIN(addr);
+   bsd_args.anamelen = PTRIN(namelen);/* XXX */
error = accept(td, &bsd_args);
bsd_to_linux_sockaddr((struct sockaddr *)bsd_args.name);
if (error) {
-   if (error == EFAULT && args->namelen != sizeof(struct 
sockaddr_in))
+   if (error == EFAULT && namelen != sizeof(struct sockaddr_in))
return (EINVAL);
return (error);
}
-   if (args->addr) {
-   error = linux_sa_put(PTRIN(args->addr));
+   if (addr) {
+   error = linux_sa_put(PTRIN(addr));
if (error) {
(void)kern_close(td, td->td_retval[0]);
return (error);
@@ -809,6 +804,20 @@ linux_accept(struct thread *td, struct l
return (0);
 }
 
+struct linux_accept_args {
+   int s;
+   l_uintptr_t addr;
+   l_uintptr_t namelen;
+};
+
+static int
+linux_accept(struct thread *td, struct linux_accept_args *args)
+{
+
+   return (linux_accept_common(td, args->s, args->addr,
+   args->namelen));
+}
+
 struct linux_getsockname_args {
int s;
l_uintptr_t addr;
___
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: r193263 - head/sys/compat/linux

2009-06-01 Thread Dmitry Chagin
Author: dchagin
Date: Mon Jun  1 20:44:58 2009
New Revision: 193263
URL: http://svn.freebsd.org/changeset/base/193263

Log:
  Implement a variation of the accept_common() which takes
  a flags argument.
  
  Do not preserve td_retval before kern_fcntl(F_SETFL) as it does not
  changed.
  
  Approved by:  kib (mentor)
  MFC after:1 month

Modified:
  head/sys/compat/linux/linux_socket.c

Modified: head/sys/compat/linux/linux_socket.c
==
--- head/sys/compat/linux/linux_socket.cMon Jun  1 20:42:27 2009
(r193262)
+++ head/sys/compat/linux/linux_socket.cMon Jun  1 20:44:58 2009
(r193263)
@@ -772,7 +772,10 @@ linux_accept_common(struct thread *td, i
struct sockaddr * __restrict name;
socklen_t * __restrict anamelen;
} */ bsd_args;
-   int error, fd;
+   int error;
+
+   if (flags & ~(LINUX_SOCK_CLOEXEC | LINUX_SOCK_NONBLOCK))
+   return (EINVAL);
 
bsd_args.s = s;
/* XXX: */
@@ -785,23 +788,27 @@ linux_accept_common(struct thread *td, i
return (EINVAL);
return (error);
}
-   if (addr) {
-   error = linux_sa_put(PTRIN(addr));
-   if (error) {
-   (void)kern_close(td, td->td_retval[0]);
-   return (error);
-   }
-   }
 
/*
 * linux appears not to copy flags from the parent socket to the
-* accepted one, so we must clear the flags in the new descriptor.
-* Ignore any errors, because we already have an open fd.
+* accepted one, so we must clear the flags in the new descriptor
+* and apply the requested flags.
 */
-   fd = td->td_retval[0];
-   (void)kern_fcntl(td, fd, F_SETFL, 0);
-   td->td_retval[0] = fd;
-   return (0);
+   error = kern_fcntl(td, td->td_retval[0], F_SETFL, 0);
+   if (error)
+   goto out;
+   error = linux_set_socket_flags(td, td->td_retval[0], flags);
+   if (error)
+   goto out;
+   if (addr)
+   error = linux_sa_put(PTRIN(addr));
+
+out:
+   if (error) {
+   (void)kern_close(td, td->td_retval[0]);
+   td->td_retval[0] = 0;
+   }
+   return (error);
 }
 
 struct linux_accept_args {
___
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: r193264 - in head/sys: amd64/linux32 compat/linux i386/linux

2009-06-01 Thread Dmitry Chagin
Author: dchagin
Date: Mon Jun  1 20:48:39 2009
New Revision: 193264
URL: http://svn.freebsd.org/changeset/base/193264

Log:
  Implement accept4 syscall.
  
  Approved by:  kib (mentor)
  MFC after:1 month

Modified:
  head/sys/amd64/linux32/linux.h
  head/sys/compat/linux/linux_socket.c
  head/sys/i386/linux/linux.h

Modified: head/sys/amd64/linux32/linux.h
==
--- head/sys/amd64/linux32/linux.h  Mon Jun  1 20:44:58 2009
(r193263)
+++ head/sys/amd64/linux32/linux.h  Mon Jun  1 20:48:39 2009
(r193264)
@@ -669,6 +669,7 @@ union l_semun {
 #defineLINUX_GETSOCKOPT15
 #defineLINUX_SENDMSG   16
 #defineLINUX_RECVMSG   17
+#defineLINUX_ACCEPT4   18
 
 #defineLINUX_SOL_SOCKET1
 #defineLINUX_SOL_IP0

Modified: head/sys/compat/linux/linux_socket.c
==
--- head/sys/compat/linux/linux_socket.cMon Jun  1 20:44:58 2009
(r193263)
+++ head/sys/compat/linux/linux_socket.cMon Jun  1 20:48:39 2009
(r193264)
@@ -825,6 +825,21 @@ linux_accept(struct thread *td, struct l
args->namelen));
 }
 
+struct linux_accept4_args {
+   int s;
+   l_uintptr_t addr;
+   l_uintptr_t namelen;
+   int flags;
+};
+
+static int
+linux_accept4(struct thread *td, struct linux_accept4_args *args)
+{
+
+   return (linux_accept_common(td, args->s, args->addr,
+   args->namelen, args->flags));
+}
+
 struct linux_getsockname_args {
int s;
l_uintptr_t addr;
@@ -1528,7 +1543,8 @@ static const unsigned char lxs_args[] = 
LINUX_AL(4) /* recv */, LINUX_AL(6) /* sendto */,
LINUX_AL(6) /* recvfrom */, LINUX_AL(2) /* shutdown */,
LINUX_AL(5) /* setsockopt */,   LINUX_AL(5) /* getsockopt */,
-   LINUX_AL(3) /* sendmsg */,  LINUX_AL(3) /* recvmsg */
+   LINUX_AL(3) /* sendmsg */,  LINUX_AL(3) /* recvmsg */,
+   LINUX_AL(4) /* accept4 */
 };
 
 #defineLINUX_AL_SIZE   sizeof(lxs_args) / sizeof(lxs_args[0]) - 1
@@ -1582,6 +1598,8 @@ linux_socketcall(struct thread *td, stru
return (linux_sendmsg(td, arg));
case LINUX_RECVMSG:
return (linux_recvmsg(td, arg));
+   case LINUX_ACCEPT4:
+   return (linux_accept4(td, arg));
}
 
uprintf("LINUX: 'socket' typ=%d not implemented\n", args->what);

Modified: head/sys/i386/linux/linux.h
==
--- head/sys/i386/linux/linux.h Mon Jun  1 20:44:58 2009(r193263)
+++ head/sys/i386/linux/linux.h Mon Jun  1 20:48:39 2009(r193264)
@@ -645,6 +645,7 @@ union l_semun {
 #defineLINUX_GETSOCKOPT15
 #defineLINUX_SENDMSG   16
 #defineLINUX_RECVMSG   17
+#defineLINUX_ACCEPT4   18
 
 #defineLINUX_SOL_SOCKET1
 #defineLINUX_SOL_IP0
___
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: r193265 - head/sys/compat/linux

2009-06-01 Thread Dmitry Chagin
Author: dchagin
Date: Mon Jun  1 20:54:41 2009
New Revision: 193265
URL: http://svn.freebsd.org/changeset/base/193265

Log:
  Add forgotten in previous commit flags argument.
  
  Approved by:  kib (mentor)
  MFC after:1 month

Modified:
  head/sys/compat/linux/linux_socket.c

Modified: head/sys/compat/linux/linux_socket.c
==
--- head/sys/compat/linux/linux_socket.cMon Jun  1 20:48:39 2009
(r193264)
+++ head/sys/compat/linux/linux_socket.cMon Jun  1 20:54:41 2009
(r193265)
@@ -765,7 +765,7 @@ linux_listen(struct thread *td, struct l
 
 static int
 linux_accept_common(struct thread *td, int s, l_uintptr_t addr,
-l_uintptr_t namelen)
+l_uintptr_t namelen, int flags)
 {
struct accept_args /* {
int s;
@@ -822,7 +822,7 @@ linux_accept(struct thread *td, struct l
 {
 
return (linux_accept_common(td, args->s, args->addr,
-   args->namelen));
+   args->namelen, 0));
 }
 
 struct linux_accept4_args {
___
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: r193266 - head/sys/netinet6

2009-06-01 Thread Marko Zec
Author: zec
Date: Mon Jun  1 20:59:40 2009
New Revision: 193266
URL: http://svn.freebsd.org/changeset/base/193266

Log:
  Remove an #undef MIN that slipped under the radar and led me to
  hastily introduce an #define MIN() a few lines below in r191816.
  
  Approved by:  julian (mentor)
  Discussed with:   bz

Modified:
  head/sys/netinet6/nd6.c

Modified: head/sys/netinet6/nd6.c
==
--- head/sys/netinet6/nd6.c Mon Jun  1 20:54:41 2009(r193265)
+++ head/sys/netinet6/nd6.c Mon Jun  1 20:59:40 2009(r193266)
@@ -281,7 +281,6 @@ nd6_setmtu0(struct ifnet *ifp, struct nd
if (ndi->maxmtu > V_in6_maxmtu)
in6_setmaxmtu(); /* check all interfaces just in case */
 
-#undef MIN
 }
 
 void
@@ -489,14 +488,6 @@ nd6_llinfo_timer(void *arg)
if ((ifp = ((ln->lle_tbl != NULL) ? ln->lle_tbl->llt_ifp : NULL)) == 
NULL)
panic("ln ifp == NULL");
 
-/*
- * XXX XXX XXX XXX XXX
- *
- * Why the ^%(@)*&%^) is this #define MIN() needed for CURVNET_SET()?!?
- * And #define MIN() is in sys/param.h already, which is #included first
- * here?!?
- */
-#define   MIN(a,b) (((a)<(b))?(a):(b))
CURVNET_SET(ifp->if_vnet);
INIT_VNET_INET6(curvnet);
 
___
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: r193245 - head/sys/dev/aic7xxx/aicasm

2009-06-01 Thread Xin LI
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Roman Divacky wrote:
[...]
>>> you build the kernel with -std=gnu99 instead of -std=c99. which is a bug. I 
>>> am
>>> trying to fix this. if anyone has any idea please mail me..
>> This is strange...  Let me take a look at this, I have reverted the
>> WARNS?=6 change for now.
> 
> oh.. sorry. this has nothing to do with this commit. I just noticed it in
> doug's reply..

The commit itself has a problem :)  I'll correct it before marking this
back to WARNS=6.

Cheers,
- --
Xin LI http://www.delphij.net/
FreeBSD - The Power to Serve!
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.11 (FreeBSD)

iEYEARECAAYFAkokQXsACgkQi+vbBBjt66DrKACdH90YE8KyOq+lmN8adEBP50Yz
ZyEAoLVQvb95bpC2jQCF3YXpJh/roNkm
=w4NO
-END PGP SIGNATURE-
___
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: r193268 - head/sys/dev/aic7xxx/aicasm

2009-06-01 Thread Xin LI
Author: delphij
Date: Mon Jun  1 21:07:54 2009
New Revision: 193268
URL: http://svn.freebsd.org/changeset/base/193268

Log:
  Initialize the match structure.  This is unnecessary but gcc insists to
  complain about it when we raise the WARNS level.

Modified:
  head/sys/dev/aic7xxx/aicasm/aicasm_scan.l

Modified: head/sys/dev/aic7xxx/aicasm/aicasm_scan.l
==
--- head/sys/dev/aic7xxx/aicasm/aicasm_scan.l   Mon Jun  1 21:02:40 2009
(r193267)
+++ head/sys/dev/aic7xxx/aicasm/aicasm_scan.l   Mon Jun  1 21:07:54 2009
(r193268)
@@ -516,6 +516,7 @@ expand_macro(struct symbol *macro_symbol
const char *body_head;
const char *body_pos;
const char *next_match;
+   regmatch_t match = { .rm_so = 0, .rm_eo = 0 };
 
/*
 * Due to the nature of unput, we must work
@@ -525,8 +526,6 @@ expand_macro(struct symbol *macro_symbol
body_head = macro_symbol->info.macroinfo->body;
body_pos = body_head + strlen(body_head);
while (body_pos > body_head) {
-   regmatch_t match;
-
next_match = body_head;
match_marg = NULL;
next_substitution(macro_symbol, body_pos, &next_match,
___
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: r193270 - head/sys/dev/cxgb/ulp/tom

2009-06-01 Thread Marko Zec
Author: zec
Date: Mon Jun  1 21:10:23 2009
New Revision: 193270
URL: http://svn.freebsd.org/changeset/base/193270

Log:
  Update VNET base pointer setting macro to use a correct source of
  vnet context.
  
  Approved by:  julian (mentor)

Modified:
  head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c

Modified: head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c
==
--- head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Mon Jun  1 21:10:19 2009
(r193269)
+++ head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Mon Jun  1 21:10:23 2009
(r193270)
@@ -1219,7 +1219,7 @@ install_offload_ops(struct socket *so)
 static __inline int
 select_rcv_wscale(int space, struct vnet *vnet)
 {
-   INIT_VNET_INET(so->so_vnet);
+   INIT_VNET_INET(vnet);
int wscale = 0;
 
if (space > MAX_RCV_WND)
___
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: r193271 - vendor-sys/acpica/20090521

2009-06-01 Thread Jung-uk Kim
Author: jkim
Date: Mon Jun  1 21:13:38 2009
New Revision: 193271
URL: http://svn.freebsd.org/changeset/base/193271

Log:
  Tag ACPICA 20090521.

Added:
  vendor-sys/acpica/20090521/
 - copied from r193270, vendor-sys/acpica/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: r193271 - vendor-sys/acpica/20090521

2009-06-01 Thread Jung-uk Kim
Author: jkim
Date: Mon Jun  1 21:13:38 2009
New Revision: 193271
URL: http://svn.freebsd.org/changeset/base/193271

Log:
  Tag ACPICA 20090521.

Added:
  vendor-sys/acpica/20090521/
 - copied from r193270, vendor-sys/acpica/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: r193272 - in head/sys: dev/cxgb/ulp/iw_cxgb kern netgraph netgraph/bluetooth/socket netinet netsmb nfsclient nfsserver rpc sys

2009-06-01 Thread John Baldwin
Author: jhb
Date: Mon Jun  1 21:17:03 2009
New Revision: 193272
URL: http://svn.freebsd.org/changeset/base/193272

Log:
  Rework socket upcalls to close some races with setup/teardown of upcalls.
  - Each socket upcall is now invoked with the appropriate socket buffer
locked.  It is not permissible to call soisconnected() with this lock
held; however, so socket upcalls now return an integer value.  The two
possible values are SU_OK and SU_ISCONNECTED.  If an upcall returns
SU_ISCONNECTED, then the soisconnected() will be invoked on the
socket after the socket buffer lock is dropped.
  - A new API is provided for setting and clearing socket upcalls.  The
API consists of soupcall_set() and soupcall_clear().
  - To simplify locking, each socket buffer now has a separate upcall.
  - When a socket upcall returns SU_ISCONNECTED, the upcall is cleared from
the receive socket buffer automatically.  Note that a SO_SND upcall
should never return SU_ISCONNECTED.
  - All this means that accept filters should now return SU_ISCONNECTED
instead of calling soisconnected() directly.  They also no longer need
to explicitly clear the upcall on the new socket.
  - The HTTP accept filter still uses soupcall_set() to manage its internal
state machine, but other accept filters no longer have any explicit
knowlege of socket upcall internals aside from their return value.
  - The various RPC client upcalls currently drop the socket buffer lock
while invoking soreceive() as a temporary band-aid.  The plan for
the future is to add a new flag to allow soreceive() to be called with
the socket buffer locked.
  - The AIO callback for socket I/O is now also invoked with the socket
buffer locked.  Previously sowakeup() would drop the socket buffer
lock only to call aio_swake() which immediately re-acquired the socket
buffer lock for the duration of the function call.
  
  Discussed with:   rwatson, rmacklem

Modified:
  head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c
  head/sys/kern/uipc_sockbuf.c
  head/sys/kern/uipc_socket.c
  head/sys/kern/vfs_aio.c
  head/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c
  head/sys/netgraph/ng_ksocket.c
  head/sys/netinet/accf_data.c
  head/sys/netinet/accf_dns.c
  head/sys/netinet/accf_http.c
  head/sys/netsmb/smb_trantcp.c
  head/sys/nfsclient/nfs_socket.c
  head/sys/nfsserver/nfs.h
  head/sys/nfsserver/nfs_srvsock.c
  head/sys/nfsserver/nfs_syscalls.c
  head/sys/rpc/clnt_dg.c
  head/sys/rpc/clnt_vc.c
  head/sys/rpc/svc_dg.c
  head/sys/rpc/svc_vc.c
  head/sys/sys/sockbuf.h
  head/sys/sys/socketvar.h

Modified: head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c
==
--- head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c  Mon Jun  1 21:13:38 2009
(r193271)
+++ head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c  Mon Jun  1 21:17:03 2009
(r193272)
@@ -141,7 +141,7 @@ SYSCTL_UINT(_hw_cxgb, OID_AUTO, cong_fla
 
 static void ep_timeout(void *arg);
 static void connect_reply_upcall(struct iwch_ep *ep, int status);
-static void iwch_so_upcall(struct socket *so, void *arg, int waitflag);
+static int iwch_so_upcall(struct socket *so, void *arg, int waitflag);
 
 /*
  * Cruft to offload socket upcalls onto thread.
@@ -335,9 +335,7 @@ close_socket(struct iwch_ep_common *epc)
 {
CTR4(KTR_IW_CXGB, "%s ep %p so %p state %s", __FUNCTION__, epc, 
epc->so, states[epc->state]);
SOCK_LOCK(epc->so);
-   epc->so->so_upcall = NULL;
-   epc->so->so_upcallarg = NULL;
-   epc->so->so_rcv.sb_flags &= ~SB_UPCALL;
+   soupcall_clear(epc->so, SO_RCV);
SOCK_UNLOCK(epc->so);
soshutdown(epc->so, SHUT_WR|SHUT_RD);
epc->so = NULL;
@@ -1108,7 +1106,7 @@ terminate(struct t3cdev *tdev, struct mb
 {
struct toepcb *toep = (struct toepcb *)ctx;
struct socket *so = toeptoso(toep);
-   struct iwch_ep *ep = so->so_upcallarg;
+   struct iwch_ep *ep = so->so_rcv.sb_upcallarg;
 
CTR2(KTR_IW_CXGB, "%s ep %p", __FUNCTION__, ep);
m_adj(m, sizeof(struct cpl_rdma_terminate));
@@ -1129,7 +1127,7 @@ ec_status(struct t3cdev *tdev, struct mb
struct iwch_qp_attributes attrs;
int release = 0;
 
-   ep = so->so_upcallarg;
+   ep = so->so_rcv.sb_upcallarg;
CTR5(KTR_IW_CXGB, "%s ep %p so %p state %s ec_status %d", __FUNCTION__, 
ep, ep->com.so, states[ep->com.state], rep->status);
if (!so || !ep) {
panic("bogosity ep %p state %d, so %p state %x\n", ep, ep ? 
ep->com.state : -1, so, so ? so->so_state : -1); 
@@ -1309,10 +1307,10 @@ static int init_sock(struct iwch_ep_comm
struct sockopt sopt;
int on=1;
 
-   epc->so->so_upcall = iwch_so_upcall;
-   epc->so->so_upcallarg = epc;
-   epc->so->so_rcv.sb_flags |= SB_UPCALL;
+   SOCK_LOCK(epc->so);
+   soupcall_set(epc->so, SO_RCV, iwch_so_upcall, epc);
epc->so->so_state |= SS_NBIO;
+ 

svn commit: r193273 - head/usr.sbin/pkg_install/info

2009-06-01 Thread Jilles Tjoelker
Author: jilles
Date: Mon Jun  1 21:26:52 2009
New Revision: 193273
URL: http://svn.freebsd.org/changeset/base/193273

Log:
  Fix segfault when giving invalid long option to pkg_info.
  
  PR:   bin/133473
  Submitted by: Rafal Grodzinski
  Approved by:  ed (mentor)
  MFC after:1 week

Modified:
  head/usr.sbin/pkg_install/info/main.c

Modified: head/usr.sbin/pkg_install/info/main.c
==
--- head/usr.sbin/pkg_install/info/main.c   Mon Jun  1 21:17:03 2009
(r193272)
+++ head/usr.sbin/pkg_install/info/main.c   Mon Jun  1 21:26:52 2009
(r193273)
@@ -58,6 +58,7 @@ static struct option longopts[] = {
{ "verbose",no_argument,NULL,   'v' },
{ "version",no_argument,NULL,   'P' },
{ "which",  required_argument,  NULL,   'W' },
+   { NULL, 0,  NULL,   0 }
 };
 
 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: r193274 - in head/sys: contrib/pf/net netinet6

2009-06-01 Thread Marko Zec
Author: zec
Date: Mon Jun  1 21:29:54 2009
New Revision: 193274
URL: http://svn.freebsd.org/changeset/base/193274

Log:
  V_loif is not an array but a pure pointer, so treat it as such.
  
  Reviewed by:  bz
  Approved by:  julian (mentor)

Modified:
  head/sys/contrib/pf/net/pf_ioctl.c
  head/sys/netinet6/ip6_input.c

Modified: head/sys/contrib/pf/net/pf_ioctl.c
==
--- head/sys/contrib/pf/net/pf_ioctl.c  Mon Jun  1 21:26:52 2009
(r193273)
+++ head/sys/contrib/pf/net/pf_ioctl.c  Mon Jun  1 21:29:54 2009
(r193274)
@@ -3717,7 +3717,7 @@ pf_check6_in(void *arg, struct mbuf **m,
 * order to support scoped addresses. In order to support stateful
 * filtering we have change this to lo0 as it is the case in IPv4.
 */
-   chk = pf_test6(PF_IN, (*m)->m_flags & M_LOOP ? &V_loif[0] : ifp, m,
+   chk = pf_test6(PF_IN, (*m)->m_flags & M_LOOP ? V_loif : ifp, m,
NULL, inp);
if (chk && *m) {
m_freem(*m);

Modified: head/sys/netinet6/ip6_input.c
==
--- head/sys/netinet6/ip6_input.c   Mon Jun  1 21:26:52 2009
(r193273)
+++ head/sys/netinet6/ip6_input.c   Mon Jun  1 21:29:54 2009
(r193274)
@@ -380,7 +380,7 @@ ip6_input(struct mbuf *m)
 #define M2MMAX (sizeof(V_ip6stat.ip6s_m2m)/sizeof(V_ip6stat.ip6s_m2m[0]))
if (m->m_next) {
if (m->m_flags & M_LOOP) {
-   V_ip6stat.ip6s_m2m[V_loif[0].if_index]++; /* 
XXX */
+   V_ip6stat.ip6s_m2m[V_loif->if_index]++;
} else if (m->m_pkthdr.rcvif->if_index < M2MMAX)

V_ip6stat.ip6s_m2m[m->m_pkthdr.rcvif->if_index]++;
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: r193275 - in head/sys: kern sys vm

2009-06-01 Thread John Baldwin
Author: jhb
Date: Mon Jun  1 21:32:52 2009
New Revision: 193275
URL: http://svn.freebsd.org/changeset/base/193275

Log:
  Add an extension to the character device interface that allows character
  device drivers to use arbitrary VM objects to satisfy individual mmap()
  requests.
  - A new d_mmap_single(cdev, &foff, objsize, &object, prot) callback is
added to cdevsw.  This function is called for each mmap() request.
If it returns ENODEV, then the mmap() request will fall back to using
the device's device pager object and d_mmap().  Otherwise, the method
can return a VM object to satisfy this entire mmap() request via
*object.  It can also modify the starting offset into this object via
*foff.  This allows device drivers to use the file offset as a cookie
to identify specific VM objects.
  - vm_mmap_vnode() has been changed to call vm_mmap_cdev() directly when
mapping V_CHR vnodes.  This avoids duplicating all the cdev mmap
handling code and simplifies some of vm_mmap_vnode().
  - D_VERSION has been bumped to D_VERSION_02.  Older device drivers
using D_VERSION_01 are still supported.
  
  MFC after:1 month

Modified:
  head/sys/kern/kern_conf.c
  head/sys/sys/conf.h
  head/sys/vm/vm_mmap.c

Modified: head/sys/kern/kern_conf.c
==
--- head/sys/kern/kern_conf.c   Mon Jun  1 21:29:54 2009(r193274)
+++ head/sys/kern/kern_conf.c   Mon Jun  1 21:32:52 2009(r193275)
@@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$");
 #include 
 
 #include 
+#include 
 
 static MALLOC_DEFINE(M_DEVT, "cdev", "cdev storage");
 
@@ -275,6 +276,7 @@ dead_strategy(struct bio *bp)
 
 #define dead_dump  (dumper_t *)enxio
 #define dead_kqfilter  (d_kqfilter_t *)enxio
+#define dead_mmap_single (d_mmap_single_t *)enodev
 
 static struct cdevsw dead_cdevsw = {
.d_version =D_VERSION,
@@ -289,7 +291,8 @@ static struct cdevsw dead_cdevsw = {
.d_strategy =   dead_strategy,
.d_name =   "dead",
.d_dump =   dead_dump,
-   .d_kqfilter =   dead_kqfilter
+   .d_kqfilter =   dead_kqfilter,
+   .d_mmap_single = dead_mmap_single
 };
 
 /* Default methods if driver does not specify method */
@@ -301,6 +304,7 @@ static struct cdevsw dead_cdevsw = {
 #define no_ioctl   (d_ioctl_t *)enodev
 #define no_mmap(d_mmap_t *)enodev
 #define no_kqfilter(d_kqfilter_t *)enodev
+#define no_mmap_single (d_mmap_single_t *)enodev
 
 static void
 no_strategy(struct bio *bp)
@@ -480,6 +484,23 @@ giant_mmap(struct cdev *dev, vm_offset_t
return (retval);
 }
 
+static int
+giant_mmap_single(struct cdev *dev, vm_ooffset_t *offset, vm_size_t size,
+vm_object_t *object, int nprot)
+{
+   struct cdevsw *dsw;
+   int retval;
+
+   dsw = dev_refthread(dev);
+   if (dsw == NULL)
+   return (ENXIO);
+   mtx_lock(&Giant);
+   retval = dsw->d_gianttrick->d_mmap_single(dev, offset, size, object,
+   nprot);
+   mtx_unlock(&Giant);
+   dev_relthread(dev);
+   return (retval);
+}
 
 static void
 notify(struct cdev *dev, const char *ev)
@@ -569,7 +590,8 @@ prep_cdevsw(struct cdevsw *devsw)
return;
}
 
-   if (devsw->d_version != D_VERSION_01) {
+   if (devsw->d_version != D_VERSION_01 &&
+   devsw->d_version != D_VERSION_02) {
printf(
"WARNING: Device driver \"%s\" has wrong version %s\n",
devsw->d_name == NULL ? "???" : devsw->d_name,
@@ -585,6 +607,8 @@ prep_cdevsw(struct cdevsw *devsw)
devsw->d_dump = dead_dump;
devsw->d_kqfilter = dead_kqfilter;
}
+   if (devsw->d_version == D_VERSION_01)
+   devsw->d_mmap_single = NULL;

if (devsw->d_flags & D_NEEDGIANT) {
if (devsw->d_gianttrick == NULL) {
@@ -613,6 +637,7 @@ prep_cdevsw(struct cdevsw *devsw)
FIXUP(d_mmap,   no_mmap,giant_mmap);
FIXUP(d_strategy,   no_strategy,giant_strategy);
FIXUP(d_kqfilter,   no_kqfilter,giant_kqfilter);
+   FIXUP(d_mmap_single,no_mmap_single, giant_mmap_single);
 
if (devsw->d_dump == NULL)  devsw->d_dump = no_dump;
 

Modified: head/sys/sys/conf.h
==
--- head/sys/sys/conf.h Mon Jun  1 21:29:54 2009(r193274)
+++ head/sys/sys/conf.h Mon Jun  1 21:32:52 2009(r193275)
@@ -103,6 +103,7 @@ struct thread;
 struct uio;
 struct knote;
 struct clonedevs;
+struct vm_object;
 struct vnode;
 
 /*
@@ -136,6 +137,8 @@ typedef int d_poll_t(struct cdev *dev, i
 typedef int d_kqfilter_t(struct cdev *dev, struct knote *kn);
 typedef int d_mmap_t(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr,
 int nprot);
+typedef int d_mmap_single_t(struct cdev *cdev, vm_ooffset_t *offset,
+vm_size

Re: svn commit: r193272 - in head/sys: dev/cxgb/ulp/iw_cxgb kern netgraph netgraph/bluetooth/socket netinet netsmb nfsclient nfsserver rpc sys

2009-06-01 Thread John Baldwin
On Monday 01 June 2009 5:17:03 pm John Baldwin wrote:
> Author: jhb
> Date: Mon Jun  1 21:17:03 2009
> New Revision: 193272
> URL: http://svn.freebsd.org/changeset/base/193272
> 
> Log:
>   Rework socket upcalls to close some races with setup/teardown of upcalls.
>   - The various RPC client upcalls currently drop the socket buffer lock
> while invoking soreceive() as a temporary band-aid.  The plan for
> the future is to add a new flag to allow soreceive() to be called with
> the socket buffer locked.

Hopefully once this last bit is done, the various panics people have seen with 
the new NFS code in 8 will be fixed as they all seem to be due to races 
between socket upcall teardown and socket upcall invocations.

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


svn commit: r193277 - in head/sys/dev/ata: . chipsets

2009-06-01 Thread Alexander Motin
Author: mav
Date: Mon Jun  1 21:42:26 2009
New Revision: 193277
URL: http://svn.freebsd.org/changeset/base/193277

Log:
  MFp4.
  
  Log supported AHCI controller capabilities.

Modified:
  head/sys/dev/ata/ata-all.h
  head/sys/dev/ata/chipsets/ata-ahci.c

Modified: head/sys/dev/ata/ata-all.h
==
--- head/sys/dev/ata/ata-all.h  Mon Jun  1 21:38:44 2009(r193276)
+++ head/sys/dev/ata/ata-all.h  Mon Jun  1 21:42:26 2009(r193277)
@@ -149,11 +149,26 @@
 /* SATA AHCI v1.0 register defines */
 #define ATA_AHCI_CAP0x00
 #defineATA_AHCI_CAP_NPMASK 0x001f
+#defineATA_AHCI_CAP_SXS0x0020
+#defineATA_AHCI_CAP_EMS0x0040
+#defineATA_AHCI_CAP_CCCS   0x0080
+#defineATA_AHCI_CAP_NCS0x1F00
+#defineATA_AHCI_CAP_NCS_SHIFT  8
 #defineATA_AHCI_CAP_PSC0x2000
 #defineATA_AHCI_CAP_SSC0x4000
+#defineATA_AHCI_CAP_PMD0x8000
+#defineATA_AHCI_CAP_FBSS   0x0001
 #defineATA_AHCI_CAP_SPM0x0002
-#defineATA_AHCI_CAP_CLO0x0100
+#defineATA_AHCI_CAP_SAM0x0008
+#defineATA_AHCI_CAP_ISS0x00F0
+#defineATA_AHCI_CAP_ISS_SHIFT  20
+#defineATA_AHCI_CAP_SCLO   0x0100
+#defineATA_AHCI_CAP_SAL0x0200
 #defineATA_AHCI_CAP_SALP   0x0400
+#defineATA_AHCI_CAP_SSS0x0800
+#defineATA_AHCI_CAP_SMPS   0x1000
+#defineATA_AHCI_CAP_SSNTF  0x2000
+#defineATA_AHCI_CAP_SNCQ   0x4000
 #defineATA_AHCI_CAP_64BIT  0x8000
 
 #define ATA_AHCI_GHC0x04

Modified: head/sys/dev/ata/chipsets/ata-ahci.c
==
--- head/sys/dev/ata/chipsets/ata-ahci.cMon Jun  1 21:38:44 2009
(r193276)
+++ head/sys/dev/ata/chipsets/ata-ahci.cMon Jun  1 21:42:26 2009
(r193277)
@@ -101,8 +101,8 @@ int
 ata_ahci_chipinit(device_t dev)
 {
 struct ata_pci_controller *ctlr = device_get_softc(dev);
-interror;
-u_int32_t version;
+int error, speed;
+u_int32_t caps, version;
 
 /* if we have a memory BAR(5) we are likely on an AHCI part */
 ctlr->r_type2 = SYS_RES_MEMORY;
@@ -142,16 +142,45 @@ ata_ahci_chipinit(device_t dev)
 ctlr->suspend = ata_ahci_suspend;
 ctlr->resume = ata_ahci_ctlr_reset;
 
-/* announce we support the HW */
-version = ATA_INL(ctlr->r_res2, ATA_AHCI_VS);
-device_printf(dev,
- "AHCI Version %x%x.%x%x controller with %d ports PM %s\n",
- (version >> 24) & 0xff, (version >> 16) & 0xff,
- (version >> 8) & 0xff, version & 0xff,
- (ATA_INL(ctlr->r_res2, ATA_AHCI_CAP) & ATA_AHCI_CAP_NPMASK) + 
1,
- (ATA_INL(ctlr->r_res2, ATA_AHCI_CAP) & ATA_AHCI_CAP_SPM) ?
- "supported" : "not supported");
-return 0;
+   /* announce we support the HW */
+   version = ATA_INL(ctlr->r_res2, ATA_AHCI_VS);
+   caps = ATA_INL(ctlr->r_res2, ATA_AHCI_CAP);
+   speed = (caps & ATA_AHCI_CAP_ISS) >> ATA_AHCI_CAP_ISS_SHIFT;
+   device_printf(dev,
+   "AHCI v%x.%02x controller with %d %sGbps ports, PM %s\n",
+   ((version >> 20) & 0xf0) + ((version >> 16) & 0x0f),
+   ((version >> 4) & 0xf0) + (version & 0x0f),
+   (caps & ATA_AHCI_CAP_NPMASK) + 1,
+   ((speed == 1) ? "1.5":((speed == 2) ? "3":
+   ((speed == 3) ? "6":"?"))),
+   (caps & ATA_AHCI_CAP_SPM) ?
+   "supported" : "not supported");
+   if (bootverbose) {
+   device_printf(dev, "Caps:%s%s%s%s%s%s%s%s %sGbps",
+   (caps & ATA_AHCI_CAP_64BIT) ? " 64bit":"",
+   (caps & ATA_AHCI_CAP_SNCQ) ? " NCQ":"",
+   (caps & ATA_AHCI_CAP_SSNTF) ? " SNTF":"",
+   (caps & ATA_AHCI_CAP_SMPS) ? " MPS":"",
+   (caps & ATA_AHCI_CAP_SSS) ? " SS":"",
+   (caps & ATA_AHCI_CAP_SALP) ? " ALP":"",
+   (caps & ATA_AHCI_CAP_SAL) ? " AL":"",
+   (caps & ATA_AHCI_CAP_SCLO) ? " CLO":"",
+   ((speed == 1) ? "1.5":((speed == 2) ? "3":
+   ((speed == 3) ? "6":"?";
+   printf("%s%s%s%s%s%s %dcmd%s%s%s %dports\n",
+   (caps & ATA_AHCI_CAP_SAM) ? " AM":"",
+   (caps & ATA_AHCI_CAP_SPM) ? " PM":"",
+   (caps & ATA_AHCI_CAP_FBSS) ? " FBS":"",
+   (ca

svn commit: r193278 - head/sys/dev/ksyms

2009-06-01 Thread John Baldwin
Author: jhb
Date: Mon Jun  1 21:54:22 2009
New Revision: 193278
URL: http://svn.freebsd.org/changeset/base/193278

Log:
  Remove another d_thread_t use that crept in.

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

Modified: head/sys/dev/ksyms/ksyms.c
==
--- head/sys/dev/ksyms/ksyms.c  Mon Jun  1 21:42:26 2009(r193277)
+++ head/sys/dev/ksyms/ksyms.c  Mon Jun  1 21:54:22 2009(r193278)
@@ -552,7 +552,7 @@ ksyms_read(struct cdev *dev, struct uio 
 /* ARGSUSED */
 static int
 ksyms_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int32_t flag __unused,
-d_thread_t *td __unused)
+struct thread *td __unused)
 {
int error = 0;
struct ksyms_softc *sc;
___
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: r193279 - in head/usr.bin/ee: . nls/hu_HU.ISO8859-2

2009-06-01 Thread Gabor Kovesdan
Author: gabor (doc,ports committer)
Date: Mon Jun  1 21:54:59 2009
New Revision: 193279
URL: http://svn.freebsd.org/changeset/base/193279

Log:
  - Add Hungarian catalog

Added:
  head/usr.bin/ee/nls/hu_HU.ISO8859-2/
  head/usr.bin/ee/nls/hu_HU.ISO8859-2/ee.msg   (contents, props changed)
Modified:
  head/usr.bin/ee/Makefile

Modified: head/usr.bin/ee/Makefile
==
--- head/usr.bin/ee/MakefileMon Jun  1 21:54:22 2009(r193278)
+++ head/usr.bin/ee/MakefileMon Jun  1 21:54:59 2009(r193279)
@@ -14,7 +14,7 @@ LDADD=-lncurses
 WARNS?=2
 
 NLS=   en_US.US-ASCII fr_FR.ISO8859-1 de_DE.ISO8859-1 pl_PL.ISO8859-2 \
-   uk_UA.KOI8-U ru_RU.KOI8-R
+   uk_UA.KOI8-U ru_RU.KOI8-R hu_HU.ISO8859-2
 
 NLSLINKS_en_US.US-ASCII= en_US.ISO8859-1 en_US.ISO8859-15
 NLSLINKS_fr_FR.ISO8859-1= fr_BE.ISO8859-1 fr_BE.ISO8859-15 \

Added: head/usr.bin/ee/nls/hu_HU.ISO8859-2/ee.msg
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/usr.bin/ee/nls/hu_HU.ISO8859-2/ee.msg  Mon Jun  1 21:54:59 2009
(r193279)
@@ -0,0 +1,185 @@
+$ This file contains the messages for ee ("easy editor").  See the file 
+$ ee.i18n.guide for more information
+$ 
+$ For ee patchlevel 3
+$ 
+$ $FreeBSD$
+$ 
+$ 
+$set 1
+$quote "
+1 "�zemm�d men�"
+2 "tabul�torok sz�k�zz� "
+3 "kis- �s nagybet� �rz�keny keres�s"
+4 "marg�k megfigyel�sre "
+5 "automatikus bekezd�sform�z�s " 
+6 "nyolcbites karakterek" 
+7 "info ablak   " 
+8 "jobb marg�   "
+9 "kil�p�s a men�b�l"
+10 "v�ltoztat�sok ment�se"
+11 "nincs ment�s"
+12 "f�jl men�"
+13 "f�jl olvas�sa"
+14 "f�jl �r�sa"
+15 "f�jl ment�se"
+16 "a szerkeszt� tartalm�nak nyomtat�sa"
+17 "keres�s men�"
+18 "keres�s erre"
+19 "keres�s"
+20 "helyes�r�s men�"
+21 "'spell' haszn�lata"
+22 "'ispell' haszn�lata"
+23 "egy�b men�"
+24 "bekezd�s form�z�sa"
+25 "shell parancs"
+26 "helyes�r�s-ellen�rz�s"
+27 "f�men�"
+28 "kil�p�s a szerkeszt�b�l"
+29 "s�g�"
+30 "f�jlm�veletek"
+31 "k�perny� �jrarajzol�sa"
+32 "be�ll�t�sok"
+33 "keres�s"
+34 "egy�b"
+35 "Vez�rl�billenty�k: 
 " 
+36 "^a ascii k�d ^i tabul�tor^r jobb   
 "
+37 "^b sz�veg alja   ^j �jsor^t sz�veg teteje  
 "
+38 "^c parancs   ^k karakter t�rl�se ^u fel
 "
+39 "^d le^l balra^v sz�t�rl�s vissza   
 "
+40 "^e keres�s prompt^m �jsor^w sz� t�rl�se
 "
+41 "^f karaktert�rl�s vissza ^n k�vetkez� oldal  ^x keres�s
 "
+42 "^g sor eleje ^o sor v�ge ^y sor t�rl�se
 "
+43 "^h visszat�rl�s  ^p el�z� oldal  ^z sort�rl�s vissza   
 "
+44 "^[ (escape) men�   
 "
+45 "   
 "
+46 "Parancsok: 
 "
+47 "help: ez az infofile: f�jln�v megjelen�t�se
"
+48 "read: f�jl olvas�sa char: karakter ascii k�dja 
"
+49 "write   : f�jl �r�sacase: k/n bet� �rz�keny 
keres�s"
+50 "exit: kil�p�s �s ment�s nocase  : nem bet��rz�keny keres�s 
"
+51 "quit: kil�p�s ment�s n�lk�l !cmd: \"cmd\" shell parancs
"
+52 "line: #. sor megjelen�t�se  0-9 : \"#\" sorra ugr�s
"
+53 "expand  : tabok kifejt�se   noexpand: ne fejtse ki a tabokat   
"
+54 "   
  "
+55 "  ee [+#] [-i] [-e] [-h] [f�jl(ok) 
  "
+56 "+# :ugr�s sorra # -i :info ablak ki -e :tabkifejt�s ki -h :kiemel�s ki"
+57 "^[ (escape) men�  ^e keres�s prompt ^y sor t�rl�se^u fel^p el�z� 
old  "
+58 "^a ascii k�d  ^x keres�s^z sort�rl vissza ^d le ^n k�v old 
   "
+59 "^b sz�ve alja ^g sor eleje  ^w sz� t�rl�se^l bal   
   "
+60 "^t sz�veg teteje  ^o sor v�ge   ^v sz�t�rl vissza ^r jobb  
   "
+61 "^c parancs^k karalter t�rl  ^f kart�rl vissza  
   "
+62 "help : s�g�   |file  : f�jln�v megjelen�t�se   |line : sor # 
ki�r�sa  "
+63 "read : f�jl olvas�sa  |char  : ascii k�d   |0-9  : # sorra 
ugr�s  "
+64 "write: f�jl �r�sa |case  : k/n �rz�keny keres�s|exit : kil�p �s 
ment  "
+65 "!cmd : shell parancs  |nocase: nem �rz�keny keres�s|quit : kil�p, nem 
ment"
+66 "expand: tabkifejt�s   |noexpand: ne legyen tabkifejt�s   

svn commit: r193280 - in head: lib/bind share/mk tools/build/options usr.bin/dig usr.sbin/named

2009-06-01 Thread Doug Barton
Author: dougb
Date: Mon Jun  1 21:58:59 2009
New Revision: 193280
URL: http://svn.freebsd.org/changeset/base/193280

Log:
  Add support for the build options that are currently in the port:
WITH_BIND_IDN
WITH_BIND_LARGE_FILE
WITH_BIND_SIGCHASE
WITH_BIND_XML

Added:
  head/tools/build/options/WITH_BIND_IDN   (contents, props changed)
  head/tools/build/options/WITH_BIND_LARGE_FILE   (contents, props changed)
  head/tools/build/options/WITH_BIND_SIGCHASE   (contents, props changed)
  head/tools/build/options/WITH_BIND_XML   (contents, props changed)
Replaced:
  head/tools/build/options/WITH_BIND_LIBS   (contents, props changed)
Modified:
  head/lib/bind/config.mk
  head/share/mk/bsd.own.mk
  head/usr.bin/dig/Makefile
  head/usr.sbin/named/Makefile

Modified: head/lib/bind/config.mk
==
--- head/lib/bind/config.mk Mon Jun  1 21:54:59 2009(r193279)
+++ head/lib/bind/config.mk Mon Jun  1 21:58:59 2009(r193280)
@@ -70,6 +70,19 @@ ISC_ATOMIC_ARCH= x86_32
 ISC_ATOMIC_ARCH=   ${MACHINE_ARCH}
 .endif
 
+# Optional features
+.if ${MK_BIND_LARGE_FILE} == "yes"
+CFLAGS+=   -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
+.endif
+.if ${MK_BIND_SIGCHASE} == "yes"
+CFLAGS+=   -DDIG_SIGCHASE
+.endif
+.if ${MK_BIND_XML} == "yes"
+CFLAGS+=   -DHAVE_LIBXML2
+CFLAGS+=   -I/usr/local/include -I/usr/local/include/libxml2
+CFLAGS+=   -L/usr/local/lib -lxml2 -lz -liconv -lm
+.endif
+
 # Link against BIND libraries
 .if ${MK_BIND_LIBS} == "no"
 LIBBIND9=  ${LIB_BIND_REL}/bind9/libbind9.a

Modified: head/share/mk/bsd.own.mk
==
--- head/share/mk/bsd.own.mkMon Jun  1 21:54:59 2009(r193279)
+++ head/share/mk/bsd.own.mkMon Jun  1 21:58:59 2009(r193280)
@@ -402,7 +402,11 @@ MK_${var}:=yes
 # MK_* options which default to "no".
 #
 .for var in \
+BIND_IDN \
+BIND_LARGE_FILE \
 BIND_LIBS \
+BIND_SIGCHASE \
+BIND_XML \
 GNU_CPIO \
 HESIOD \
 IDEA

Added: head/tools/build/options/WITH_BIND_IDN
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/build/options/WITH_BIND_IDN  Mon Jun  1 21:58:59 2009
(r193280)
@@ -0,0 +1,3 @@
+.\" $FreeBSD$
+Set to enable IDN support for dig, host, and nslookup.
+This requires ports/dns/idnkit to be installed in /usr/local.

Added: head/tools/build/options/WITH_BIND_LARGE_FILE
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/build/options/WITH_BIND_LARGE_FILE   Mon Jun  1 21:58:59 
2009(r193280)
@@ -0,0 +1,2 @@
+.\" $FreeBSD$
+Set to enable 64-bit file support.

Added: head/tools/build/options/WITH_BIND_LIBS
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/build/options/WITH_BIND_LIBS Mon Jun  1 21:58:59 2009
(r193280)
@@ -0,0 +1,2 @@
+.\" $FreeBSD$
+Set to install BIND libraries and include files.

Added: head/tools/build/options/WITH_BIND_SIGCHASE
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/build/options/WITH_BIND_SIGCHASE Mon Jun  1 21:58:59 2009
(r193280)
@@ -0,0 +1,2 @@
+.\" $FreeBSD$
+Set to enable DNSSEC validation support for dig, host, and nslookup.

Added: head/tools/build/options/WITH_BIND_XML
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/build/options/WITH_BIND_XML  Mon Jun  1 21:58:59 2009
(r193280)
@@ -0,0 +1,3 @@
+.\" $FreeBSD$
+Set to enable the http statistics interface for named.
+This requires ports/textproc/libxml2 to be installed in /usr/local.

Modified: head/usr.bin/dig/Makefile
==
--- head/usr.bin/dig/Makefile   Mon Jun  1 21:54:59 2009(r193279)
+++ head/usr.bin/dig/Makefile   Mon Jun  1 21:58:59 2009(r193280)
@@ -15,6 +15,11 @@ SRCS+=   dig.c dighost.c
 CFLAGS+=   -I${SRCDIR}/include
 CFLAGS+=   -I${BIND_DIR}/lib/isc/${ISC_ATOMIC_ARCH}/include
 
+.if ${MK_BIND_IDN} == "yes"
+CFLAGS+=   -DWITH_IDN -I/usr/local/include
+CFLAGS+=   -L/usr/local/lib -lidnkit -R/usr/local/lib -liconv
+.endif
+
 DPADD+=${BIND_DPADD} ${CRYPTO_DPADD} ${PTHREAD_DPADD}
 LDADD+=${BIND_LDADD} ${CRYPTO_LDADD} ${PTHREAD_LDADD}
 

Modified: head/usr.sbin/named/Makefile
==
--- head/us

Re: svn commit: r192925 - in head/sys/dev/usb: . input

2009-06-01 Thread Rui Paulo

On 1 Jun 2009, at 16:54, Hans Petter Selasky wrote:


On Monday 01 June 2009, Rui Paulo wrote:

Hi,

On 1 Jun 2009, at 06:49, Hans Petter Selasky wrote:

On Monday 01 June 2009, Rui Paulo wrote:

http://wiki.freebsd.org/AppleMacbook#head-7eab3730c3bf3d04bdfb0d1d3649ea
ddf 2fed595


Hi Rui Paulo,

Regarding the eject button, can you have a look at:

/sys/dev/usb/input/ukbd.c

And provide a patch that masks this key the way you want?


I'm not sure what you mean. I'm proposing to remove the key handling
code from the kernel. See the attached patch.


Your patch looks OK. Make sure you test it before committing.


I can't test it right now for various reasons. If anyone can test it,  
I would be glad.


Regards,
--
Rui Paulo



PGP.sig
Description: This is a digitally signed message part


svn commit: r193281 - vendor/bind9/dist

2009-06-01 Thread Doug Barton
Author: dougb
Date: Mon Jun  1 22:05:08 2009
New Revision: 193281
URL: http://svn.freebsd.org/changeset/base/193281

Log:
  Update note about IDN and XML support, and combine it with the
  note about IPv6 support
  
  Fix alphebetization of the new dnssec-keyfromlabel directory

Modified:
  vendor/bind9/dist/FREEBSD-Upgrade

Modified: vendor/bind9/dist/FREEBSD-Upgrade
==
--- vendor/bind9/dist/FREEBSD-Upgrade   Mon Jun  1 21:58:59 2009
(r193280)
+++ vendor/bind9/dist/FREEBSD-Upgrade   Mon Jun  1 22:05:08 2009
(r193281)
@@ -63,9 +63,6 @@
 
 10) Generate and run configure:
 
-   NOTE: Disabling libxml and idn is temporary, adding support
- for these features is planned.
-
aclocal ; autoheader ; autoconf
$ ./configure --prefix=/usr \
--without-libxml2 --without-idn \
@@ -74,9 +71,10 @@
--enable-getifaddrs --disable-linux-caps \
--with-openssl=/usr --with-randomdev=/dev/random
 
-   Note that we intentionally disable IPv6 support on the configure
-   command line; src/lib/bind/config.mk will re-enable it at compile
-   time if WITHOUT_INET6 is not defined.
+   NOTE: Disabling libxml, idn, and IPv6 is the default.
+ Knobs are provided for users to enabled the first 2, and
+ src/lib/bind/config.mk will re-enable IPv6 at compile
+ time if WITHOUT_INET6 is not defined.
 
 11) Copy the following generated files to src/lib/bind:
 
@@ -113,8 +111,8 @@
src/usr.bin/nslookupbind9/bin/dig
src/usr.bin/nsupdatebind9/bin/nsupdate
src/usr.sbin/dnssec-dsfromkey   bind9/bin/dnssec
-   src/usr.sbin/dnssec-keygen  bind9/bin/dnssec
src/usr.sbin/dnssec-keyfromlabel bind9/bin/dnssec
+   src/usr.sbin/dnssec-keygen  bind9/bin/dnssec
src/usr.sbin/dnssec-signzonebind9/bin/dnssec
src/usr.sbin/named  bind9/bin/named
src/usr.sbin/named-checkconfbind9/bin/check
___
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: r193282 - stable/7/sys/libkern

2009-06-01 Thread Kip Macy
Author: kmacy
Date: Mon Jun  1 22:09:42 2009
New Revision: 193282
URL: http://svn.freebsd.org/changeset/base/193282

Log:
  memmove is defined in support.S on arm - don't compile in

Modified:
  stable/7/sys/libkern/memmove.c

Modified: stable/7/sys/libkern/memmove.c
==
--- stable/7/sys/libkern/memmove.c  Mon Jun  1 22:05:08 2009
(r193281)
+++ stable/7/sys/libkern/memmove.c  Mon Jun  1 22:09:42 2009
(r193282)
@@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$");
 
 #include 
 
+#if !defined(__arm__)
 void *
 memmove(void *dest, const void *src, size_t n)
 {
@@ -36,3 +37,4 @@ memmove(void *dest, const void *src, siz
bcopy(src, dest, n);
return (dest);
 }
+#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: r193283 - head/share/man/man5

2009-06-01 Thread Doug Barton
Author: dougb
Date: Mon Jun  1 22:14:45 2009
New Revision: 193283
URL: http://svn.freebsd.org/changeset/base/193283

Log:
  Commit the updates to this file for the new BIND options

Modified:
  head/share/man/man5/src.conf.5

Modified: head/share/man/man5/src.conf.5
==
--- head/share/man/man5/src.conf.5  Mon Jun  1 22:09:42 2009
(r193282)
+++ head/share/man/man5/src.conf.5  Mon Jun  1 22:14:45 2009
(r193283)
@@ -1,7 +1,7 @@
 .\" DO NOT EDIT-- this file is automatically generated.
 .\" from FreeBSD: head/tools/build/options/makeman 188848 2009-02-20 11:09:55Z 
mtm
 .\" $FreeBSD$
-.Dd April  5, 2009
+.Dd June  1, 2009
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -150,8 +150,15 @@ and
 .\" from FreeBSD: head/tools/build/options/WITHOUT_BIND_ETC 156932 2006-03-21 
07:50:50Z ru
 Set to avoid installing the default files to
 .Pa /var/named/etc/namedb .
+.It Va WITH_BIND_IDN
+.\" from FreeBSD: head/tools/build/options/WITH_BIND_IDN 193280 2009-06-01 
21:58:59Z dougb
+Set to enable IDN support for dig, host, and nslookup.
+This requires ports/dns/idnkit to be installed in /usr/local.
+.It Va WITH_BIND_LARGE_FILE
+.\" from FreeBSD: head/tools/build/options/WITH_BIND_LARGE_FILE 193280 
2009-06-01 21:58:59Z dougb
+Set to enable 64-bit file support.
 .It Va WITH_BIND_LIBS
-.\" from FreeBSD: head/tools/build/options/WITH_BIND_LIBS 156932 2006-03-21 
07:50:50Z ru
+.\" from FreeBSD: head/tools/build/options/WITH_BIND_LIBS 193280 2009-06-01 
21:58:59Z dougb
 Set to install BIND libraries and include files.
 .It Va WITHOUT_BIND_LIBS_LWRES
 .\" from FreeBSD: head/tools/build/options/WITHOUT_BIND_LIBS_LWRES 156932 
2006-03-21 07:50:50Z ru
@@ -182,6 +189,9 @@ Set to avoid building or installing
 .Xr rndc 8 ,
 and
 .Xr rndc-confgen 8 .
+.It Va WITH_BIND_SIGCHASE
+.\" from FreeBSD: head/tools/build/options/WITH_BIND_SIGCHASE 193280 
2009-06-01 21:58:59Z dougb
+Set to enable DNSSEC validation support for dig, host, and nslookup.
 .It Va WITHOUT_BIND_UTILS
 .\" from FreeBSD: head/tools/build/options/WITHOUT_BIND_UTILS 156932 
2006-03-21 07:50:50Z ru
 Set to avoid building or installing the BIND userland utilities,
@@ -190,6 +200,10 @@ Set to avoid building or installing the 
 .Xr nslookup 1 ,
 and
 .Xr nsupdate 8 .
+.It Va WITH_BIND_XML
+.\" from FreeBSD: head/tools/build/options/WITH_BIND_XML 193280 2009-06-01 
21:58:59Z dougb
+Set to enable the http statistics interface for named.
+This requires ports/textproc/libxml2 to be installed in /usr/local.
 .It Va WITHOUT_BLUETOOTH
 .\" from FreeBSD: head/tools/build/options/WITHOUT_BLUETOOTH 156932 2006-03-21 
07:50:50Z ru
 Set to not build Bluetooth related kernel modules, programs and libraries.
___
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: r193285 - head

2009-06-01 Thread Doug Barton
Author: dougb
Date: Mon Jun  1 22:47:59 2009
New Revision: 193285
URL: http://svn.freebsd.org/changeset/base/193285

Log:
  Add a note about the change to rcorder for pf and ipfw.

Modified:
  head/UPDATING

Modified: head/UPDATING
==
--- head/UPDATING   Mon Jun  1 22:34:09 2009(r193284)
+++ head/UPDATING   Mon Jun  1 22:47:59 2009(r193285)
@@ -33,6 +33,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.
rebuilt.
Bump __FreeBSD_version to 800096.
 
+20090531:
+   For those who use ipfw and especially pf, those two firewalls
+   are now started BEFORE the network is initialized (i.e., before
+   rc.d/netif). Please review your rules to make sure that your
+   interfaces will be properly described.
+
 20090530:
Remove the tunable/sysctl debug.mpsafevfs as its initial purpose
is no more valid.
___
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: stable/7: lib/libc/i386/stdlib lib/libc/i386/string lib/libc_r/arch/amd64 lib/libc_r/arch/i386 lib/libstand/i386 lib/msun/amd64 lib/msun/i387 lib/msun/ia64 tools/KSE/ksetes...

2009-06-01 Thread Maxim Sobolev

Attilio Rao wrote:

Author: attilio
Date: Sat May 30 23:27:48 2009
New Revision: 193134
URL: http://svn.freebsd.org/changeset/base/193134

Log:
  MFC r192760:
  Use the END() macro appropriately in order to improve debugging for
  tools (Valgrind mainly).

Modified: stable/7/lib/libc/i386/stdlib/ldiv.S
==
--- stable/7/lib/libc/i386/stdlib/ldiv.SSat May 30 23:01:27 2009
(r193133)
+++ stable/7/lib/libc/i386/stdlib/ldiv.SSat May 30 23:27:48 2009
(r193134)
@@ -40,3 +40,4 @@ ENTRY(ldiv)
 movl%edx,8(%esp)
 ret
 END(ldiv)
+END(ldiv)

Modified: stable/7/lib/libc/i386/string/wcscmp.S
==
--- stable/7/lib/libc/i386/string/wcscmp.S  Sat May 30 23:01:27 2009
(r193133)
+++ stable/7/lib/libc/i386/string/wcscmp.S  Sat May 30 23:27:48 2009
(r193134)
@@ -78,3 +78,4 @@ no0:  subl(%esi),%eax
popl%edi
ret
 END(wcscmp)
+END(wcscmp)


Are those double-ENDs intentional?

-Maxim
___
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: stable/7: lib/libc/i386/stdlib lib/libc/i386/string lib/libc_r/arch/amd64 lib/libc_r/arch/i386 lib/libstand/i386 lib/msun/amd64 lib/msun/i387 lib/msun/ia64 tools/KSE/ksetes...

2009-06-01 Thread Attilio Rao
2009/6/2 Maxim Sobolev :
> Attilio Rao wrote:
>>
>> Author: attilio
>> Date: Sat May 30 23:27:48 2009
>> New Revision: 193134
>> URL: http://svn.freebsd.org/changeset/base/193134
>>
>> Log:
>>  MFC r192760:
>>  Use the END() macro appropriately in order to improve debugging for
>>  tools (Valgrind mainly).
>>
>> Modified: stable/7/lib/libc/i386/stdlib/ldiv.S
>>
>> ==
>> --- stable/7/lib/libc/i386/stdlib/ldiv.SSat May 30 23:01:27 2009
>>  (r193133)
>> +++ stable/7/lib/libc/i386/stdlib/ldiv.SSat May 30 23:27:48 2009
>>  (r193134)
>> @@ -40,3 +40,4 @@ ENTRY(ldiv)
>> movl%edx,8(%esp)
>> ret
>>  END(ldiv)
>> +END(ldiv)
>>
>> Modified: stable/7/lib/libc/i386/string/wcscmp.S
>>
>> ==
>> --- stable/7/lib/libc/i386/string/wcscmp.S  Sat May 30 23:01:27 2009
>>  (r193133)
>> +++ stable/7/lib/libc/i386/string/wcscmp.S  Sat May 30 23:27:48 2009
>>  (r193134)
>> @@ -78,3 +78,4 @@ no0:  subl(%esi),%eax
>>popl%edi
>>ret
>>  END(wcscmp)
>> +END(wcscmp)
>
> Are those double-ENDs intentional?

No, thanks for catching them.

Attilio


-- 
Peace can only be achieved by understanding - A. Einstein
___
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: r193286 - in stable/7/lib/libc/i386: stdlib string

2009-06-01 Thread Attilio Rao
Author: attilio
Date: Mon Jun  1 23:53:15 2009
New Revision: 193286
URL: http://svn.freebsd.org/changeset/base/193286

Log:
  Remove double-inserted END() macros.
  
  Reported by:  sobomax

Modified:
  stable/7/lib/libc/i386/stdlib/ldiv.S
  stable/7/lib/libc/i386/string/wcscmp.S

Modified: stable/7/lib/libc/i386/stdlib/ldiv.S
==
--- stable/7/lib/libc/i386/stdlib/ldiv.SMon Jun  1 22:47:59 2009
(r193285)
+++ stable/7/lib/libc/i386/stdlib/ldiv.SMon Jun  1 23:53:15 2009
(r193286)
@@ -40,4 +40,3 @@ ENTRY(ldiv)
 movl%edx,8(%esp)
 ret
 END(ldiv)
-END(ldiv)

Modified: stable/7/lib/libc/i386/string/wcscmp.S
==
--- stable/7/lib/libc/i386/string/wcscmp.S  Mon Jun  1 22:47:59 2009
(r193285)
+++ stable/7/lib/libc/i386/string/wcscmp.S  Mon Jun  1 23:53:15 2009
(r193286)
@@ -78,4 +78,3 @@ no0:  subl(%esi),%eax
popl%edi
ret
 END(wcscmp)
-END(wcscmp)
___
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: r193287 - head/sys/net80211

2009-06-01 Thread Sam Leffler
Author: sam
Date: Tue Jun  2 00:04:10 2009
New Revision: 193287
URL: http://svn.freebsd.org/changeset/base/193287

Log:
  count packets

Modified:
  head/sys/net80211/ieee80211_monitor.c

Modified: head/sys/net80211/ieee80211_monitor.c
==
--- head/sys/net80211/ieee80211_monitor.c   Mon Jun  1 23:53:15 2009
(r193286)
+++ head/sys/net80211/ieee80211_monitor.c   Tue Jun  2 00:04:10 2009
(r193287)
@@ -127,6 +127,9 @@ static int
 monitor_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf)
 {
struct ieee80211vap *vap = ni->ni_vap;
+   struct ifnet *ifp = vap->iv_ifp;
+
+   ifp->if_ipackets++;
 
if (ieee80211_radiotap_active_vap(vap))
ieee80211_radiotap_rx(vap, m);
___
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: r193288 - head/sys/net80211

2009-06-01 Thread Sam Leffler
Author: sam
Date: Tue Jun  2 00:06:39 2009
New Revision: 193288
URL: http://svn.freebsd.org/changeset/base/193288

Log:
  don't dispatch frames to vap's not running

Modified:
  head/sys/net80211/ieee80211_input.c

Modified: head/sys/net80211/ieee80211_input.c
==
--- head/sys/net80211/ieee80211_input.c Tue Jun  2 00:04:10 2009
(r193287)
+++ head/sys/net80211/ieee80211_input.c Tue Jun  2 00:06:39 2009
(r193288)
@@ -65,6 +65,9 @@ ieee80211_input_all(struct ieee80211com 
struct ieee80211_node *ni;
struct mbuf *mcopy;
 
+   /* NB: could check for IFF_UP but this is cheaper */
+   if (vap->iv_state == IEEE80211_S_INIT)
+   continue;
/*
 * WDS vap's only receive directed traffic from the
 * station at the ``far end''.  That traffic should
___
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"


  1   2   >