svn commit: r197858 - in projects/capabilities8: .
cddl/compat/opensolaris cddl/contrib/opensolaris
cddl/lib/libnvpair contrib/bind9 contrib/bzip2 contrib/cpio
contrib/csup contrib/ee contrib/file ...
Robert Watson
rwatson at FreeBSD.org
Thu Oct 8 13:57:52 UTC 2009
Author: rwatson
Date: Thu Oct 8 13:57:51 2009
New Revision: 197858
URL: http://svn.freebsd.org/changeset/base/197858
Log:
Integrate capabilities 8 branch from stable/8.
Modified:
projects/capabilities8/ (props changed)
projects/capabilities8/ObsoleteFiles.inc (props changed)
projects/capabilities8/UPDATING (props changed)
projects/capabilities8/cddl/compat/opensolaris/ (props changed)
projects/capabilities8/cddl/contrib/opensolaris/ (props changed)
projects/capabilities8/cddl/lib/libnvpair/ (props changed)
projects/capabilities8/contrib/bind9/ (props changed)
projects/capabilities8/contrib/bzip2/ (props changed)
projects/capabilities8/contrib/cpio/ (props changed)
projects/capabilities8/contrib/csup/ (props changed)
projects/capabilities8/contrib/ee/ (props changed)
projects/capabilities8/contrib/file/ (props changed)
projects/capabilities8/contrib/gdb/ (props changed)
projects/capabilities8/contrib/gdtoa/ (props changed)
projects/capabilities8/contrib/less/ (props changed)
projects/capabilities8/contrib/libpcap/ (props changed)
projects/capabilities8/contrib/ncurses/ (props changed)
projects/capabilities8/contrib/netcat/ (props changed)
projects/capabilities8/contrib/ntp/ (props changed)
projects/capabilities8/contrib/openbsm/ (props changed)
projects/capabilities8/contrib/openpam/ (props changed)
projects/capabilities8/contrib/pf/ (props changed)
projects/capabilities8/contrib/sendmail/ (props changed)
projects/capabilities8/contrib/tcpdump/ (props changed)
projects/capabilities8/contrib/tcsh/ (props changed)
projects/capabilities8/contrib/top/ (props changed)
projects/capabilities8/contrib/top/install-sh (props changed)
projects/capabilities8/contrib/traceroute/ (props changed)
projects/capabilities8/contrib/wpa/ (props changed)
projects/capabilities8/crypto/openssh/ (props changed)
projects/capabilities8/crypto/openssl/ (props changed)
projects/capabilities8/etc/ (props changed)
projects/capabilities8/gnu/usr.bin/patch/ (props changed)
projects/capabilities8/include/ (props changed)
projects/capabilities8/lib/libarchive/ (props changed)
projects/capabilities8/lib/libc/ (props changed)
projects/capabilities8/lib/libc/gen/_pthread_stubs.c
projects/capabilities8/lib/libc/stdio/asprintf.c (props changed)
projects/capabilities8/lib/libc/stdtime/ (props changed)
projects/capabilities8/lib/libc/string/ffsll.c (props changed)
projects/capabilities8/lib/libc/string/flsll.c (props changed)
projects/capabilities8/lib/libc/string/wcpcpy.c (props changed)
projects/capabilities8/lib/libc/string/wcpncpy.c (props changed)
projects/capabilities8/lib/libdevinfo/ (props changed)
projects/capabilities8/lib/libdisk/ (props changed)
projects/capabilities8/lib/libkvm/ (props changed)
projects/capabilities8/lib/libthr/ (props changed)
projects/capabilities8/lib/libusb/ (props changed)
projects/capabilities8/lib/libusb/libusb20.3 (props changed)
projects/capabilities8/lib/libusb/usb.h (props changed)
projects/capabilities8/lib/libutil/ (props changed)
projects/capabilities8/release/ (props changed)
projects/capabilities8/release/doc/ (props changed)
projects/capabilities8/release/doc/en_US.ISO8859-1/hardware/ (props changed)
projects/capabilities8/sbin/ (props changed)
projects/capabilities8/sbin/bsdlabel/ (props changed)
projects/capabilities8/sbin/camcontrol/ (props changed)
projects/capabilities8/sbin/geom/ (props changed)
projects/capabilities8/sbin/ifconfig/ (props changed)
projects/capabilities8/sbin/ipfw/ (props changed)
projects/capabilities8/sbin/mount/ (props changed)
projects/capabilities8/sbin/umount/ (props changed)
projects/capabilities8/share/man/man4/ (props changed)
projects/capabilities8/share/man/man5/ (props changed)
projects/capabilities8/share/man/man7/ (props changed)
projects/capabilities8/share/man/man9/ (props changed)
projects/capabilities8/share/timedef/ (props changed)
projects/capabilities8/share/zoneinfo/ (props changed)
projects/capabilities8/sys/ (props changed)
projects/capabilities8/sys/amd64/amd64/initcpu.c
projects/capabilities8/sys/amd64/include/xen/ (props changed)
projects/capabilities8/sys/cddl/contrib/opensolaris/ (props changed)
projects/capabilities8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
projects/capabilities8/sys/conf/files
projects/capabilities8/sys/contrib/dev/acpica/ (props changed)
projects/capabilities8/sys/contrib/pf/ (props changed)
projects/capabilities8/sys/dev/de/if_de.c
projects/capabilities8/sys/dev/de/if_devar.h
projects/capabilities8/sys/dev/if_ndis/if_ndis.c
projects/capabilities8/sys/dev/mxge/if_mxge.c
projects/capabilities8/sys/dev/mxge/if_mxge_var.h
projects/capabilities8/sys/dev/usb/controller/ehci.c
projects/capabilities8/sys/dev/xen/xenpci/ (props changed)
projects/capabilities8/sys/i386/i386/initcpu.c
projects/capabilities8/sys/kern/init_main.c
projects/capabilities8/sys/kern/kern_exec.c
projects/capabilities8/sys/kern/kern_sig.c
projects/capabilities8/sys/modules/nfslockd/Makefile
projects/capabilities8/sys/net/flowtable.c
projects/capabilities8/sys/net/flowtable.h
projects/capabilities8/sys/net/route.c
projects/capabilities8/sys/netinet/in.c
projects/capabilities8/sys/netinet/tcp_input.c
projects/capabilities8/sys/nlm/nlm_prot_impl.c
projects/capabilities8/sys/pc98/conf/GENERIC
projects/capabilities8/sys/sparc64/conf/GENERIC
projects/capabilities8/sys/vm/vm_map.c
projects/capabilities8/tools/regression/lib/msun/test-conj.t (props changed)
projects/capabilities8/tools/regression/poll/ (props changed)
projects/capabilities8/tools/regression/priv/ (props changed)
projects/capabilities8/tools/regression/usr.bin/pkill/pgrep-_g.t (props changed)
projects/capabilities8/tools/regression/usr.bin/pkill/pgrep-_s.t (props changed)
projects/capabilities8/tools/regression/usr.bin/pkill/pkill-_g.t (props changed)
projects/capabilities8/tools/tools/ath/common/dumpregs.h (props changed)
projects/capabilities8/tools/tools/ath/common/dumpregs_5210.c (props changed)
projects/capabilities8/tools/tools/ath/common/dumpregs_5211.c (props changed)
projects/capabilities8/tools/tools/ath/common/dumpregs_5212.c (props changed)
projects/capabilities8/tools/tools/ath/common/dumpregs_5416.c (props changed)
projects/capabilities8/tools/tools/termcap/termcap.pl (props changed)
projects/capabilities8/tools/tools/vimage/ (props changed)
projects/capabilities8/usr.bin/calendar/calendars/calendar.freebsd (props changed)
projects/capabilities8/usr.bin/csup/ (props changed)
projects/capabilities8/usr.bin/fstat/ (props changed)
projects/capabilities8/usr.bin/look/ (props changed)
projects/capabilities8/usr.bin/procstat/ (props changed)
projects/capabilities8/usr.bin/w/ (props changed)
projects/capabilities8/usr.bin/whois/ (props changed)
projects/capabilities8/usr.bin/whois/whois.1
projects/capabilities8/usr.bin/whois/whois.c
projects/capabilities8/usr.sbin/ (props changed)
projects/capabilities8/usr.sbin/arp/ (props changed)
projects/capabilities8/usr.sbin/dumpcis/cardinfo.h (props changed)
projects/capabilities8/usr.sbin/dumpcis/cis.h (props changed)
projects/capabilities8/usr.sbin/freebsd-update/ (props changed)
projects/capabilities8/usr.sbin/iostat/ (props changed)
projects/capabilities8/usr.sbin/jls/ (props changed)
projects/capabilities8/usr.sbin/lpr/ (props changed)
projects/capabilities8/usr.sbin/lpr/lp/lp.sh
projects/capabilities8/usr.sbin/makefs/ffs/ffs_bswap.c (props changed)
projects/capabilities8/usr.sbin/makefs/ffs/ffs_subr.c (props changed)
projects/capabilities8/usr.sbin/makefs/ffs/ufs_bswap.h (props changed)
projects/capabilities8/usr.sbin/makefs/getid.c (props changed)
projects/capabilities8/usr.sbin/mfiutil/README (props changed)
projects/capabilities8/usr.sbin/mfiutil/mfiutil.1 (props changed)
projects/capabilities8/usr.sbin/mfiutil/mfiutil.8 (props changed)
projects/capabilities8/usr.sbin/ndp/ (props changed)
projects/capabilities8/usr.sbin/ntp/ (props changed)
projects/capabilities8/usr.sbin/ppp/ (props changed)
projects/capabilities8/usr.sbin/pstat/ (props changed)
projects/capabilities8/usr.sbin/sysinstall/ (props changed)
projects/capabilities8/usr.sbin/traceroute6/ (props changed)
projects/capabilities8/usr.sbin/wpa/ (props changed)
projects/capabilities8/usr.sbin/zic/ (props changed)
Modified: projects/capabilities8/lib/libc/gen/_pthread_stubs.c
==============================================================================
--- projects/capabilities8/lib/libc/gen/_pthread_stubs.c Thu Oct 8 11:42:24 2009 (r197857)
+++ projects/capabilities8/lib/libc/gen/_pthread_stubs.c Thu Oct 8 13:57:51 2009 (r197858)
@@ -222,7 +222,7 @@ STUB_FUNC1(pthread_mutex_trylock, PJT_MU
STUB_FUNC1(pthread_mutex_unlock, PJT_MUTEX_UNLOCK, int, void *)
STUB_FUNC1(pthread_mutexattr_destroy, PJT_MUTEXATTR_DESTROY, int, void *)
STUB_FUNC1(pthread_mutexattr_init, PJT_MUTEXATTR_INIT, int, void *)
-STUB_FUNC1(pthread_mutexattr_settype, PJT_MUTEXATTR_SETTYPE, int, void *)
+STUB_FUNC2(pthread_mutexattr_settype, PJT_MUTEXATTR_SETTYPE, int, void *, int)
STUB_FUNC2(pthread_once, PJT_ONCE, int, void *, void *)
STUB_FUNC1(pthread_rwlock_destroy, PJT_RWLOCK_DESTROY, int, void *)
STUB_FUNC2(pthread_rwlock_init, PJT_RWLOCK_INIT, int, void *, void *)
Modified: projects/capabilities8/sys/amd64/amd64/initcpu.c
==============================================================================
--- projects/capabilities8/sys/amd64/amd64/initcpu.c Thu Oct 8 11:42:24 2009 (r197857)
+++ projects/capabilities8/sys/amd64/amd64/initcpu.c Thu Oct 8 13:57:51 2009 (r197858)
@@ -165,4 +165,10 @@ initializecpu(void)
*/
if ((cpu_feature & CPUID_CLFSH) != 0)
cpu_clflush_line_size = ((cpu_procinfo >> 8) & 0xff) * 8;
+ /*
+ * XXXKIB: (temporary) hack to work around traps generated when
+ * CLFLUSHing APIC registers window.
+ */
+ if (cpu_vendor_id == CPU_VENDOR_INTEL && !(cpu_feature & CPUID_SS))
+ cpu_feature &= ~CPUID_CLFSH;
}
Modified: projects/capabilities8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
==============================================================================
--- projects/capabilities8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Oct 8 11:42:24 2009 (r197857)
+++ projects/capabilities8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Oct 8 13:57:51 2009 (r197858)
@@ -4172,8 +4172,12 @@ zfs_freebsd_setattr(ap)
zflags = VTOZ(vp)->z_phys->zp_flags;
if (vap->va_flags != VNOVAL) {
+ zfsvfs_t *zfsvfs = VTOZ(vp)->z_zfsvfs;
int error;
+ if (zfsvfs->z_use_fuids == B_FALSE)
+ return (EOPNOTSUPP);
+
fflags = vap->va_flags;
if ((fflags & ~(SF_IMMUTABLE|SF_APPEND|SF_NOUNLINK|UF_NODUMP)) != 0)
return (EOPNOTSUPP);
Modified: projects/capabilities8/sys/conf/files
==============================================================================
--- projects/capabilities8/sys/conf/files Thu Oct 8 11:42:24 2009 (r197857)
+++ projects/capabilities8/sys/conf/files Thu Oct 8 13:57:51 2009 (r197858)
@@ -2660,12 +2660,12 @@ vm/vm_reserv.c standard
vm/vm_unix.c standard
vm/vm_zeroidle.c standard
vm/vnode_pager.c standard
-xdr/xdr.c optional krpc | nfslockd | nfsclient | nfsserver
-xdr/xdr_array.c optional krpc | nfslockd | nfsclient | nfsserver
-xdr/xdr_mbuf.c optional krpc | nfslockd | nfsclient | nfsserver
-xdr/xdr_mem.c optional krpc | nfslockd | nfsclient | nfsserver
-xdr/xdr_reference.c optional krpc | nfslockd | nfsclient | nfsserver
-xdr/xdr_sizeof.c optional krpc | nfslockd | nfsclient | nfsserver
+xdr/xdr.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd
+xdr/xdr_array.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd
+xdr/xdr_mbuf.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd
+xdr/xdr_mem.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd
+xdr/xdr_reference.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd
+xdr/xdr_sizeof.c optional krpc | nfslockd | nfsclient | nfsserver | nfscl | nfsd
#
gnu/fs/xfs/xfs_alloc.c optional xfs \
compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" \
Modified: projects/capabilities8/sys/dev/de/if_de.c
==============================================================================
--- projects/capabilities8/sys/dev/de/if_de.c Thu Oct 8 11:42:24 2009 (r197857)
+++ projects/capabilities8/sys/dev/de/if_de.c Thu Oct 8 13:57:51 2009 (r197858)
@@ -160,7 +160,7 @@ static void tulip_dma_map_rxbuf(void *,
static void
tulip_dma_map_addr(void *arg, bus_dma_segment_t *segs, int nseg, int error)
{
- u_int32_t *paddr;
+ bus_addr_t *paddr;
if (error)
return;
@@ -182,7 +182,7 @@ tulip_dma_map_rxbuf(void *arg, bus_dma_s
KASSERT(nseg == 1, ("too many DMA segments"));
KASSERT(segs[0].ds_len >= TULIP_RX_BUFLEN, ("receive buffer too small"));
- desc->d_addr1 = segs[0].ds_addr;
+ desc->d_addr1 = segs[0].ds_addr & 0xffffffff;
desc->d_length1 = TULIP_RX_BUFLEN;
#ifdef not_needed
/* These should already always be zero. */
@@ -3171,8 +3171,8 @@ tulip_reset(tulip_softc_t * const sc)
sc->tulip_ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
}
- TULIP_CSR_WRITE(sc, csr_txlist, sc->tulip_txinfo.ri_dma_addr);
- TULIP_CSR_WRITE(sc, csr_rxlist, sc->tulip_rxinfo.ri_dma_addr);
+ TULIP_CSR_WRITE(sc, csr_txlist, sc->tulip_txinfo.ri_dma_addr & 0xffffffff);
+ TULIP_CSR_WRITE(sc, csr_rxlist, sc->tulip_rxinfo.ri_dma_addr & 0xffffffff);
TULIP_CSR_WRITE(sc, csr_busmode,
(1 << (3 /*pci_max_burst_len*/ + 8))
|TULIP_BUSMODE_CACHE_ALIGN8
@@ -3488,7 +3488,7 @@ tulip_rx_intr(tulip_softc_t * const sc)
struct mbuf *m0;
KASSERT(ms != NULL, ("no packet to accept"));
-#if defined(TULIP_COPY_RXDATA)
+#ifndef __NO_STRICT_ALIGNMENT
/*
* Copy the data into a new mbuf that is properly aligned. If
* we fail to allocate a new mbuf, then drop the packet. We will
@@ -3527,7 +3527,7 @@ tulip_rx_intr(tulip_softc_t * const sc)
*/
ms = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
-#if defined(TULIP_COPY_RXDATA)
+#ifndef __NO_STRICT_ALIGNMENT
skip_input:
#endif
if (ms == NULL) {
@@ -4016,9 +4016,9 @@ tulip_txput(tulip_softc_t * const sc, st
eop = nextout;
eop->di_desc->d_flag &= TULIP_DFLAG_ENDRING|TULIP_DFLAG_CHAIN;
eop->di_desc->d_status = d_status;
- eop->di_desc->d_addr1 = segs[segcnt].ds_addr;
+ eop->di_desc->d_addr1 = segs[segcnt].ds_addr & 0xffffffff;
eop->di_desc->d_length1 = segs[segcnt].ds_len;
- eop->di_desc->d_addr2 = segs[segcnt+1].ds_addr;
+ eop->di_desc->d_addr2 = segs[segcnt+1].ds_addr & 0xffffffff;
eop->di_desc->d_length2 = segs[segcnt+1].ds_len;
d_status = TULIP_DSTS_OWNER;
if (++nextout == ri->ri_last)
@@ -4028,7 +4028,7 @@ tulip_txput(tulip_softc_t * const sc, st
eop = nextout;
eop->di_desc->d_flag &= TULIP_DFLAG_ENDRING|TULIP_DFLAG_CHAIN;
eop->di_desc->d_status = d_status;
- eop->di_desc->d_addr1 = segs[segcnt].ds_addr;
+ eop->di_desc->d_addr1 = segs[segcnt].ds_addr & 0xffffffff;
eop->di_desc->d_length1 = segs[segcnt].ds_len;
eop->di_desc->d_addr2 = 0;
eop->di_desc->d_length2 = 0;
@@ -4194,7 +4194,7 @@ tulip_txput_setup(tulip_softc_t * const
nextout->d_length2 = 0;
nextout->d_addr2 = 0;
nextout->d_length1 = sizeof(sc->tulip_setupdata);
- nextout->d_addr1 = sc->tulip_setup_dma_addr;
+ nextout->d_addr1 = sc->tulip_setup_dma_addr & 0xffffffff;
bus_dmamap_sync(sc->tulip_setup_tag, sc->tulip_setup_map,
BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
TULIP_TXDESC_PRESYNC(ri);
@@ -4491,7 +4491,7 @@ tulip_busdma_freering(tulip_ringinfo_t *
/* Allocate memory for a single descriptor ring. */
static int
tulip_busdma_allocring(device_t dev, tulip_softc_t * const sc, size_t count,
- bus_size_t maxsize, int nsegs, tulip_ringinfo_t *ri, const char *name)
+ bus_size_t align, int nsegs, tulip_ringinfo_t *ri, const char *name)
{
size_t size;
int error, i;
@@ -4499,7 +4499,7 @@ tulip_busdma_allocring(device_t dev, tul
/* First, setup a tag. */
ri->ri_max = count;
size = count * sizeof(tulip_desc_t);
- error = bus_dma_tag_create(NULL, PAGE_SIZE, 0, BUS_SPACE_MAXADDR_32BIT,
+ error = bus_dma_tag_create(NULL, 32, 0, BUS_SPACE_MAXADDR_32BIT,
BUS_SPACE_MAXADDR, NULL, NULL, size, 1, size, 0, NULL, NULL,
&ri->ri_ring_tag);
if (error) {
@@ -4527,9 +4527,9 @@ tulip_busdma_allocring(device_t dev, tul
}
/* Allocate a tag for the data buffers. */
- error = bus_dma_tag_create(NULL, 4, 0,
+ error = bus_dma_tag_create(NULL, align, 0,
BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
- maxsize, nsegs, TULIP_DATA_PER_DESC, 0, NULL, NULL, &ri->ri_data_tag);
+ MCLBYTES * nsegs, nsegs, MCLBYTES, 0, NULL, NULL, &ri->ri_data_tag);
if (error) {
device_printf(dev, "failed to allocate %s buffer dma tag\n", name);
return (error);
@@ -4563,6 +4563,7 @@ tulip_busdma_cleanup(tulip_softc_t * con
if (sc->tulip_setupbuf != NULL) {
bus_dmamem_free(sc->tulip_setup_tag, sc->tulip_setupbuf,
sc->tulip_setup_map);
+ bus_dmamap_destroy(sc->tulip_setup_tag, sc->tulip_setup_map);
sc->tulip_setup_map = NULL;
sc->tulip_setupbuf = NULL;
}
@@ -4586,8 +4587,8 @@ tulip_busdma_init(device_t dev, tulip_so
/*
* Allocate space and dmamap for transmit ring.
*/
- error = tulip_busdma_allocring(dev, sc, TULIP_TXDESCS, TULIP_DATA_PER_DESC,
- TULIP_MAX_TXSEG, &sc->tulip_txinfo, "transmit");
+ error = tulip_busdma_allocring(dev, sc, TULIP_TXDESCS, 1, TULIP_MAX_TXSEG,
+ &sc->tulip_txinfo, "transmit");
if (error)
return (error);
@@ -4598,7 +4599,7 @@ tulip_busdma_init(device_t dev, tulip_so
* a waste in practice though as an ethernet frame can easily fit
* in TULIP_RX_BUFLEN bytes.
*/
- error = tulip_busdma_allocring(dev, sc, TULIP_RXDESCS, MCLBYTES, 1,
+ error = tulip_busdma_allocring(dev, sc, TULIP_RXDESCS, 4, 1,
&sc->tulip_rxinfo, "receive");
if (error)
return (error);
@@ -4606,7 +4607,7 @@ tulip_busdma_init(device_t dev, tulip_so
/*
* Allocate a DMA tag, memory, and map for setup descriptor
*/
- error = bus_dma_tag_create(NULL, 4, 0,
+ error = bus_dma_tag_create(NULL, 32, 0,
BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
sizeof(sc->tulip_setupdata), 1, sizeof(sc->tulip_setupdata), 0,
NULL, NULL, &sc->tulip_setup_tag);
Modified: projects/capabilities8/sys/dev/de/if_devar.h
==============================================================================
--- projects/capabilities8/sys/dev/de/if_devar.h Thu Oct 8 11:42:24 2009 (r197857)
+++ projects/capabilities8/sys/dev/de/if_devar.h Thu Oct 8 13:57:51 2009 (r197858)
@@ -104,7 +104,7 @@ typedef struct {
tulip_descinfo_t *ri_descinfo;
bus_dma_tag_t ri_ring_tag;
bus_dmamap_t ri_ring_map;
- uint32_t ri_dma_addr;
+ bus_addr_t ri_dma_addr;
bus_dma_tag_t ri_data_tag;
bus_dmamap_t *ri_data_maps;
} tulip_ringinfo_t;
@@ -134,11 +134,7 @@ typedef struct {
* architecture which can't handle unaligned accesses) because with
* 100Mb/s cards the copying is just too much of a hit.
*/
-#if !defined(__i386__)
-#define TULIP_COPY_RXDATA 1
-#endif
-#define TULIP_DATA_PER_DESC 2032
#define TULIP_TXTIMER 4
#define TULIP_RXDESCS 48
#define TULIP_TXDESCS 128
@@ -560,7 +556,7 @@ struct tulip_softc {
*/
bus_dma_tag_t tulip_setup_tag;
bus_dmamap_t tulip_setup_map;
- uint32_t tulip_setup_dma_addr;
+ bus_addr_t tulip_setup_dma_addr;
u_int32_t *tulip_setupbuf;
u_int32_t tulip_setupdata[192 / sizeof(u_int32_t)];
char tulip_boardid[24];
Modified: projects/capabilities8/sys/dev/if_ndis/if_ndis.c
==============================================================================
--- projects/capabilities8/sys/dev/if_ndis/if_ndis.c Thu Oct 8 11:42:24 2009 (r197857)
+++ projects/capabilities8/sys/dev/if_ndis/if_ndis.c Thu Oct 8 13:57:51 2009 (r197858)
@@ -1012,7 +1012,12 @@ static void
ndis_vap_delete(struct ieee80211vap *vap)
{
struct ndis_vap *nvp = NDIS_VAP(vap);
+ struct ieee80211com *ic = vap->iv_ic;
+ struct ifnet *ifp = ic->ic_ifp;
+ struct ndis_softc *sc = ifp->if_softc;
+ ndis_stop(sc);
+ callout_drain(&sc->ndis_scan_callout);
ieee80211_vap_detach(vap);
free(nvp, M_80211_VAP);
}
@@ -1529,7 +1534,7 @@ ndis_inputtask(dobj, arg)
if (m == NULL)
break;
KeReleaseSpinLock(&sc->ndis_rxlock, irql);
- if (sc->ndis_80211)
+ if ((sc->ndis_80211 != 0) && (vap != NULL))
vap->iv_deliver_data(vap, vap->iv_bss, m);
else
(*ifp->if_input)(ifp, m);
@@ -1741,7 +1746,7 @@ ndis_ticktask(d, xsc)
sc->ndis_sts == NDIS_STATUS_MEDIA_CONNECT) {
sc->ndis_link = 1;
NDIS_UNLOCK(sc);
- if (sc->ndis_80211) {
+ if ((sc->ndis_80211 != 0) && (vap != NULL)) {
ndis_getstate_80211(sc);
ieee80211_new_state(vap, IEEE80211_S_RUN, -1);
}
@@ -1753,7 +1758,7 @@ ndis_ticktask(d, xsc)
sc->ndis_sts == NDIS_STATUS_MEDIA_DISCONNECT) {
sc->ndis_link = 0;
NDIS_UNLOCK(sc);
- if (sc->ndis_80211)
+ if ((sc->ndis_80211 != 0) && (vap != NULL))
ieee80211_new_state(vap, IEEE80211_S_SCAN, 0);
NDIS_LOCK(sc);
if_link_state_change(sc->ifp, LINK_STATE_DOWN);
@@ -2042,9 +2047,6 @@ ndis_init(xsc)
/* Setup task offload. */
ndis_set_offload(sc);
- if (sc->ndis_80211)
- ndis_setstate_80211(sc);
-
NDIS_LOCK(sc);
sc->ndis_txidx = 0;
@@ -2292,8 +2294,6 @@ ndis_setstate_80211(sc)
ifp = sc->ifp;
ic = ifp->if_l2com;
vap = TAILQ_FIRST(&ic->ic_vaps);
- if (vap == NULL)
- return;
if (!NDIS_INITIALIZED(sc)) {
DPRINTF(("%s: NDIS not initialized\n", __func__));
@@ -2725,8 +2725,6 @@ ndis_getstate_80211(sc)
ifp = sc->ifp;
ic = ifp->if_l2com;
vap = TAILQ_FIRST(&ic->ic_vaps);
- if (vap == NULL)
- return;
ni = vap->iv_bss;
if (!NDIS_INITIALIZED(sc))
Modified: projects/capabilities8/sys/dev/mxge/if_mxge.c
==============================================================================
--- projects/capabilities8/sys/dev/mxge/if_mxge.c Thu Oct 8 11:42:24 2009 (r197857)
+++ projects/capabilities8/sys/dev/mxge/if_mxge.c Thu Oct 8 13:57:51 2009 (r197858)
@@ -3653,10 +3653,16 @@ mxge_setup_cfg_space(mxge_softc_t *sc)
if (pci_find_extcap(dev, PCIY_EXPRESS, ®) == 0) {
lnk = pci_read_config(dev, reg + 0x12, 2);
sc->link_width = (lnk >> 4) & 0x3f;
-
- pectl = pci_read_config(dev, reg + 0x8, 2);
- pectl = (pectl & ~0x7000) | (5 << 12);
- pci_write_config(dev, reg + 0x8, pectl, 2);
+
+ if (sc->pectl == 0) {
+ pectl = pci_read_config(dev, reg + 0x8, 2);
+ pectl = (pectl & ~0x7000) | (5 << 12);
+ pci_write_config(dev, reg + 0x8, pectl, 2);
+ sc->pectl = pectl;
+ } else {
+ /* restore saved pectl after watchdog reset */
+ pci_write_config(dev, reg + 0x8, sc->pectl, 2);
+ }
}
/* Enable DMA and Memory space access */
@@ -3768,6 +3774,9 @@ mxge_watchdog_reset(mxge_softc_t *sc, in
/* release all TX locks */
for (s = 0; s < num_tx_slices; s++) {
ss = &sc->ss[s];
+#ifdef IFNET_BUF_RING
+ mxge_start_locked(ss);
+#endif
mtx_unlock(&ss->tx.mtx);
}
}
Modified: projects/capabilities8/sys/dev/mxge/if_mxge_var.h
==============================================================================
--- projects/capabilities8/sys/dev/mxge/if_mxge_var.h Thu Oct 8 11:42:24 2009 (r197857)
+++ projects/capabilities8/sys/dev/mxge/if_mxge_var.h Thu Oct 8 13:57:51 2009 (r197858)
@@ -273,6 +273,7 @@ struct mxge_softc {
struct sysctl_ctx_list slice_sysctl_ctx;
char *mac_addr_string;
uint8_t mac_addr[6]; /* eeprom mac address */
+ uint16_t pectl; /* save PCIe CTL state */
char product_code_string[64];
char serial_number_string[64];
char cmd_mtx_name[16];
Modified: projects/capabilities8/sys/dev/usb/controller/ehci.c
==============================================================================
--- projects/capabilities8/sys/dev/usb/controller/ehci.c Thu Oct 8 11:42:24 2009 (r197857)
+++ projects/capabilities8/sys/dev/usb/controller/ehci.c Thu Oct 8 13:57:51 2009 (r197858)
@@ -131,6 +131,7 @@ struct ehci_std_temp {
uint8_t auto_data_toggle;
uint8_t setup_alt_next;
uint8_t last_frame;
+ uint8_t can_use_next;
};
void
@@ -1207,11 +1208,6 @@ ehci_non_isoc_done_sub(struct usb_xfer *
xfer->td_transfer_cache = td;
- /* update data toggle */
-
- xfer->endpoint->toggle_next =
- (status & EHCI_QTD_TOGGLE_MASK) ? 1 : 0;
-
#if USB_DEBUG
if (status & EHCI_QTD_STATERRS) {
DPRINTFN(11, "error, addr=%d, endpt=0x%02x, frame=0x%02x"
@@ -1235,6 +1231,9 @@ ehci_non_isoc_done_sub(struct usb_xfer *
static void
ehci_non_isoc_done(struct usb_xfer *xfer)
{
+ ehci_softc_t *sc = EHCI_BUS2SC(xfer->xroot->bus);
+ ehci_qh_t *qh;
+ uint32_t status;
usb_error_t err = 0;
DPRINTFN(13, "xfer=%p endpoint=%p transfer done\n",
@@ -1248,6 +1247,17 @@ ehci_non_isoc_done(struct usb_xfer *xfer
}
#endif
+ /* extract data toggle directly from the QH's overlay area */
+
+ qh = xfer->qh_start[xfer->flags_int.curr_dma_set];
+
+ usb_pc_cpu_invalidate(qh->page_cache);
+
+ status = hc32toh(sc, qh->qh_qtd.qtd_status);
+
+ xfer->endpoint->toggle_next =
+ (status & EHCI_QTD_TOGGLE_MASK) ? 1 : 0;
+
/* reset scanner */
xfer->td_transfer_cache = xfer->td_transfer_first;
@@ -1348,6 +1358,7 @@ ehci_check_transfer(struct usb_xfer *xfe
}
} else {
ehci_qtd_t *td;
+ ehci_qh_t *qh;
/* non-isochronous transfer */
@@ -1357,16 +1368,35 @@ ehci_check_transfer(struct usb_xfer *xfe
*/
td = xfer->td_transfer_cache;
+ qh = xfer->qh_start[xfer->flags_int.curr_dma_set];
+
+ usb_pc_cpu_invalidate(qh->page_cache);
+
+ status = hc32toh(sc, qh->qh_qtd.qtd_status);
+ if (status & EHCI_QTD_ACTIVE) {
+ /* transfer is pending */
+ goto done;
+ }
+
while (1) {
usb_pc_cpu_invalidate(td->page_cache);
status = hc32toh(sc, td->qtd_status);
/*
- * if there is an active TD the transfer isn't done
+ * Check if there is an active TD which
+ * indicates that the transfer isn't done.
*/
if (status & EHCI_QTD_ACTIVE) {
/* update cache */
- xfer->td_transfer_cache = td;
+ if (xfer->td_transfer_cache != td) {
+ xfer->td_transfer_cache = td;
+ if (qh->qh_qtd.qtd_next &
+ htohc32(sc, EHCI_LINK_TERMINATE)) {
+ /* XXX - manually advance to next frame */
+ qh->qh_qtd.qtd_next = td->qtd_self;
+ usb_pc_cpu_flush(td->page_cache);
+ }
+ }
goto done;
}
/*
@@ -1545,7 +1575,6 @@ ehci_setup_standard_chain_sub(struct ehc
ehci_qtd_t *td;
ehci_qtd_t *td_next;
ehci_qtd_t *td_alt_next;
- uint32_t qtd_altnext;
uint32_t buf_offset;
uint32_t average;
uint32_t len_old;
@@ -1554,7 +1583,6 @@ ehci_setup_standard_chain_sub(struct ehc
uint8_t precompute;
terminate = htohc32(temp->sc, EHCI_LINK_TERMINATE);
- qtd_altnext = terminate;
td_alt_next = NULL;
buf_offset = 0;
shortpkt_old = temp->shortpkt;
@@ -1612,7 +1640,8 @@ restart:
td->qtd_status =
temp->qtd_status |
- htohc32(temp->sc, EHCI_QTD_SET_BYTES(average));
+ htohc32(temp->sc, EHCI_QTD_IOC |
+ EHCI_QTD_SET_BYTES(average));
if (average == 0) {
@@ -1687,11 +1716,23 @@ restart:
td->qtd_buffer_hi[x] = 0;
}
- if (td_next) {
- /* link the current TD with the next one */
- td->qtd_next = td_next->qtd_self;
+ if (temp->can_use_next) {
+ if (td_next) {
+ /* link the current TD with the next one */
+ td->qtd_next = td_next->qtd_self;
+ }
+ } else {
+ /*
+ * BUG WARNING: The EHCI HW can use the
+ * qtd_next field instead of qtd_altnext when
+ * a short packet is received! We work this
+ * around in software by not queueing more
+ * than one job/TD at a time!
+ */
+ td->qtd_next = terminate;
}
- td->qtd_altnext = qtd_altnext;
+
+ td->qtd_altnext = terminate;
td->alt_next = td_alt_next;
usb_pc_cpu_flush(td->page_cache);
@@ -1703,15 +1744,9 @@ restart:
/* setup alt next pointer, if any */
if (temp->last_frame) {
td_alt_next = NULL;
- qtd_altnext = terminate;
} else {
/* we use this field internally */
td_alt_next = td_next;
- if (temp->setup_alt_next) {
- qtd_altnext = td_next->qtd_self;
- } else {
- qtd_altnext = terminate;
- }
}
/* restore */
@@ -1756,6 +1791,8 @@ ehci_setup_standard_chain(struct usb_xfe
temp.qtd_status = 0;
temp.last_frame = 0;
temp.setup_alt_next = xfer->flags_int.short_frames_ok;
+ temp.can_use_next = (xfer->flags_int.control_xfr ||
+ (UE_GET_DIR(xfer->endpointno) == UE_DIR_OUT));
if (xfer->flags_int.control_xfr) {
if (xfer->endpoint->toggle_next) {
@@ -1889,7 +1926,6 @@ ehci_setup_standard_chain(struct usb_xfe
/* the last TD terminates the transfer: */
td->qtd_next = htohc32(temp.sc, EHCI_LINK_TERMINATE);
td->qtd_altnext = htohc32(temp.sc, EHCI_LINK_TERMINATE);
- td->qtd_status |= htohc32(temp.sc, EHCI_QTD_IOC);
usb_pc_cpu_flush(td->page_cache);
Modified: projects/capabilities8/sys/i386/i386/initcpu.c
==============================================================================
--- projects/capabilities8/sys/i386/i386/initcpu.c Thu Oct 8 11:42:24 2009 (r197857)
+++ projects/capabilities8/sys/i386/i386/initcpu.c Thu Oct 8 13:57:51 2009 (r197858)
@@ -717,6 +717,12 @@ initializecpu(void)
*/
if ((cpu_feature & CPUID_CLFSH) != 0)
cpu_clflush_line_size = ((cpu_procinfo >> 8) & 0xff) * 8;
+ /*
+ * XXXKIB: (temporary) hack to work around traps generated when
+ * CLFLUSHing APIC registers window.
+ */
+ if (cpu_vendor_id == CPU_VENDOR_INTEL && !(cpu_feature & CPUID_SS))
+ cpu_feature &= ~CPUID_CLFSH;
#if defined(PC98) && !defined(CPU_UPGRADE_HW_CACHE)
/*
Modified: projects/capabilities8/sys/kern/init_main.c
==============================================================================
--- projects/capabilities8/sys/kern/init_main.c Thu Oct 8 11:42:24 2009 (r197857)
+++ projects/capabilities8/sys/kern/init_main.c Thu Oct 8 13:57:51 2009 (r197858)
@@ -492,6 +492,11 @@ proc0_init(void *dummy __unused)
pmap_pinit0(vmspace_pmap(&vmspace0));
p->p_vmspace = &vmspace0;
vmspace0.vm_refcnt = 1;
+
+ /*
+ * proc0 is not expected to enter usermode, so there is no special
+ * handling for sv_minuser here, like is done for exec_new_vmspace().
+ */
vm_map_init(&vmspace0.vm_map, p->p_sysent->sv_minuser,
p->p_sysent->sv_maxuser);
vmspace0.vm_map.pmap = vmspace_pmap(&vmspace0);
Modified: projects/capabilities8/sys/kern/kern_exec.c
==============================================================================
--- projects/capabilities8/sys/kern/kern_exec.c Thu Oct 8 11:42:24 2009 (r197857)
+++ projects/capabilities8/sys/kern/kern_exec.c Thu Oct 8 13:57:51 2009 (r197858)
@@ -122,6 +122,11 @@ u_long ps_arg_cache_limit = PAGE_SIZE /
SYSCTL_ULONG(_kern, OID_AUTO, ps_arg_cache_limit, CTLFLAG_RW,
&ps_arg_cache_limit, 0, "");
+static int map_at_zero = 0;
+TUNABLE_INT("security.bsd.map_at_zero", &map_at_zero);
+SYSCTL_INT(_security_bsd, OID_AUTO, map_at_zero, CTLFLAG_RW, &map_at_zero, 0,
+ "Permit processes to map an object at virtual address 0.");
+
static int
sysctl_kern_ps_strings(SYSCTL_HANDLER_ARGS)
{
@@ -999,7 +1004,7 @@ exec_new_vmspace(imgp, sv)
int error;
struct proc *p = imgp->proc;
struct vmspace *vmspace = p->p_vmspace;
- vm_offset_t stack_addr;
+ vm_offset_t sv_minuser, stack_addr;
vm_map_t map;
u_long ssiz;
@@ -1015,13 +1020,17 @@ exec_new_vmspace(imgp, sv)
* not disrupted
*/
map = &vmspace->vm_map;
- if (vmspace->vm_refcnt == 1 && vm_map_min(map) == sv->sv_minuser &&
+ if (map_at_zero)
+ sv_minuser = sv->sv_minuser;
+ else
+ sv_minuser = MAX(sv->sv_minuser, PAGE_SIZE);
+ if (vmspace->vm_refcnt == 1 && vm_map_min(map) == sv_minuser &&
vm_map_max(map) == sv->sv_maxuser) {
shmexit(vmspace);
pmap_remove_pages(vmspace_pmap(vmspace));
vm_map_remove(map, vm_map_min(map), vm_map_max(map));
} else {
- error = vmspace_exec(p, sv->sv_minuser, sv->sv_maxuser);
+ error = vmspace_exec(p, sv_minuser, sv->sv_maxuser);
if (error)
return (error);
vmspace = p->p_vmspace;
Modified: projects/capabilities8/sys/kern/kern_sig.c
==============================================================================
--- projects/capabilities8/sys/kern/kern_sig.c Thu Oct 8 11:42:24 2009 (r197857)
+++ projects/capabilities8/sys/kern/kern_sig.c Thu Oct 8 13:57:51 2009 (r197858)
@@ -1888,7 +1888,7 @@ sigtd(struct proc *p, int sig, int prop)
/*
* Check if current thread can handle the signal without
- * switching conetxt to another thread.
+ * switching context to another thread.
*/
if (curproc == p && !SIGISMEMBER(curthread->td_sigmask, sig))
return (curthread);
Modified: projects/capabilities8/sys/modules/nfslockd/Makefile
==============================================================================
--- projects/capabilities8/sys/modules/nfslockd/Makefile Thu Oct 8 11:42:24 2009 (r197857)
+++ projects/capabilities8/sys/modules/nfslockd/Makefile Thu Oct 8 13:57:51 2009 (r197858)
@@ -14,18 +14,12 @@ SRCS+= opt_inet6.h opt_nfs.h
.if !defined(KERNBUILDDIR)
NFS_INET6?= 1 # 0/1 - requires INET6 to be configured in kernel
-NFSCLIENT?= 1 # 0/1 - requires NFSCLIENT to be configured in kernel
.if ${NFS_INET6} > 0
opt_inet6.h:
echo "#define INET6 1" > ${.TARGET}
.endif
-.if ${NFSCLIENT} > 0
-opt_nfs.h:
- echo "#define NFSCLIENT 1" > ${.TARGET}
-.endif
-
.endif
.include <bsd.kmod.mk>
Modified: projects/capabilities8/sys/net/flowtable.c
==============================================================================
--- projects/capabilities8/sys/net/flowtable.c Thu Oct 8 11:42:24 2009 (r197857)
+++ projects/capabilities8/sys/net/flowtable.c Thu Oct 8 13:57:51 2009 (r197858)
@@ -830,7 +830,7 @@ fle_free(struct flentry *fle)
}
static void
-flowtable_free_stale(struct flowtable *ft)
+flowtable_free_stale(struct flowtable *ft, struct rtentry *rt)
{
int curbit = 0, count;
struct flentry *fle, **flehead, *fleprev;
@@ -866,8 +866,14 @@ flowtable_free_stale(struct flowtable *f
curbit);
}
#endif
- while (fle != NULL) {
- if (!flow_stale(ft, fle)) {
+ while (fle != NULL) {
+ if (rt != NULL) {
+ if (__DEVOLATILE(struct rtentry *, fle->f_rt) != rt) {
+ fleprev = fle;
+ fle = fle->f_next;
+ continue;
+ }
+ } else if (!flow_stale(ft, fle)) {
fleprev = fle;
fle = fle->f_next;
continue;
@@ -916,6 +922,30 @@ flowtable_free_stale(struct flowtable *f
log(LOG_DEBUG, "freed %d flow entries\n", count);
}
+void
+flowtable_route_flush(struct flowtable *ft, struct rtentry *rt)
+{
+ int i;
+ if (ft->ft_flags & FL_PCPU) {
+ for (i = 0; i <= mp_maxid; i++) {
+ if (CPU_ABSENT(i))
+ continue;
+
+ thread_lock(curthread);
+ sched_bind(curthread, i);
+ thread_unlock(curthread);
+
+ flowtable_free_stale(ft, rt);
+
+ thread_lock(curthread);
+ sched_unbind(curthread);
+ thread_unlock(curthread);
+ }
+ } else {
+ flowtable_free_stale(ft, rt);
+ }
+}
+
static void
flowtable_clean_vnet(void)
{
@@ -933,14 +963,14 @@ flowtable_clean_vnet(void)
sched_bind(curthread, i);
thread_unlock(curthread);
- flowtable_free_stale(ft);
+ flowtable_free_stale(ft, NULL);
thread_lock(curthread);
sched_unbind(curthread);
thread_unlock(curthread);
}
} else {
- flowtable_free_stale(ft);
+ flowtable_free_stale(ft, NULL);
}
ft = ft->ft_next;
}
Modified: projects/capabilities8/sys/net/flowtable.h
==============================================================================
--- projects/capabilities8/sys/net/flowtable.h Thu Oct 8 11:42:24 2009 (r197857)
+++ projects/capabilities8/sys/net/flowtable.h Thu Oct 8 13:57:51 2009 (r197858)
@@ -51,5 +51,7 @@ struct flowtable *flowtable_alloc(int ne
int flowtable_lookup(struct flowtable *ft, struct mbuf *m,
struct route *ro, uint32_t fibnum);
+void flowtable_route_flush(struct flowtable *ft, struct rtentry *rt);
+
#endif /* _KERNEL */
#endif
Modified: projects/capabilities8/sys/net/route.c
==============================================================================
--- projects/capabilities8/sys/net/route.c Thu Oct 8 11:42:24 2009 (r197857)
+++ projects/capabilities8/sys/net/route.c Thu Oct 8 13:57:51 2009 (r197858)
@@ -56,6 +56,7 @@
#include <net/if_dl.h>
#include <net/route.h>
#include <net/vnet.h>
+#include <net/flowtable.h>
#ifdef RADIX_MPATH
#include <net/radix_mpath.h>
@@ -996,6 +997,9 @@ rtrequest1_fib(int req, struct rt_addrin
{
int error = 0, needlock = 0;
register struct rtentry *rt;
+#ifdef FLOWTABLE
+ register struct rtentry *rt0;
+#endif
register struct radix_node *rn;
register struct radix_node_head *rnh;
struct ifaddr *ifa;
@@ -1153,6 +1157,53 @@ rtrequest1_fib(int req, struct rt_addrin
}
#endif
+#ifdef FLOWTABLE
+ rt0 = NULL;
+ /* XXX
+ * "flow-table" only support IPv4 at the moment.
+ */
+ if (dst->sa_family == AF_INET) {
+ rn = rnh->rnh_matchaddr(dst, rnh);
+ if (rn && ((rn->rn_flags & RNF_ROOT) == 0)) {
+ struct sockaddr *mask;
+ u_char *m, *n;
+ int len;
+
+ /*
+ * compare mask to see if the new route is
+ * more specific than the existing one
+ */
+ rt0 = RNTORT(rn);
+ RT_LOCK(rt0);
+ RT_ADDREF(rt0);
+ RT_UNLOCK(rt0);
+ /*
+ * A host route is already present, so
+ * leave the flow-table entries as is.
+ */
+ if (rt0->rt_flags & RTF_HOST) {
+ RTFREE(rt0);
+ rt0 = NULL;
+ } else if (!(flags & RTF_HOST) && netmask) {
+ mask = rt_mask(rt0);
+ len = mask->sa_len;
+ m = (u_char *)mask;
+ n = (u_char *)netmask;
+ while (len-- > 0) {
+ if (*n != *m)
+ break;
+ n++;
+ m++;
+ }
+ if (len == 0 || (*n < *m)) {
+ RTFREE(rt0);
+ rt0 = NULL;
+ }
+ }
+ }
+ }
+#endif
+
/* XXX mtu manipulation will be done in rnh_addaddr -- itojun */
rn = rnh->rnh_addaddr(ndst, netmask, rnh, rt->rt_nodes);
/*
@@ -1165,8 +1216,18 @@ rtrequest1_fib(int req, struct rt_addrin
Free(rt_key(rt));
RT_LOCK_DESTROY(rt);
uma_zfree(V_rtzone, rt);
+#ifdef FLOWTABLE
+ if (rt0 != NULL)
+ RTFREE(rt0);
+#endif
senderr(EEXIST);
+ }
+#ifdef FLOWTABLE
+ else if (rt0 != NULL) {
+ flowtable_route_flush(V_ip_ft, rt0);
+ RTFREE(rt0);
}
+#endif
/*
* If this protocol has something to add to this then
Modified: projects/capabilities8/sys/netinet/in.c
==============================================================================
--- projects/capabilities8/sys/netinet/in.c Thu Oct 8 11:42:24 2009 (r197857)
+++ projects/capabilities8/sys/netinet/in.c Thu Oct 8 13:57:51 2009 (r197858)
@@ -1060,6 +1060,8 @@ in_scrubprefix(struct in_ifaddr *target)
!(target->ia_ifp->if_flags & IFF_LOOPBACK)) {
error = ifa_del_loopback_route((struct ifaddr *)target,
(struct sockaddr *)&target->ia_addr);
+ /* remove arp cache */
+ arp_ifscrub(target->ia_ifp, IA_SIN(target)->sin_addr.s_addr);
}
if ((target->ia_flags & IFA_ROUTE) == 0) {
@@ -1082,8 +1084,6 @@ in_scrubprefix(struct in_ifaddr *target)
prefix = target->ia_addr.sin_addr;
mask = target->ia_sockmask.sin_addr;
prefix.s_addr &= mask.s_addr;
- /* remove arp cache */
- arp_ifscrub(target->ia_ifp, IA_SIN(target)->sin_addr.s_addr);
}
IN_IFADDR_RLOCK();
@@ -1327,8 +1327,10 @@ in_lltable_rtcheck(struct ifnet *ifp, co
/* XXX rtalloc1 should take a const param */
rt = rtalloc1(__DECONST(struct sockaddr *, l3addr), 0, 0);
if (rt == NULL || (rt->rt_flags & RTF_GATEWAY) || rt->rt_ifp != ifp) {
+#ifdef DIAGNOSTICS
log(LOG_INFO, "IPv4 address: \"%s\" is not on the network\n",
inet_ntoa(((const struct sockaddr_in *)l3addr)->sin_addr));
+#endif
if (rt != NULL)
RTFREE_LOCKED(rt);
return (EINVAL);
Modified: projects/capabilities8/sys/netinet/tcp_input.c
==============================================================================
--- projects/capabilities8/sys/netinet/tcp_input.c Thu Oct 8 11:42:24 2009 (r197857)
+++ projects/capabilities8/sys/netinet/tcp_input.c Thu Oct 8 13:57:51 2009 (r197858)
@@ -648,6 +648,7 @@ findpcb:
* tried to free the inpcb, in which case we need to loop back and
* try to find a new inpcb to deliver to.
*/
+relocked:
if (inp->inp_flags & INP_TIMEWAIT) {
KASSERT(ti_locked == TI_RLOCKED || ti_locked == TI_WLOCKED,
("%s: INP_TIMEWAIT ti_locked %d", __func__, ti_locked));
@@ -698,7 +699,8 @@ findpcb:
* We've identified a valid inpcb, but it could be that we need an
* inpcbinfo write lock and have only a read lock. In this case,
* attempt to upgrade/relock using the same strategy as the TIMEWAIT
- * case above.
+ * case above. If we relock, we have to jump back to 'relocked' as
+ * the connection might now be in TIMEWAIT.
*/
if (tp->t_state != TCPS_ESTABLISHED ||
(thflags & (TH_SYN | TH_FIN | TH_RST)) != 0 ||
@@ -720,6 +722,7 @@ findpcb:
goto findpcb;
}
tcp_wlock_relocked++;
+ goto relocked;
} else {
ti_locked = TI_WLOCKED;
tcp_wlock_upgraded++;
Modified: projects/capabilities8/sys/nlm/nlm_prot_impl.c
==============================================================================
--- projects/capabilities8/sys/nlm/nlm_prot_impl.c Thu Oct 8 11:42:24 2009 (r197857)
+++ projects/capabilities8/sys/nlm/nlm_prot_impl.c Thu Oct 8 13:57:51 2009 (r197858)
@@ -26,7 +26,6 @@
*/
#include "opt_inet6.h"
-#include "opt_nfs.h"
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
@@ -671,8 +670,6 @@ nlm_host_destroy(struct nlm_host *host)
free(host, M_NLM);
}
-#ifdef NFSCLIENT
-
/*
* Thread start callback for client lock recovery
*/
@@ -695,8 +692,6 @@ nlm_client_recovery_start(void *arg)
kthread_exit();
}
-#endif
-
/*
* This is called when we receive a host state change notification. We
* unlock any active locks owned by the host. When rpc.lockd is
@@ -735,7 +730,6 @@ nlm_host_notify(struct nlm_host *host, i
lf_clearremotesys(host->nh_sysid);
host->nh_state = newstate;
-#ifdef NFSCLIENT
/*
* If we have any remote locks for this host (i.e. it
* represents a remote NFS server that our local NFS client
@@ -750,7 +744,6 @@ nlm_host_notify(struct nlm_host *host, i
kthread_add(nlm_client_recovery_start, host, curproc, &td, 0, 0,
"NFS lock recovery for %s", host->nh_caller_name);
}
-#endif
}
/*
@@ -1479,10 +1472,8 @@ nlm_server_main(int addr_count, char **a
enum clnt_stat stat;
struct nlm_host *host, *nhost;
struct nlm_waiting_lock *nw;
-#ifdef NFSCLIENT
vop_advlock_t *old_nfs_advlock;
vop_reclaim_t *old_nfs_reclaim;
-#endif
int v4_used;
#ifdef INET6
int v6_used;
@@ -1583,20 +1574,16 @@ nlm_server_main(int addr_count, char **a
NLM_DEBUG(1, "NLM: local NSM state is %d\n", smstat.state);
nlm_nsm_state = smstat.state;
-#ifdef NFSCLIENT
old_nfs_advlock = nfs_advlock_p;
nfs_advlock_p = nlm_advlock;
old_nfs_reclaim = nfs_reclaim_p;
nfs_reclaim_p = nlm_reclaim;
-#endif
svc_run(pool);
error = 0;
-#ifdef NFSCLIENT
nfs_advlock_p = old_nfs_advlock;
nfs_reclaim_p = old_nfs_reclaim;
-#endif
out:
if (pool)
Modified: projects/capabilities8/sys/pc98/conf/GENERIC
==============================================================================
--- projects/capabilities8/sys/pc98/conf/GENERIC Thu Oct 8 11:42:24 2009 (r197857)
+++ projects/capabilities8/sys/pc98/conf/GENERIC Thu Oct 8 13:57:51 2009 (r197858)
@@ -214,7 +214,7 @@ device xe # Xircom pccard Ethernet
#device wlan # 802.11 support
#options IEEE80211_DEBUG # enable debug msgs
#options IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's
-#options IEEE80211_SUPPORT_MESH # enable 802.11s D3.0 support
+#options IEEE80211_SUPPORT_MESH # enable 802.11s draft support
#device wlan_wep # 802.11 WEP support
#device wlan_ccmp # 802.11 CCMP support
#device wlan_tkip # 802.11 TKIP support
Modified: projects/capabilities8/sys/sparc64/conf/GENERIC
==============================================================================
--- projects/capabilities8/sys/sparc64/conf/GENERIC Thu Oct 8 11:42:24 2009 (r197857)
+++ projects/capabilities8/sys/sparc64/conf/GENERIC Thu Oct 8 13:57:51 2009 (r197858)
@@ -68,6 +68,7 @@ options SYSVMSG # SYSV-style message
options SYSVSEM # SYSV-style semaphores
options P1003_1B_SEMAPHORES # POSIX-style semaphores
options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
+options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed.
options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4)
options AUDIT # Security event auditing
options MAC # TrustedBSD MAC Framework
Modified: projects/capabilities8/sys/vm/vm_map.c
==============================================================================
--- projects/capabilities8/sys/vm/vm_map.c Thu Oct 8 11:42:24 2009 (r197857)
+++ projects/capabilities8/sys/vm/vm_map.c Thu Oct 8 13:57:51 2009 (r197858)
@@ -116,22 +116,6 @@ __FBSDID("$FreeBSD$");
* another, and then marking both regions as copy-on-write.
*/
-/*
- * vm_map_startup:
- *
- * Initialize the vm_map module. Must be called before
- * any other vm_map routines.
- *
- * Map and entry structures are allocated from the general
- * purpose memory pool with some exceptions:
- *
- * - The kernel map and kmem submap are allocated statically.
- * - Kernel map entries are allocated out of a static pool.
- *
- * These restrictions are necessary since malloc() uses the
- * maps and requires map entries.
- */
-
static struct mtx map_sleep_mtx;
static uma_zone_t mapentzone;
static uma_zone_t kmapentzone;
@@ -176,6 +160,22 @@ static void vmspace_zdtor(void *mem, int
start = end; \
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list