svn commit: r197341 - head/sys/netinet

2009-09-20 Thread Michael Tuexen
Author: tuexen
Date: Sun Sep 20 11:32:22 2009
New Revision: 197341
URL: http://svn.freebsd.org/changeset/base/197341

Log:
  Fix errnos.
  
  Approved by: rrs(mentor)
  MFC after: 3 days.

Modified:
  head/sys/netinet/sctp_output.c

Modified: head/sys/netinet/sctp_output.c
==
--- head/sys/netinet/sctp_output.c  Sun Sep 20 05:31:42 2009
(r197340)
+++ head/sys/netinet/sctp_output.c  Sun Sep 20 11:32:22 2009
(r197341)
@@ -12384,8 +12384,8 @@ sctp_lower_sosend(struct socket *so,
 
t_inp = inp = (struct sctp_inpcb *)so-so_pcb;
if (inp == NULL) {
-   SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, 
EFAULT);
-   error = EFAULT;
+   SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, 
EINVAL);
+   error = EINVAL;
if (i_pak) {
SCTP_RELEASE_PKT(i_pak);
}
@@ -12432,8 +12432,8 @@ sctp_lower_sosend(struct socket *so,
if ((inp-sctp_flags  SCTP_PCB_FLAGS_TCPTYPE) 
(inp-sctp_socket-so_qlimit)) {
/* The listener can NOT send */
-   SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, 
EFAULT);
-   error = EFAULT;
+   SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, 
ENOTCONN);
+   error = ENOTCONN;
goto out_unlocked;
}
if ((use_rcvinfo)  srcv) {
@@ -12566,8 +12566,8 @@ sctp_lower_sosend(struct socket *so,
if ((inp-sctp_flags  SCTP_PCB_FLAGS_SOCKET_GONE) ||
(inp-sctp_flags  SCTP_PCB_FLAGS_SOCKET_ALLGONE)) {
/* Should I really unlock ? */
-   SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, 
SCTP_FROM_SCTP_OUTPUT, EFAULT);
-   error = EFAULT;
+   SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, 
SCTP_FROM_SCTP_OUTPUT, EINVAL);
+   error = EINVAL;
goto out_unlocked;
 
}
@@ -12596,6 +12596,12 @@ sctp_lower_sosend(struct socket *so,
}
}
if (stcb == NULL) {
+   if ((inp-sctp_flags  SCTP_PCB_FLAGS_TCPTYPE) ||
+   (inp-sctp_flags  SCTP_PCB_FLAGS_IN_TCPPOOL)) {
+   SCTP_LTRACE_ERR_RET(inp, stcb, net, 
SCTP_FROM_SCTP_OUTPUT, ENOTCONN);
+   error = ENOTCONN;
+   goto out_unlocked;
+   }
if (addr == NULL) {
SCTP_LTRACE_ERR_RET(inp, stcb, net, 
SCTP_FROM_SCTP_OUTPUT, ENOENT);
error = ENOENT;
___
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: r197342 - head/sys/netinet

2009-09-20 Thread Michael Tuexen
Author: tuexen
Date: Sun Sep 20 11:33:39 2009
New Revision: 197342
URL: http://svn.freebsd.org/changeset/base/197342

Log:
  Fix handling of sctp_drain().
  
  Approved by: rrs (mentor)
  MFC after: 2 month

Modified:
  head/sys/netinet/sctp_pcb.c

Modified: head/sys/netinet/sctp_pcb.c
==
--- head/sys/netinet/sctp_pcb.c Sun Sep 20 11:32:22 2009(r197341)
+++ head/sys/netinet/sctp_pcb.c Sun Sep 20 11:33:39 2009(r197342)
@@ -6585,17 +6585,20 @@ sctp_drain()
 * occur. We really hope this does NOT happen!
 */
VNET_ITERATOR_DECL(vnet_iter);
-
-   SCTP_STAT_INCR(sctps_protocol_drain_calls);
-   if (SCTP_BASE_SYSCTL(sctp_do_drain) == 0) {
-   return;
-   }
VNET_LIST_RLOCK_NOSLEEP();
VNET_FOREACH(vnet_iter) {
CURVNET_SET(vnet_iter);
struct sctp_inpcb *inp;
struct sctp_tcb *stcb;
 
+   SCTP_STAT_INCR(sctps_protocol_drain_calls);
+   if (SCTP_BASE_SYSCTL(sctp_do_drain) == 0) {
+#ifdef VIMAGE
+   continue;
+#else
+   return;
+#endif
+   }
SCTP_INP_INFO_RLOCK();
LIST_FOREACH(inp, SCTP_BASE_INFO(listhead), sctp_list) {
/* For each endpoint */
___
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: r197343 - in stable/7/sys: . boot/forth conf contrib/pf dev/cas modules modules/cas sparc64/conf

2009-09-20 Thread Marius Strobl
Author: marius
Date: Sun Sep 20 12:08:29 2009
New Revision: 197343
URL: http://svn.freebsd.org/changeset/base/197343

Log:
  MFC: 194246, 194904, 194973
  
  Add cas(4), a driver for Sun Cassini/Cassini+ and National Semiconductor
  DP83065 Saturn Gigabit Ethernet controllers. These are the successors
  of the Sun GEM controllers and still have a similar but extended transmit
  logic. As such this driver is based on gem(4).
  Thanks to marcel@ for providing a Sun Quad GigaSwift Ethernet UTP (QGE)
  card which was vital for getting this driver to work on architectures
  not using Open Firmware.

Added:
  stable/7/sys/dev/cas/
 - copied from r194246, head/sys/dev/cas/
  stable/7/sys/modules/cas/
 - copied from r194246, head/sys/modules/cas/
Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/boot/forth/loader.conf
  stable/7/sys/conf/NOTES
  stable/7/sys/conf/files
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/cas/if_cas.c
  stable/7/sys/dev/cas/if_casvar.h
  stable/7/sys/modules/Makefile
  stable/7/sys/sparc64/conf/GENERIC

Modified: stable/7/sys/boot/forth/loader.conf
==
--- stable/7/sys/boot/forth/loader.conf Sun Sep 20 11:33:39 2009
(r197342)
+++ stable/7/sys/boot/forth/loader.conf Sun Sep 20 12:08:29 2009
(r197343)
@@ -220,6 +220,7 @@ if_axe_load=NO# ASIX Electronics AX8
 if_bce_load=NO   # Broadcom NetXtreme II Gigabit Ethernet
 if_bfe_load=NO   # Broadcom BCM4401
 if_bge_load=NO   # Broadcom BCM570x PCI Gigabit Ethernet
+if_cas_load=NO   # Sun Cassini/Cassini+ and NS DP83065 Saturn
 if_cm_load=NO# SMC (90c26, 90c56, 90c66)
 if_cs_load=NO# Crystal Semiconductor CS8920
 if_cue_load=NO   # CATC USB-EL1210A USB Ethernet

Modified: stable/7/sys/conf/NOTES
==
--- stable/7/sys/conf/NOTES Sun Sep 20 11:33:39 2009(r197342)
+++ stable/7/sys/conf/NOTES Sun Sep 20 12:08:29 2009(r197343)
@@ -1733,6 +1733,7 @@ devicemiibus
 #  BCM570x family of controllers, including the 3Com 3c996-T,
 #  the Netgear GA302T, the SysKonnect SK-9D21 and SK-9D41, and
 #  the embedded gigE NICs on Dell PowerEdge 2550 servers.
+# cas: Sun Cassini/Cassini+ and National Semiconductor DP83065 Saturn
 # cm:  Arcnet SMC COM90c26 / SMC COM90c56
 #  (and SMC COM90c66 in '56 compatibility mode) adapters.
 # cnw:  Xircom CNW/Netware Airsurfer PC Card adapter
@@ -1875,6 +1876,7 @@ deviceale # Atheros 
AR8121/AR8113/AR8
 device bce # Broadcom BCM5706/BCM5708 Gigabit Ethernet
 device bfe # Broadcom BCM440x 10/100 Ethernet
 device bge # Broadcom BCM570xx Gigabit Ethernet
+device cas # Sun Cassini/Cassini+ and NS DP83065 Saturn
 device cxgb# Chelsio T3 10 Gigabit Ethernet
 device dc  # DEC/Intel 21143 and various workalikes
 device et  # Agere ET1310 10/100/Gigabit Ethernet

Modified: stable/7/sys/conf/files
==
--- stable/7/sys/conf/files Sun Sep 20 11:33:39 2009(r197342)
+++ stable/7/sys/conf/files Sun Sep 20 12:08:29 2009(r197343)
@@ -671,6 +671,7 @@ dev/buslogic/bt_pci.c   optional bt pci
 dev/cardbus/cardbus.c  optional cardbus
 dev/cardbus/cardbus_cis.c  optional cardbus
 dev/cardbus/cardbus_device.c   optional cardbus
+dev/cas/if_cas.c   optional cas
 dev/ciss/ciss.coptional ciss
 dev/cm/smc90cx6.c  optional cm
 dev/cmx/cmx.c  optional cmx

Modified: stable/7/sys/dev/cas/if_cas.c
==
--- head/sys/dev/cas/if_cas.c   Mon Jun 15 18:22:41 2009(r194246)
+++ stable/7/sys/dev/cas/if_cas.c   Sun Sep 20 12:08:29 2009
(r197343)
@@ -57,7 +57,7 @@ __FBSDID($FreeBSD$);
 #include sys/rman.h
 #include sys/socket.h
 #include sys/sockio.h
-#include sys/rman.h
+#include sys/taskqueue.h
 
 #include net/bpf.h
 #include net/ethernet.h
@@ -135,7 +135,8 @@ static void cas_free(void *arg1, void* a
 static voidcas_init(void *xsc);
 static voidcas_init_locked(struct cas_softc *sc);
 static voidcas_init_regs(struct cas_softc *sc);
-static voidcas_intr(void *v);
+static int cas_intr(void *v);
+static voidcas_intr_task(void *arg, int pending __unused);
 static int cas_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data);
 static int cas_load_txmbuf(struct cas_softc *sc, struct mbuf **m_head);
 static int cas_mediachange(struct ifnet *ifp);
@@ -159,13 +160,13 @@ static void   cas_rxdma_callback(void *xsc
int 

svn commit: r197344 - in stable/7/sys: . contrib/pf dev/mpt

2009-09-20 Thread Marius Strobl
Author: marius
Date: Sun Sep 20 12:12:36 2009
New Revision: 197344
URL: http://svn.freebsd.org/changeset/base/197344

Log:
  - Remove unused variables. [1]
  - Remove redundant zeroing of tmf_req which Coverity Prevent(tm) complains
about. [2]
  
  Submitted by: Christoph Mallon [1]
  Found with:   Coverity Prevent(tm) [2]
  CID:  2496 [2]

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/mpt/mpt_cam.c

Modified: stable/7/sys/dev/mpt/mpt_cam.c
==
--- stable/7/sys/dev/mpt/mpt_cam.c  Sun Sep 20 12:08:29 2009
(r197343)
+++ stable/7/sys/dev/mpt/mpt_cam.c  Sun Sep 20 12:12:36 2009
(r197344)
@@ -884,11 +884,6 @@ mpt_sata_pass_reply_handler(struct mpt_s
if (req != NULL) {
 
if (reply_frame != NULL) {
-   MSG_SATA_PASSTHROUGH_REQUEST *pass;
-   MSG_SATA_PASSTHROUGH_REPLY *reply;
-
-   pass = (MSG_SATA_PASSTHROUGH_REQUEST *)req-req_vbuf;
-   reply = (MSG_SATA_PASSTHROUGH_REPLY *)reply_frame;
req-IOCStatus = le16toh(reply_frame-IOCStatus);
}
req-state = ~REQ_STATE_QUEUED;
@@ -1063,7 +1058,7 @@ mpt_read_config_info_spi(struct mpt_soft
 static int
 mpt_set_initial_config_spi(struct mpt_softc *mpt)
 {
-   int i, j, pp1val = ((1  mpt-mpt_ini_id)  16) | mpt-mpt_ini_id;
+   int i, pp1val = ((1  mpt-mpt_ini_id)  16) | mpt-mpt_ini_id;
int error;
 
mpt-mpt_disc_enable = 0xff;
@@ -1101,15 +1096,11 @@ mpt_set_initial_config_spi(struct mpt_so
 * all targets back to async/narrow.
 *
 * We skip this step if the BIOS has already negotiated
-* speeds with the targets and does not require us to
-* do Domain Validation.
+* speeds with the targets.
 */
i = mpt-mpt_port_page2.PortSettings 
MPI_SCSIPORTPAGE2_PORT_MASK_NEGO_MASTER_SETTINGS;
-   j = mpt-mpt_port_page2.PortFlags 
-   MPI_SCSIPORTPAGE2_PORT_FLAGS_DV_MASK;
-   if (i == MPI_SCSIPORTPAGE2_PORT_ALL_MASTER_SETTINGS /* 
-   j == MPI_SCSIPORTPAGE2_PORT_FLAGS_OFF_DV */) {
+   if (i == MPI_SCSIPORTPAGE2_PORT_ALL_MASTER_SETTINGS) {
mpt_lprt(mpt, MPT_PRT_NEGOTIATION,
honoring BIOS transfer negotiations\n);
} else {
@@ -2602,7 +2593,6 @@ mpt_scsi_reply_handler(struct mpt_softc 
 {
MSG_SCSI_IO_REQUEST *scsi_req;
union ccb *ccb;
-   target_id_t tgt;
 
if (req-state == REQ_STATE_FREE) {
mpt_prt(mpt, mpt_scsi_reply_handler: req already free\n);
@@ -2617,7 +2607,6 @@ mpt_scsi_reply_handler(struct mpt_softc 
return (TRUE);
}
 
-   tgt = scsi_req-TargetID;
mpt_req_untimeout(req, mpt_timeout, ccb);
ccb-ccb_h.status = ~CAM_SIM_QUEUED;
 
@@ -2971,13 +2960,9 @@ mpt_fc_els_reply_handler(struct mpt_soft
}
if (tgt_req) {
mpt_tgt_state_t *tgt = MPT_TGT_STATE(mpt, tgt_req);
-   uint8_t *vbuf;
union ccb *ccb = tgt-ccb;
uint32_t ct_id;
 
-   vbuf = tgt_req-req_vbuf;
-   vbuf += MPT_RQSL(mpt);
-
/*
 * Check to make sure we have the correct command
 * The reply descriptor in the target state should
@@ -3079,7 +3064,6 @@ mpt_scsi_reply_frame_handler(struct mpt_
MSG_SCSI_IO_REPLY *scsi_io_reply;
u_int ioc_status;
u_int sstate;
-   u_int loginfo;
 
MPT_DUMP_REPLY_FRAME(mpt, reply_frame);
KASSERT(reply_frame-Function == MPI_FUNCTION_SCSI_IO_REQUEST
@@ -3090,7 +3074,6 @@ mpt_scsi_reply_frame_handler(struct mpt_
 
scsi_io_reply = (MSG_SCSI_IO_REPLY *)reply_frame;
ioc_status = le16toh(scsi_io_reply-IOCStatus);
-   loginfo = ioc_status  MPI_IOCSTATUS_FLAG_LOG_INFO_AVAILABLE;
ioc_status = MPI_IOCSTATUS_MASK;
sstate = scsi_io_reply-SCSIState;
 
@@ -4040,16 +4023,11 @@ mpt_scsi_send_tmf(struct mpt_softc *mpt,
memset(tmf_req, 0, sizeof(*tmf_req));
tmf_req-TargetID = target;
tmf_req-Bus = channel;
-   tmf_req-ChainOffset = 0;
tmf_req-Function = MPI_FUNCTION_SCSI_TASK_MGMT;
-   tmf_req-Reserved = 0;
tmf_req-TaskType = type;
-   tmf_req-Reserved1 = 0;
tmf_req-MsgFlags = flags;
tmf_req-MsgContext =
htole32(mpt-tmf_req-index | scsi_tmf_handler_id);
-   memset(tmf_req-LUN, 0,
-   sizeof(tmf_req-LUN) + sizeof(tmf_req-Reserved2));
if (lun  256) {
tmf_req-LUN[0] = 0x40 | ((lun  8)  0x3f);
tmf_req-LUN[1] = lun  0xff;
___
svn-src-all@freebsd.org mailing list

svn commit: r197345 - stable/7/share/man/man4

2009-09-20 Thread Marius Strobl
Author: marius
Date: Sun Sep 20 12:14:42 2009
New Revision: 197345
URL: http://svn.freebsd.org/changeset/base/197345

Log:
  MFC: r194247
  
  Add a man page for cas(4) and reference it as appropriate.

Added:
  stable/7/share/man/man4/cas.4
 - copied unchanged from r194247, head/share/man/man4/cas.4
Modified:
  stable/7/share/man/man4/   (props changed)
  stable/7/share/man/man4/Makefile
  stable/7/share/man/man4/altq.4
  stable/7/share/man/man4/miibus.4
  stable/7/share/man/man4/vlan.4

Modified: stable/7/share/man/man4/Makefile
==
--- stable/7/share/man/man4/MakefileSun Sep 20 12:12:36 2009
(r197344)
+++ stable/7/share/man/man4/MakefileSun Sep 20 12:14:42 2009
(r197345)
@@ -46,6 +46,7 @@ MAN=  aac.4 \
bt.4 \
cardbus.4 \
carp.4 \
+   cas.4 \
ccd.4 \
cd.4 \
cdce.4 \
@@ -448,6 +449,7 @@ MLINKS+=bfe.4 if_bfe.4
 MLINKS+=bge.4 if_bge.4
 MLINKS+=bktr.4 brooktree.4
 MLINKS+=cnw.4 if_cnw.4
+MLINKS+=cas.4 if_cas.4
 MLINKS+=crypto.4 cryptodev.4
 MLINKS+=cue.4 if_cue.4
 MLINKS+=dc.4 if_dc.4

Modified: stable/7/share/man/man4/altq.4
==
--- stable/7/share/man/man4/altq.4  Sun Sep 20 12:12:36 2009
(r197344)
+++ stable/7/share/man/man4/altq.4  Sun Sep 20 12:14:42 2009
(r197345)
@@ -25,7 +25,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd June 10, 2009
+.Dd June 14, 2009
 .Dt ALTQ 4
 .Os
 .Sh NAME
@@ -126,6 +126,7 @@ They have been applied to the following 
 .Xr bce 4 ,
 .Xr bfe 4 ,
 .Xr bge 4 ,
+.Xr cas 4 ,
 .Xr dc 4 ,
 .Xr de 4 ,
 .Xr ed 4 ,

Copied: stable/7/share/man/man4/cas.4 (from r194247, head/share/man/man4/cas.4)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/7/share/man/man4/cas.4   Sun Sep 20 12:14:42 2009
(r197345, copy of r194247, head/share/man/man4/cas.4)
@@ -0,0 +1,154 @@
+.\
+.\ Copyright (c) 2009 Marius Strobl mar...@freebsd.org
+.\ 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 June 15, 2009
+.Dt CAS 4
+.Os
+.Sh NAME
+.Nm cas
+.Nd Sun Cassini/Cassini+ and National Semiconductor DP83065 Saturn Gigabit 
Ethernet driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd device miibus
+.Cd device cas
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_cas=YES
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the Sun Cassini/Cassini+ and National
+Semiconductor DP83065 Saturn Gigabit Ethernet controllers found
+on-board in Sun UltraSPARC machines and as add-on cards.
+.Pp
+All controllers supported by the
+.Nm
+driver have TCP/UDP checksum offload capability for both receive and
+transmit, support for the reception and transmission of extended frames
+for
+.Xr vlan 4
+and an interrupt coalescing/moderation mechanism as well as a 512-bit
+multicast hash filter.
+.Pp
+The
+.Nm
+driver also supports Jumbo Frames (up to 9022 bytes), which can be
+configured via the interface MTU setting.
+Selecting an MTU larger than 1500 bytes with the
+.Xr ifconfig 8
+utility configures the adapter to receive and transmit Jumbo Frames.
+.Sh HARDWARE
+.Pp
+The chips supported by the
+.Nm
+driver are:
+.Pp
+.Bl -bullet -compact
+.It
+National Semiconductor DP83065 Saturn Gigabit Ethernet
+.It
+Sun Cassini Gigabit Ethernet
+.It
+Sun Cassini+ Gigabit Ethernet
+.El
+.Pp
+The

svn commit: r197346 - stable/7/release/doc/en_US.ISO8859-1/hardware

2009-09-20 Thread Marius Strobl
Author: marius
Date: Sun Sep 20 12:19:21 2009
New Revision: 197346
URL: http://svn.freebsd.org/changeset/base/197346

Log:
  MFC: r194248
  
  Add cas(4).

Modified:
  stable/7/release/doc/en_US.ISO8859-1/hardware/article.sgml   (contents, props 
changed)

Modified: stable/7/release/doc/en_US.ISO8859-1/hardware/article.sgml
==
--- stable/7/release/doc/en_US.ISO8859-1/hardware/article.sgml  Sun Sep 20 
12:14:42 2009(r197345)
+++ stable/7/release/doc/en_US.ISO8859-1/hardware/article.sgml  Sun Sep 20 
12:19:21 2009(r197346)
@@ -699,6 +699,8 @@
 
 hwlist.bge;
 
+hwlist.cas;
+
 hwlist.cdce;
 
 para[arch.amd64;, arch.i386;] Crystal Semiconductor CS89x0-based NICs 
___
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: r197347 - stable/7/usr.sbin/sysinstall

2009-09-20 Thread Marius Strobl
Author: marius
Date: Sun Sep 20 12:24:55 2009
New Revision: 197347
URL: http://svn.freebsd.org/changeset/base/197347

Log:
  MFC: r194249
  
  Add cas(4).

Modified:
  stable/7/usr.sbin/sysinstall/   (props changed)
  stable/7/usr.sbin/sysinstall/devices.c

Modified: stable/7/usr.sbin/sysinstall/devices.c
==
--- stable/7/usr.sbin/sysinstall/devices.c  Sun Sep 20 12:19:21 2009
(r197346)
+++ stable/7/usr.sbin/sysinstall/devices.c  Sun Sep 20 12:24:55 2009
(r197347)
@@ -104,6 +104,7 @@ static struct _devname {
 NETWORK(bce, Broadcom NetXtreme II Gigabit Ethernet card),
 NETWORK(bfe, Broadcom BCM440x PCI Ethernet card),
 NETWORK(bge, Broadcom BCM570x PCI Gigabit Ethernet card),
+NETWORK(cas, Sun Cassini/Cassini+ or NS DP83065 Saturn Ethernet),
 NETWORK(cue, CATC USB Ethernet adapter),
 NETWORK(cxgb,Chelsio T3 10Gb Ethernet card),
 NETWORK(fpa, DEC DEFPA PCI FDDI card),
___
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: r197348 - head/sys/vm

2009-09-20 Thread Konstantin Belousov
Author: kib
Date: Sun Sep 20 12:40:56 2009
New Revision: 197348
URL: http://svn.freebsd.org/changeset/base/197348

Log:
  Old (a.out) rtld attempts to mmap zero-length region, e.g. when bss
  of the linked object is zero-length. More old code assumes that mmap
  of zero length returns success.
  
  For a.out and pre-8 ELF binaries, allow the mmap of zero length.
  
  Reported by:  tegge
  Reviewed by:  tegge, alc, jhb
  MFC after:3 days

Modified:
  head/sys/vm/vm_mmap.c

Modified: head/sys/vm/vm_mmap.c
==
--- head/sys/vm/vm_mmap.c   Sun Sep 20 12:24:55 2009(r197347)
+++ head/sys/vm/vm_mmap.c   Sun Sep 20 12:40:56 2009(r197348)
@@ -64,6 +64,7 @@ __FBSDID($FreeBSD$);
 #include sys/mount.h
 #include sys/conf.h
 #include sys/stat.h
+#include sys/sysent.h
 #include sys/vmmeter.h
 #include sys/sysctl.h
 
@@ -229,7 +230,8 @@ mmap(td, uap)
 
fp = NULL;
/* make sure mapping fits into numeric range etc */
-   if (uap-len == 0 ||
+   if ((uap-len == 0  !SV_CURPROC_FLAG(SV_AOUT) 
+curproc-p_osrel = 800104) ||
((flags  MAP_ANON)  uap-fd != -1))
return (EINVAL);
 
___
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: r197349 - in stable/7/sys: . conf contrib/pf dev/gem modules/gem

2009-09-20 Thread Marius Strobl
Author: marius
Date: Sun Sep 20 12:56:50 2009
New Revision: 197349
URL: http://svn.freebsd.org/changeset/base/197349

Log:
  MFC: r194763, r194886
  
  - Initialize the ifnet structure, especially if_dname, before probing
the PHYs as some PHY drivers use it (but probably shouldn't). How
gem(4) has worked with brgphy(4) on powerpc without this so far is
unclear to me.
  - Call ether_ifdetach(9) before stopping the controller and the
callouts. The consensus is that the latter is now safe to do and
should also solve the problem of active BPF listeners clearing
promiscuous mode can result in the tick callout being restarted
which in turn will trigger a panic once it's actually gone.
  - Introduce a dying flag which is set during detach and checked in
gem_ioctl() in order to prevent active BPF listeners to clear
promiscuous mode which may lead to the tick callout being restarted
which will trigger a panic once it's actually gone.
  - In gem_stop() reset rather than just disable the transmitter and
receiver in order to ensure we're not unloading DMA maps still in
use by the hardware. [1]
  - The blanking time is specified in PCI clocks so we should use twice
the value when operating at 66MHz.
  - Spell some 2 as ETHER_ALIGN and a 19 as GEM_STATUS_TX_COMPLETION_SHFT
to make the actual intentions clear.
  - As we don't unload the peak attempts counter ignore its overflow
interrupts.
  - Remove a stale setting of a variable to GEM_TD_INTERRUPT_ME which
isn't used afterwards.
  - For optimum performance increment the TX kick register in multiples
of 4 if possible as suggested by the documentation.
  - Partially revert r164931; drivers should only clear the watchdog
timer if all outstanding TX descriptors are done.
  - Fix some debugging strings.
  - Add a missing BUS_DMASYNC_POSTWRITE in gem_rint().
  - As the error paths in the interrupt handler are generally unlikely
predict them as false.
  - Add support for the SBus version of the GEM controller. [2]
  - Add some lock assertions.
  - Improve some comments.
  - Fix some more or less cosmetic issues in the code of the PCI front-end.
  - Change some softc members to be unsigned where more appropriate and
remove unused ones.
  
  Obtained from:NetBSD (partially) [2], OpenBSD [1]

Added:
  stable/7/sys/dev/gem/if_gem_sbus.c
 - copied unchanged from r194763, head/sys/dev/gem/if_gem_sbus.c
Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/conf/files
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/gem/if_gem.c
  stable/7/sys/dev/gem/if_gem_pci.c
  stable/7/sys/dev/gem/if_gemreg.h
  stable/7/sys/dev/gem/if_gemvar.h
  stable/7/sys/modules/gem/Makefile

Modified: stable/7/sys/conf/files
==
--- stable/7/sys/conf/files Sun Sep 20 12:40:56 2009(r197348)
+++ stable/7/sys/conf/files Sun Sep 20 12:56:50 2009(r197349)
@@ -841,6 +841,7 @@ dev/flash/at45d.c   optional at45d
 dev/fxp/if_fxp.c   optional fxp
 dev/gem/if_gem.c   optional gem
 dev/gem/if_gem_pci.c   optional gem pci
+dev/gem/if_gem_sbus.c  optional gem sbus
 dev/hatm/if_hatm.c optional hatm pci
 dev/hatm/if_hatm_intr.coptional hatm pci
 dev/hatm/if_hatm_ioctl.c   optional hatm pci

Modified: stable/7/sys/dev/gem/if_gem.c
==
--- stable/7/sys/dev/gem/if_gem.c   Sun Sep 20 12:40:56 2009
(r197348)
+++ stable/7/sys/dev/gem/if_gem.c   Sun Sep 20 12:56:50 2009
(r197349)
@@ -84,7 +84,7 @@ __FBSDID($FreeBSD$);
 CTASSERT(powerof2(GEM_NRXDESC)  GEM_NRXDESC = 32  GEM_NRXDESC = 8192);
 CTASSERT(powerof2(GEM_NTXDESC)  GEM_NTXDESC = 32  GEM_NTXDESC = 8192);
 
-#defineTRIES   1
+#defineGEM_TRIES   1
 
 /*
  * The hardware supports basic TCP/UDP checksum offloading.  However,
@@ -119,7 +119,7 @@ static void gem_rint(struct gem_softc *s
 #ifdef GEM_RINT_TIMEOUT
 static voidgem_rint_timeout(void *arg);
 #endif
-static __inline void gem_rxcksum(struct mbuf *m, uint64_t flags);
+static inline void gem_rxcksum(struct mbuf *m, uint64_t flags);
 static voidgem_rxdrain(struct gem_softc *sc);
 static voidgem_setladrf(struct gem_softc *sc);
 static voidgem_start(struct ifnet *ifp);
@@ -127,6 +127,7 @@ static void gem_start_locked(struct ifne
 static voidgem_stop(struct ifnet *ifp, int disable);
 static voidgem_tick(void *arg);
 static voidgem_tint(struct gem_softc *sc);
+static inline void gem_txkick(struct gem_softc *sc);
 static int gem_watchdog(struct gem_softc *sc);
 
 devclass_t gem_devclass;
@@ -151,9 +152,24 @@ gem_attach(struct gem_softc *sc)
int error, i;
uint32_t v;
 
+   if (bootverbose)
+   device_printf(sc-sc_dev, flags=0x%x\n, sc-sc_flags);
+
+   

svn commit: r197350 - head/sys/dev/acpi_support

2009-09-20 Thread John Baldwin
Author: jhb
Date: Sun Sep 20 13:28:19 2009
New Revision: 197350
URL: http://svn.freebsd.org/changeset/base/197350

Log:
  Re-remove the IBM0057 ID used for PS/2 mouse controllers.  The asl for the
  61p includes the hotkey device as IBM0068 and the mouse as IBM0057 similar
  to other systems.
  
  Submitted by: marius
  MFC after:3 days

Modified:
  head/sys/dev/acpi_support/acpi_ibm.c

Modified: head/sys/dev/acpi_support/acpi_ibm.c
==
--- head/sys/dev/acpi_support/acpi_ibm.cSun Sep 20 12:56:50 2009
(r197349)
+++ head/sys/dev/acpi_support/acpi_ibm.cSun Sep 20 13:28:19 2009
(r197350)
@@ -288,7 +288,7 @@ static devclass_t acpi_ibm_devclass;
 DRIVER_MODULE(acpi_ibm, acpi, acpi_ibm_driver, acpi_ibm_devclass,
  0, 0);
 MODULE_DEPEND(acpi_ibm, acpi, 1, 1, 1);
-static char*ibm_ids[] = {IBM0057, IBM0068, NULL};
+static char*ibm_ids[] = {IBM0068, NULL};
 
 static void
 ibm_led(void *softc, int onoff)
___
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: r197351 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2009-09-20 Thread Pawel Jakub Dawidek
Author: pjd
Date: Sun Sep 20 13:28:29 2009
New Revision: 197351
URL: http://svn.freebsd.org/changeset/base/197351

Log:
  Purge namecache in the same place OpenSolaris does.

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

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Sun Sep 
20 13:28:19 2009(r197350)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Sun Sep 
20 13:28:29 2009(r197351)
@@ -2354,9 +2354,6 @@ zfs_ioc_rollback(zfs_cmd_t *zc)
if (error == 0) {
int resume_err;
 
-#ifdef FREEBSD_NAMECACHE
-   cache_purgevfs(zfsvfs-z_vfs);
-#endif
ASSERT(strcmp(osname, zc-zc_name) == 0);
error = dmu_objset_rollback(os);
resume_err = zfs_resume_fs(zfsvfs, osname, mode);
@@ -2543,9 +2540,6 @@ zfs_ioc_recv(zfs_cmd_t *zc)
if (error == 0) {
int resume_err;
 
-#ifdef FREEBSD_NAMECACHE
-   cache_purgevfs(zfsvfs-z_vfs);
-#endif
error = dmu_recv_end(drc);
resume_err = zfs_resume_fs(zfsvfs, osname, mode);
error = error ? error : resume_err;

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.cSun Sep 
20 13:28:19 2009(r197350)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.cSun Sep 
20 13:28:29 2009(r197351)
@@ -898,6 +898,9 @@ zfsvfs_teardown(zfsvfs_t *zfsvfs, boolea
 * 'z_parent' is self referential for non-snapshots.
 */
(void) dnlc_purge_vfsp(zfsvfs-z_parent-z_vfs, 0);
+#ifdef FREEBSD_NAMECACHE
+   cache_purgevfs(zfsvfs-z_parent-z_vfs);
+#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: r197353 - stable/7/release/doc/en_US.ISO8859-1/hardware

2009-09-20 Thread Marius Strobl
Author: marius
Date: Sun Sep 20 13:47:55 2009
New Revision: 197353
URL: http://svn.freebsd.org/changeset/base/197353

Log:
  Move mergeinfo for r194248 from article.sgml up to its directory.

Modified:
  stable/7/release/doc/en_US.ISO8859-1/hardware/   (props changed)
___
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: r197354 - in stable/6/sys: . conf contrib/pf dev/cxgb sparc64/sbus

2009-09-20 Thread Marius Strobl
Author: marius
Date: Sun Sep 20 13:49:10 2009
New Revision: 197354
URL: http://svn.freebsd.org/changeset/base/197354

Log:
  MFC: r190112 (partial)
  
  - As suggested by OpenSolaris use up-burst-sizes for determining the
supported burst sizes.
  - Add support for 64-bit burst sizes (required for SBus GEM).
  - Take advantage of KOBJMETHOD_END.
  - Add missing const.

Modified:
  stable/6/sys/   (props changed)
  stable/6/sys/conf/   (props changed)
  stable/6/sys/contrib/pf/   (props changed)
  stable/6/sys/dev/cxgb/   (props changed)
  stable/6/sys/sparc64/sbus/sbus.c
  stable/6/sys/sparc64/sbus/sbusvar.h

Modified: stable/6/sys/sparc64/sbus/sbus.c
==
--- stable/6/sys/sparc64/sbus/sbus.cSun Sep 20 13:47:55 2009
(r197353)
+++ stable/6/sys/sparc64/sbus/sbus.cSun Sep 20 13:49:10 2009
(r197354)
@@ -212,7 +212,7 @@ static ofw_bus_get_name_t sbus_get_name;
 static ofw_bus_get_node_t sbus_get_node;
 static ofw_bus_get_type_t sbus_get_type;
 
-static int sbus_inlist(const char *, const char **);
+static int sbus_inlist(const char *, const char *const *);
 static struct sbus_devinfo * sbus_setup_dinfo(struct sbus_softc *sc,
 phandle_t node, char *name);
 static void sbus_destroy_dinfo(struct sbus_devinfo *dinfo);
@@ -233,14 +233,14 @@ static device_method_t sbus_methods[] = 
DEVMETHOD(bus_print_child,  sbus_print_child),
DEVMETHOD(bus_probe_nomatch,sbus_probe_nomatch),
DEVMETHOD(bus_read_ivar,sbus_read_ivar),
-   DEVMETHOD(bus_setup_intr,   sbus_setup_intr),
-   DEVMETHOD(bus_teardown_intr,sbus_teardown_intr),
DEVMETHOD(bus_alloc_resource,   sbus_alloc_resource),
DEVMETHOD(bus_activate_resource,sbus_activate_resource),
DEVMETHOD(bus_deactivate_resource,  sbus_deactivate_resource),
DEVMETHOD(bus_release_resource, sbus_release_resource),
-   DEVMETHOD(bus_get_resource_list, sbus_get_resource_list),
+   DEVMETHOD(bus_setup_intr,   sbus_setup_intr),
+   DEVMETHOD(bus_teardown_intr,sbus_teardown_intr),
DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource),
+   DEVMETHOD(bus_get_resource_list, sbus_get_resource_list),
 
/* ofw_bus interface */
DEVMETHOD(ofw_bus_get_compat,   sbus_get_compat),
@@ -249,7 +249,7 @@ static device_method_t sbus_methods[] = 
DEVMETHOD(ofw_bus_get_node, sbus_get_node),
DEVMETHOD(ofw_bus_get_type, sbus_get_type),
 
-   { 0, 0 }
+   KOBJMETHOD_END
 };
 
 static driver_t sbus_driver = {
@@ -266,14 +266,14 @@ MODULE_VERSION(sbus, 1);
 #defineOFW_SBUS_TYPE   sbus
 #defineOFW_SBUS_NAME   sbus
 
-static const char *sbus_order_first[] = {
+static const char *const sbus_order_first[] = {
auxio,
dma,
NULL
 };
 
 static int
-sbus_inlist(const char *name, const char **list)
+sbus_inlist(const char *name, const char *const *list)
 {
int i;
 
@@ -388,11 +388,12 @@ sbus_attach(device_t dev)
 
/*
 * Get the SBus burst transfer size if burst transfers are supported.
-* XXX: is the default correct?
 */
-   if (OF_getprop(node, burst-sizes, sc-sc_burst,
+   if (OF_getprop(node, up-burst-sizes, sc-sc_burst,
sizeof(sc-sc_burst)) == -1 || sc-sc_burst == 0)
-   sc-sc_burst = SBUS_BURST_DEF;
+   sc-sc_burst =
+   (SBUS_BURST64_DEF  SBUS_BURST64_SHIFT) | SBUS_BURST_DEF;
+
 
/* initalise the IOMMU */
 
@@ -849,8 +850,8 @@ sbus_activate_resource(device_t bus, dev
}
if (type == SYS_RES_MEMORY) {
/*
-* Need to memory-map the device space, as some drivers depend
-* on the virtual address being set and useable.
+* Need to memory-map the device space, as some drivers
+* depend on the virtual address being set and usable.
 */
error = sparc64_bus_mem_map(rman_get_bustag(r),
rman_get_bushandle(r), rman_get_size(r), 0, 0, p);

Modified: stable/6/sys/sparc64/sbus/sbusvar.h
==
--- stable/6/sys/sparc64/sbus/sbusvar.h Sun Sep 20 13:47:55 2009
(r197353)
+++ stable/6/sys/sparc64/sbus/sbusvar.h Sun Sep 20 13:49:10 2009
(r197354)
@@ -77,7 +77,7 @@
  */
 
 #ifndef _SPARC64_SBUS_SBUSVAR_H_
-#define _SPARC64_SBUS_SBUSVAR_H_
+#define_SPARC64_SBUS_SBUSVAR_H_
 
 /*
  * Macros for probe order
@@ -88,18 +88,24 @@
 /*
  * PROM-reported DMA burst sizes for the SBus
  */
-#define SBUS_BURST_1   0x1
-#define SBUS_BURST_2   0x2
-#define SBUS_BURST_4   0x4
-#define SBUS_BURST_8   0x8
-#define SBUS_BURST_16  0x10
-#define SBUS_BURST_32  0x20
-#define SBUS_BURST_64  0x40
+#defineSBUS_BURST_1(1  0)
+#defineSBUS_BURST_2(1  1)
+#define  

svn commit: r197355 - in stable/6/sys: . conf contrib/pf dev/cxgb dev/gem modules/gem

2009-09-20 Thread Marius Strobl
Author: marius
Date: Sun Sep 20 13:54:27 2009
New Revision: 197355
URL: http://svn.freebsd.org/changeset/base/197355

Log:
  MFC: r194763, r194886
  
  - Initialize the ifnet structure, especially if_dname, before probing
the PHYs as some PHY drivers use it (but probably shouldn't). How
gem(4) has worked with brgphy(4) on powerpc without this so far is
unclear to me.
  - Call ether_ifdetach(9) before stopping the controller and the
callouts. The consensus is that the latter is now safe to do and
should also solve the problem of active BPF listeners clearing
promiscuous mode can result in the tick callout being restarted
which in turn will trigger a panic once it's actually gone.
  - Introduce a dying flag which is set during detach and checked in
gem_ioctl() in order to prevent active BPF listeners to clear
promiscuous mode which may lead to the tick callout being restarted
which will trigger a panic once it's actually gone.
  - In gem_stop() reset rather than just disable the transmitter and
receiver in order to ensure we're not unloading DMA maps still in
use by the hardware. [1]
  - The blanking time is specified in PCI clocks so we should use twice
the value when operating at 66MHz.
  - Spell some 2 as ETHER_ALIGN and a 19 as GEM_STATUS_TX_COMPLETION_SHFT
to make the actual intentions clear.
  - As we don't unload the peak attempts counter ignore its overflow
interrupts.
  - Remove a stale setting of a variable to GEM_TD_INTERRUPT_ME which
isn't used afterwards.
  - For optimum performance increment the TX kick register in multiples
of 4 if possible as suggested by the documentation.
  - Partially revert r164931; drivers should only clear the watchdog
timer if all outstanding TX descriptors are done.
  - Fix some debugging strings.
  - Add a missing BUS_DMASYNC_POSTWRITE in gem_rint().
  - As the error paths in the interrupt handler are generally unlikely
predict them as false.
  - Add support for the SBus version of the GEM controller. [2]
  - Add some lock assertions.
  - Improve some comments.
  - Fix some more or less cosmetic issues in the code of the PCI front-end.
  - Change some softc members to be unsigned where more appropriate and
remove unused ones.
  
  Obtained from:NetBSD (partially) [2], OpenBSD [1]

Added:
  stable/6/sys/dev/gem/if_gem_sbus.c
 - copied unchanged from r194763, head/sys/dev/gem/if_gem_sbus.c
Modified:
  stable/6/sys/   (props changed)
  stable/6/sys/conf/   (props changed)
  stable/6/sys/conf/files
  stable/6/sys/contrib/pf/   (props changed)
  stable/6/sys/dev/cxgb/   (props changed)
  stable/6/sys/dev/gem/if_gem.c
  stable/6/sys/dev/gem/if_gem_pci.c
  stable/6/sys/dev/gem/if_gemreg.h
  stable/6/sys/dev/gem/if_gemvar.h
  stable/6/sys/modules/gem/Makefile

Modified: stable/6/sys/conf/files
==
--- stable/6/sys/conf/files Sun Sep 20 13:49:10 2009(r197354)
+++ stable/6/sys/conf/files Sun Sep 20 13:54:27 2009(r197355)
@@ -629,6 +629,7 @@ dev/firewire/sbp_targ.c optional sbp_ta
 dev/fxp/if_fxp.c   optional fxp
 dev/gem/if_gem.c   optional gem
 dev/gem/if_gem_pci.c   optional gem pci
+dev/gem/if_gem_sbus.c  optional gem sbus
 dev/harp/if_harp.c optional harp pci
 dev/hatm/if_hatm.c optional hatm pci
 dev/hatm/if_hatm_intr.coptional hatm pci
@@ -2042,4 +2043,4 @@ xdr/xdr_array.c   optional nfslockd
 xdr/xdr_mbuf.c optional nfslockd
 xdr/xdr_mem.c  optional nfslockd
 xdr/xdr_reference.coptional nfslockd
-xdr/xdr_sizeof.c   optional nfslockd
\ No newline at end of file
+xdr/xdr_sizeof.c   optional nfslockd

Modified: stable/6/sys/dev/gem/if_gem.c
==
--- stable/6/sys/dev/gem/if_gem.c   Sun Sep 20 13:49:10 2009
(r197354)
+++ stable/6/sys/dev/gem/if_gem.c   Sun Sep 20 13:54:27 2009
(r197355)
@@ -84,7 +84,7 @@ __FBSDID($FreeBSD$);
 CTASSERT(powerof2(GEM_NRXDESC)  GEM_NRXDESC = 32  GEM_NRXDESC = 8192);
 CTASSERT(powerof2(GEM_NTXDESC)  GEM_NTXDESC = 32  GEM_NTXDESC = 8192);
 
-#defineTRIES   1
+#defineGEM_TRIES   1
 
 /*
  * The hardware supports basic TCP/UDP checksum offloading.  However,
@@ -120,7 +120,7 @@ static void gem_rint(struct gem_softc *s
 #ifdef GEM_RINT_TIMEOUT
 static voidgem_rint_timeout(void *arg);
 #endif
-static __inline void gem_rxcksum(struct mbuf *m, uint64_t flags);
+static inline void gem_rxcksum(struct mbuf *m, uint64_t flags);
 static voidgem_rxdrain(struct gem_softc *sc);
 static voidgem_setladrf(struct gem_softc *sc);
 static voidgem_start(struct ifnet *ifp);
@@ -128,6 +128,7 @@ static void gem_start_locked(struct ifne
 static voidgem_stop(struct 

svn commit: r197356 - in head: tools/regression/usr.bin/sed usr.bin/sed

2009-09-20 Thread Diomidis Spinellis
Author: dds
Date: Sun Sep 20 14:11:33 2009
New Revision: 197356
URL: http://svn.freebsd.org/changeset/base/197356

Log:
  Allow [ to be used as a delimiter.
  
  Pointed by:   Marius Strobl
  Obtained from:Apple

Modified:
  head/tools/regression/usr.bin/sed/multitest.t
  head/usr.bin/sed/compile.c

Modified: head/tools/regression/usr.bin/sed/multitest.t
==
--- head/tools/regression/usr.bin/sed/multitest.t   Sun Sep 20 13:54:27 
2009(r197355)
+++ head/tools/regression/usr.bin/sed/multitest.t   Sun Sep 20 14:11:33 
2009(r197356)
@@ -432,6 +432,15 @@ u2/g' lines1
# POSIX does not say that this should work,
# but it does for GNU, BSD, and SunOS
mark '8.17' ; $SED -e 's/[/]/Q/' lines1
+
+   COMMENT='[ as an s delimiter and its escapes'
+   mark '8.18' ; $SED -e 's[_[X[' lines1
+   # This is a matter of interpretation
+   # POSIX 1003.1, 2004 says Within the BRE and the replacement,
+   # the BRE delimiter itself can be used as a *literal* character
+   # if it is preceded by a backslash
+   mark '8.19' ; sed 's/l/[/' lines1 | $SED -e 's[\[.[X['
+   mark '8.20' ; sed 's/l/[/' lines1 | $SED -e 's[\[.[X\[['
 }
 
 test_error()

Modified: head/usr.bin/sed/compile.c
==
--- head/usr.bin/sed/compile.c  Sun Sep 20 13:54:27 2009(r197355)
+++ head/usr.bin/sed/compile.c  Sun Sep 20 14:11:33 2009(r197356)
@@ -387,7 +387,7 @@ compile_delimited(char *p, char *d)
errx(1, %lu: %s: newline can not be used as a string 
delimiter,
linenum, fname);
while (*p) {
-   if (*p == '[') {
+   if (*p == '['  *p != c) {
if ((d = compile_ccl(p, d)) == NULL)
errx(1, %lu: %s: unbalanced brackets ([]), 
linenum, fname);
continue;
___
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: r197357 - head/tools/regression/usr.bin/sed

2009-09-20 Thread Diomidis Spinellis
Author: dds
Date: Sun Sep 20 14:20:00 2009
New Revision: 197357
URL: http://svn.freebsd.org/changeset/base/197357

Log:
  Describe how other systems treat this case.

Modified:
  head/tools/regression/usr.bin/sed/multitest.t

Modified: head/tools/regression/usr.bin/sed/multitest.t
==
--- head/tools/regression/usr.bin/sed/multitest.t   Sun Sep 20 14:11:33 
2009(r197356)
+++ head/tools/regression/usr.bin/sed/multitest.t   Sun Sep 20 14:20:00 
2009(r197357)
@@ -438,7 +438,11 @@ u2/g' lines1
# This is a matter of interpretation
# POSIX 1003.1, 2004 says Within the BRE and the replacement,
# the BRE delimiter itself can be used as a *literal* character
-   # if it is preceded by a backslash
+   # if it is preceded by a backslash
+   # SunOS 5.1 /usr/bin/sed and Mac OS X follow the literal POSIX
+   # interpretation.
+   # GNU sed version 4.1.5 treats \[ as the beginning of a character
+   # set specification (both with --posix and without).
mark '8.19' ; sed 's/l/[/' lines1 | $SED -e 's[\[.[X['
mark '8.20' ; sed 's/l/[/' lines1 | $SED -e 's[\[.[X\[['
 }
___
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: r197358 - stable/7/share/man/man4

2009-09-20 Thread Marius Strobl
Author: marius
Date: Sun Sep 20 14:26:17 2009
New Revision: 197358
URL: http://svn.freebsd.org/changeset/base/197358

Log:
  MFC: r194764
  
  - Update regarding the support for SBus GEM added in r194763 (MFC'ed
in r197349).
  - Improve the description a bit and add a reference to vlan(4).

Modified:
  stable/7/share/man/man4/   (props changed)
  stable/7/share/man/man4/gem.4

Modified: stable/7/share/man/man4/gem.4
==
--- stable/7/share/man/man4/gem.4   Sun Sep 20 14:20:00 2009
(r197357)
+++ stable/7/share/man/man4/gem.4   Sun Sep 20 14:26:17 2009
(r197358)
@@ -33,7 +33,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd January 15, 2009
+.Dd June 14, 2009
 .Dt GEM 4
 .Os
 .Sh NAME
@@ -57,9 +57,16 @@ if_gem_load=YES
 .Sh DESCRIPTION
 The
 .Nm
-driver provides support for the GMac Ethernet hardware found mostly in
+driver provides support for the GMAC Ethernet hardware found mostly in
 the last Apple PowerBooks G3s and most G4-based Apple hardware, as
-well as many Sun UltraSPARCs.
+well as Sun UltraSPARC machines.
+.Pp
+All controllers supported by the   
+.Nm
+driver have TCP checksum offload capability for both receive and transmit, 
+support for the reception and transmission of extended frames for  
+.Xr vlan 4 
+and a 512-bit multicast hash filter.   
 .Sh HARDWARE
 .Pp
 Chips supported by the
@@ -84,6 +91,9 @@ driver at this time:
 .It
 Sun Gigabit Ethernet PCI 2.0/3.0 (GBE/P)
 (part no.\ 501-4373)
+.It
+Sun Gigabit Ethernet SBus 2.0/3.0 (GBE/S)
+(part no.\ 501-4375)
 .El
 .Sh NOTES
 On sparc64 the
@@ -108,15 +118,11 @@ the system's default MAC address.
 Supported interfaces having their own MAC address include the on-board
 Sun ERI 10/100 Mbps on boards equipped with more than one Ethernet interface
 and the Sun Gigabit Ethernet 2.0/3.0 GBE add-on cards.
-.Sh CAVEATS
-Currently the
-.Nm
-driver fails to attach to Sun Gigabit Ethernet SBus 2.0/3.0 (GBE/S) cards,
-as no SBus front-end has been written so far.
 .Sh SEE ALSO
 .Xr altq 4 ,
 .Xr miibus 4 ,
 .Xr netintro 4 ,
+.Xr vlan 4 ,
 .Xr eeprom 8 ,
 .Xr ifconfig 8
 .Sh HISTORY
@@ -132,9 +138,19 @@ version to include it was
 .An -nosplit
 The
 .Nm
-driver was written by
+driver was written for
+.Nx
+by
 .An Eduardo Horvath
 .Aq e...@netbsd.org .
+It was ported to
+.Fx
+by
+.An Thomas Moestl
+.Aq t...@freebsd.org
+and later on improved by
+.An Marius Strobl
+.Aq ma...@freebsd.org .
 The man page was written by
 .An Thomas Klausner
 .Aq w...@netbsd.org .
___
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: r197359 - stable/6/share/man/man4

2009-09-20 Thread Marius Strobl
Author: marius
Date: Sun Sep 20 14:26:26 2009
New Revision: 197359
URL: http://svn.freebsd.org/changeset/base/197359

Log:
  MFC: r194764
  
  - Update regarding the support for SBus GEM added in r194763 (MFC'ed
in r197355).
  - Improve the description a bit and add a reference to vlan(4).

Modified:
  stable/6/share/man/man4/   (props changed)
  stable/6/share/man/man4/gem.4

Modified: stable/6/share/man/man4/gem.4
==
--- stable/6/share/man/man4/gem.4   Sun Sep 20 14:26:17 2009
(r197358)
+++ stable/6/share/man/man4/gem.4   Sun Sep 20 14:26:26 2009
(r197359)
@@ -33,7 +33,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd January 15, 2009
+.Dd June 14, 2009
 .Dt GEM 4
 .Os
 .Sh NAME
@@ -57,9 +57,16 @@ if_gem_load=YES
 .Sh DESCRIPTION
 The
 .Nm
-driver provides support for the GMac Ethernet hardware found mostly in
+driver provides support for the GMAC Ethernet hardware found mostly in
 the last Apple PowerBooks G3s and most G4-based Apple hardware, as
-well as many Sun UltraSPARCs.
+well as Sun UltraSPARC machines.
+.Pp
+All controllers supported by the   
+.Nm
+driver have TCP checksum offload capability for both receive and transmit, 
+support for the reception and transmission of extended frames for  
+.Xr vlan 4 
+and a 512-bit multicast hash filter.   
 .Sh HARDWARE
 .Pp
 Chips supported by the
@@ -84,6 +91,9 @@ driver at this time:
 .It
 Sun Gigabit Ethernet PCI 2.0/3.0 (GBE/P)
 (part no.\ 501-4373)
+.It
+Sun Gigabit Ethernet SBus 2.0/3.0 (GBE/S)
+(part no.\ 501-4375)
 .El
 .Sh NOTES
 On sparc64 the
@@ -108,15 +118,11 @@ the system's default MAC address.
 Supported interfaces having their own MAC address include the on-board
 Sun ERI 10/100 Mbps on boards equipped with more than one Ethernet interface
 and the Sun Gigabit Ethernet 2.0/3.0 GBE add-on cards.
-.Sh CAVEATS
-Currently the
-.Nm
-driver fails to attach to Sun Gigabit Ethernet SBus 2.0/3.0 (GBE/S) cards,
-as no SBus front-end has been written so far.
 .Sh SEE ALSO
 .Xr altq 4 ,
 .Xr miibus 4 ,
 .Xr netintro 4 ,
+.Xr vlan 4 ,
 .Xr eeprom 8 ,
 .Xr ifconfig 8
 .Sh HISTORY
@@ -132,9 +138,19 @@ version to include it was
 .An -nosplit
 The
 .Nm
-driver was written by
+driver was written for
+.Nx
+by
 .An Eduardo Horvath
 .Aq e...@netbsd.org .
+It was ported to
+.Fx
+by
+.An Thomas Moestl
+.Aq t...@freebsd.org
+and later on improved by
+.An Marius Strobl
+.Aq ma...@freebsd.org .
 The man page was written by
 .An Thomas Klausner
 .Aq w...@netbsd.org .
___
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: r197360 - head/tools/regression/usr.bin/sed/regress.multitest.out

2009-09-20 Thread Diomidis Spinellis
Author: dds
Date: Sun Sep 20 15:04:50 2009
New Revision: 197360
URL: http://svn.freebsd.org/changeset/base/197360

Log:
  Add correct test results.

Added:
  head/tools/regression/usr.bin/sed/regress.multitest.out/8.18   (contents, 
props changed)
  head/tools/regression/usr.bin/sed/regress.multitest.out/8.19   (contents, 
props changed)
  head/tools/regression/usr.bin/sed/regress.multitest.out/8.20   (contents, 
props changed)

Added: head/tools/regression/usr.bin/sed/regress.multitest.out/8.18
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/regression/usr.bin/sed/regress.multitest.out/8.18Sun Sep 
20 15:04:50 2009(r197360)
@@ -0,0 +1,14 @@
+l1X1
+l1X2
+l1X3
+l1X4
+l1X5
+l1X6
+l1X7
+l1X8
+l1X9
+l1X10
+l1X11
+l1X12
+l1X13
+l1X14

Added: head/tools/regression/usr.bin/sed/regress.multitest.out/8.19
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/regression/usr.bin/sed/regress.multitest.out/8.19Sun Sep 
20 15:04:50 2009(r197360)
@@ -0,0 +1,14 @@
+X_1
+X_2
+X_3
+X_4
+X_5
+X_6
+X_7
+X_8
+X_9
+X_10
+X_11
+X_12
+X_13
+X_14

Added: head/tools/regression/usr.bin/sed/regress.multitest.out/8.20
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/regression/usr.bin/sed/regress.multitest.out/8.20Sun Sep 
20 15:04:50 2009(r197360)
@@ -0,0 +1,14 @@
+X[_1
+X[_2
+X[_3
+X[_4
+X[_5
+X[_6
+X[_7
+X[_8
+X[_9
+X[_10
+X[_11
+X[_12
+X[_13
+X[_14
___
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: r197361 - in head: tools/regression/usr.bin/sed tools/regression/usr.bin/sed/regress.multitest.out usr.bin/sed

2009-09-20 Thread Diomidis Spinellis
Author: dds
Date: Sun Sep 20 15:17:40 2009
New Revision: 197361
URL: http://svn.freebsd.org/changeset/base/197361

Log:
  Follow POSIX (IEEE Std 1003.1, 2004 Edition) in the implementation
  of the y (translate) command.
  
  If a backslash character is immediately followed by a backslash
  character in string1 or string2, the two backslash characters shall
  be counted as a single literal backslash character
  
  Pointed by:   Marius Strobl
  Obtained from:Mac OS X

Added:
  head/tools/regression/usr.bin/sed/regress.multitest.out/8.21   (contents, 
props changed)
Modified:
  head/tools/regression/usr.bin/sed/multitest.t
  head/usr.bin/sed/compile.c

Modified: head/tools/regression/usr.bin/sed/multitest.t
==
--- head/tools/regression/usr.bin/sed/multitest.t   Sun Sep 20 15:04:50 
2009(r197360)
+++ head/tools/regression/usr.bin/sed/multitest.t   Sun Sep 20 15:17:40 
2009(r197361)
@@ -445,6 +445,10 @@ u2/g' lines1
# set specification (both with --posix and without).
mark '8.19' ; sed 's/l/[/' lines1 | $SED -e 's[\[.[X['
mark '8.20' ; sed 's/l/[/' lines1 | $SED -e 's[\[.[X\[['
+   COMMENT='\ in y command'
+   mark '8.21'
+   echo 'a\b(c' |
+   $SED 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, 
/\\()%abcdefghijklmnopqrstuvwxyz,--%'
 }
 
 test_error()

Added: head/tools/regression/usr.bin/sed/regress.multitest.out/8.21
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/regression/usr.bin/sed/regress.multitest.out/8.21Sun Sep 
20 15:17:40 2009(r197361)
@@ -0,0 +1 @@
+a-b-c

Modified: head/usr.bin/sed/compile.c
==
--- head/usr.bin/sed/compile.c  Sun Sep 20 15:04:50 2009(r197360)
+++ head/usr.bin/sed/compile.c  Sun Sep 20 15:17:40 2009(r197361)
@@ -66,7 +66,7 @@ static struct labhash {
 
 static char *compile_addr(char *, struct s_addr *);
 static char *compile_ccl(char **, char *);
-static char *compile_delimited(char *, char *);
+static char *compile_delimited(char *, char *, int);
 static char *compile_flags(char *, struct s_subst *);
 static regex_t  *compile_re(char *, int);
 static char *compile_subst(char *, struct s_subst *);
@@ -320,7 +320,7 @@ nonsel: /* Now parse the command */
linenum, fname);
if ((cmd-u.s = calloc(1, sizeof(struct s_subst))) == 
NULL)
err(1, malloc);
-   p = compile_delimited(p, re);
+   p = compile_delimited(p, re, 0);
if (p == NULL)
errx(1,
%lu: %s: unterminated substitute pattern, 
linenum, fname);
@@ -373,7 +373,7 @@ nonsel: /* Now parse the command */
  * with the processed string.
  */
 static char *
-compile_delimited(char *p, char *d)
+compile_delimited(char *p, char *d, int is_tr)
 {
char c;
 
@@ -399,9 +399,12 @@ compile_delimited(char *p, char *d)
*d++ = '\n';
p += 2;
continue;
-   } else if (*p == '\\'  p[1] == '\\')
-   *d++ = *p++;
-   else if (*p == c) {
+   } else if (*p == '\\'  p[1] == '\\') {
+   if (is_tr)
+   p++;
+   else
+   *d++ = *p++;
+   } else if (*p == c) {
*d = '\0';
return (p + 1);
}
@@ -654,11 +657,11 @@ compile_tr(char *p, struct s_tr **py)
errx(1,
%lu: %s: transform pattern can not be delimited by newline or 
backslash,
linenum, fname);
-   p = compile_delimited(p, old);
+   p = compile_delimited(p, old, 1);
if (p == NULL)
errx(1, %lu: %s: unterminated transform source string,
linenum, fname);
-   p = compile_delimited(p - 1, new);
+   p = compile_delimited(p - 1, new, 1);
if (p == NULL)
errx(1, %lu: %s: unterminated transform target string,
linenum, fname);
@@ -781,7 +784,7 @@ compile_addr(char *p, struct s_addr *a)
++p;
/* FALLTHROUGH */
case '/':   /* Context address */
-   p = compile_delimited(p, re);
+   p = compile_delimited(p, re, 0);
if (p == NULL)
errx(1, %lu: %s: unterminated regular expression, 
linenum, fname);
/* Check for case insensitive regexp flag */

Re: svn commit: r197348 - head/sys/vm

2009-09-20 Thread Sam Leffler
Konstantin Belousov wrote:
 Author: kib
 Date: Sun Sep 20 12:40:56 2009
 New Revision: 197348
 URL: http://svn.freebsd.org/changeset/base/197348
 
 Log:
   Old (a.out) rtld attempts to mmap zero-length region, e.g. when bss
   of the linked object is zero-length. More old code assumes that mmap
   of zero length returns success.
   
   For a.out and pre-8 ELF binaries, allow the mmap of zero length.
   
   Reported by:tegge
   Reviewed by:tegge, alc, jhb
   MFC after:  3 days
 
 Modified:
   head/sys/vm/vm_mmap.c
 
 Modified: head/sys/vm/vm_mmap.c
 ==
 --- head/sys/vm/vm_mmap.c Sun Sep 20 12:24:55 2009(r197347)
 +++ head/sys/vm/vm_mmap.c Sun Sep 20 12:40:56 2009(r197348)
 @@ -64,6 +64,7 @@ __FBSDID($FreeBSD$);
  #include sys/mount.h
  #include sys/conf.h
  #include sys/stat.h
 +#include sys/sysent.h
  #include sys/vmmeter.h
  #include sys/sysctl.h
  
 @@ -229,7 +230,8 @@ mmap(td, uap)
  
   fp = NULL;
   /* make sure mapping fits into numeric range etc */
 - if (uap-len == 0 ||
 + if ((uap-len == 0  !SV_CURPROC_FLAG(SV_AOUT) 
 +  curproc-p_osrel = 800104) ||
   ((flags  MAP_ANON)  uap-fd != -1))
   return (EINVAL);
  
 
 

This hack needs a comment.

Sam

___
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: r197362 - in head: tools/regression/usr.bin/sed tools/regression/usr.bin/sed/regress.multitest.out usr.bin/sed

2009-09-20 Thread Diomidis Spinellis
Author: dds
Date: Sun Sep 20 15:47:31 2009
New Revision: 197362
URL: http://svn.freebsd.org/changeset/base/197362

Log:
  IEEE Std 1003.1, 2004 Edition states:
  
  The escape sequence '\n' shall match a newline embedded in
  the pattern space.
  
  It is unclear whether this also applies to a \n embedded in a
  character class.  Disable the existing handling of \n in a character
  class following Mac OS X, GNU sed version 4.1.5 with --posix, and
  SunOS 5.10 /usr/bin/sed.
  
  Pointed by:   Marius Strobl
  Obtained from:Mac OS X

Added:
  head/tools/regression/usr.bin/sed/regress.multitest.out/8.22   (contents, 
props changed)
  head/tools/regression/usr.bin/sed/regress.multitest.out/8.23   (contents, 
props changed)
Modified:
  head/tools/regression/usr.bin/sed/multitest.t
  head/usr.bin/sed/compile.c

Modified: head/tools/regression/usr.bin/sed/multitest.t
==
--- head/tools/regression/usr.bin/sed/multitest.t   Sun Sep 20 15:17:40 
2009(r197361)
+++ head/tools/regression/usr.bin/sed/multitest.t   Sun Sep 20 15:47:31 
2009(r197362)
@@ -449,6 +449,9 @@ u2/g' lines1
mark '8.21'
echo 'a\b(c' |
$SED 'y%ABCDEFGHIJKLMNOPQRSTUVWXYZ, 
/\\()%abcdefghijklmnopqrstuvwxyz,--%'
+   COMMENT='\n in a character class and a BRE'
+   mark '8.22' ; (echo 1; echo 2) | $SED -n '1{;N;s/[\n]/X/;p;}'
+   mark '8.23' ; (echo 1; echo 2) | $SED -n '1{;N;s/\n/X/;p;}'
 }
 
 test_error()

Added: head/tools/regression/usr.bin/sed/regress.multitest.out/8.22
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/regression/usr.bin/sed/regress.multitest.out/8.22Sun Sep 
20 15:47:31 2009(r197362)
@@ -0,0 +1,2 @@
+1
+2

Added: head/tools/regression/usr.bin/sed/regress.multitest.out/8.23
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/regression/usr.bin/sed/regress.multitest.out/8.23Sun Sep 
20 15:47:31 2009(r197362)
@@ -0,0 +1 @@
+1X2

Modified: head/usr.bin/sed/compile.c
==
--- head/usr.bin/sed/compile.c  Sun Sep 20 15:17:40 2009(r197361)
+++ head/usr.bin/sed/compile.c  Sun Sep 20 15:47:31 2009(r197362)
@@ -432,8 +432,7 @@ compile_ccl(char **sp, char *t)
for (c = *s; (*t = *s) != ']' || c != d; s++, t++)
if ((c = *s) == '\0')
return NULL;
-   } else if (*s == '\\'  s[1] == 'n')
-   *t = '\n', s++;
+   }
return (*s == ']') ? *sp = ++s, ++t : NULL;
 }
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


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

2009-09-20 Thread Jilles Tjoelker
Author: jilles
Date: Sun Sep 20 16:47:56 2009
New Revision: 197363
URL: http://svn.freebsd.org/changeset/base/197363

Log:
  Update find(1) man page for -L/-delete interaction.
  
  It is a bit unfortunate that the example to delete broken symlinks now uses
  rm(1), but allowing this with -delete would require fixing fts(3) to not
  imply FTS_NOCHDIR if FTS_LOGICAL is given (or hacks in the -delete option).
  
  PR:   bin/90687
  MFC after:2 weeks

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

Modified: head/usr.bin/find/find.1
==
--- head/usr.bin/find/find.1Sun Sep 20 15:47:31 2009(r197362)
+++ head/usr.bin/find/find.1Sun Sep 20 16:47:56 2009(r197363)
@@ -312,6 +312,7 @@ character in its pathname relative to
 .Dq Pa \.
 for security reasons.
 Depth-first traversal processing is implied by this option.
+Following symlinks is incompatible with this option.
 .It Ic -depth
 Always true;
 same as the
@@ -920,7 +921,7 @@ recent than the current time minus one m
 Use the
 .Xr echo 1
 command to print out a list of all the files.
-.It Li find -L /usr/ports/packages -type l -delete
+.It Li find -L /usr/ports/packages -type l -exec rm -- {} +
 Delete all broken symbolic links in
 .Pa /usr/ports/packages .
 .It Li find /usr/src -name CVS -prune -o -depth +6 -print
___
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: r197364 - head/sys/net

2009-09-20 Thread Qing Li
Author: qingli
Date: Sun Sep 20 17:22:19 2009
New Revision: 197364
URL: http://svn.freebsd.org/changeset/base/197364

Log:
  A wrong variable is used when setting up the interface
  address route, which broke source address selection in
  some code paths.
  
  Submitted by: noted by bz
  Reviewed by:  hrs
  MFC after:immediately

Modified:
  head/sys/net/if.c

Modified: head/sys/net/if.c
==
--- head/sys/net/if.c   Sun Sep 20 16:47:56 2009(r197363)
+++ head/sys/net/if.c   Sun Sep 20 17:22:19 2009(r197364)
@@ -1432,9 +1432,9 @@ ifa_add_loopback_route(struct ifaddr *if
if (error == 0  rt != NULL) {
RT_LOCK(rt);
((struct sockaddr_dl *)rt-rt_gateway)-sdl_type  =
-   rt-rt_ifp-if_type;
+   ifa-ifa_ifp-if_type;
((struct sockaddr_dl *)rt-rt_gateway)-sdl_index =
-   rt-rt_ifp-if_index;
+   ifa-ifa_ifp-if_index;
RT_REMREF(rt);
RT_UNLOCK(rt);
} else if (error != 0)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r197365 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci net

2009-09-20 Thread Qing Li
Author: qingli
Date: Sun Sep 20 17:46:56 2009
New Revision: 197365
URL: http://svn.freebsd.org/changeset/base/197365

Log:
  MFC   r197364
  
  A wrong variable is used when setting up the interface
  address route, which broke source address selection in
  some code paths.
  
  Submitted by: noted by bz
  Reviewed by:  hrs
  Approved by:  re (kib)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/net/if.c

Modified: stable/8/sys/net/if.c
==
--- stable/8/sys/net/if.c   Sun Sep 20 17:22:19 2009(r197364)
+++ stable/8/sys/net/if.c   Sun Sep 20 17:46:56 2009(r197365)
@@ -1432,9 +1432,9 @@ ifa_add_loopback_route(struct ifaddr *if
if (error == 0  rt != NULL) {
RT_LOCK(rt);
((struct sockaddr_dl *)rt-rt_gateway)-sdl_type  =
-   rt-rt_ifp-if_type;
+   ifa-ifa_ifp-if_type;
((struct sockaddr_dl *)rt-rt_gateway)-sdl_index =
-   rt-rt_ifp-if_index;
+   ifa-ifa_ifp-if_index;
RT_REMREF(rt);
RT_UNLOCK(rt);
} else if (error != 0)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r197366 - in stable/7/sys: . contrib/pf sparc64/include sparc64/sparc64

2009-09-20 Thread Marius Strobl
Author: marius
Date: Sun Sep 20 18:53:40 2009
New Revision: 197366
URL: http://svn.freebsd.org/changeset/base/197366

Log:
  MFC: r195149 (partial)
  
  - Work around the broken loader behavior of not demapping no longer
used kernel TLB slots when unloading the kernel or modules, which
results in havoc when loading a kernel and modules which take up
less TLB slots afterwards as the unused but locked ones aren't
accounted for in virtual_avail. Eventually this should be fixed
in the loader which isn't straight forward though and the kernel
should be robust against this anyway. [1]
  - Remove the no longer used global msgbuf_phys.
  - Remove the redundant ekva parameter of pmap_bootstrap_alloc().
  - Correct some outdated function names in ktr(9) invocations.
  
  Requested by: jhb [1]

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/sparc64/include/pmap.h
  stable/7/sys/sparc64/sparc64/machdep.c
  stable/7/sys/sparc64/sparc64/pmap.c

Modified: stable/7/sys/sparc64/include/pmap.h
==
--- stable/7/sys/sparc64/include/pmap.h Sun Sep 20 17:46:56 2009
(r197365)
+++ stable/7/sys/sparc64/include/pmap.h Sun Sep 20 18:53:40 2009
(r197366)
@@ -80,7 +80,7 @@ struct pmap {
 #definepmap_page_get_memattr(m)VM_MEMATTR_DEFAULT
 #definepmap_page_set_memattr(m, ma)(void)0
 
-void   pmap_bootstrap(vm_offset_t ekva);
+void   pmap_bootstrap(void);
 vm_paddr_t pmap_kextract(vm_offset_t va);
 void   pmap_kenter(vm_offset_t va, vm_page_t m);
 void   pmap_kremove(vm_offset_t);
@@ -106,8 +106,6 @@ extern  vm_paddr_t phys_avail[];
 extern vm_offset_t virtual_avail;
 extern vm_offset_t virtual_end;
 
-extern vm_paddr_t msgbuf_phys;
-
 #ifdef PMAP_STATS
 
 SYSCTL_DECL(_debug_pmap_stats);

Modified: stable/7/sys/sparc64/sparc64/machdep.c
==
--- stable/7/sys/sparc64/sparc64/machdep.c  Sun Sep 20 17:46:56 2009
(r197365)
+++ stable/7/sys/sparc64/sparc64/machdep.c  Sun Sep 20 18:53:40 2009
(r197366)
@@ -242,6 +242,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_l
char *env;
struct pcpu *pc;
vm_offset_t end;
+   vm_offset_t va;
caddr_t kmdp;
phandle_t child;
phandle_t root;
@@ -360,19 +361,28 @@ sparc64_init(caddr_t mdp, u_long o1, u_l
 * Panic if there is no metadata.  Most likely the kernel was booted
 * directly, instead of through loader(8).
 */
-   if (mdp == NULL || kmdp == NULL) {
-   printf(sparc64_init: no loader metadata.\n
+   if (mdp == NULL || kmdp == NULL || end == 0 ||
+   kernel_tlb_slots == 0 || kernel_tlbs == NULL) {
+   printf(sparc64_init: missing loader metadata.\n
This probably means you are not using loader(8).\n);
panic(sparc64_init);
}
 
/*
-* Sanity check the kernel end, which is important.
-*/
-   if (end == 0) {
-   printf(sparc64_init: warning, kernel end not specified.\n
-   Attempting to continue anyway.\n);
-   end = (vm_offset_t)_end;
+* Work around the broken loader behavior of not demapping no
+* longer used kernel TLB slots when unloading the kernel or
+* modules.
+*/
+   for (va = KERNBASE + (kernel_tlb_slots - 1) * PAGE_SIZE_4M;
+   va = roundup2(end, PAGE_SIZE_4M); va -= PAGE_SIZE_4M) {
+   printf(demapping unused kernel TLB slot (va %#lx - %#lx)\n,
+   va, va + PAGE_SIZE_4M - 1);
+   stxa(TLB_DEMAP_VA(va) | TLB_DEMAP_PRIMARY | TLB_DEMAP_PAGE,
+   ASI_DMMU_DEMAP, 0);
+   stxa(TLB_DEMAP_VA(va) | TLB_DEMAP_PRIMARY | TLB_DEMAP_PAGE,
+   ASI_IMMU_DEMAP, 0);
+   flush(KERNBASE);
+   kernel_tlb_slots--;
}
 
/*
@@ -421,7 +431,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_l
/*
 * Initialize virtual memory and calculate physmem.
 */
-   pmap_bootstrap(end);
+   pmap_bootstrap();
 
/*
 * Initialize tunables.

Modified: stable/7/sys/sparc64/sparc64/pmap.c
==
--- stable/7/sys/sparc64/sparc64/pmap.c Sun Sep 20 17:46:56 2009
(r197365)
+++ stable/7/sys/sparc64/sparc64/pmap.c Sun Sep 20 18:53:40 2009
(r197366)
@@ -119,10 +119,9 @@ __FBSDID($FreeBSD$);
 extern struct mtx sched_lock;
 
 /*
- * Virtual and physical address of message buffer
+ * Virtual address of message buffer
  */
 struct msgbuf *msgbufp;
-vm_paddr_t msgbuf_phys;
 
 /*
  * Map of physical memory reagions
@@ -277,7 +276,7 @@ om_cmp(const void *a, const void *b)
  * Bootstrap the system enough to run with virtual memory.
  */
 void

svn commit: r197367 - in stable/7/sys: . contrib/pf dev/pci sparc64/include

2009-09-20 Thread Marius Strobl
Author: marius
Date: Sun Sep 20 18:59:30 2009
New Revision: 197367
URL: http://svn.freebsd.org/changeset/base/197367

Log:
  MFC: r195808
  
  Add a MD __PCI_BAR_ZERO_VALID which denotes that BARs containing 0
  actually specify valid bases that should be treated just as normal.
  The PCI specifications have no indication that 0 would be a magic value
  indicating a disabled BAR as commonly used on at least amd64 and i386
  but not sparc64. It's unclear what to do in pci_delete_resource()
  instead of writing 0 to a BAR though as there's no (other) way do
  disable individual BARs so its decoding is left enabled in case of
  __PCI_BAR_ZERO_VALID for now.
  
  Approved by:  jhb

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/pci/pci.c
  stable/7/sys/sparc64/include/param.h

Modified: stable/7/sys/dev/pci/pci.c
==
--- stable/7/sys/dev/pci/pci.c  Sun Sep 20 18:53:40 2009(r197366)
+++ stable/7/sys/dev/pci/pci.c  Sun Sep 20 18:59:30 2009(r197367)
@@ -2337,7 +2337,7 @@ pci_add_map(device_t bus, device_t dev, 
 {
pci_addr_t base, map, testval;
pci_addr_t start, end, count;
-   int barlen, maprange, mapsize, type;
+   int barlen, basezero, maprange, mapsize, type;
uint16_t cmd;
struct resource *res;
 
@@ -2350,6 +2350,11 @@ pci_add_map(device_t bus, device_t dev, 
type = SYS_RES_IOPORT;
mapsize = pci_mapsize(testval);
base = pci_mapbase(map);
+#ifdef __PCI_BAR_ZERO_VALID
+   basezero = 0;
+#else
+   basezero = base == 0;
+#endif
maprange = pci_maprange(map);
barlen = maprange == 64 ? 2 : 1;
 
@@ -2378,17 +2383,17 @@ pci_add_map(device_t bus, device_t dev, 
}
 
/*
-* If base is 0, then we have problems.  It is best to ignore
-* such entries for the moment.  These will be allocated later if
-* the driver specifically requests them.  However, some
-* removable busses look better when all resources are allocated,
-* so allow '0' to be overriden.
+* If base is 0, then we have problems if this architecture does
+* not allow that.  It is best to ignore such entries for the
+* moment.  These will be allocated later if the driver specifically
+* requests them.  However, some removable busses look better when
+* all resources are allocated, so allow '0' to be overriden.
 *
 * Similarly treat maps whose values is the same as the test value
 * read back.  These maps have had all f's written to them by the
 * BIOS in an attempt to disable the resources.
 */
-   if (!force  (base == 0 || map == testval))
+   if (!force  (basezero || map == testval))
return (barlen);
if ((u_long)base != base) {
device_printf(bus,
@@ -2425,7 +2430,7 @@ pci_add_map(device_t bus, device_t dev, 
}
 
count = 1  mapsize;
-   if (base == 0 || base == pci_mapbase(testval)) {
+   if (basezero || base == pci_mapbase(testval)) {
start = 0;  /* Let the parent decide. */
end = ~0ULL;
} else {
@@ -3669,6 +3674,7 @@ pci_delete_resource(device_t dev, device
return;
}
 
+#ifndef __PCI_BAR_ZERO_VALID
/*
 * If this is a BAR, clear the BAR so it stops
 * decoding before releasing the resource.
@@ -3679,6 +3685,7 @@ pci_delete_resource(device_t dev, device
pci_write_bar(child, rid, 0);
break;
}
+#endif
bus_release_resource(dev, type, rid, rle-res);
}
resource_list_delete(rl, type, rid);

Modified: stable/7/sys/sparc64/include/param.h
==
--- stable/7/sys/sparc64/include/param.hSun Sep 20 18:53:40 2009
(r197366)
+++ stable/7/sys/sparc64/include/param.hSun Sep 20 18:59:30 2009
(r197367)
@@ -48,6 +48,8 @@
 
 #ifndef _NO_NAMESPACE_POLLUTION
 
+#define __PCI_BAR_ZERO_VALID
+
 #ifndef _MACHINE_PARAM_H_
 #define_MACHINE_PARAM_H_
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r197368 - head/release/doc/en_US.ISO8859-1/hardware

2009-09-20 Thread Marius Strobl
Author: marius
Date: Sun Sep 20 19:14:34 2009
New Revision: 197368
URL: http://svn.freebsd.org/changeset/base/197368

Log:
  - Update the list of known-working machines based on feedback for 7.2.
  - Update the V440 entry regarding added support for the on-board NICs
in 8.0.
  
  Approved by:  blackend
  MFC after:3 days

Modified:
  head/release/doc/en_US.ISO8859-1/hardware/article.sgml

Modified: head/release/doc/en_US.ISO8859-1/hardware/article.sgml
==
--- head/release/doc/en_US.ISO8859-1/hardware/article.sgml  Sun Sep 20 
18:59:30 2009(r197367)
+++ head/release/doc/en_US.ISO8859-1/hardware/article.sgml  Sun Sep 20 
19:14:34 2009(r197368)
@@ -503,6 +503,10 @@
/listitem
 
listitem
+ parasun.blade; 2500/para
+   /listitem
+
+   listitem
  parasun.fire; 280R/para
/listitem
 
@@ -511,7 +515,12 @@
/listitem
 
listitem
- parasun.fire; V440 (except for the on-board NICs)/para
+ parasun.fire; V250/para
+   /listitem
+
+   listitem
+ parasun.fire; V440 (support for the on-board NICs first
+   appeared in 8.0-RELEASE)/para
/listitem
 
listitem
___
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: r197370 - in stable/6/sys: . conf contrib/pf dev/cxgb sparc64/include sparc64/sparc64

2009-09-20 Thread Marius Strobl
Author: marius
Date: Sun Sep 20 19:32:10 2009
New Revision: 197370
URL: http://svn.freebsd.org/changeset/base/197370

Log:
  MFC: r195149 (partial)
  
  - Work around the broken loader behavior of not demapping no longer
used kernel TLB slots when unloading the kernel or modules, which
results in havoc when loading a kernel and modules which take up
less TLB slots afterwards as the unused but locked ones aren't
accounted for in virtual_avail. Eventually this should be fixed
in the loader which isn't straight forward though and the kernel
should be robust against this anyway. [1]
  - Remove the no longer used global msgbuf_phys.
  - Remove the redundant ekva parameter of pmap_bootstrap_alloc().
  - Correct some outdated function names in ktr(9) invocations.
  
  Requested by: jhb [1]

Modified:
  stable/6/sys/   (props changed)
  stable/6/sys/conf/   (props changed)
  stable/6/sys/contrib/pf/   (props changed)
  stable/6/sys/dev/cxgb/   (props changed)
  stable/6/sys/sparc64/include/pmap.h
  stable/6/sys/sparc64/sparc64/machdep.c
  stable/6/sys/sparc64/sparc64/pmap.c

Modified: stable/6/sys/sparc64/include/pmap.h
==
--- stable/6/sys/sparc64/include/pmap.h Sun Sep 20 19:26:04 2009
(r197369)
+++ stable/6/sys/sparc64/include/pmap.h Sun Sep 20 19:32:10 2009
(r197370)
@@ -77,7 +77,7 @@ struct pmap {
 #definePMAP_TRYLOCK(pmap)  mtx_trylock((pmap)-pm_mtx)
 #definePMAP_UNLOCK(pmap)   mtx_unlock((pmap)-pm_mtx)
 
-void   pmap_bootstrap(vm_offset_t ekva);
+void   pmap_bootstrap(void);
 vm_paddr_t pmap_kextract(vm_offset_t va);
 void   pmap_kenter(vm_offset_t va, vm_page_t m);
 void   pmap_kremove(vm_offset_t);
@@ -105,8 +105,6 @@ extern  vm_paddr_t phys_avail[];
 extern vm_offset_t virtual_avail;
 extern vm_offset_t virtual_end;
 
-extern vm_paddr_t msgbuf_phys;
-
 #ifdef PMAP_STATS
 
 SYSCTL_DECL(_debug_pmap_stats);

Modified: stable/6/sys/sparc64/sparc64/machdep.c
==
--- stable/6/sys/sparc64/sparc64/machdep.c  Sun Sep 20 19:26:04 2009
(r197369)
+++ stable/6/sys/sparc64/sparc64/machdep.c  Sun Sep 20 19:32:10 2009
(r197370)
@@ -275,6 +275,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_l
char *env;
struct pcpu *pc;
vm_offset_t end;
+   vm_offset_t va;
caddr_t kmdp;
phandle_t child;
phandle_t root;
@@ -338,19 +339,28 @@ sparc64_init(caddr_t mdp, u_long o1, u_l
 * Panic if there is no metadata.  Most likely the kernel was booted
 * directly, instead of through loader(8).
 */
-   if (mdp == NULL || kmdp == NULL) {
-   printf(sparc64_init: no loader metadata.\n
+   if (mdp == NULL || kmdp == NULL || end == 0 ||
+   kernel_tlb_slots == 0 || kernel_tlbs == NULL) {
+   printf(sparc64_init: missing loader metadata.\n
This probably means you are not using loader(8).\n);
panic(sparc64_init);
}
 
/*
-* Sanity check the kernel end, which is important.
-*/
-   if (end == 0) {
-   printf(sparc64_init: warning, kernel end not specified.\n
-   Attempting to continue anyway.\n);
-   end = (vm_offset_t)_end;
+* Work around the broken loader behavior of not demapping no
+* longer used kernel TLB slots when unloading the kernel or
+* modules.
+*/
+   for (va = KERNBASE + (kernel_tlb_slots - 1) * PAGE_SIZE_4M;
+   va = roundup2(end, PAGE_SIZE_4M); va -= PAGE_SIZE_4M) {
+   printf(demapping unused kernel TLB slot (va %#lx - %#lx)\n,
+   va, va + PAGE_SIZE_4M - 1);
+   stxa(TLB_DEMAP_VA(va) | TLB_DEMAP_PRIMARY | TLB_DEMAP_PAGE,
+   ASI_DMMU_DEMAP, 0);
+   stxa(TLB_DEMAP_VA(va) | TLB_DEMAP_PRIMARY | TLB_DEMAP_PAGE,
+   ASI_IMMU_DEMAP, 0);
+   flush(KERNBASE);
+   kernel_tlb_slots--;
}
 
cache_init(child);
@@ -371,7 +381,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_l
/*
 * Initialize virtual memory and calculate physmem.
 */
-   pmap_bootstrap(end);
+   pmap_bootstrap();
 
/*
 * Initialize tunables.

Modified: stable/6/sys/sparc64/sparc64/pmap.c
==
--- stable/6/sys/sparc64/sparc64/pmap.c Sun Sep 20 19:26:04 2009
(r197369)
+++ stable/6/sys/sparc64/sparc64/pmap.c Sun Sep 20 19:32:10 2009
(r197370)
@@ -111,10 +111,9 @@ __FBSDID($FreeBSD$);
 #endif
 
 /*
- * Virtual and physical address of message buffer
+ * Virtual address of message buffer
  */
 struct msgbuf *msgbufp;
-vm_paddr_t msgbuf_phys;
 
 int pmap_pagedaemon_waken;
 
@@ -271,7 +270,7 @@ om_cmp(const void *a, const void *b)
  

Re: svn commit: r197298 - head/sbin/mount_nfs

2009-09-20 Thread Rick Macklem



On Sat, 19 Sep 2009, M. Warner Losh wrote:


:
: Hmm, it might actually be nice to be able to change those at some point
: as well.  I have looked at this in the past and it is quite deeply
: buried in libc. :-/

What's the benefit for forcing a tcp connection for the portmapper
RPCs?  They just happen once at startup...


Someone mentioned an issue w.r.t. umount using UDP, which was basically
a slow timeout when a server didn't handle the UDP call, such as when
it was down. I'd guess that a TCP attempt would fail more quickly than
a UDP attempt when the server doesn't have rpcbind/portmapper running.
(Not so sure when the server has crashed, but I'm guessing that the TCP
connection attempt fails more quickly than the N retries over UDP?)

And what about going through NAT gateways? (I'm not familiar with how
typical NAT gateways are set up, but do they all forward UDP ok?)

I suspect others would know more about the tradeoffs? rick


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

2009-09-20 Thread Jilles Tjoelker
Author: jilles
Date: Sun Sep 20 21:42:38 2009
New Revision: 197371
URL: http://svn.freebsd.org/changeset/base/197371

Log:
  Mention that NUL characters are not allowed in sh(1) input.
  
  I do not consider this a bug because POSIX permits it and argument strings
  and environment variables cannot contain '\0' anyway.
  
  PR:   bin/25542
  MFC after:2 weeks

Modified:
  head/bin/sh/sh.1

Modified: head/bin/sh/sh.1
==
--- head/bin/sh/sh.1Sun Sep 20 19:32:10 2009(r197370)
+++ head/bin/sh/sh.1Sun Sep 20 21:42:38 2009(r197371)
@@ -375,6 +375,10 @@ introduces a comment if used at the begi
 The word starting with
 .Ql #
 and the rest of the line are ignored.
+.Pp
+.Tn ASCII
+.Dv NUL
+characters (character code 0) are not allowed in shell input.
 .Ss Quoting
 Quoting is used to remove the special meaning of certain characters
 or words to the shell, such as operators, whitespace, keywords,
___
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: r197298 - head/sbin/mount_nfs

2009-09-20 Thread M. Warner Losh
In message: pine.gso.4.63.0909201722330.22...@muncher.cs.uoguelph.ca
Rick Macklem rmack...@uoguelph.ca writes:
: 
: 
: On Sat, 19 Sep 2009, M. Warner Losh wrote:
: 
:  :
:  : Hmm, it might actually be nice to be able to change those at some point
:  : as well.  I have looked at this in the past and it is quite deeply
:  : buried in libc. :-/
: 
:  What's the benefit for forcing a tcp connection for the portmapper
:  RPCs?  They just happen once at startup...
: 
: Someone mentioned an issue w.r.t. umount using UDP, which was basically
: a slow timeout when a server didn't handle the UDP call, such as when
: it was down. I'd guess that a TCP attempt would fail more quickly than
: a UDP attempt when the server doesn't have rpcbind/portmapper running.
: (Not so sure when the server has crashed, but I'm guessing that the TCP
: connection attempt fails more quickly than the N retries over UDP?)

A server down would have the same timeout issues as a UDP timeout.

: And what about going through NAT gateways? (I'm not familiar with how
: typical NAT gateways are set up, but do they all forward UDP ok?)
: 
: I suspect others would know more about the tradeoffs? rick

I think Sam hit the nail on the head: Its more firewall friendly to be
able to do it...

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: r197298 - head/sbin/mount_nfs

2009-09-20 Thread Rick Macklem



On Sun, 20 Sep 2009, M. Warner Losh wrote:


In message: pine.gso.4.63.0909201722330.22...@muncher.cs.uoguelph.ca
   Rick Macklem rmack...@uoguelph.ca writes:
:
:
: On Sat, 19 Sep 2009, M. Warner Losh wrote:
:
:  :
:  : Hmm, it might actually be nice to be able to change those at some point
:  : as well.  I have looked at this in the past and it is quite deeply
:  : buried in libc. :-/
: 
:  What's the benefit for forcing a tcp connection for the portmapper
:  RPCs?  They just happen once at startup...
: 

Just fyi, I just looked at what the competition does and was a
bit surprised at what I found:

Linux (not really current system):
- starts out talking to Portmapper over TCP and gets a dump of the
  other machine's portmap list, then switches to UDP to get the port#s
  for Mount and NFS, even if tcp was specified on the mount.
- Uses UDP for both Mount and NFS by default, but switches to using
  TCP for both when tcp is specified.
(As noted, this was a rather old Linux system, so I wouldn't be
 surprised if this has changed/is different for other distros.)

Solaris10:
- Always uses UDP for Portmapper and Mount, no matter what is specified
  on the mount command.
- Uses TCP for NFS by default of UDP if proto=udp is specified as a
  mount option.

I was surprised that Solaris10 did this.

I've also noticed that the mntudp option doesn't do what the man
page says it does. The man page indicates that it forces the use of
UDP for Mount, even when TCP is used for NFS (like Solaris10 does
by default). However, the current mount_nfs.c switches to UDP for
both Mount and NFS when mntudp is specified. (It was changed to
that behaviour by r180435.

It would be nice to have it so that a default mount without
udp nor tcp specified doesn't create the unusable mount
point for a server that is UDP only, as reported by the email
to freebsd-stable on Sep. 11 with subject NFS issues on 8.0-BETA4.
r197298 did that, but made it less Solaris10 compatible.

I tend to like being Solaris compatible, but I'm not sure if that
makes sense for this? rick



___
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: r197372 - head/sys/dev/isp

2009-09-20 Thread Matt Jacob
Author: mjacob
Date: Mon Sep 21 01:38:22 2009
New Revision: 197372
URL: http://svn.freebsd.org/changeset/base/197372

Log:
  Remove file unused in freebsd.

Deleted:
  head/sys/dev/isp/isp_tpublic.h
Modified:
  head/sys/dev/isp/isp.c
  head/sys/dev/isp/isp_stds.h
  head/sys/dev/isp/ispmbox.h

Modified: head/sys/dev/isp/isp.c
==
--- head/sys/dev/isp/isp.c  Sun Sep 20 21:42:38 2009(r197371)
+++ head/sys/dev/isp/isp.c  Mon Sep 21 01:38:22 2009(r197372)
@@ -1547,24 +1547,18 @@ isp_fibre_init(ispsoftc_t *isp)
}
 
icbp-icb_maxfrmlen = DEFAULT_FRAMESIZE(isp);
-   if (icbp-icb_maxfrmlen  ICB_MIN_FRMLEN ||
-   icbp-icb_maxfrmlen  ICB_MAX_FRMLEN) {
-   isp_prt(isp, ISP_LOGERR,
-   bad frame length (%d) from NVRAM- using %d,
-   DEFAULT_FRAMESIZE(isp), ICB_DFLT_FRMLEN);
+   if (icbp-icb_maxfrmlen  ICB_MIN_FRMLEN || icbp-icb_maxfrmlen  
ICB_MAX_FRMLEN) {
+   isp_prt(isp, ISP_LOGERR, bad frame length (%d) from NVRAM- 
using %d, DEFAULT_FRAMESIZE(isp), ICB_DFLT_FRMLEN);
icbp-icb_maxfrmlen = ICB_DFLT_FRMLEN;
}
icbp-icb_maxalloc = fcp-isp_maxalloc;
if (icbp-icb_maxalloc  1) {
-   isp_prt(isp, ISP_LOGERR,
-   bad maximum allocation (%d)- using 16, fcp-isp_maxalloc);
+   isp_prt(isp, ISP_LOGERR, bad maximum allocation (%d)- using 
16, fcp-isp_maxalloc);
icbp-icb_maxalloc = 16;
}
icbp-icb_execthrottle = DEFAULT_EXEC_THROTTLE(isp);
if (icbp-icb_execthrottle  1) {
-   isp_prt(isp, ISP_LOGERR,
-   bad execution throttle of %d- using %d,
-   DEFAULT_EXEC_THROTTLE(isp), ICB_DFLT_THROTTLE);
+   isp_prt(isp, ISP_LOGERR, bad execution throttle of %d- using 
%d, DEFAULT_EXEC_THROTTLE(isp), ICB_DFLT_THROTTLE);
icbp-icb_execthrottle = ICB_DFLT_THROTTLE;
}
icbp-icb_retry_delay = fcp-isp_retry_delay;
@@ -1658,18 +1652,18 @@ isp_fibre_init(ispsoftc_t *isp)
 
/*
 * For 22XX  2.1.26  23XX, set some options.
-* XXX: Probably okay for newer 2100 f/w too.
 */
if (ISP_FW_NEWER_THAN(isp, 2, 26, 0)) {
-   /*
-* Turn on LIP F8 async event (1)
-* Turn on generate AE 8013 on all LIP Resets (2)
-* Disable LIP F7 switching (8)
-*/
MBSINIT(mbs, MBOX_SET_FIRMWARE_OPTIONS, MBLOGALL, 0);
-   mbs.param[1] = 0xb;
+   mbs.param[1] = 
IFCOPT1_DISF7SWTCH|IFCOPT1_LIPASYNC|IFCOPT1_LIPF8;
mbs.param[2] = 0;
mbs.param[3] = 0;
+   if (ISP_FW_NEWER_THAN(isp, 3, 16, 0)) {
+   mbs.param[1] |= IFCOPT1_EQFQASYNC|IFCOPT1_CTIO_RETRY;
+   if (fcp-role  ISP_ROLE_TARGET) {
+   mbs.param[3] = IFCOPT3_NOPRLI;
+   }
+   }
isp_mboxcmd(isp, mbs);
if (mbs.param[0] != MBOX_COMMAND_COMPLETE) {
return;
@@ -2093,8 +2087,7 @@ isp_mark_portdb(ispsoftc_t *isp, int cha
  * or via FABRIC LOGIN/FABRIC LOGOUT for other cards.
  */
 static int
-isp_plogx(ispsoftc_t *isp, int chan, uint16_t handle, uint32_t portid,
-int flags, int gs)
+isp_plogx(ispsoftc_t *isp, int chan, uint16_t handle, uint32_t portid, int 
flags, int gs)
 {
mbreg_t mbs;
uint8_t q[QENTRY_LEN];
@@ -2771,15 +2764,21 @@ isp_pdb_sync(ispsoftc_t *isp, int chan)
/*
 * Make sure we're okay for doing this right now.
 */
-   if (fcp-isp_loopstate != LOOP_PDB_RCVD  fcp-isp_loopstate != 
LOOP_FSCAN_DONE  fcp-isp_loopstate != LOOP_LSCAN_DONE) {
-   isp_prt(isp, ISP_LOGWARN, isp_pdb_sync: bad loopstate %d, 
fcp-isp_loopstate);
+   if (fcp-isp_loopstate != LOOP_PDB_RCVD 
+   fcp-isp_loopstate != LOOP_FSCAN_DONE 
+   fcp-isp_loopstate != LOOP_LSCAN_DONE) {
+   isp_prt(isp, ISP_LOGWARN, isp_pdb_sync: bad loopstate %d,
+   fcp-isp_loopstate);
return (-1);
}
 
-   if (fcp-isp_topo == TOPO_FL_PORT || fcp-isp_topo == TOPO_NL_PORT || 
fcp-isp_topo == TOPO_N_PORT) {
+   if (fcp-isp_topo == TOPO_FL_PORT ||
+   fcp-isp_topo == TOPO_NL_PORT ||
+   fcp-isp_topo == TOPO_N_PORT) {
if (fcp-isp_loopstate  LOOP_LSCAN_DONE) {
if (isp_scan_loop(isp, chan) != 0) {
-   isp_prt(isp, ISP_LOGWARN, isp_pdb_sync: 
isp_scan_loop failed);
+   isp_prt(isp, ISP_LOGWARN,
+   isp_pdb_sync: isp_scan_loop failed);
return (-1);
}
}
@@ -2788,13 +2787,15 @@ isp_pdb_sync(ispsoftc_t *isp, 

svn commit: r197373 - head/sys/dev/isp

2009-09-20 Thread Matt Jacob
Author: mjacob
Date: Mon Sep 21 01:41:19 2009
New Revision: 197373
URL: http://svn.freebsd.org/changeset/base/197373

Log:
  (semiforced commit to add comment missed in last delta)
  Add a maximum response length for FCP RSPNS IUs.
  
  Clarify some of the FC option words for setting parameters
  and try and disable automatic PRLI when in target mode- this
  should correct some cases of N-port topologies with 23XX cards
  where we put out an illegal PRLI (in target mode only we're
  not supposed to put out a PRLI).

Modified:
  head/sys/dev/isp/isp.c
  head/sys/dev/isp/isp_stds.h
  head/sys/dev/isp/ispmbox.h

Modified: head/sys/dev/isp/isp.c
==
--- head/sys/dev/isp/isp.c  Mon Sep 21 01:38:22 2009(r197372)
+++ head/sys/dev/isp/isp.c  Mon Sep 21 01:41:19 2009(r197373)
@@ -63,7 +63,6 @@ __FBSDID($FreeBSD$);
 /*
  * General defines
  */
-
 #defineMBOX_DELAY_COUNT100 / 100
 #defineISP_MARK_PORTDB(a, b, c)\
 isp_prt(isp, ISP_LOGSANCFG,\

Modified: head/sys/dev/isp/isp_stds.h
==
--- head/sys/dev/isp/isp_stds.h Mon Sep 21 01:38:22 2009(r197372)
+++ head/sys/dev/isp/isp_stds.h Mon Sep 21 01:41:19 2009(r197373)
@@ -31,7 +31,6 @@
  */
 #ifndef_ISP_STDS_H
 #define_ISP_STDS_H
-
 /*
  * FC Frame Header
  *

Modified: head/sys/dev/isp/ispmbox.h
==
--- head/sys/dev/isp/ispmbox.h  Mon Sep 21 01:38:22 2009(r197372)
+++ head/sys/dev/isp/ispmbox.h  Mon Sep 21 01:41:19 2009(r197373)
@@ -26,6 +26,7 @@
  *  SUCH DAMAGE.
  * 
  */
+
 /*
  * Mailbox and Queue Entry Definitions for for Qlogic ISP SCSI adapters.
  */
___
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: r197298 - head/sbin/mount_nfs

2009-09-20 Thread M. Warner Losh
In message: 200909211216.07249.docon...@gsoft.com.au
Daniel O'Connor docon...@gsoft.com.au writes:
: On Mon, 21 Sep 2009, Rick Macklem wrote:
:  And what about going through NAT gateways? (I'm not familiar with how
:  typical NAT gateways are set up, but do they all forward UDP ok?)
: 
: The thought of doing NFS over the internet boggles my mind :)

One of the early net meltdowns was caused by this, no?

: However all consumer grade routers will NAT UDP properly otherwise 
: people wouldn't be able to play games.

The issue most likely is one of internal firewalls, not external...

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: r197374 - head/lib/libdisk

2009-09-20 Thread Takahashi Yoshihiro
Author: nyan
Date: Mon Sep 21 04:04:02 2009
New Revision: 197374
URL: http://svn.freebsd.org/changeset/base/197374

Log:
  Disable a check on a disk size because it's too strict.  This change is
  to avoid using incorrect geometry.
  
  It seems that this is the same problem in g_part_bsd_read()@g_part_bsd.c.
  
  Reviewed by:  rink
  MFC after:3 days

Modified:
  head/lib/libdisk/change.c

Modified: head/lib/libdisk/change.c
==
--- head/lib/libdisk/change.c   Mon Sep 21 01:41:19 2009(r197373)
+++ head/lib/libdisk/change.c   Mon Sep 21 04:04:02 2009(r197374)
@@ -47,9 +47,11 @@ Sanitize_Bios_Geom(struct disk *disk)
if (disk-bios_sect  63)
sane = 0;
 #endif
+#if 0  /* Disable a check on a disk size.  It's too strict. */
if (disk-bios_cyl * disk-bios_hd * disk-bios_sect !=
disk-chunks-size)
sane = 0;
+#endif
if (sane)
return;
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r197298 - head/sbin/mount_nfs

2009-09-20 Thread Daniel O'Connor
On Mon, 21 Sep 2009, M. Warner Losh wrote:
 In message: 200909211216.07249.docon...@gsoft.com.au

 Daniel O'Connor docon...@gsoft.com.au writes:
 : On Mon, 21 Sep 2009, Rick Macklem wrote:
 :  And what about going through NAT gateways? (I'm not familiar with
 :  how typical NAT gateways are set up, but do they all forward UDP
 :  ok?)
 :
 : The thought of doing NFS over the internet boggles my mind :)

 One of the early net meltdowns was caused by this, no?

Before my time ;)

 : However all consumer grade routers will NAT UDP properly otherwise
 : people wouldn't be able to play games.

 The issue most likely is one of internal firewalls, not external...

Well I wondered if that was what the OP meant but then why would you 
need NAT? Of course that doesn't mean there isn't some crazy internal 
setup that would send sane people running for the hills in horror.

-- 
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
The nice thing about standards is that there
are so many of them to choose from.
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C


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