PERFORCE change 145311 for review
Ed Schouten
ed at FreeBSD.org
Wed Jul 16 09:44:25 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=145311
Change 145311 by ed at ed_dull on 2008/07/16 09:43:26
IFC.
Affected files ...
.. //depot/projects/mpsafetty/ObsoleteFiles.inc#2 integrate
.. //depot/projects/mpsafetty/games/fortune/datfiles/fortunes#2 integrate
.. //depot/projects/mpsafetty/lib/libc/posix1e/acl_support.c#2 integrate
.. //depot/projects/mpsafetty/lib/libc/sys/ktrace.2#2 integrate
.. //depot/projects/mpsafetty/lib/libc/sys/modstat.2#2 integrate
.. //depot/projects/mpsafetty/share/man/man4/Makefile#2 integrate
.. //depot/projects/mpsafetty/share/man/man4/ahc.4#2 integrate
.. //depot/projects/mpsafetty/share/man/man4/et.4#1 branch
.. //depot/projects/mpsafetty/sys/amd64/amd64/busdma_machdep.c#2 integrate
.. //depot/projects/mpsafetty/sys/amd64/amd64/pmap.c#4 integrate
.. //depot/projects/mpsafetty/sys/conf/newvers.sh#2 integrate
.. //depot/projects/mpsafetty/sys/dev/sound/pci/hda/hdac.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/vr/if_vr.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/vr/if_vrreg.h#2 integrate
.. //depot/projects/mpsafetty/sys/i386/i386/busdma_machdep.c#2 integrate
.. //depot/projects/mpsafetty/sys/ia64/ia64/busdma_machdep.c#2 integrate
.. //depot/projects/mpsafetty/sys/kern/subr_stack.c#2 integrate
.. //depot/projects/mpsafetty/sys/libkern/memset.c#2 integrate
.. //depot/projects/mpsafetty/sys/net/bpf.c#2 integrate
.. //depot/projects/mpsafetty/sys/net/if_vlan.c#2 integrate
.. //depot/projects/mpsafetty/sys/netgraph/bluetooth/common/ng_bluetooth.c#3 integrate
.. //depot/projects/mpsafetty/sys/netinet/in_pcb.h#4 integrate
.. //depot/projects/mpsafetty/sys/netinet/ip_carp.c#2 integrate
.. //depot/projects/mpsafetty/sys/netinet/tcp_output.c#2 integrate
.. //depot/projects/mpsafetty/sys/netinet/udp_usrreq.c#4 integrate
.. //depot/projects/mpsafetty/sys/sys/eventhandler.h#2 integrate
.. //depot/projects/mpsafetty/sys/sys/libkern.h#2 integrate
.. //depot/projects/mpsafetty/usr.sbin/cdcontrol/cdcontrol.1#2 integrate
.. //depot/projects/mpsafetty/usr.sbin/cdcontrol/cdcontrol.c#2 integrate
.. //depot/projects/mpsafetty/usr.sbin/extattr/rmextattr.c#2 integrate
Differences ...
==== //depot/projects/mpsafetty/ObsoleteFiles.inc#2 (text+ko) ====
@@ -1,5 +1,5 @@
#
-# $FreeBSD: src/ObsoleteFiles.inc,v 1.151 2008/07/06 20:57:35 marcel Exp $
+# $FreeBSD: src/ObsoleteFiles.inc,v 1.152 2008/07/13 17:17:35 antoine Exp $
#
# This file lists old files (OLD_FILES), libraries (OLD_LIBS) and
# directories (OLD_DIRS) which should get removed at an update. Recently
@@ -57,6 +57,10 @@
# 20080701: wpa_supplicant.conf moved to share/examples/etc/
OLD_FILES+=usr/share/examples/wpa_supplicant/wpa_supplicant.conf
OLD_DIRS+=usr/share/examples/wpa_supplicant
+# 20080614: pecoff image activator removed
+.if ${TARGET_ARCH} == "i386"
+OLD_FILES+=usr/include/machine/pecoff_machdep.h
+.endif
# 20080614: sgtty removed
OLD_FILES+=usr/include/sys/ttychars.h
OLD_FILES+=usr/include/sys/ttydev.h
==== //depot/projects/mpsafetty/games/fortune/datfiles/fortunes#2 (text+ko) ====
@@ -1,5 +1,5 @@
This fortune brought to you by:
-$FreeBSD: src/games/fortune/datfiles/fortunes,v 1.267 2008/07/07 10:04:16 phk Exp $
+$FreeBSD: src/games/fortune/datfiles/fortunes,v 1.268 2008/07/14 18:45:06 phk Exp $
%
=======================================================================
|| ||
@@ -23572,9 +23572,6 @@
I have a very firm grasp on reality! I can reach out and strangle it
any time!
%
-I have a very small mind and must live with it.
- -- Edsger W. Dijkstra
-%
I have a very strange feeling about this...
-- Luke Skywalker
%
@@ -34282,6 +34279,11 @@
My own business always bores me to death; I prefer other people's.
-- Oscar Wilde
%
+My own feelings are perhaps best described by saying that I am
+perfectly aware that there is no Royal Road to Mathematics, in other
+words, that I have only a very small head and must live with it.
+ -- Edsger W. Dijkstra
+%
My own dear love, he is strong and bold
And he cares not what comes after.
His words ring sweet as a chime of gold,
==== //depot/projects/mpsafetty/lib/libc/posix1e/acl_support.c#2 (text+ko) ====
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1999, 2000, 2001 Robert N. M. Watson
+ * Copyright (c) 1999-2001, 2008 Robert N. M. Watson
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/posix1e/acl_support.c,v 1.14 2007/02/26 02:07:02 kientzle Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/posix1e/acl_support.c,v 1.15 2008/07/13 16:37:51 rwatson Exp $");
#include <sys/types.h>
#include "namespace.h"
@@ -138,7 +138,7 @@
{
struct acl *acl_int;
struct acl_entry *entry; /* current entry */
- uid_t obj_uid=-1, obj_gid=-1, highest_uid=0, highest_gid=0;
+ uid_t highest_uid=0, highest_gid=0;
int stage = ACL_USER_OBJ;
int i = 0;
int count_user_obj=0, count_user=0, count_group_obj=0,
@@ -162,7 +162,6 @@
return (EINVAL);
stage = ACL_USER;
count_user_obj++;
- obj_uid = entry->ae_id;
break;
case ACL_USER:
@@ -170,8 +169,6 @@
if (stage > ACL_USER)
return (EINVAL);
stage = ACL_USER;
- if (entry->ae_id == obj_uid)
- return (EINVAL);
if (count_user && (entry->ae_id <= highest_uid))
return (EINVAL);
highest_uid = entry->ae_id;
@@ -185,7 +182,6 @@
return (EINVAL);
stage = ACL_GROUP;
count_group_obj++;
- obj_gid = entry->ae_id;
break;
case ACL_GROUP:
@@ -193,8 +189,6 @@
if (stage > ACL_GROUP)
return (EINVAL);
stage = ACL_GROUP;
- if (entry->ae_id == obj_gid)
- return (EINVAL);
if (count_group && (entry->ae_id <= highest_gid))
return (EINVAL);
highest_gid = entry->ae_id;
==== //depot/projects/mpsafetty/lib/libc/sys/ktrace.2#2 (text+ko) ====
@@ -26,9 +26,9 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)ktrace.2 8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/sys/ktrace.2,v 1.25 2007/01/09 00:28:14 imp Exp $
+.\" $FreeBSD: src/lib/libc/sys/ktrace.2,v 1.26 2008/07/13 13:42:52 remko Exp $
.\"
-.Dd June 4, 1993
+.Dd July 13, 2008
.Dt KTRACE 2
.Os
.Sh NAME
@@ -101,7 +101,7 @@
pid_t ktr_pid; /* process id */
char ktr_comm[MAXCOMLEN+1]; /* command name */
struct timeval ktr_time; /* timestamp */
- caddr_t ktr_buf;
+ intptr_t ktr_tid; /* was ktr_buffer */
};
.Ed
.Pp
@@ -120,8 +120,8 @@
field gives the time (with microsecond resolution)
that the record was generated.
The
-.Va ktr_buf
-is an internal kernel pointer and is not useful.
+.Va ktr_tid
+field holds a threadid.
.Pp
The generic header is followed by
.Va ktr_len
==== //depot/projects/mpsafetty/lib/libc/sys/modstat.2#2 (text+ko) ====
@@ -23,9 +23,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/lib/libc/sys/modstat.2,v 1.11 2007/06/13 19:22:29 brueffer Exp $
+.\" $FreeBSD: src/lib/libc/sys/modstat.2,v 1.12 2008/07/15 10:06:37 danger Exp $
.\"
-.Dd June 13, 2007
+.Dd July 15, 2008
.Dt MODSTAT 2
.Os
.Sh NAME
@@ -55,9 +55,9 @@
};
typedef union modspecific {
int intval;
- u_int u_intval;
+ u_int uintval;
long longval;
- u_long u_longval;
+ u_long ulongval;
} modspecific_t;
.Ed
.Pp
==== //depot/projects/mpsafetty/share/man/man4/Makefile#2 (text+ko) ====
@@ -1,5 +1,5 @@
# @(#)Makefile 8.1 (Berkeley) 6/18/93
-# $FreeBSD: src/share/man/man4/Makefile,v 1.421 2008/07/04 21:24:35 jhb Exp $
+# $FreeBSD: src/share/man/man4/Makefile,v 1.422 2008/07/14 18:15:43 brueffer Exp $
MAN= aac.4 \
acpi.4 \
@@ -77,6 +77,7 @@
en.4 \
enc.4 \
esp.4 \
+ et.4 \
exca.4 \
faith.4 \
fatm.4 \
@@ -451,6 +452,7 @@
MLINKS+=ef.4 if_ef.4
MLINKS+=em.4 if_em.4
MLINKS+=en.4 if_en.4
+MLINKS+=et.4 if_et.4
MLINKS+=faith.4 if_faith.4
MLINKS+=fatm.4 if_fatm.4
MLINKS+=fd.4 stderr.4 \
==== //depot/projects/mpsafetty/share/man/man4/ahc.4#2 (text+ko) ====
@@ -24,9 +24,9 @@
.\" (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: src/share/man/man4/ahc.4,v 1.39 2006/05/20 09:39:28 brueffer Exp $
+.\" $FreeBSD: src/share/man/man4/ahc.4,v 1.40 2008/07/13 13:56:21 remko Exp $
.\"
-.Dd July 4, 2004
+.Dd July 13, 2008
.Dt AHC 4
.Os
.Sh NAME
@@ -264,7 +264,7 @@
.Tn 2915
.It
Adaptec
-.Tn 2920
+.Tn 2920C
.It
Adaptec
.Tn 2930C
==== //depot/projects/mpsafetty/sys/amd64/amd64/busdma_machdep.c#2 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.85 2008/02/12 16:24:30 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.86 2008/07/15 03:34:49 alc Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -480,8 +480,6 @@
mflags = M_NOWAIT;
else
mflags = M_WAITOK;
- if (flags & BUS_DMA_ZERO)
- mflags |= M_ZERO;
/* If we succeed, no mapping/bouncing will be required */
*mapp = NULL;
@@ -489,13 +487,15 @@
if (dmat->segments == NULL) {
dmat->segments = (bus_dma_segment_t *)malloc(
sizeof(bus_dma_segment_t) * dmat->nsegments, M_DEVBUF,
- M_NOWAIT);
+ mflags);
if (dmat->segments == NULL) {
CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d",
__func__, dmat, dmat->flags, ENOMEM);
return (ENOMEM);
}
}
+ if (flags & BUS_DMA_ZERO)
+ mflags |= M_ZERO;
/*
* XXX:
@@ -531,7 +531,7 @@
pmap_change_attr((vm_offset_t)*vaddr, dmat->maxsize,
PAT_UNCACHEABLE);
CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d",
- __func__, dmat, dmat->flags, ENOMEM);
+ __func__, dmat, dmat->flags, 0);
return (0);
}
==== //depot/projects/mpsafetty/sys/amd64/amd64/pmap.c#4 (text+ko) ====
@@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.631 2008/07/12 21:24:42 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.632 2008/07/13 18:19:53 alc Exp $");
/*
* Manages physical address maps.
@@ -1041,17 +1041,25 @@
vm_paddr_t
pmap_kextract(vm_offset_t va)
{
- pd_entry_t *pde;
+ pd_entry_t pde;
vm_paddr_t pa;
if (va >= DMAP_MIN_ADDRESS && va < DMAP_MAX_ADDRESS) {
pa = DMAP_TO_PHYS(va);
} else {
- pde = vtopde(va);
- if (*pde & PG_PS) {
- pa = (*pde & PG_PS_FRAME) | (va & PDRMASK);
+ pde = *vtopde(va);
+ if (pde & PG_PS) {
+ pa = (pde & PG_PS_FRAME) | (va & PDRMASK);
} else {
- pa = *vtopte(va);
+ /*
+ * Beware of a concurrent promotion that changes the
+ * PDE at this point! For example, vtopte() must not
+ * be used to access the PTE because it would use the
+ * new PDE. It is, however, safe to use the old PDE
+ * because the page table page is preserved by the
+ * promotion.
+ */
+ pa = *pmap_pde_to_pte(&pde, va);
pa = (pa & PG_FRAME) | (va & PAGE_MASK);
}
}
==== //depot/projects/mpsafetty/sys/conf/newvers.sh#2 (text+ko) ====
@@ -28,7 +28,7 @@
# SUCH DAMAGE.
#
# @(#)newvers.sh 8.1 (Berkeley) 4/20/94
-# $FreeBSD: src/sys/conf/newvers.sh,v 1.75 2008/06/08 19:46:23 dougb Exp $
+# $FreeBSD: src/sys/conf/newvers.sh,v 1.76 2008/07/13 20:08:38 dougb Exp $
TYPE="FreeBSD"
REVISION="8.0"
@@ -97,7 +97,7 @@
done
if [ -n "$svnversion" -a -d "${SRCDIR}/.svn" ] ; then
- svn=" @`cd $SRCDIR && $svnversion`"
+ svn=" r`cd $SRCDIR && $svnversion`"
else
svn=""
fi
==== //depot/projects/mpsafetty/sys/dev/sound/pci/hda/hdac.c#2 (text+ko) ====
@@ -84,7 +84,7 @@
#define HDA_DRV_TEST_REV "20080420_0052"
#define HDA_WIDGET_PARSER_REV 1
-SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/hda/hdac.c,v 1.54 2008/05/22 09:14:12 kevlo Exp $");
+SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/hda/hdac.c,v 1.55 2008/07/15 02:34:44 delphij Exp $");
#define HDA_BOOTVERBOSE(stmt) do { \
if (bootverbose != 0 || snd_verbose > 3) { \
@@ -193,6 +193,7 @@
/* Dell */
#define DELL_VENDORID 0x1028
+#define DELL_D630_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01f9)
#define DELL_D820_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01cc)
#define DELL_V1500_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0228)
#define DELL_I1300_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01c9)
@@ -688,6 +689,8 @@
0, 0, -1, 13, { 14, -1 }, -1 },
{ DELL_OPLX745_SUBVENDOR, HDA_CODEC_AD1983, HDAC_HP_SWITCH_CTL,
0, 0, -1, 6, { 5, 7, -1 }, -1 },
+ { DELL_D630_SUBVENDOR, HDA_CODEC_STAC9205, HDAC_HP_SWITCH_CTRL,
+ 0, 0, -1, 10, { 13, -1 }, -1 },
{ DELL_V1500_SUBVENDOR, HDA_CODEC_STAC9205, HDAC_HP_SWITCH_CTRL,
0, 0, -1, 10, { 13, -1 }, -1 },
{ APPLE_MB3_SUBVENDOR, HDA_CODEC_ALC885, HDAC_HP_SWITCH_CTL,
@@ -4255,6 +4258,8 @@
HDA_QUIRK_GPIO0 | HDA_QUIRK_OVREF50, 0},
{ APPLE_INTEL_MAC, HDA_CODEC_STAC9221,
HDA_QUIRK_GPIO0 | HDA_QUIRK_GPIO1, 0 },
+ { DELL_D630_SUBVENDOR, HDA_CODEC_STAC9205,
+ HDA_QUIRK_GPIO0, 0 },
{ DELL_V1500_SUBVENDOR, HDA_CODEC_STAC9205,
HDA_QUIRK_GPIO0, 0 },
{ HDA_MATCH_ALL, HDA_CODEC_AD1988,
@@ -4528,7 +4533,8 @@
}
break;
case HDA_CODEC_STAC9205:
- if (subvendor == DELL_V1500_SUBVENDOR) {
+ if ((subvendor == DELL_V1500_SUBVENDOR) ||
+ (subvendor == DELL_D630_SUBVENDOR)) {
w = hdac_widget_get(devinfo, 29);
if (w != NULL)
w->selconn = 1;
==== //depot/projects/mpsafetty/sys/dev/vr/if_vr.c#2 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/vr/if_vr.c,v 1.130 2008/03/11 04:51:22 yongari Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/vr/if_vr.c,v 1.132 2008/07/16 08:35:29 yongari Exp $");
/*
* VIA Rhine fast ethernet PCI NIC driver
@@ -186,7 +186,8 @@
static void vr_miibus_statchg(device_t);
static void vr_link_task(void *, int);
-static int vr_setperf(struct vr_softc *, int, uint8_t *);
+static void vr_cam_mask(struct vr_softc *, uint32_t, int);
+static int vr_cam_data(struct vr_softc *, int, int, uint8_t *);
static void vr_set_filter(struct vr_softc *);
static void vr_reset(const struct vr_softc *);
static int vr_tx_ring_init(struct vr_softc *);
@@ -394,27 +395,44 @@
VR_UNLOCK(sc);
}
-/*
- * Copy the address 'mac' into the perfect RX filter entry at
- * offset 'idx.' The perfect filter only has 32 entries so do
- * some sanity tests.
- */
+
+static void
+vr_cam_mask(struct vr_softc *sc, uint32_t mask, int type)
+{
+
+ if (type == VR_MCAST_CAM)
+ CSR_WRITE_1(sc, VR_CAMCTL, VR_CAMCTL_ENA | VR_CAMCTL_MCAST);
+ else
+ CSR_WRITE_1(sc, VR_CAMCTL, VR_CAMCTL_ENA | VR_CAMCTL_VLAN);
+ CSR_WRITE_4(sc, VR_CAMMASK, mask);
+ CSR_WRITE_1(sc, VR_CAMCTL, 0);
+}
+
static int
-vr_setperf(struct vr_softc *sc, int idx, uint8_t *mac)
+vr_cam_data(struct vr_softc *sc, int type, int idx, uint8_t *mac)
{
int i;
- if (idx < 0 || idx >= VR_CAM_MCAST_CNT || mac == NULL)
- return (EINVAL);
+ if (type == VR_MCAST_CAM) {
+ if (idx < 0 || idx >= VR_CAM_MCAST_CNT || mac == NULL)
+ return (EINVAL);
+ CSR_WRITE_1(sc, VR_CAMCTL, VR_CAMCTL_ENA | VR_CAMCTL_MCAST);
+ } else
+ CSR_WRITE_1(sc, VR_CAMCTL, VR_CAMCTL_ENA | VR_CAMCTL_VLAN);
/* Set CAM entry address. */
CSR_WRITE_1(sc, VR_CAMADDR, idx);
/* Set CAM entry data. */
- for (i = 0; i < ETHER_ADDR_LEN; i++)
- CSR_WRITE_1(sc, VR_MAR0 + i, mac[i]);
+ if (type == VR_MCAST_CAM) {
+ for (i = 0; i < ETHER_ADDR_LEN; i++)
+ CSR_WRITE_1(sc, VR_MCAM0 + i, mac[i]);
+ } else {
+ CSR_WRITE_1(sc, VR_VCAM0, mac[0]);
+ CSR_WRITE_1(sc, VR_VCAM1, mac[1]);
+ }
+ DELAY(10);
/* Write CAM and wait for self-clear of VR_CAMCTL_WRITE bit. */
- CSR_WRITE_1(sc, VR_CAMCTL,
- VR_CAMCTL_ENA | VR_CAMCTL_MCAST | VR_CAMCTL_WRITE);
+ CSR_WRITE_1(sc, VR_CAMCTL, VR_CAMCTL_ENA | VR_CAMCTL_WRITE);
for (i = 0; i < VR_TIMEOUT; i++) {
DELAY(1);
if ((CSR_READ_1(sc, VR_CAMCTL) & VR_CAMCTL_WRITE) == 0)
@@ -424,6 +442,7 @@
if (i == VR_TIMEOUT)
device_printf(sc->vr_dev, "%s: setting CAM filter timeout!\n",
__func__);
+ CSR_WRITE_1(sc, VR_CAMCTL, 0);
return (i == VR_TIMEOUT ? ETIMEDOUT : 0);
}
@@ -461,6 +480,7 @@
/* Now program new ones. */
error = 0;
+ mcnt = 0;
IF_ADDR_LOCK(ifp);
if ((sc->vr_quirks & VR_Q_CAM) != 0) {
/*
@@ -468,12 +488,10 @@
* 32 entries multicast perfect filter.
*/
cam_mask = 0;
- mcnt = 0;
- CSR_WRITE_1(sc, VR_CAMCTL, VR_CAMCTL_ENA | VR_CAMCTL_MCAST);
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
if (ifma->ifma_addr->sa_family != AF_LINK)
continue;
- error = vr_setperf(sc, mcnt,
+ error = vr_cam_data(sc, VR_MCAST_CAM, mcnt,
LLADDR((struct sockaddr_dl *)ifma->ifma_addr));
if (error != 0) {
cam_mask = 0;
@@ -482,19 +500,16 @@
cam_mask |= 1 << mcnt;
mcnt++;
}
- /* Enable multicast CAM entries depending on mask. */
- CSR_WRITE_1(sc, VR_CAMMASK, cam_mask);
- /* Accessing CAM done. */
- CSR_WRITE_1(sc, VR_CAMCTL, 0);
+ vr_cam_mask(sc, VR_MCAST_CAM, cam_mask);
}
- mcnt = 0;
if ((sc->vr_quirks & VR_Q_CAM) == 0 || error != 0) {
/*
* If there are too many multicast addresses or
* setting multicast CAM filter failed, use hash
* table based filtering.
*/
+ mcnt = 0;
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
if (ifma->ifma_addr->sa_family != AF_LINK)
continue;
@@ -1324,8 +1339,8 @@
* We don't support SG in Rx path yet, so discard
* partial frame.
*/
- if ((rxstat & (VR_RXSTAT_RXERR | VR_RXSTAT_FIRSTFRAG |
- VR_RXSTAT_LASTFRAG)) !=
+ if ((rxstat & VR_RXSTAT_RX_OK) == 0 ||
+ (rxstat & (VR_RXSTAT_FIRSTFRAG | VR_RXSTAT_LASTFRAG)) !=
(VR_RXSTAT_FIRSTFRAG | VR_RXSTAT_LASTFRAG)) {
ifp->if_ierrors++;
sc->vr_stat.rx_errors++;
@@ -2031,11 +2046,19 @@
/* Init tx descriptors. */
vr_tx_ring_init(sc);
- /* Disable all VLAN CAM entries. */
if ((sc->vr_quirks & VR_Q_CAM) != 0) {
- CSR_WRITE_1(sc, VR_CAMCTL, VR_CAMCTL_ENA | VR_CAMCTL_VLAN);
- CSR_WRITE_1(sc, VR_CAMMASK, 0);
- CSR_WRITE_1(sc, VR_CAMCTL, 0);
+ uint8_t vcam[2] = { 0, 0 };
+
+ /* Disable VLAN hardware tag insertion/stripping. */
+ VR_CLRBIT(sc, VR_TXCFG, VR_TXCFG_TXTAGEN | VR_TXCFG_RXTAGCTL);
+ /* Disable VLAN hardware filtering. */
+ VR_CLRBIT(sc, VR_BCR1, VR_BCR1_VLANFILT_ENB);
+ /* Disable all CAM entries. */
+ vr_cam_mask(sc, VR_MCAST_CAM, 0);
+ vr_cam_mask(sc, VR_VLAN_CAM, 0);
+ /* Enable the first VLAN CAM. */
+ vr_cam_data(sc, VR_VLAN_CAM, 0, vcam);
+ vr_cam_mask(sc, VR_VLAN_CAM, 1);
}
/*
==== //depot/projects/mpsafetty/sys/dev/vr/if_vrreg.h#2 (text+ko) ====
@@ -29,7 +29,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/vr/if_vrreg.h,v 1.36 2008/03/11 04:51:22 yongari Exp $
+ * $FreeBSD: src/sys/dev/vr/if_vrreg.h,v 1.38 2008/07/16 08:35:29 yongari Exp $
*/
/*
@@ -47,6 +47,14 @@
#define VR_IMR 0x0E /* interrupt mask register */
#define VR_MAR0 0x10 /* multicast hash 0 */
#define VR_MAR1 0x14 /* multicast hash 1 */
+#define VR_MCAM0 0x10
+#define VR_MCAM1 0x11
+#define VR_MCAM2 0x12
+#define VR_MCAM3 0x13
+#define VR_MCAM4 0x14
+#define VR_MCAM5 0x15
+#define VR_VCAM0 0x16
+#define VR_VCAM1 0x17
#define VR_RXADDR 0x18 /* rx descriptor list start addr */
#define VR_TXADDR 0x1C /* tx descriptor list start addr */
#define VR_CURRXDESC0 0x20
@@ -368,6 +376,7 @@
#define VR_BCR1_TXTHRESH512BYTES 0x20
#define VR_BCR1_TXTHRESH1024BYTES 0x28
#define VR_BCR1_TXTHRESHSTORENFWD 0x38
+#define VR_BCR1_VLANFILT_ENB 0x80 /* VT6105M */
/*
* CAMCTL register bits. (VT6105M only)
@@ -455,7 +464,8 @@
#define VR_RXSTAT_RX_PHYS 0x00000800
#define VR_RXSTAT_RX_BROAD 0x00001000
#define VR_RXSTAT_RX_MULTI 0x00002000
-#define VR_RXSTAT_RX_OK 0x00004000
+#define VR_RXSTAT_RX_VIDHIT 0x00004000 /* 6105M */
+#define VR_RXSTAT_RX_OK 0x00008000
#define VR_RXSTAT_RXLEN 0x07FF0000
#define VR_RXSTAT_RXLEN_EXT 0x78000000
#define VR_RXSTAT_OWN 0x80000000
@@ -750,3 +760,6 @@
#define VR_SETBIT16(sc, reg, x) CSR_WRITE_2(sc, reg, CSR_READ_2(sc, reg) | (x))
#define VR_CLRBIT16(sc, reg, x) CSR_WRITE_2(sc, reg, CSR_READ_2(sc, reg) & ~(x))
+
+#define VR_MCAST_CAM 0
+#define VR_VLAN_CAM 1
==== //depot/projects/mpsafetty/sys/i386/i386/busdma_machdep.c#2 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/i386/busdma_machdep.c,v 1.92 2008/03/28 15:28:20 emaste Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/i386/busdma_machdep.c,v 1.93 2008/07/15 03:34:49 alc Exp $");
#include <sys/param.h>
#include <sys/kdb.h>
@@ -488,8 +488,6 @@
mflags = M_NOWAIT;
else
mflags = M_WAITOK;
- if (flags & BUS_DMA_ZERO)
- mflags |= M_ZERO;
/* If we succeed, no mapping/bouncing will be required */
*mapp = NULL;
@@ -497,13 +495,15 @@
if (dmat->segments == NULL) {
dmat->segments = (bus_dma_segment_t *)malloc(
sizeof(bus_dma_segment_t) * dmat->nsegments, M_DEVBUF,
- M_NOWAIT);
+ mflags);
if (dmat->segments == NULL) {
CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d",
__func__, dmat, dmat->flags, ENOMEM);
return (ENOMEM);
}
}
+ if (flags & BUS_DMA_ZERO)
+ mflags |= M_ZERO;
/*
* XXX:
==== //depot/projects/mpsafetty/sys/ia64/ia64/busdma_machdep.c#2 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/ia64/ia64/busdma_machdep.c,v 1.46 2007/11/27 17:28:12 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/ia64/ia64/busdma_machdep.c,v 1.47 2008/07/15 03:34:49 alc Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -416,8 +416,6 @@
mflags = M_NOWAIT;
else
mflags = M_WAITOK;
- if (flags & BUS_DMA_ZERO)
- mflags |= M_ZERO;
/* If we succeed, no mapping/bouncing will be required */
*mapp = NULL;
@@ -425,10 +423,12 @@
if (dmat->segments == NULL) {
dmat->segments = (bus_dma_segment_t *)malloc(
sizeof(bus_dma_segment_t) * dmat->nsegments, M_DEVBUF,
- M_NOWAIT);
+ mflags);
if (dmat->segments == NULL)
return (ENOMEM);
}
+ if (flags & BUS_DMA_ZERO)
+ mflags |= M_ZERO;
/*
* XXX:
==== //depot/projects/mpsafetty/sys/kern/subr_stack.c#2 (text+ko) ====
@@ -27,7 +27,7 @@
#include "opt_ddb.h"
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/subr_stack.c,v 1.6 2007/12/03 14:44:35 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/subr_stack.c,v 1.7 2008/07/13 17:15:19 svn Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -40,7 +40,7 @@
#include <sys/stack.h>
#include <sys/systm.h>
-MALLOC_DEFINE(M_STACK, "stack", "Stack Traces");
+static MALLOC_DEFINE(M_STACK, "stack", "Stack Traces");
static void stack_symbol(vm_offset_t pc, char *namebuf, u_int buflen,
long *offset);
==== //depot/projects/mpsafetty/sys/libkern/memset.c#2 (text+ko) ====
@@ -23,18 +23,22 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-#include <sys/types.h>
-__FBSDID("$FreeBSD: src/sys/libkern/memset.c,v 1.2 2007/04/06 00:06:26 kan Exp $");
+__FBSDID("$FreeBSD: src/sys/libkern/memset.c,v 1.3 2008/07/14 21:36:02 obrien Exp $");
-void *memset(void *, int, size_t);
+#define LIBKERN_INLINE
+#include <sys/types.h>
+#include <sys/libkern.h>
void *
memset(void *b, int c, size_t len)
{
char *bb;
- for (bb = (char *)b; len--; )
- *bb++ = c;
+ if (c == 0)
+ bzero(b, len);
+ else
+ for (bb = (char *)b; len--; )
+ *bb++ = c;
return (b);
}
==== //depot/projects/mpsafetty/sys/net/bpf.c#2 (text+ko) ====
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/net/bpf.c,v 1.197 2008/07/07 09:25:49 dwmalone Exp $");
+__FBSDID("$FreeBSD: src/sys/net/bpf.c,v 1.198 2008/07/14 22:41:48 jkim Exp $");
#include "opt_bpf.h"
#include "opt_mac.h"
@@ -443,13 +443,19 @@
if (len - hlen > ifp->if_mtu)
return (EMSGSIZE);
- if ((unsigned)len > MCLBYTES)
+ if ((unsigned)len > MJUM16BYTES)
return (EIO);
- if (len > MHLEN)
+ if (len <= MHLEN)
+ MGETHDR(m, M_WAIT, MT_DATA);
+ else if (len <= MCLBYTES)
m = m_getcl(M_WAIT, MT_DATA, M_PKTHDR);
else
- MGETHDR(m, M_WAIT, MT_DATA);
+ m = m_getjcl(M_WAIT, MT_DATA, M_PKTHDR,
+#if (MJUMPAGESIZE > MCLBYTES)
+ len <= MJUMPAGESIZE ? MJUMPAGESIZE :
+#endif
+ (len <= MJUM9BYTES ? MJUM9BYTES : MJUM16BYTES));
m->m_pkthdr.len = m->m_len = len;
m->m_pkthdr.rcvif = NULL;
*mp = m;
==== //depot/projects/mpsafetty/sys/net/if_vlan.c#2 (text+ko) ====
@@ -26,7 +26,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/net/if_vlan.c,v 1.125 2007/10/18 21:22:15 thompsa Exp $
+ * $FreeBSD: src/sys/net/if_vlan.c,v 1.126 2008/07/14 18:40:21 jfv Exp $
*/
/*
@@ -1062,6 +1062,8 @@
ifp->if_drv_flags |= IFF_DRV_RUNNING;
done:
TRUNK_UNLOCK(trunk);
+ if (error == 0)
+ EVENTHANDLER_INVOKE(vlan_config, p, ifv->ifv_tag);
VLAN_UNLOCK();
return (error);
@@ -1084,12 +1086,14 @@
struct ifvlantrunk *trunk;
struct vlan_mc_entry *mc;
struct ifvlan *ifv;
+ struct ifnet *parent;
int error;
VLAN_LOCK_ASSERT();
ifv = ifp->if_softc;
trunk = ifv->ifv_trunk;
+ parent = PARENT(ifv);
if (trunk) {
struct sockaddr_dl sdl;
@@ -1153,6 +1157,8 @@
ifp->if_link_state = LINK_STATE_UNKNOWN;
ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
+ EVENTHANDLER_INVOKE(vlan_unconfig, parent, ifv->ifv_tag);
+
return (0);
}
==== //depot/projects/mpsafetty/sys/netgraph/bluetooth/common/ng_bluetooth.c#3 (text+ko) ====
@@ -28,7 +28,7 @@
* SUCH DAMAGE.
*
* $Id: ng_bluetooth.c,v 1.3 2003/04/26 22:37:31 max Exp $
- * $FreeBSD: src/sys/netgraph/bluetooth/common/ng_bluetooth.c,v 1.8 2008/07/10 00:15:29 emax Exp $
+ * $FreeBSD: src/sys/netgraph/bluetooth/common/ng_bluetooth.c,v 1.9 2008/07/14 13:45:05 trhodes Exp $
*/
#include <sys/param.h>
@@ -57,7 +57,7 @@
SYSCTL_NODE(_net, OID_AUTO, bluetooth, CTLFLAG_RW, 0, "Bluetooth family");
SYSCTL_INT(_net_bluetooth, OID_AUTO, version,
- CTLFLAG_RD, 0, NG_BLUETOOTH_VERSION, "");
+ CTLFLAG_RD, 0, NG_BLUETOOTH_VERSION, "Version of the stack");
/*
* HCI
==== //depot/projects/mpsafetty/sys/netinet/in_pcb.h#4 (text+ko) ====
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*
* @(#)in_pcb.h 8.1 (Berkeley) 6/10/93
- * $FreeBSD: src/sys/netinet/in_pcb.h,v 1.109 2008/07/10 13:31:11 bz Exp $
+ * $FreeBSD: src/sys/netinet/in_pcb.h,v 1.110 2008/07/15 15:38:47 rwatson Exp $
*/
#ifndef _NETINET_IN_PCB_H_
@@ -315,6 +315,8 @@
#define INP_LOCK_DESTROY(inp) rw_destroy(&(inp)->inp_lock)
#define INP_RLOCK(inp) rw_rlock(&(inp)->inp_lock)
#define INP_WLOCK(inp) rw_wlock(&(inp)->inp_lock)
+#define INP_TRY_RLOCK(inp) rw_try_rlock(&(inp)->inp_lock)
+#define INP_TRY_WLOCK(inp) rw_try_wlock(&(inp)->inp_lock)
#define INP_RUNLOCK(inp) rw_runlock(&(inp)->inp_lock)
#define INP_WUNLOCK(inp) rw_wunlock(&(inp)->inp_lock)
#define INP_LOCK_ASSERT(inp) rw_assert(&(inp)->inp_lock, RA_LOCKED)
@@ -356,6 +358,8 @@
#define INP_INFO_LOCK_DESTROY(ipi) rw_destroy(&(ipi)->ipi_lock)
#define INP_INFO_RLOCK(ipi) rw_rlock(&(ipi)->ipi_lock)
#define INP_INFO_WLOCK(ipi) rw_wlock(&(ipi)->ipi_lock)
+#define INP_INFO_TRY_RLOCK(ipi) rw_try_rlock(&(ipi)->ipi_lock)
+#define INP_INFO_TRY_WLOCK(ipi) rw_try_wlock(&(ipi)->ipi_lock)
#define INP_INFO_RUNLOCK(ipi) rw_runlock(&(ipi)->ipi_lock)
#define INP_INFO_WUNLOCK(ipi) rw_wunlock(&(ipi)->ipi_lock)
#define INP_INFO_LOCK_ASSERT(ipi) rw_assert(&(ipi)->ipi_lock, RA_LOCKED)
==== //depot/projects/mpsafetty/sys/netinet/ip_carp.c#2 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/netinet/ip_carp.c,v 1.54 2008/06/02 18:58:07 mlaier Exp $");
+__FBSDID("$FreeBSD: src/sys/netinet/ip_carp.c,v 1.55 2008/07/14 20:11:51 eri Exp $");
#include "opt_carp.h"
#include "opt_bpf.h"
@@ -1464,7 +1464,11 @@
carp_set_state(sc, INIT);
if (sc->sc_naddrs)
SC2IFP(sc)->if_flags |= IFF_UP;
+ if (sc->sc_carpdev)
+ CARP_SCLOCK(sc);
carp_setrun(sc, 0);
+ if (sc->sc_carpdev)
+ CARP_SCUNLOCK(sc);
return (0);
}
@@ -1625,7 +1629,11 @@
carp_set_state(sc, INIT);
if (sc->sc_naddrs6)
SC2IFP(sc)->if_flags |= IFF_UP;
+ if (sc->sc_carpdev)
+ CARP_SCLOCK(sc);
carp_setrun(sc, 0);
+ if (sc->sc_carpdev)
+ CARP_SCUNLOCK(sc);
return (0);
}
==== //depot/projects/mpsafetty/sys/netinet/tcp_output.c#2 (text+ko) ====
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/netinet/tcp_output.c,v 1.150 2008/04/17 21:38:16 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/netinet/tcp_output.c,v 1.151 2008/07/15 10:32:35 rpaulo Exp $");
#include "opt_inet.h"
#include "opt_inet6.h"
@@ -934,7 +934,7 @@
* a 0 window. This may cause the remote transmitter to stall. This
* flag tells soreceive() to disable delayed acknowledgements when
* draining the buffer. This can occur if the receiver is attempting
- * to read more data then can be buffered prior to transmitting on
+ * to read more data than can be buffered prior to transmitting on
* the connection.
*/
if (recwin == 0)
==== //depot/projects/mpsafetty/sys/netinet/udp_usrreq.c#4 (text+ko) ====
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/netinet/udp_usrreq.c,v 1.230 2008/07/10 16:20:18 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/netinet/udp_usrreq.c,v 1.231 2008/07/15 15:38:47 rwatson Exp $");
#include "opt_ipfw.h"
#include "opt_inet6.h"
@@ -846,14 +846,42 @@
return (error);
}
- if (src.sin_family == AF_INET || addr != NULL) {
+ /*
+ * Depending on whether or not the application has bound or connected
+ * the application, we may have to do varying levels of work. The
+ * optimal case is for a connected UDP socket, as a global lock isn't
+ * required.
+ *
+ * In order to decide which we need, we require stability of the
+ * inpcb binding, which we ensure by acquiring a read lock on the
+ * inpcb. This doesn't strictly follow the lock order, so we play
+ * the trylock and retry game; note that we may end up with more
+ * conservative locks than required the second time around, so later
+ * assertions have to accept that. Further analysis of the number of
+ * misses under contention is required.
+ */
+ sin = (struct sockaddr_in *)addr;
+ INP_RLOCK(inp);
+ if (sin != NULL &&
+ (inp->inp_laddr.s_addr == INADDR_ANY && inp->inp_lport == 0)) {
+ INP_RUNLOCK(inp);
INP_INFO_WLOCK(&udbinfo);
INP_WLOCK(inp);
+ unlock_udbinfo = 2;
+ } else if ((sin != NULL && (
+ (sin->sin_addr.s_addr == INADDR_ANY) ||
+ (sin->sin_addr.s_addr == INADDR_BROADCAST) ||
+ (inp->inp_laddr.s_addr == INADDR_ANY) ||
+ (inp->inp_lport == 0))) ||
+ (src.sin_family == AF_INET)) {
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list