From owner-p4-projects@FreeBSD.ORG Sat Aug 23 22:41:14 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0DD4E10656C5; Sat, 23 Aug 2008 22:41:14 +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 C5B9510656CD for ; Sat, 23 Aug 2008 22:41:13 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B6DFA8FC22 for ; Sat, 23 Aug 2008 22:41:13 +0000 (UTC) (envelope-from jb@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 m7NMfDmw075604 for ; Sat, 23 Aug 2008 22:41:13 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.2/8.14.1/Submit) id m7NMfD53075602 for perforce@freebsd.org; Sat, 23 Aug 2008 22:41:13 GMT (envelope-from jb@freebsd.org) Date: Sat, 23 Aug 2008 22:41:13 GMT Message-Id: <200808232241.m7NMfD53075602@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 148220 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: Sat, 23 Aug 2008 22:41:14 -0000 http://perforce.freebsd.org/chv.cgi?CH=148220 Change 148220 by jb@freebsd3 on 2008/08/23 22:40:46 IF7 Affected files ... .. //depot/projects/dtrace7/src/release/picobsd/build/picobsd#3 integrate .. //depot/projects/dtrace7/src/share/colldef/Makefile#2 integrate .. //depot/projects/dtrace7/src/share/colldef/no_NO.ISO8859-1.src#1 branch .. //depot/projects/dtrace7/src/share/colldef/no_NO.ISO8859-15.src#1 branch .. //depot/projects/dtrace7/src/share/timedef/Makefile#2 integrate .. //depot/projects/dtrace7/src/share/timedef/nb_NO.ISO8859-1.src#1 branch .. //depot/projects/dtrace7/src/share/timedef/nb_NO.UTF-8.src#1 branch .. //depot/projects/dtrace7/src/share/timedef/no_NO.ISO8859-1.src#2 delete .. //depot/projects/dtrace7/src/share/timedef/no_NO.UTF-8.src#2 delete .. //depot/projects/dtrace7/src/sys/dev/ata/ata-all.c#4 integrate .. //depot/projects/dtrace7/src/sys/dev/ata/ata-all.h#5 integrate .. //depot/projects/dtrace7/src/sys/dev/ata/ata-chipset.c#7 integrate .. //depot/projects/dtrace7/src/sys/dev/pci/pci.c#5 integrate .. //depot/projects/dtrace7/src/sys/dev/pci/pci_pci.c#2 integrate .. //depot/projects/dtrace7/src/sys/dev/pci/pcivar.h#2 integrate .. //depot/projects/dtrace7/src/sys/dev/usb/hid.c#2 integrate .. //depot/projects/dtrace7/src/sys/dev/usb/ums.c#5 integrate .. //depot/projects/dtrace7/src/sys/kern/vfs_bio.c#3 integrate .. //depot/projects/dtrace7/src/sys/sys/copyright.h#3 integrate .. //depot/projects/dtrace7/src/sys/ufs/ffs/ffs_balloc.c#4 integrate Differences ... ==== //depot/projects/dtrace7/src/release/picobsd/build/picobsd#3 (text+ko) ==== @@ -1,6 +1,6 @@ #!/bin/sh - # -# $FreeBSD: src/release/picobsd/build/picobsd,v 1.39.2.1 2007/11/21 07:20:10 luigi Exp $ +# $FreeBSD: src/release/picobsd/build/picobsd,v 1.39.2.2 2008/08/22 10:18:18 luigi Exp $ # This file requires sysutils/makefs to run # # The new PicoBSD build script. Invoked as @@ -75,19 +75,17 @@ # log something on stdout if verbose. o_verbose=0 # this needs to be here! log() { - if [ ${o_verbose} -gt 0 ] ; then - printf "\n*** %s\n" "$*" - if [ ${o_verbose} -gt 1 ] ; then - read -p "=== Press enter to continue" foo - fi - fi + local foo + [ ${o_verbose} -gt 0 ] && printf "\n*** %s\n" "$*" + [ ${o_verbose} -gt 1 ] && read -p "=== Press enter to continue" foo + return 0 } logverbose() { local foo - printf "\n*** %s\n" "$*" read -p "=== Press enter to continue" foo + return 0 } set_defaults() { @@ -164,6 +162,7 @@ ) } +# entry for 4.x and earlier trees create_includes_and_libraries() { local e i @@ -208,21 +207,22 @@ # set_type looks in user or system directories for the floppy type # specified as first argument, and sets variables according to the config. -# file. Also sets MY_TREE and BUILDDIR and SITE +# file. Sets THETYPE, SITE, name, MY_TREE and BUILDDIR set_type() { local a i - log "set_type()" + log "set_type() : Type '$1' site '$2'" THETYPE=$1 SITE=$2 a=$1 + name="" # clear in case of errors for i in ${c_startdir}/${a} ${PICO_TREE}/${a} ; do log "set_type: checking $i" - if [ -d $i -a -f $i/PICOBSD -a -f $i/crunch.conf ] ; then + [ -d $i -a -f $i/PICOBSD -a -f $i/crunch.conf ] || continue set -- `cat $i/PICOBSD | \ awk '/^#PicoBSD/ {print $2, $3, $4, $5, $6}'` - if [ "$1" != "" ]; then + [ x"$1" != "x" ] || continue MFS_SIZE=$1 ; init_name=$2 mfs_inodes=$3 ; fd_inodes=$4 name=`(cd $i ; pwd) ` @@ -231,10 +231,8 @@ BUILDDIR=${c_startdir}/build_dir-${name} log "Matching file $name in $i" return ; - fi - fi done - echo "Type $a NOT FOUND" + logverbose "Type $a NOT FOUND" } clean_tree() { @@ -280,10 +278,8 @@ log "PICO_OBJ is ${PICO_OBJ}" if [ ${OSVERSION} -ge 500035 ] ; then - MAKEOBJDIRPREFIX=${l_objtree} - export MAKEOBJDIRPREFIX + export MAKEOBJDIRPREFIX=${l_objtree} eval "export BINMAKE=\"`cd ${SRC}; make -f Makefile -V BINMAKE`\"" - log `cd ${SRC}; make -f Makefile.inc1 -V WMAKEENV` eval export `cd ${SRC}; ${BINMAKE} -f Makefile.inc1 -V WMAKEENV` fi # create build directory and subtree @@ -305,12 +301,16 @@ local z msg log "build_package()" - touch build.status + rm -rf build.status echo "##############################################" >>build.status echo "## `date` ">>build.status echo "##############################################" >>build.status for z in bridge dial router net isp ; do set_type ${z} + if [ "${name}" = "" ] ; then + echo "*** TYPE=${z} not found" >>build.status + continue + fi echo "---------------------------------------------">>build.status echo "Building TYPE=${z}, SIZE=${MFS_SIZE}" >>build.status msg="(ok)" # error message @@ -455,15 +455,13 @@ #------------------------------------------------------------------- -# invoke the Makefile to compile the kernel. +# invoke the picobsd Makefile to compile the kernel. +# if MODULES is set (value is irrelevant) the makefile will build modules. do_kernel() { # OK log "do_kernel() Preparing kernel \"$name\" in $MY_TREE" (cd $MY_TREE; export name SRC BUILDDIR # used in this makefile ; # export CONFIG - if [ "${o_do_modules}" = "yes" ] ; then - MODULES="" - export MODULES - fi + [ "${o_do_modules}" = "yes" ] && export MODULES="" ${BINMAKE} -v -f ${PICO_TREE}/build/Makefile.conf ) || \ fail $? missing_kernel } @@ -497,14 +495,15 @@ else excl="" fi - (cd ${PICO_TREE}/floppy.tree ; tar -cf - --exclude CVS ${excl} . ) | \ + (cd ${PICO_TREE}/floppy.tree ; tar -cf - --exclude CVS --exclude .svn \ + ${excl} . ) | \ (cd ${dst} ; tar x${o_tarv}f - ) log "Copied from generic floppy-tree `echo; ls -laR ${dst}`" srcdir=${MY_TREE}/floppy.tree if [ -d ${srcdir} ] ; then log "update with type-specific files:" - (cd ${srcdir} ; tar -cf - --exclude CVS . ) | \ + (cd ${srcdir} ; tar -cf - --exclude CVS --exclude .svn . ) | \ (cd ${dst} ; tar x${o_tarv}f - ) log "Copied from type floppy-tree `echo; ls -laR ${dst}`" else @@ -512,7 +511,7 @@ fi if [ -d ${srcdir}.${SITE} ] ; then log "Update with site-specific (${SITE}) files:" - (cd ${srcdir}.${SITE} ; tar -cf - --exclude CVS . ) | \ + (cd ${srcdir}.${SITE} ; tar -cf - --exclude CVS --exclude .svn . ) | \ (cd ${dst} ; tar x${o_tarv}f - ) log "Copied from site floppy-tree `echo; ls -laR ${dst}`" else @@ -595,7 +594,7 @@ for MFS_TREE in ${PICO_TREE}/mfs_tree ${MY_TREE}/mfs_tree ; do if [ -d ${MFS_TREE} ] ; then log "Copy ${MFS_TREE} ..." - (cd ${MFS_TREE} ; tar -cf - --exclude CVS . ) | \ + (cd ${MFS_TREE} ; tar -cf - --exclude CVS --exclude .svn . ) | \ (cd ${dst} ; tar x${o_tarv}f - ) fi done @@ -825,7 +824,8 @@ # arguments. set_defaults -while [ true ]; do +args="" +while [ x"$1" != x ]; do case $1 in --src) # set the source path instead of /usr/src SRC=`(cd $2; pwd)` @@ -866,23 +866,22 @@ o_makeopts="-d l" # be verbose ;; *) - break ; + args="$args $1" # accumulate args ;; esac shift done set_build_parameters # things that depend on ${SRC} -set_type $1 $2 # type and site, respectively # If $1="package", it creates a neat set of floppies +set -- ${args} +[ "$1" = "package" ] && build_package + +set_type $args # type and site, respectively + +[ "${o_interactive}" != "NO" ] && main_dialog -if [ "$1" = "package" ] ; then - build_package -fi -if [ "${o_interactive}" != "NO" ] ; then - main_dialog -fi if [ "${o_clean}" = "YES" ] ; then clean_tree else ==== //depot/projects/dtrace7/src/share/colldef/Makefile#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/share/colldef/Makefile,v 1.71 2006/11/09 18:10:33 des Exp $ +# $FreeBSD: src/share/colldef/Makefile,v 1.71.2.1 2008/08/23 13:25:56 des Exp $ LOCALES= bg_BG.CP1251 \ be_BY.CP1131 \ @@ -23,6 +23,8 @@ la_LN.ISO8859-2 \ la_LN.ISO8859-4 \ la_LN.US-ASCII \ + no_NO.ISO8859-1 \ + no_NO.ISO8859-15 \ lt_LT.ISO8859-4 \ lt_LT.ISO8859-13 \ pl_PL.ISO8859-2 \ @@ -64,9 +66,11 @@ ISO8859-1_ISO8859-1= ${ISO8859-15_ISO8859-15} pt_PT:pt_BR LATIN1LINKS= af_ZA da_DK en_AU en_CA en_GB en_NZ en_US eu_ES fi_FI \ - fr_BE fr_CA fr_CH fr_FR it_CH it_IT nb_NO nl_BE nl_NL \ - nn_NO no_NO pt_PT -ISO8859-15_ISO8859-15= de_DE:de_AT de_DE:de_CH ${LATIN1LINKS:C/^/la_LN:/} + fr_BE fr_CA fr_CH fr_FR it_CH it_IT nl_BE nl_NL pt_PT +ISO8859-15_ISO8859-15= \ + de_DE:de_AT de_DE:de_CH \ + no_NO:nb_NO no_NO:nn_NO \ + ${LATIN1LINKS:C/^/la_LN:/} LATIN2LINKS= hr_HR hu_HU ro_RO sr_YU ISO8859-2_ISO8859-2= ${LATIN2LINKS:C/^/la_LN:/} cs_CZ:sk_SK ==== //depot/projects/dtrace7/src/share/timedef/Makefile#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/share/timedef/Makefile,v 1.50 2006/11/09 18:10:34 des Exp $ +# $FreeBSD: src/share/timedef/Makefile,v 1.50.2.1 2008/08/23 13:25:56 des Exp $ LOCALES= am_ET.UTF-8 \ be_BY.CP1131 \ @@ -54,11 +54,11 @@ lt_LT.ISO8859-13 \ lt_LT.UTF-8 \ mn_MN.UTF-8 \ + nb_NO.ISO8859-1 \ + nb_NO.UTF-8 \ nl_NL.ISO8859-1 \ nn_NO.ISO8859-1 \ nn_NO.UTF-8 \ - no_NO.ISO8859-1 \ - no_NO.UTF-8 \ pl_PL.ISO8859-2 \ pl_PL.UTF-8 \ pt_BR.ISO8859-1 \ @@ -118,7 +118,7 @@ FR_LINKS= fr_FR:fr_BE fr_FR:fr_CA fr_FR:fr_CH IT_LINKS= it_IT:it_CH NL_LINKS= nl_NL:nl_BE -NO_LINKS= no_NO:nb_NO +NO_LINKS= nb_NO:no_NO GB_LINKS= en_GB:en_AU en_GB:en_CA en_GB:en_NZ eucKR_CP949= ko_KR ==== //depot/projects/dtrace7/src/sys/dev/ata/ata-all.c#4 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.280.2.2 2008/05/24 10:15:20 bz Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.280.2.3 2008/08/22 08:09:13 philip Exp $"); #include "opt_ata.h" #include @@ -75,6 +75,7 @@ uma_zone_t ata_request_zone; uma_zone_t ata_composite_zone; int ata_wc = 1; +int ata_dma_check_80pin = 1; /* local vars */ static int ata_dma = 1; @@ -85,6 +86,10 @@ TUNABLE_INT("hw.ata.ata_dma", &ata_dma); SYSCTL_INT(_hw_ata, OID_AUTO, ata_dma, CTLFLAG_RDTUN, &ata_dma, 0, "ATA disk DMA mode control"); +TUNABLE_INT("hw.ata.ata_dma_check_80pin", &ata_dma_check_80pin); +SYSCTL_INT(_hw_ata, OID_AUTO, ata_dma_check_80pin, + CTLFLAG_RDTUN, &ata_dma_check_80pin, 1, + "Check for 80pin cable before setting ATA DMA mode"); TUNABLE_INT("hw.ata.atapi_dma", &atapi_dma); SYSCTL_INT(_hw_ata, OID_AUTO, atapi_dma, CTLFLAG_RDTUN, &atapi_dma, 0, "ATAPI device DMA mode control"); ==== //depot/projects/dtrace7/src/sys/dev/ata/ata-all.h#5 (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/ata/ata-all.h,v 1.124.2.4 2008/04/08 10:48:21 phk Exp $ + * $FreeBSD: src/sys/dev/ata/ata-all.h,v 1.124.2.5 2008/08/22 08:09:13 philip Exp $ */ /* ATA register defines */ @@ -524,7 +524,8 @@ extern struct intr_config_hook *ata_delayed_attach; extern devclass_t ata_devclass; extern int ata_wc; - +extern int ata_dma_check_80pin; + /* public prototypes */ /* ata-all.c: */ int ata_probe(device_t dev); ==== //depot/projects/dtrace7/src/sys/dev/ata/ata-chipset.c#7 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.202.2.11 2008/08/02 12:34:49 remko Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.202.2.12 2008/08/22 08:09:13 philip Exp $"); #include "opt_ata.h" #include @@ -5829,6 +5829,12 @@ { struct ata_device *atadev = device_get_softc(dev); + if (!ata_dma_check_80pin) { + if (bootverbose) + device_printf(dev, "Skipping 80pin cable check\n"); + return mode; + } + if (mode > ATA_UDMA2 && !(atadev->param.hwres & ATA_CABLE_ID)) { ata_print_cable(dev, "device"); mode = ATA_UDMA2; ==== //depot/projects/dtrace7/src/sys/dev/pci/pci.c#5 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/pci/pci.c,v 1.355.2.3 2008/08/15 20:16:21 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/pci/pci.c,v 1.355.2.4 2008/08/23 03:40:49 mlaier 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/dtrace7/src/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.50.2.1 2008/08/23 03:40:49 mlaier 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/dtrace7/src/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.80 2007/09/30 11:05:15 marius Exp $ + * $FreeBSD: src/sys/dev/pci/pcivar.h,v 1.80.2.1 2008/08/23 03:40:49 mlaier 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) */ @@ -462,6 +470,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/dtrace7/src/sys/dev/usb/hid.c#2 (text+ko) ==== @@ -2,7 +2,7 @@ #include -__FBSDID("$FreeBSD: src/sys/dev/usb/hid.c,v 1.29 2007/06/20 05:10:52 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/hid.c,v 1.29.2.2 2008/08/23 17:40:35 kaiw Exp $"); /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. @@ -193,8 +193,11 @@ case 0: /* Main */ switch (bTag) { case 8: /* Input */ - if (!(s->kindset & (1 << hid_input))) + if (!(s->kindset & (1 << hid_input))) { + if (s->nu > 0) + s->nu--; continue; + } c->kind = hid_input; c->flags = dval; ret: @@ -223,8 +226,11 @@ return (1); } case 9: /* Output */ - if (!(s->kindset & (1 << hid_output))) + if (!(s->kindset & (1 << hid_output))) { + if (s->nu > 0) + s->nu--; continue; + } c->kind = hid_output; c->flags = dval; goto ret; @@ -237,8 +243,11 @@ s->nu = 0; return (1); case 11: /* Feature */ - if (!(s->kindset & (1 << hid_feature))) + if (!(s->kindset & (1 << hid_feature))) { + if (s->nu > 0) + s->nu--; continue; + } c->kind = hid_feature; c->flags = dval; goto ret; @@ -266,7 +275,7 @@ c->logical_maximum = dval; break; case 3: - c->physical_maximum = dval; + c->physical_minimum = dval; break; case 4: c->physical_maximum = dval; ==== //depot/projects/dtrace7/src/sys/dev/usb/ums.c#5 (text+ko) ==== @@ -36,7 +36,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/usb/ums.c,v 1.96.2.3 2008/06/12 16:45:46 kaiw Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/ums.c,v 1.96.2.5 2008/08/23 17:35:15 kaiw Exp $"); /* * HID spec: http://www.usb.org/developers/devclass_docs/HID1_11.pdf @@ -283,6 +283,9 @@ /* Try the wheel first as the Z activator since it's tradition. */ wheel = hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL), + hid_input, &sc->sc_loc_z, &flags) || + hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP, + HUG_TWHEEL), hid_input, &sc->sc_loc_z, &flags); if (wheel) { @@ -359,12 +362,6 @@ hid_input, &sc->sc_loc_btn[i-1], 0); sc->sc_isize = hid_report_size(desc, size, hid_input, &sc->sc_iid); - sc->sc_ibuf = malloc(sc->sc_isize, M_USB, M_NOWAIT); - if (!sc->sc_ibuf) { - printf("%s: no memory\n", device_get_nameunit(sc->sc_dev)); - free(sc->sc_loc_btn, M_USB); - return ENXIO; - } /* * The Microsoft Wireless Notebook Optical Mouse seems to be in worse @@ -407,6 +404,13 @@ sc->sc_loc_btn[2].pos = 2; } + sc->sc_ibuf = malloc(sc->sc_isize, M_USB, M_NOWAIT); + if (!sc->sc_ibuf) { + printf("%s: no memory\n", device_get_nameunit(sc->sc_dev)); + free(sc->sc_loc_btn, M_USB); + return ENXIO; + } + sc->sc_ep_addr = ed->bEndpointAddress; sc->sc_disconnected = 0; free(desc, M_TEMP); ==== //depot/projects/dtrace7/src/sys/kern/vfs_bio.c#3 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/vfs_bio.c,v 1.528.2.1 2008/07/22 14:27:47 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/vfs_bio.c,v 1.528.2.2 2008/08/22 09:47:01 kib Exp $"); #include #include @@ -1383,7 +1383,7 @@ if ((bp->b_flags & (B_DELWRI|B_NEEDSGIANT)) == (B_DELWRI|B_NEEDSGIANT)) bp->b_qindex = QUEUE_DIRTY_GIANT; - if (bp->b_flags & B_DELWRI) + else if (bp->b_flags & B_DELWRI) bp->b_qindex = QUEUE_DIRTY; else bp->b_qindex = QUEUE_CLEAN; ==== //depot/projects/dtrace7/src/sys/sys/copyright.h#3 (text+ko) ==== @@ -22,7 +22,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/sys/copyright.h,v 1.25.2.1 2007/12/26 16:46:47 imp Exp $ + * $FreeBSD: src/sys/sys/copyright.h,v 1.25.2.2 2008/08/22 12:40:59 nyan Exp $ */ @@ -42,7 +42,7 @@ /* a port of FreeBSD to the NEC PC98, Japan */ #define COPYRIGHT_PC98 \ - "Copyright (c) 1994-2008 FreeBSD(98) porting team.\nCopyright (c) 1992 A.Kojima F.Ukai M.Ishii (KMC).\n" + "Copyright (c) 1994-2003 FreeBSD(98) porting team.\nCopyright (c) 1992 A.Kojima F.Ukai M.Ishii (KMC).\n" #if defined(PC98) char copyright[] = COPYRIGHT_FreeBSD COPYRIGHT_PC98 COPYRIGHT_UCB; ==== //depot/projects/dtrace7/src/sys/ufs/ffs/ffs_balloc.c#4 (text+ko) ==== @@ -60,7 +60,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/ufs/ffs/ffs_balloc.c,v 1.50.10.3 2008/02/15 16:43:02 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/ufs/ffs/ffs_balloc.c,v 1.50.10.4 2008/08/22 09:54:56 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.