From owner-p4-projects@FreeBSD.ORG Thu Jul 24 08:38:01 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E187E1065670; Thu, 24 Jul 2008 08:38:00 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4BCE106566B for ; Thu, 24 Jul 2008 08:38:00 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 716968FC0A for ; Thu, 24 Jul 2008 08:38:00 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.2/8.14.2) with ESMTP id m6O8c0ih007269 for ; Thu, 24 Jul 2008 08:38:00 GMT (envelope-from weongyo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.2/8.14.1/Submit) id m6O8c0le007267 for perforce@freebsd.org; Thu, 24 Jul 2008 08:38:00 GMT (envelope-from weongyo@FreeBSD.org) Date: Thu, 24 Jul 2008 08:38:00 GMT Message-Id: <200807240838.m6O8c0le007267@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to weongyo@FreeBSD.org using -f From: Weongyo Jeong To: Perforce Change Reviews Cc: Subject: PERFORCE change 145772 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jul 2008 08:38:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=145772 Change 145772 by weongyo@weongyo_ws on 2008/07/24 08:37:14 IFC Affected files ... .. //depot/projects/ndisusb/contrib/ipfilter/ipsend/sock.c#2 integrate .. //depot/projects/ndisusb/crypto/openssh/Makefile.in#2 delete .. //depot/projects/ndisusb/crypto/openssh/Makefile.inc#2 delete .. //depot/projects/ndisusb/crypto/openssh/buildpkg.sh.in#2 delete .. //depot/projects/ndisusb/crypto/openssh/config.sub#2 delete .. //depot/projects/ndisusb/crypto/openssh/configure.ac#2 delete .. //depot/projects/ndisusb/crypto/openssh/install-sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/mdoc2man.awk#2 delete .. //depot/projects/ndisusb/crypto/openssh/nchan.ms#2 delete .. //depot/projects/ndisusb/crypto/openssh/nchan2.ms#2 delete .. //depot/projects/ndisusb/crypto/openssh/openbsd-compat/Makefile.in#2 delete .. //depot/projects/ndisusb/crypto/openssh/openbsd-compat/regress/Makefile.in#2 delete .. //depot/projects/ndisusb/crypto/openssh/openbsd-compat/regress/closefromtest.c#2 delete .. //depot/projects/ndisusb/crypto/openssh/openbsd-compat/regress/snprintftest.c#2 delete .. //depot/projects/ndisusb/crypto/openssh/openbsd-compat/regress/strduptest.c#2 delete .. //depot/projects/ndisusb/crypto/openssh/openbsd-compat/regress/strtonumtest.c#2 delete .. //depot/projects/ndisusb/crypto/openssh/openssh.xml.in#2 delete .. //depot/projects/ndisusb/crypto/openssh/opensshd.init.in#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/Makefile#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/README.regress#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/agent-getpeereid.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/agent-ptrace.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/agent-timeout.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/agent.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/banner.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/broken-pipe.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/brokenkeys.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/bsd.regress.mk#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/cfgmatch.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/cipher-speed.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/connect-privsep.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/connect.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/copy.1#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/copy.2#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/dsa_ssh2.prv#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/dsa_ssh2.pub#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/dynamic-forward.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/envpass.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/exit-status.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/forcecommand.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/forwarding.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/keygen-change.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/keyscan.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/login-timeout.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/multiplex.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/proto-mismatch.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/proto-version.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/proxy-connect.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/reconfigure.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/reexec.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/rekey.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/rsa_openssh.prv#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/rsa_openssh.pub#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/rsa_ssh2.prv#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/runtests.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/scp-ssh-wrapper.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/scp.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/sftp-badcmds.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/sftp-batch.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/sftp-cmds.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/sftp-glob.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/sftp.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/ssh-com-client.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/ssh-com-keygen.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/ssh-com-sftp.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/ssh-com.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/sshd-log-wrapper.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/stderr-after-eof.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/stderr-data.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/t4.ok#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/t5.ok#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/test-exec.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/transfer.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/try-ciphers.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/regress/yes-head.sh#2 delete .. //depot/projects/ndisusb/crypto/openssh/scard/Makefile.in#2 delete .. //depot/projects/ndisusb/crypto/openssh/scard/Ssh.bin#2 delete .. //depot/projects/ndisusb/crypto/openssh/scard/Ssh.bin.uu#2 delete .. //depot/projects/ndisusb/crypto/openssh/scard/Ssh.java#2 delete .. //depot/projects/ndisusb/crypto/openssh/ssh_prng_cmds.in#2 delete .. //depot/projects/ndisusb/crypto/openssh/survey.sh.in#2 delete .. //depot/projects/ndisusb/lib/libkvm/kvm_mips.c#1 branch .. //depot/projects/ndisusb/secure/lib/libcrypto/opensslconf-mips.h#1 branch .. //depot/projects/ndisusb/share/misc/bsd-family-tree#2 integrate .. //depot/projects/ndisusb/share/mk/bsd.sys.mk#3 integrate .. //depot/projects/ndisusb/sys/boot/Makefile#2 integrate .. //depot/projects/ndisusb/sys/compat/linux/linux_ioctl.c#2 integrate .. //depot/projects/ndisusb/sys/compat/linux/linux_ioctl.h#2 integrate .. //depot/projects/ndisusb/sys/compat/linux/linux_misc.c#3 integrate .. //depot/projects/ndisusb/sys/compat/ndis/kern_ndis.c#6 integrate .. //depot/projects/ndisusb/sys/conf/kern.mk#3 integrate .. //depot/projects/ndisusb/sys/dev/acpica/acpi.c#2 integrate .. //depot/projects/ndisusb/sys/dev/pci/pci.c#2 integrate .. //depot/projects/ndisusb/sys/dev/pci/pci_pci.c#2 integrate .. //depot/projects/ndisusb/sys/dev/pci/pcivar.h#2 integrate .. //depot/projects/ndisusb/sys/i386/include/profile.h#2 integrate .. //depot/projects/ndisusb/sys/kern/kern_fork.c#3 integrate .. //depot/projects/ndisusb/sys/rpc/auth_unix.c#3 integrate .. //depot/projects/ndisusb/sys/security/audit/audit_bsm_klib.c#3 integrate .. //depot/projects/ndisusb/sys/sys/refcount.h#2 integrate .. //depot/projects/ndisusb/sys/ufs/ffs/ffs_balloc.c#2 integrate .. //depot/projects/ndisusb/usr.sbin/ndiscvt/ndisgen.8#3 integrate Differences ... ==== //depot/projects/ndisusb/contrib/ipfilter/ipsend/sock.c#2 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/contrib/ipfilter/ipsend/sock.c,v 1.19 2007/10/18 21:52:12 darrenr Exp $ */ +/* $FreeBSD: src/contrib/ipfilter/ipsend/sock.c,v 1.20 2008/07/23 16:34:53 des Exp $ */ /* * sock.c (C) 1995-1998 Darren Reed * @@ -33,15 +33,23 @@ # ifdef __NetBSD__ # include # endif -# define _KERNEL -# define KERNEL +# ifdef __FreeBSD__ +# define _WANT_FILE +# else +# define _KERNEL +# define KERNEL +# endif # ifdef ultrix # undef LOCORE # include # endif # include -# undef _KERNEL -# undef KERNEL +# ifdef __FreeBSD__ +# undef _WANT_FILE +# else +# undef _KERNEL +# undef KERNEL +# endif #endif #include #include ==== //depot/projects/ndisusb/share/misc/bsd-family-tree#2 (text+ko) ==== @@ -221,7 +221,7 @@ *--FreeBSD | | | DragonFly 1.12.0 | 7.0 | | | | | | | | OpenBSD 4.3 | - | V | | | | + | V | | | DragonFly 2.0.0 | | | | | FreeBSD 8 -current | NetBSD -current OpenBSD -current | | | | | | @@ -485,6 +485,7 @@ DragonFly 1.12.0 2008-02-26 [DFB] FreeBSD 7.0 2008-02-27 [FBD] OpenBSD 4.3 2008-05-01 [OBD] +DragonFly 2.0.0 2008-07-21 [DFB] Bibliography ------------------------ @@ -545,4 +546,4 @@ Copyright (c) 1997-2007 Wolfram Schneider URL: http://cvsweb.freebsd.org/src/share/misc/bsd-family-tree -$FreeBSD: src/share/misc/bsd-family-tree,v 1.120 2008/05/01 09:52:34 maxim Exp $ +$FreeBSD: src/share/misc/bsd-family-tree,v 1.121 2008/07/23 14:25:39 maxim Exp $ ==== //depot/projects/ndisusb/share/mk/bsd.sys.mk#3 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/share/mk/bsd.sys.mk,v 1.46 2008/07/19 00:19:16 cognet Exp $ +# $FreeBSD: src/share/mk/bsd.sys.mk,v 1.47 2008/07/23 06:14:21 imp Exp $ # # This file contains common settings used for building FreeBSD # sources. @@ -75,7 +75,7 @@ .endif .if ${MK_SSP} != "no" && ${CC} != "icc" && ${MACHINE_ARCH} != "ia64" && \ - ${MACHINE_ARCH} != "arm" + ${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "mips" # Don't use -Wstack-protector as it breaks world with -Werror. SSP_CFLAGS ?= -fstack-protector CFLAGS += ${SSP_CFLAGS} ==== //depot/projects/ndisusb/sys/boot/Makefile#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/boot/Makefile,v 1.33 2008/02/17 20:34:35 marcel Exp $ +# $FreeBSD: src/sys/boot/Makefile,v 1.34 2008/07/23 07:23:33 imp Exp $ .include @@ -23,6 +23,9 @@ .endif # Pick the machine-dependent subdir based on the target architecture. -SUBDIR+= ${MACHINE:S/amd64/i386/:S/sun4v/sparc64/} +ADIR= ${MACHINE:S/amd64/i386/:S/sun4v/sparc64/} +.if exists(${.CURDIR}/${ADIR}/.) +SUBDIR+= ${ADIR} +.endif .include ==== //depot/projects/ndisusb/sys/compat/linux/linux_ioctl.c#2 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_ioctl.c,v 1.139 2007/11/07 16:42:52 kib Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_ioctl.c,v 1.140 2008/07/23 17:47:44 ed Exp $"); #include #include @@ -893,7 +893,10 @@ break; } - /* LINUX_TIOCPKT */ + case LINUX_TIOCPKT: + args->cmd = TIOCPKT; + error = (ioctl(td, (struct ioctl_args *)args)); + break; case LINUX_FIONBIO: args->cmd = FIONBIO; @@ -993,6 +996,10 @@ sizeof(int)); break; } + case LINUX_TIOCSPTLCK: + /* Our unlockpt() does nothing. */ + error = 0; + break; default: error = ENOIOCTL; break; ==== //depot/projects/ndisusb/sys/compat/linux/linux_ioctl.h#2 (text+ko) ==== @@ -25,7 +25,7 @@ * (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/sys/compat/linux/linux_ioctl.h,v 1.27 2007/11/07 16:42:52 kib Exp $ + * $FreeBSD: src/sys/compat/linux/linux_ioctl.h,v 1.28 2008/07/23 17:47:44 ed Exp $ */ #ifndef _LINUX_IOCTL_H_ @@ -368,6 +368,7 @@ #define LINUX_TIOCCBRK 0x5428 #define LINUX_TIOCGPTN 0x5430 +#define LINUX_TIOCSPTLCK 0x5431 #define LINUX_FIONCLEX 0x5450 #define LINUX_FIOCLEX 0x5451 ==== //depot/projects/ndisusb/sys/compat/linux/linux_misc.c#3 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_misc.c,v 1.222 2008/07/05 13:10:10 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_misc.c,v 1.223 2008/07/23 17:19:02 rdivacky Exp $"); #include "opt_compat.h" #include "opt_mac.h" @@ -170,17 +170,20 @@ linux_alarm(struct thread *td, struct linux_alarm_args *args) { struct itimerval it, old_it; + u_int secs; int error; #ifdef DEBUG if (ldebug(alarm)) printf(ARGS(alarm, "%u"), args->secs); #endif + + secs = args->secs; - if (args->secs > 100000000) - return (EINVAL); + if (secs > INT_MAX) + secs = INT_MAX; - it.it_value.tv_sec = (long)args->secs; + it.it_value.tv_sec = (long) secs; it.it_value.tv_usec = 0; it.it_interval.tv_sec = 0; it.it_interval.tv_usec = 0; ==== //depot/projects/ndisusb/sys/compat/ndis/kern_ndis.c#6 (text+ko) ==== ==== //depot/projects/ndisusb/sys/conf/kern.mk#3 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/kern.mk,v 1.56 2008/07/22 09:38:12 cognet Exp $ +# $FreeBSD: src/sys/conf/kern.mk,v 1.57 2008/07/23 06:16:34 imp Exp $ # # Warning flags for compiling the kernel and components of the kernel. @@ -111,6 +111,6 @@ # GCC SSP support. # .if ${MK_SSP} != "no" && ${CC} != "icc" && ${MACHINE_ARCH} != "ia64" && \ - ${MACHINE_ARCH} != "arm" + ${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "mips" CFLAGS+= -fstack-protector .endif ==== //depot/projects/ndisusb/sys/dev/acpica/acpi.c#2 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.248 2008/04/07 18:35:11 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.249 2008/07/23 15:13:06 jhb Exp $"); #include "opt_acpi.h" #include @@ -1531,8 +1531,7 @@ * 1. I/O port and memory system resource holders * 2. Embedded controllers (to handle early accesses) * 3. PCI Link Devices - * ACPI_DEV_BASE_ORDER. Host-PCI bridges - * ACPI_DEV_BASE_ORDER + 10. CPUs + * 100000. CPUs */ AcpiGetType(handle, &type); if (acpi_MatchHid(handle, "PNP0C01") || acpi_MatchHid(handle, "PNP0C02")) @@ -1541,10 +1540,8 @@ *order = 2; else if (acpi_MatchHid(handle, "PNP0C0F")) *order = 3; - else if (acpi_MatchHid(handle, "PNP0A03")) - *order = ACPI_DEV_BASE_ORDER; else if (type == ACPI_TYPE_PROCESSOR) - *order = ACPI_DEV_BASE_ORDER + 10; + *order = 100000; } /* @@ -1594,10 +1591,8 @@ * placeholder so that the probe/attach passes will run * breadth-first. Orders less than ACPI_DEV_BASE_ORDER * are reserved for special objects (i.e., system - * resources). Orders between ACPI_DEV_BASE_ORDER and 100 - * are used for Host-PCI bridges (and effectively all - * their children) and CPUs. Larger values are used for - * all other devices. + * resources). CPU devices have a very high order to + * ensure they are probed after other devices. */ ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "scanning '%s'\n", handle_str)); order = level * 10 + 100; ==== //depot/projects/ndisusb/sys/dev/pci/pci.c#2 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/pci/pci.c,v 1.357 2008/02/01 20:31:09 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/pci/pci.c,v 1.358 2008/07/23 09:44:36 luoqi Exp $"); #include "opt_bus.h" @@ -562,11 +562,12 @@ cfg->domain, cfg->bus, cfg->slot, cfg->func, (long long)addr); - } + } else + addr = MSI_INTEL_ADDR_BASE; - /* Enable MSI -> HT mapping. */ - val |= PCIM_HTCMD_MSI_ENABLE; - WREG(ptr + PCIR_HT_COMMAND, val, 2); + cfg->ht.ht_msimap = ptr; + cfg->ht.ht_msictrl = val; + cfg->ht.ht_msiaddr = addr; break; } break; @@ -1095,6 +1096,9 @@ bus_write_4(msix->msix_table_res, offset, address & 0xffffffff); bus_write_4(msix->msix_table_res, offset + 4, address >> 32); bus_write_4(msix->msix_table_res, offset + 8, data); + + /* Enable MSI -> HT mapping. */ + pci_ht_map_msi(dev, address); } void @@ -1534,6 +1538,34 @@ } /* + * HyperTransport MSI mapping control + */ +void +pci_ht_map_msi(device_t dev, uint64_t addr) +{ + struct pci_devinfo *dinfo = device_get_ivars(dev); + struct pcicfg_ht *ht = &dinfo->cfg.ht; + + if (!ht->ht_msimap) + return; + + if (addr && !(ht->ht_msictrl & PCIM_HTCMD_MSI_ENABLE) && + ht->ht_msiaddr >> 20 == addr >> 20) { + /* Enable MSI -> HT mapping. */ + ht->ht_msictrl |= PCIM_HTCMD_MSI_ENABLE; + pci_write_config(dev, ht->ht_msimap + PCIR_HT_COMMAND, + ht->ht_msictrl, 2); + } + + if (!addr && ht->ht_msictrl & PCIM_HTCMD_MSI_ENABLE) { + /* Disable MSI -> HT mapping. */ + ht->ht_msictrl &= ~PCIM_HTCMD_MSI_ENABLE; + pci_write_config(dev, ht->ht_msimap + PCIR_HT_COMMAND, + ht->ht_msictrl, 2); + } +} + +/* * Support for MSI message signalled interrupts. */ void @@ -1558,6 +1590,9 @@ msi->msi_ctrl |= PCIM_MSICTRL_MSI_ENABLE; pci_write_config(dev, msi->msi_location + PCIR_MSI_CTRL, msi->msi_ctrl, 2); + + /* Enable MSI -> HT mapping. */ + pci_ht_map_msi(dev, address); } void @@ -1566,6 +1601,9 @@ struct pci_devinfo *dinfo = device_get_ivars(dev); struct pcicfg_msi *msi = &dinfo->cfg.msi; + /* Disable MSI -> HT mapping. */ + pci_ht_map_msi(dev, 0); + /* Disable MSI in the control register. */ msi->msi_ctrl &= ~PCIM_MSICTRL_MSI_ENABLE; pci_write_config(dev, msi->msi_location + PCIR_MSI_CTRL, msi->msi_ctrl, ==== //depot/projects/ndisusb/sys/dev/pci/pci_pci.c#2 (text+ko) ==== @@ -29,7 +29,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/pci/pci_pci.c,v 1.50 2007/09/30 11:05:15 marius Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/pci/pci_pci.c,v 1.51 2008/07/23 09:44:36 luoqi Exp $"); /* * PCI:PCI bridge support. @@ -607,9 +607,15 @@ uint32_t *data) { device_t bus; + int error; bus = device_get_parent(pcib); - return (PCIB_MAP_MSI(device_get_parent(bus), dev, irq, addr, data)); + error = PCIB_MAP_MSI(device_get_parent(bus), dev, irq, addr, data); + if (error) + return (error); + + pci_ht_map_msi(pcib, *addr); + return (0); } /* ==== //depot/projects/ndisusb/sys/dev/pci/pcivar.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * (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/sys/dev/pci/pcivar.h,v 1.82 2008/04/26 14:13:48 marius Exp $ + * $FreeBSD: src/sys/dev/pci/pcivar.h,v 1.83 2008/07/23 09:44:36 luoqi Exp $ * */ @@ -115,6 +115,13 @@ struct resource *msix_pba_res; /* Resource containing PBA. */ }; +/* Interesting values for HyperTransport */ +struct pcicfg_ht { + uint8_t ht_msimap; /* Offset of MSI mapping cap registers. */ + uint16_t ht_msictrl; /* MSI mapping control */ + uint64_t ht_msiaddr; /* MSI mapping base address */ +}; + /* config header information common to all header types */ typedef struct pcicfg { struct device *dev; /* device which owns this */ @@ -156,6 +163,7 @@ struct pcicfg_vpd vpd; /* pci vital product data */ struct pcicfg_msi msi; /* pci msi */ struct pcicfg_msix msix; /* pci msi-x */ + struct pcicfg_ht ht; /* HyperTransport */ } pcicfgregs; /* additional type 1 device config header information (PCI to PCI bridge) */ @@ -455,6 +463,8 @@ int pci_msi_device_blacklisted(device_t dev); +void pci_ht_map_msi(device_t dev, uint64_t addr); + #endif /* _SYS_BUS_H_ */ /* ==== //depot/projects/ndisusb/sys/i386/include/profile.h#2 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * @(#)profile.h 8.1 (Berkeley) 6/11/93 - * $FreeBSD: src/sys/i386/include/profile.h,v 1.42 2006/10/28 11:03:03 bde Exp $ + * $FreeBSD: src/sys/i386/include/profile.h,v 1.43 2008/07/23 11:37:20 luoqi Exp $ */ #ifndef _MACHINE_PROFILE_H_ @@ -115,7 +115,15 @@ void \ mcount() \ { \ - uintfptr_t selfpc, frompc; \ + uintfptr_t selfpc, frompc, ecx; \ + /* \ + * In gcc 4.2, ecx might be used in the caller as the arg \ + * pointer if the stack realignment option is set (-mstackrealign) \ + * or if the caller has the force_align_arg_pointer attribute \ + * (stack realignment is ALWAYS on for main). Preserve ecx \ + * here. \ + */ \ + __asm("" : "=c" (ecx)); \ /* \ * Find the return address for mcount, \ * and the return address for mcount's caller. \ @@ -132,6 +140,7 @@ __asm("movl (%%ebp),%0" : "=r" (frompc)); \ frompc = ((uintfptr_t *)frompc)[1]; \ _mcount(frompc, selfpc); \ + __asm("" : : "c" (ecx)); \ } #else /* !__GNUCLIKE_ASM */ #define MCOUNT ==== //depot/projects/ndisusb/sys/kern/kern_fork.c#3 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_fork.c,v 1.294 2008/07/07 09:30:11 kib Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_fork.c,v 1.295 2008/07/23 08:45:25 kib Exp $"); #include "opt_kdtrace.h" #include "opt_ktrace.h" @@ -440,6 +440,7 @@ bcopy(&p1->p_startcopy, &p2->p_startcopy, __rangeof(struct proc, p_startcopy, p_endcopy)); + pargs_hold(p2->p_args); PROC_UNLOCK(p1); bzero(&p2->p_startzero, @@ -520,7 +521,6 @@ if (p1->p_flag & P_PROFIL) startprofclock(p2); td2->td_ucred = crhold(p2->p_ucred); - pargs_hold(p2->p_args); if (flags & RFSIGSHARE) { p2->p_sigacts = sigacts_hold(p1->p_sigacts); ==== //depot/projects/ndisusb/sys/rpc/auth_unix.c#3 (text+ko) ==== @@ -34,7 +34,7 @@ static char *sccsid = "@(#)auth_unix.c 2.2 88/08/01 4.0 RPCSRC"; #endif #include -__FBSDID("$FreeBSD: src/sys/rpc/auth_unix.c,v 1.4 2008/06/27 14:35:05 dfr Exp $"); +__FBSDID("$FreeBSD: src/sys/rpc/auth_unix.c,v 1.5 2008/07/23 09:18:08 dfr Exp $"); /* * auth_unix.c, Implements UNIX style authentication parameters. @@ -55,6 +55,7 @@ #include #include #include +#include #include #include @@ -86,7 +87,7 @@ struct audata { TAILQ_ENTRY(audata) au_link; TAILQ_ENTRY(audata) au_alllink; - int au_refs; + volatile u_int au_refs; struct xucred au_xcred; struct opaque_auth au_origcred; /* original credentials */ struct opaque_auth au_shcred; /* short hand cred */ @@ -157,6 +158,7 @@ sx_slock(&auth_unix_lock); TAILQ_FOREACH(au, &auth_unix_cache[h], au_link) { if (!memcmp(&xcr, &au->au_xcred, sizeof(xcr))) { + refcount_acquire(&au->au_refs); if (sx_try_upgrade(&auth_unix_lock)) { /* * Keep auth_unix_all LRU sorted. @@ -164,16 +166,16 @@ TAILQ_REMOVE(&auth_unix_all, au, au_alllink); TAILQ_INSERT_TAIL(&auth_unix_all, au, au_alllink); - au->au_refs++; sx_xunlock(&auth_unix_lock); - return (au->au_auth); } else { sx_sunlock(&auth_unix_lock); - goto again; } + return (au->au_auth); } } + sx_sunlock(&auth_unix_lock); + /* * Allocate and set up auth handle */ @@ -183,7 +185,7 @@ auth->ah_ops = &authunix_ops; auth->ah_private = (caddr_t)au; auth->ah_verf = au->au_shcred = _null_auth; - au->au_refs = 1; + refcount_init(&au->au_refs, 1); au->au_xcred = xcr; au->au_shfaults = 0; au->au_origcred.oa_base = NULL; @@ -210,18 +212,26 @@ auth->ah_cred = au->au_origcred; marshal_new_auth(auth); - if (sx_try_upgrade(&auth_unix_lock)) { - auth_unix_count++; - TAILQ_INSERT_TAIL(&auth_unix_cache[h], au, au_link); - TAILQ_INSERT_TAIL(&auth_unix_all, au, au_alllink); - au->au_refs++; /* one for the cache, one for user */ - sx_xunlock(&auth_unix_lock); - return (auth); - } else { - sx_sunlock(&auth_unix_lock); - AUTH_DESTROY(auth); - goto again; + sx_xlock(&auth_unix_lock); + TAILQ_FOREACH(tau, &auth_unix_cache[h], au_link) { + if (!memcmp(&xcr, &tau->au_xcred, sizeof(xcr))) { + /* + * We lost a race to create the AUTH that + * matches this cred. + */ + sx_xunlock(&auth_unix_lock); + AUTH_DESTROY(auth); + goto again; + } } + + auth_unix_count++; + TAILQ_INSERT_TAIL(&auth_unix_cache[h], au, au_link); + TAILQ_INSERT_TAIL(&auth_unix_all, au, au_alllink); + refcount_acquire(&au->au_refs); /* one for the cache, one for user */ + sx_xunlock(&auth_unix_lock); + + return (auth); } /* @@ -316,16 +326,10 @@ authunix_destroy(AUTH *auth) { struct audata *au; - int refs; au = AUTH_PRIVATE(auth); - sx_xlock(&auth_unix_lock); - au->au_refs--; - refs = au->au_refs; - sx_xunlock(&auth_unix_lock); - - if (refs > 0) + if (!refcount_release(&au->au_refs)) return; mem_free(au->au_origcred.oa_base, au->au_origcred.oa_length); ==== //depot/projects/ndisusb/sys/security/audit/audit_bsm_klib.c#3 (text) ==== @@ -29,7 +29,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/security/audit/audit_bsm_klib.c,v 1.14 2008/07/22 16:21:59 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/security/audit/audit_bsm_klib.c,v 1.15 2008/07/23 07:42:31 rwatson Exp $"); #include #include @@ -53,7 +53,7 @@ * Hash table functions for the audit event number to event class mask * mapping. */ -#define EVCLASSMAP_HASH_TABLE_SIZE 251 +#define EVCLASSMAP_HASH_TABLE_SIZE 251 struct evclass_elem { au_event_t event; au_class_t class; ==== //depot/projects/ndisusb/sys/sys/refcount.h#2 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/sys/refcount.h,v 1.1 2005/09/27 18:01:33 jhb Exp $ + * $FreeBSD: src/sys/sys/refcount.h,v 1.5 2008/07/23 16:44:20 des Exp $ */ #ifndef __SYS_REFCOUNT_H__ @@ -34,6 +34,12 @@ #include +#ifdef _KERNEL +#include +#else +#define KASSERT(exp, msg) /* */ +#endif + static __inline void refcount_init(volatile u_int *count, u_int value) { @@ -51,9 +57,12 @@ static __inline int refcount_release(volatile u_int *count) { + u_int old; /* XXX: Should this have a rel membar? */ - return (atomic_fetchadd_int(count, -1) == 1); + old = atomic_fetchadd_int(count, -1); + KASSERT(old > 0, ("negative refcount %p", count)); + return (old == 1); } #endif /* ! __SYS_REFCOUNT_H__ */ ==== //depot/projects/ndisusb/sys/ufs/ffs/ffs_balloc.c#2 (text+ko) ==== @@ -60,7 +60,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/ufs/ffs/ffs_balloc.c,v 1.53 2008/01/03 12:28:57 kib Exp $"); +__FBSDID("$FreeBSD: src/sys/ufs/ffs/ffs_balloc.c,v 1.54 2008/07/23 14:32:44 kib Exp $"); #include #include @@ -104,6 +104,7 @@ ufs1_daddr_t *allocib, *blkp, *allocblk, allociblk[NIADDR + 1]; ufs2_daddr_t *lbns_remfree, lbns[NIADDR + 1]; int unwindidx = -1; + int saved_inbdflush; ip = VTOI(vp); dp = ip->i_din1; @@ -225,6 +226,9 @@ if (num < 1) panic ("ffs_balloc_ufs1: ufs_getlbns returned indirect block"); #endif + saved_inbdflush = ~TDP_INBDFLUSH | (curthread->td_pflags & + TDP_INBDFLUSH); + curthread->td_pflags |= TDP_INBDFLUSH; /* * Fetch the first indirect block allocating if necessary. */ @@ -237,8 +241,10 @@ UFS_LOCK(ump); pref = ffs_blkpref_ufs1(ip, lbn, 0, (ufs1_daddr_t *)0); if ((error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, - cred, &newb)) != 0) + cred, &newb)) != 0) { + curthread->td_pflags &= saved_inbdflush; return (error); + } nb = newb; *allocblk++ = nb; *lbns_remfree++ = indirs[1].in_lbn; @@ -329,6 +335,7 @@ * If asked only for the indirect block, then return it. */ if (flags & BA_METAONLY) { + curthread->td_pflags &= saved_inbdflush; *bpp = bp; return (0); } @@ -366,6 +373,7 @@ bp->b_flags |= B_CLUSTEROK; bdwrite(bp); } + curthread->td_pflags &= saved_inbdflush; *bpp = nbp; return (0); } @@ -387,9 +395,11 @@ nbp = getblk(vp, lbn, fs->fs_bsize, 0, 0, 0); nbp->b_blkno = fsbtodb(fs, nb); } + curthread->td_pflags &= saved_inbdflush; *bpp = nbp; return (0); fail: + curthread->td_pflags &= saved_inbdflush; /* * If we have failed to allocate any blocks, simply return the error. * This is the usual case and avoids the need to fsync the file. @@ -489,6 +499,7 @@ ufs2_daddr_t *lbns_remfree, lbns[NIADDR + 1]; int deallocated, osize, nsize, num, i, error; int unwindidx = -1; + int saved_inbdflush; ip = VTOI(vp); dp = ip->i_din2; @@ -719,6 +730,9 @@ if (num < 1) panic ("ffs_balloc_ufs2: ufs_getlbns returned indirect block"); #endif + saved_inbdflush = ~TDP_INBDFLUSH | (curthread->td_pflags & + TDP_INBDFLUSH); + curthread->td_pflags |= TDP_INBDFLUSH; /* * Fetch the first indirect block allocating if necessary. */ @@ -731,8 +745,10 @@ UFS_LOCK(ump); pref = ffs_blkpref_ufs2(ip, lbn, 0, (ufs2_daddr_t *)0); if ((error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, - cred, &newb)) != 0) + cred, &newb)) != 0) { + curthread->td_pflags &= saved_inbdflush; return (error); + } nb = newb; *allocblk++ = nb; *lbns_remfree++ = indirs[1].in_lbn; @@ -823,6 +839,7 @@ * If asked only for the indirect block, then return it. */ if (flags & BA_METAONLY) { + curthread->td_pflags &= saved_inbdflush; *bpp = bp; return (0); } @@ -860,6 +877,7 @@ bp->b_flags |= B_CLUSTEROK; bdwrite(bp); } + curthread->td_pflags &= saved_inbdflush; *bpp = nbp; return (0); } @@ -887,9 +905,11 @@ nbp = getblk(vp, lbn, fs->fs_bsize, 0, 0, 0); nbp->b_blkno = fsbtodb(fs, nb); } + curthread->td_pflags &= saved_inbdflush; *bpp = nbp; return (0); fail: + curthread->td_pflags &= saved_inbdflush; /* * If we have failed to allocate any blocks, simply return the error. * This is the usual case and avoids the need to fsync the file. ==== //depot/projects/ndisusb/usr.sbin/ndiscvt/ndisgen.8#3 (text+ko) ==== @@ -28,7 +28,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/usr.sbin/ndiscvt/ndisgen.8,v 1.3 2005/07/23 18:47:18 dougb Exp $ +.\" $FreeBSD: src/usr.sbin/ndiscvt/ndisgen.8,v 1.4 2008/07/23 05:50:17 weongyo Exp $ .\" .Dd April 24, 2005 .Dt NDISGEN 8