From owner-p4-projects@FreeBSD.ORG Tue Feb 10 15:04:49 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 236B91065678; Tue, 10 Feb 2009 15:04:48 +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 A6B0610656FC for ; Tue, 10 Feb 2009 15:04:46 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5A3888FC0A for ; Tue, 10 Feb 2009 15:04:46 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n1AF4kRB017579 for ; Tue, 10 Feb 2009 15:04:46 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n1AF4jfx017577 for perforce@freebsd.org; Tue, 10 Feb 2009 15:04:45 GMT (envelope-from jhb@freebsd.org) Date: Tue, 10 Feb 2009 15:04:45 GMT Message-Id: <200902101504.n1AF4jfx017577@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Cc: Subject: PERFORCE change 157492 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: Tue, 10 Feb 2009 15:04:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=157492 Change 157492 by jhb@jhb_jhbbsd on 2009/02/10 15:04:25 IFC @157486 Affected files ... .. //depot/projects/smpng/sys/amd64/amd64/busdma_machdep.c#30 integrate .. //depot/projects/smpng/sys/amd64/conf/DEFAULTS#11 integrate .. //depot/projects/smpng/sys/arm/arm/busdma_machdep.c#28 integrate .. //depot/projects/smpng/sys/cam/cam_periph.c#30 integrate .. //depot/projects/smpng/sys/conf/NOTES#161 integrate .. //depot/projects/smpng/sys/conf/files#227 integrate .. //depot/projects/smpng/sys/conf/options#162 integrate .. //depot/projects/smpng/sys/dev/de/if_de.c#7 integrate .. //depot/projects/smpng/sys/dev/firewire/if_fwe.c#33 integrate .. //depot/projects/smpng/sys/dev/firewire/if_fwip.c#14 integrate .. //depot/projects/smpng/sys/dev/firewire/sbp.c#46 integrate .. //depot/projects/smpng/sys/dev/sound/pci/ds1.c#27 integrate .. //depot/projects/smpng/sys/dev/usb2/controller/at91dci.c#3 integrate .. //depot/projects/smpng/sys/dev/usb2/controller/at91dci_atmelarm.c#4 integrate .. //depot/projects/smpng/sys/dev/usb2/controller/atmegadci.c#2 integrate .. //depot/projects/smpng/sys/dev/usb2/controller/ehci2.c#5 integrate .. //depot/projects/smpng/sys/dev/usb2/controller/ehci2.h#4 integrate .. //depot/projects/smpng/sys/dev/usb2/controller/ehci2_ixp4xx.c#1 branch .. //depot/projects/smpng/sys/dev/usb2/controller/ehci2_mbus.c#1 branch .. //depot/projects/smpng/sys/dev/usb2/controller/ehci2_pci.c#4 integrate .. //depot/projects/smpng/sys/dev/usb2/controller/musb2_otg.c#3 integrate .. //depot/projects/smpng/sys/dev/usb2/controller/ohci2.c#4 integrate .. //depot/projects/smpng/sys/dev/usb2/controller/uhci2.c#5 integrate .. //depot/projects/smpng/sys/dev/usb2/controller/usb2_controller.c#3 integrate .. //depot/projects/smpng/sys/dev/usb2/controller/uss820dci.c#3 integrate .. //depot/projects/smpng/sys/dev/usb2/core/usb2_config_td.c#3 delete .. //depot/projects/smpng/sys/dev/usb2/core/usb2_config_td.h#3 delete .. //depot/projects/smpng/sys/dev/usb2/core/usb2_core.h#4 integrate .. //depot/projects/smpng/sys/dev/usb2/core/usb2_device.c#4 integrate .. //depot/projects/smpng/sys/dev/usb2/core/usb2_hub.c#6 integrate .. //depot/projects/smpng/sys/dev/usb2/core/usb2_msctest.c#4 integrate .. //depot/projects/smpng/sys/dev/usb2/core/usb2_process.c#4 integrate .. //depot/projects/smpng/sys/dev/usb2/core/usb2_process.h#3 integrate .. //depot/projects/smpng/sys/dev/usb2/core/usb2_request.c#4 integrate .. //depot/projects/smpng/sys/dev/usb2/core/usb2_request.h#3 integrate .. //depot/projects/smpng/sys/dev/usb2/core/usb2_transfer.c#3 integrate .. //depot/projects/smpng/sys/dev/usb2/core/usb2_util.c#4 integrate .. //depot/projects/smpng/sys/dev/usb2/core/usb2_util.h#2 integrate .. //depot/projects/smpng/sys/dev/usb2/ethernet/if_aue2.c#6 integrate .. //depot/projects/smpng/sys/dev/usb2/ethernet/if_auereg.h#3 integrate .. //depot/projects/smpng/sys/dev/usb2/ethernet/if_axe2.c#5 integrate .. //depot/projects/smpng/sys/dev/usb2/ethernet/if_axereg.h#3 integrate .. //depot/projects/smpng/sys/dev/usb2/ethernet/if_cdce2.c#5 integrate .. //depot/projects/smpng/sys/dev/usb2/ethernet/if_cdcereg.h#3 integrate .. //depot/projects/smpng/sys/dev/usb2/ethernet/if_cue2.c#5 integrate .. //depot/projects/smpng/sys/dev/usb2/ethernet/if_cuereg.h#3 integrate .. //depot/projects/smpng/sys/dev/usb2/ethernet/if_kue2.c#5 integrate .. //depot/projects/smpng/sys/dev/usb2/ethernet/if_kuereg.h#3 integrate .. //depot/projects/smpng/sys/dev/usb2/ethernet/if_rue2.c#5 integrate .. //depot/projects/smpng/sys/dev/usb2/ethernet/if_ruereg.h#3 integrate .. //depot/projects/smpng/sys/dev/usb2/ethernet/if_udav2.c#5 integrate .. //depot/projects/smpng/sys/dev/usb2/ethernet/if_udavreg.h#3 integrate .. //depot/projects/smpng/sys/dev/usb2/ethernet/usb2_ethernet.c#3 integrate .. //depot/projects/smpng/sys/dev/usb2/ethernet/usb2_ethernet.h#3 integrate .. //depot/projects/smpng/sys/dev/usb2/include/usb2_cdc.h#2 integrate .. //depot/projects/smpng/sys/dev/usb2/misc/ufm2.c#4 integrate .. //depot/projects/smpng/sys/dev/usb2/serial/u3g2.c#5 integrate .. //depot/projects/smpng/sys/dev/usb2/serial/uark2.c#4 integrate .. //depot/projects/smpng/sys/dev/usb2/serial/ubsa2.c#5 integrate .. //depot/projects/smpng/sys/dev/usb2/serial/ubser2.c#4 integrate .. //depot/projects/smpng/sys/dev/usb2/serial/uchcom2.c#4 integrate .. //depot/projects/smpng/sys/dev/usb2/serial/ucycom2.c#4 integrate .. //depot/projects/smpng/sys/dev/usb2/serial/ufoma2.c#5 integrate .. //depot/projects/smpng/sys/dev/usb2/serial/uftdi2.c#4 integrate .. //depot/projects/smpng/sys/dev/usb2/serial/ugensa2.c#5 integrate .. //depot/projects/smpng/sys/dev/usb2/serial/uipaq2.c#4 integrate .. //depot/projects/smpng/sys/dev/usb2/serial/ulpt2.c#3 integrate .. //depot/projects/smpng/sys/dev/usb2/serial/umct2.c#4 integrate .. //depot/projects/smpng/sys/dev/usb2/serial/umodem2.c#4 integrate .. //depot/projects/smpng/sys/dev/usb2/serial/umoscom2.c#4 integrate .. //depot/projects/smpng/sys/dev/usb2/serial/uplcom2.c#4 integrate .. //depot/projects/smpng/sys/dev/usb2/serial/usb2_serial.c#3 integrate .. //depot/projects/smpng/sys/dev/usb2/serial/usb2_serial.h#3 integrate .. //depot/projects/smpng/sys/dev/usb2/serial/uslcom2.c#1 branch .. //depot/projects/smpng/sys/dev/usb2/serial/uvisor2.c#4 integrate .. //depot/projects/smpng/sys/dev/usb2/serial/uvscom2.c#4 integrate .. //depot/projects/smpng/sys/dev/usb2/sound/uaudio2.c#5 integrate .. //depot/projects/smpng/sys/dev/usb2/storage/umass2.c#6 integrate .. //depot/projects/smpng/sys/dev/usb2/template/usb2_template_cdce.c#2 integrate .. //depot/projects/smpng/sys/dev/usb2/wlan/if_rum2.c#6 integrate .. //depot/projects/smpng/sys/dev/usb2/wlan/if_rumreg.h#2 integrate .. //depot/projects/smpng/sys/dev/usb2/wlan/if_rumvar.h#3 integrate .. //depot/projects/smpng/sys/dev/usb2/wlan/if_ural2.c#5 integrate .. //depot/projects/smpng/sys/dev/usb2/wlan/if_uralreg.h#2 integrate .. //depot/projects/smpng/sys/dev/usb2/wlan/if_uralvar.h#3 integrate .. //depot/projects/smpng/sys/dev/usb2/wlan/if_zyd2.c#5 integrate .. //depot/projects/smpng/sys/dev/usb2/wlan/if_zydfw.h#2 integrate .. //depot/projects/smpng/sys/dev/usb2/wlan/if_zydreg.h#3 integrate .. //depot/projects/smpng/sys/fs/udf/ecma167-udf.h#8 integrate .. //depot/projects/smpng/sys/fs/udf/udf_vfsops.c#43 integrate .. //depot/projects/smpng/sys/fs/udf/udf_vnops.c#46 integrate .. //depot/projects/smpng/sys/geom/part/g_part_apm.c#7 integrate .. //depot/projects/smpng/sys/geom/part/g_part_gpt.c#9 integrate .. //depot/projects/smpng/sys/geom/part/g_part_pc98.c#7 integrate .. //depot/projects/smpng/sys/geom/part/g_part_vtoc8.c#6 integrate .. //depot/projects/smpng/sys/i386/conf/DEFAULTS#13 integrate .. //depot/projects/smpng/sys/i386/i386/busdma_machdep.c#49 integrate .. //depot/projects/smpng/sys/kern/uipc_debug.c#7 integrate .. //depot/projects/smpng/sys/mips/include/pmap.h#4 integrate .. //depot/projects/smpng/sys/modules/usb2/Makefile#5 integrate .. //depot/projects/smpng/sys/modules/usb2/core/Makefile#2 integrate .. //depot/projects/smpng/sys/modules/usb2/serial_slcom/Makefile#1 branch .. //depot/projects/smpng/sys/net80211/ieee80211_regdomain.c#7 integrate .. //depot/projects/smpng/sys/netinet/sctp_uio.h#17 integrate .. //depot/projects/smpng/sys/pci/if_rl.c#76 integrate Differences ... ==== //depot/projects/smpng/sys/amd64/amd64/busdma_machdep.c#30 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.87 2009/02/08 22:54:58 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.88 2009/02/09 18:03:31 cognet Exp $"); #include #include @@ -93,6 +93,7 @@ int active_bpages; int total_bounced; int total_deferred; + int map_count; bus_size_t alignment; bus_size_t boundary; bus_addr_t lowaddr; @@ -418,7 +419,7 @@ else maxpages = MIN(MAX_BPAGES, Maxmem -atop(dmat->lowaddr)); if ((dmat->flags & BUS_DMA_MIN_ALLOC_COMP) == 0 - || (dmat->map_count > 0 && bz->total_bpages < maxpages)) { + || (bz->map_count > 0 && bz->total_bpages < maxpages)) { int pages; pages = MAX(atop(dmat->maxsize), 1); @@ -434,6 +435,7 @@ error = 0; } } + bz->map_count++; } else { *mapp = NULL; } @@ -457,6 +459,8 @@ __func__, dmat, EBUSY); return (EBUSY); } + if (dmat->bounce_zone) + dmat->bounce_zone->map_count--; free(map, M_DEVBUF); } dmat->map_count--; @@ -989,6 +993,7 @@ bz->lowaddr = dmat->lowaddr; bz->alignment = dmat->alignment; bz->boundary = dmat->boundary; + bz->map_count = 0; snprintf(bz->zoneid, 8, "zone%d", busdma_zonecount); busdma_zonecount++; snprintf(bz->lowaddrid, 18, "%#jx", (uintmax_t)bz->lowaddr); ==== //depot/projects/smpng/sys/amd64/conf/DEFAULTS#11 (text+ko) ==== @@ -1,7 +1,7 @@ # # DEFAULTS -- Default kernel configuration file for FreeBSD/amd64 # -# $FreeBSD: src/sys/amd64/conf/DEFAULTS,v 1.14 2008/12/17 17:43:22 marcel Exp $ +# $FreeBSD: src/sys/amd64/conf/DEFAULTS,v 1.15 2009/02/10 00:08:39 marcel Exp $ machine amd64 @@ -17,4 +17,5 @@ # Default partitioning schemes options GEOM_PART_BSD +options GEOM_PART_EBR options GEOM_PART_MBR ==== //depot/projects/smpng/sys/arm/arm/busdma_machdep.c#28 (text+ko) ==== @@ -29,7 +29,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/busdma_machdep.c,v 1.43 2009/02/08 22:54:58 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/busdma_machdep.c,v 1.44 2009/02/09 18:03:31 cognet Exp $"); /* * ARM bus dma support routines @@ -112,6 +112,7 @@ int active_bpages; int total_bounced; int total_deferred; + int map_count; bus_size_t alignment; bus_size_t boundary; bus_addr_t lowaddr; @@ -523,7 +524,7 @@ */ maxpages = MAX_BPAGES; if ((dmat->flags & BUS_DMA_MIN_ALLOC_COMP) == 0 - || (dmat->map_count > 0 && bz->total_bpages < maxpages)) { + || (bz->map_count > 0 && bz->total_bpages < maxpages)) { int pages; pages = MAX(atop(dmat->maxsize), 1); @@ -539,6 +540,7 @@ error = 0; } } + bz->map_count++; } CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", __func__, dmat, dmat->flags, error); @@ -560,6 +562,8 @@ __func__, dmat, EBUSY); return (EBUSY); } + if (dmat->bounce_zone) + dmat->bounce_zone->map_count--; dmat->map_count--; CTR2(KTR_BUSDMA, "%s: tag %p error 0", __func__, dmat); return (0); @@ -1277,6 +1281,7 @@ bz->lowaddr = dmat->lowaddr; bz->alignment = dmat->alignment; bz->boundary = dmat->boundary; + bz->map_count = 0; snprintf(bz->zoneid, 8, "zone%d", busdma_zonecount); busdma_zonecount++; snprintf(bz->lowaddrid, 18, "%#jx", (uintmax_t)bz->lowaddr); ==== //depot/projects/smpng/sys/cam/cam_periph.c#30 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/cam_periph.c,v 1.76 2009/01/26 15:01:47 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/cam_periph.c,v 1.77 2009/02/09 17:02:54 fjoe Exp $"); #include #include @@ -171,7 +171,7 @@ break; } xpt_unlock_buses(); - if (p_drv == NULL) { + if (*p_drv == NULL) { printf("cam_periph_alloc: invalid periph name '%s'\n", name); return (CAM_REQ_INVALID); } ==== //depot/projects/smpng/sys/conf/NOTES#161 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1527 2009/02/08 12:33:05 wkoszek Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1528 2009/02/10 00:08:39 marcel Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -147,6 +147,7 @@ options GEOM_NOP # Test class. options GEOM_PART_APM # Apple partitioning options GEOM_PART_BSD # BSD disklabel +options GEOM_PART_EBR # Extended Boot Records options GEOM_PART_GPT # GPT partitioning options GEOM_PART_MBR # MBR partitioning options GEOM_PART_PC98 # PC-9800 disk partitioning ==== //depot/projects/smpng/sys/conf/files#227 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.1367 2009/02/08 14:43:20 wkoszek Exp $ +# $FreeBSD: src/sys/conf/files,v 1.1369 2009/02/09 22:38:55 thompsa Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -1567,7 +1567,6 @@ # dev/usb2/core/usb2_busdma.c optional usb2_core dev/usb2/core/usb2_compat_linux.c optional usb2_core -dev/usb2/core/usb2_config_td.c optional usb2_core dev/usb2/core/usb2_core.c optional usb2_core dev/usb2/core/usb2_debug.c optional usb2_core dev/usb2/core/usb2_dev.c optional usb2_core @@ -1624,6 +1623,7 @@ dev/usb2/serial/umodem2.c optional usb2_core usb2_serial usb2_serial_modem dev/usb2/serial/umoscom2.c optional usb2_core usb2_serial usb2_serial_moscom dev/usb2/serial/uplcom2.c optional usb2_core usb2_serial usb2_serial_plcom +dev/usb2/serial/uslcom2.c optional usb2_core usb2_serial usb2_serial_slcom dev/usb2/serial/usb2_serial.c optional usb2_core usb2_serial dev/usb2/serial/uvisor2.c optional usb2_core usb2_serial usb2_serial_visor dev/usb2/serial/uvscom2.c optional usb2_core usb2_serial usb2_serial_vscom ==== //depot/projects/smpng/sys/conf/options#162 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options,v 1.660 2009/02/06 10:30:46 wkoszek Exp $ +# $FreeBSD: src/sys/conf/options,v 1.661 2009/02/10 00:08:39 marcel Exp $ # # On the handling of kernel options # @@ -92,6 +92,7 @@ GEOM_NOP opt_geom.h GEOM_PART_APM opt_geom.h GEOM_PART_BSD opt_geom.h +GEOM_PART_EBR opt_geom.h GEOM_PART_GPT opt_geom.h GEOM_PART_MBR opt_geom.h GEOM_PART_PC98 opt_geom.h ==== //depot/projects/smpng/sys/dev/de/if_de.c#7 (text) ==== @@ -36,7 +36,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/de/if_de.c,v 1.184 2008/04/05 17:24:44 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/de/if_de.c,v 1.185 2009/02/09 17:07:29 fjoe Exp $"); #define TULIP_HDR_DATA @@ -4561,7 +4561,7 @@ sc->tulip_setup_dma_addr = 0; } if (sc->tulip_setupbuf != NULL) { - bus_dmamem_free(sc->tulip_setup_tag, sc->tulip_setupdata, + bus_dmamem_free(sc->tulip_setup_tag, sc->tulip_setupbuf, sc->tulip_setup_map); sc->tulip_setup_map = NULL; sc->tulip_setupbuf = NULL; ==== //depot/projects/smpng/sys/dev/firewire/if_fwe.c#33 (text+ko) ==== @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/firewire/if_fwe.c,v 1.45 2008/03/25 09:38:58 ru Exp $ + * $FreeBSD: src/sys/dev/firewire/if_fwe.c,v 1.46 2009/02/09 16:58:18 fjoe Exp $ */ #ifdef HAVE_KERNEL_OPTION_HEADERS @@ -445,7 +445,7 @@ #ifdef DEVICE_POLLING { struct ifreq *ifr = (struct ifreq *) data; - struct firewire_comm *fc = fc = fwe->fd.fc; + struct firewire_comm *fc = fwe->fd.fc; if (ifr->ifr_reqcap & IFCAP_POLLING && !(ifp->if_capenable & IFCAP_POLLING)) { ==== //depot/projects/smpng/sys/dev/firewire/if_fwip.c#14 (text+ko) ==== @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/firewire/if_fwip.c,v 1.17 2008/03/25 09:38:58 ru Exp $ + * $FreeBSD: src/sys/dev/firewire/if_fwip.c,v 1.18 2009/02/09 16:58:18 fjoe Exp $ */ #ifdef HAVE_KERNEL_OPTION_HEADERS @@ -427,7 +427,7 @@ #ifdef DEVICE_POLLING { struct ifreq *ifr = (struct ifreq *) data; - struct firewire_comm *fc = fc = fwip->fd.fc; + struct firewire_comm *fc = fwip->fd.fc; if (ifr->ifr_reqcap & IFCAP_POLLING && !(ifp->if_capenable & IFCAP_POLLING)) { ==== //depot/projects/smpng/sys/dev/firewire/sbp.c#46 (text+ko) ==== @@ -31,7 +31,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/firewire/sbp.c,v 1.98 2009/02/01 23:28:52 sbruno Exp $ + * $FreeBSD: src/sys/dev/firewire/sbp.c,v 1.99 2009/02/09 16:57:07 fjoe Exp $ * */ @@ -330,12 +330,11 @@ static void sbp_identify(driver_t *driver, device_t parent) { - device_t child; SBP_DEBUG(0) printf("sbp_identify\n"); END_DEBUG - child = BUS_ADD_CHILD(parent, 0, "sbp", device_get_unit(parent)); + BUS_ADD_CHILD(parent, 0, "sbp", device_get_unit(parent)); } /* ==== //depot/projects/smpng/sys/dev/sound/pci/ds1.c#27 (text+ko) ==== @@ -33,7 +33,7 @@ #include #include -SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/ds1.c,v 1.52 2007/06/17 06:10:41 ariff Exp $"); +SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/ds1.c,v 1.53 2009/02/09 22:59:22 cognet Exp $"); /* -------------------------------------------------------------------- */ @@ -396,7 +396,7 @@ pb->Format |= b16? 0 : 0x80000000; pb->Format |= (stereo && (ch == 2 || ch == 4))? 0x00000001 : 0; pb->LoopDefault = 0; - pb->PgBase = base? base : 0; + pb->PgBase = base; pb->PgLoop = 0; pb->PgLoopEnd = len >> ss; pb->PgLoopFrac = 0; ==== //depot/projects/smpng/sys/dev/usb2/controller/at91dci.c#3 (text+ko) ==== @@ -1,5 +1,5 @@ #include -__FBSDID("$FreeBSD: src/sys/dev/usb2/controller/at91dci.c,v 1.11 2009/01/13 19:05:51 thompsa Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb2/controller/at91dci.c,v 1.12 2009/02/09 21:47:39 thompsa Exp $"); /*- * Copyright (c) 2007-2008 Hans Petter Selasky. All rights reserved. @@ -275,7 +275,7 @@ DELAY(8000); } else { /* Wait for reset to complete. */ - usb2_pause_mtx(&sc->sc_bus.bus_mtx, 8); + usb2_pause_mtx(&sc->sc_bus.bus_mtx, hz / 125); } AT91_UDP_WRITE_4(sc, AT91_UDP_GSTATE, 0); @@ -1395,7 +1395,7 @@ (sc->sc_clocks_on) (sc->sc_clocks_arg); } /* wait a little for things to stabilise */ - usb2_pause_mtx(&sc->sc_bus.bus_mtx, 1); + usb2_pause_mtx(&sc->sc_bus.bus_mtx, hz / 1000); /* disable and clear all interrupts */ ==== //depot/projects/smpng/sys/dev/usb2/controller/at91dci_atmelarm.c#4 (text+ko) ==== @@ -1,5 +1,5 @@ #include -__FBSDID("$FreeBSD: src/sys/dev/usb2/controller/at91dci_atmelarm.c,v 1.8 2009/02/01 00:51:25 thompsa Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb2/controller/at91dci_atmelarm.c,v 1.9 2009/02/09 21:47:39 thompsa Exp $"); /*- * Copyright (c) 2007-2008 Hans Petter Selasky. All rights reserved. @@ -168,7 +168,7 @@ at91_udp_pull_down(sc); /* wait 10ms for pulldown to stabilise */ - usb2_pause_mtx(NULL, 10); + usb2_pause_mtx(NULL, hz / 100); sc->sc_iclk = at91_pmc_clock_ref("udc_clk"); sc->sc_fclk = at91_pmc_clock_ref("udpck"); ==== //depot/projects/smpng/sys/dev/usb2/controller/atmegadci.c#2 (text+ko) ==== @@ -1,5 +1,5 @@ #include -__FBSDID("$FreeBSD: src/sys/dev/usb2/controller/atmegadci.c,v 1.1 2009/01/13 18:49:35 thompsa Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb2/controller/atmegadci.c,v 1.2 2009/02/09 21:47:39 thompsa Exp $"); /*- * Copyright (c) 2009 Hans Petter Selasky. All rights reserved. @@ -221,7 +221,7 @@ DELAY(8000); } else { /* Wait for reset to complete. */ - usb2_pause_mtx(&sc->sc_bus.bus_mtx, 8); + usb2_pause_mtx(&sc->sc_bus.bus_mtx, hz / 125); } /* hardware should have cleared RMWKUP bit */ @@ -1253,7 +1253,7 @@ (sc->sc_clocks_on) (&sc->sc_bus); /* wait a little for things to stabilise */ - usb2_pause_mtx(&sc->sc_bus.bus_mtx, 1); + usb2_pause_mtx(&sc->sc_bus.bus_mtx, hz / 1000); /* enable interrupts */ ATMEGA_WRITE_1(sc, ATMEGA_UDIEN, ==== //depot/projects/smpng/sys/dev/usb2/controller/ehci2.c#5 (text+ko) ==== @@ -44,7 +44,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/usb2/controller/ehci2.c,v 1.11 2009/02/08 21:08:00 thompsa Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb2/controller/ehci2.c,v 1.12 2009/02/09 21:47:39 thompsa Exp $"); #include #include @@ -177,7 +177,7 @@ EOWRITE4(sc, EHCI_USBCMD, 0); /* Halt controller */ for (n = 0; n != 100; n++) { - usb2_pause_mtx(&sc->sc_bus.bus_mtx, 1); + usb2_pause_mtx(&sc->sc_bus.bus_mtx, hz / 1000); hcr = EOREAD4(sc, EHCI_USBSTS); if (hcr & EHCI_STS_HCH) { hcr = 0; @@ -193,7 +193,7 @@ EOWRITE4(sc, EHCI_USBCMD, EHCI_CMD_HCRESET); for (n = 0; n != 100; n++) { - usb2_pause_mtx(&sc->sc_bus.bus_mtx, 1); + usb2_pause_mtx(&sc->sc_bus.bus_mtx, hz / 1000); hcr = EOREAD4(sc, EHCI_USBCMD); if (!(hcr & EHCI_CMD_HCRESET)) { if (sc->sc_flags & EHCI_SCFLG_SETMODE) @@ -478,7 +478,7 @@ EOWRITE4(sc, EHCI_CONFIGFLAG, EHCI_CONF_CF); for (i = 0; i < 100; i++) { - usb2_pause_mtx(NULL, 1); + usb2_pause_mtx(NULL, hz / 1000); hcr = EOREAD4(sc, EHCI_USBSTS) & EHCI_STS_HCH; if (!hcr) { break; @@ -511,11 +511,12 @@ if (ehci_hc_reset(sc)) { DPRINTF("reset failed!\n"); } - /* XXX let stray task complete */ - usb2_pause_mtx(&sc->sc_bus.bus_mtx, 50); USB_BUS_UNLOCK(&sc->sc_bus); + /* XXX let stray task complete */ + usb2_pause_mtx(NULL, hz / 20); + usb2_callout_drain(&sc->sc_tmo_pcd); } @@ -549,7 +550,7 @@ if (hcr == 0) { break; } - usb2_pause_mtx(&sc->sc_bus.bus_mtx, 1); + usb2_pause_mtx(&sc->sc_bus.bus_mtx, hz / 1000); } if (hcr != 0) { @@ -563,7 +564,7 @@ if (hcr == EHCI_STS_HCH) { break; } - usb2_pause_mtx(&sc->sc_bus.bus_mtx, 1); + usb2_pause_mtx(&sc->sc_bus.bus_mtx, hz / 1000); } if (hcr != EHCI_STS_HCH) { @@ -607,7 +608,7 @@ if (hcr) { usb2_pause_mtx(&sc->sc_bus.bus_mtx, - USB_RESUME_WAIT); + USB_MS_TO_TICKS(USB_RESUME_WAIT)); for (i = 1; i <= sc->sc_noport; i++) { cmd = EOREAD4(sc, EHCI_PORTSC(i)); @@ -625,16 +626,17 @@ if (hcr != EHCI_STS_HCH) { break; } - usb2_pause_mtx(&sc->sc_bus.bus_mtx, 1); + usb2_pause_mtx(&sc->sc_bus.bus_mtx, hz / 1000); } if (hcr == EHCI_STS_HCH) { device_printf(sc->sc_bus.bdev, "config timeout\n"); } - usb2_pause_mtx(&sc->sc_bus.bus_mtx, - USB_RESUME_WAIT); USB_BUS_UNLOCK(&sc->sc_bus); + usb2_pause_mtx(NULL, + USB_MS_TO_TICKS(USB_RESUME_WAIT)); + /* catch any lost interrupts */ ehci_do_poll(&sc->sc_bus); } @@ -1140,6 +1142,9 @@ td = xfer->td_transfer_cache; td_alt_next = td->alt_next; + if (xfer->aframes != xfer->nframes) { + xfer->frlengths[xfer->aframes] = 0; + } while (1) { usb2_pc_cpu_invalidate(td->page_cache); @@ -1148,8 +1153,8 @@ len = EHCI_QTD_GET_BYTES(status); /* - * Verify the status length and subtract - * the remainder from "frlengths[]": + * Verify the status length and + * add the length to "frlengths[]": */ if (len > td->len) { /* should not happen */ @@ -1157,7 +1162,7 @@ "0x%04x/0x%04x bytes\n", len, td->len); status |= EHCI_QTD_HALTED; } else if (xfer->aframes != xfer->nframes) { - xfer->frlengths[xfer->aframes] -= len; + xfer->frlengths[xfer->aframes] += td->len - len; } /* Check for last transfer */ if (((void *)td) == xfer->td_transfer_last) { @@ -3214,9 +3219,9 @@ /* wait 20ms for resume sequence to complete */ if (use_polling) { /* polling */ - DELAY(20 * 1000); + DELAY(20000); } else { - usb2_pause_mtx(&sc->sc_bus.bus_mtx, 20); + usb2_pause_mtx(&sc->sc_bus.bus_mtx, hz / 50); } EOWRITE4(sc, port, v & ~(EHCI_PS_SUSP | @@ -3225,9 +3230,9 @@ /* settle time */ if (use_polling) { /* polling */ - DELAY(4 * 1000); + DELAY(4000); } else { - usb2_pause_mtx(&sc->sc_bus.bus_mtx, 4); + usb2_pause_mtx(&sc->sc_bus.bus_mtx, hz / 250); } break; case UHF_PORT_POWER: @@ -3383,7 +3388,7 @@ } else { /* Wait for reset to complete. */ usb2_pause_mtx(&sc->sc_bus.bus_mtx, - USB_PORT_ROOT_RESET_DELAY); + USB_MS_TO_TICKS(USB_PORT_ROOT_RESET_DELAY)); } /* Terminate reset sequence. */ @@ -3396,7 +3401,7 @@ } else { /* Wait for HC to complete reset. */ usb2_pause_mtx(&sc->sc_bus.bus_mtx, - EHCI_PORT_RESET_COMPLETE); + USB_MS_TO_TICKS(EHCI_PORT_RESET_COMPLETE)); } v = EOREAD4(sc, port); ==== //depot/projects/smpng/sys/dev/usb2/controller/ehci2.h#4 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/usb2/controller/ehci2.h,v 1.5 2009/01/13 19:03:01 thompsa Exp $ */ +/* $FreeBSD: src/sys/dev/usb2/controller/ehci2.h,v 1.6 2009/02/09 21:47:39 thompsa Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. @@ -468,7 +468,6 @@ struct ehci_sitd *sc_isoc_fs_p_last[EHCI_VIRTUAL_FRAMELIST_COUNT]; struct ehci_itd *sc_isoc_hs_p_last[EHCI_VIRTUAL_FRAMELIST_COUNT]; void *sc_intr_hdl; - device_t sc_dev; bus_size_t sc_io_size; bus_space_tag_t sc_io_tag; bus_space_handle_t sc_io_hdl; ==== //depot/projects/smpng/sys/dev/usb2/controller/ehci2_pci.c#4 (text+ko) ==== @@ -36,7 +36,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/usb2/controller/ehci2_pci.c,v 1.8 2009/02/01 00:51:25 thompsa Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb2/controller/ehci2_pci.c,v 1.9 2009/02/09 21:47:39 thompsa Exp $"); /* * USB Enhanced Host Controller Driver, a.k.a. USB 2.0 controller. @@ -237,7 +237,6 @@ USB_GET_DMA_TAG(self), &ehci_iterate_hw_softc)) { return (ENOMEM); } - sc->sc_dev = self; pci_enable_busmaster(self); @@ -456,7 +455,7 @@ "timed out waiting for BIOS\n"); break; } - usb2_pause_mtx(NULL, 10); /* wait 10ms */ + usb2_pause_mtx(NULL, hz / 100); /* wait 10ms */ } } } ==== //depot/projects/smpng/sys/dev/usb2/controller/musb2_otg.c#3 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/usb2/controller/musb2_otg.c,v 1.10 2009/01/13 19:03:33 thompsa Exp $ */ +/* $FreeBSD: src/sys/dev/usb2/controller/musb2_otg.c,v 1.11 2009/02/09 21:47:39 thompsa Exp $ */ /*- * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. * @@ -223,7 +223,7 @@ DELAY(8000); } else { /* Wait for reset to complete. */ - usb2_pause_mtx(&sc->sc_bus.bus_mtx, 8); + usb2_pause_mtx(&sc->sc_bus.bus_mtx, hz / 125); } temp = MUSB2_READ_1(sc, MUSB2_REG_POWER); @@ -1708,7 +1708,7 @@ (sc->sc_clocks_on) (sc->sc_clocks_arg); } /* wait a little for things to stabilise */ - usb2_pause_mtx(&sc->sc_bus.bus_mtx, 1); + usb2_pause_mtx(&sc->sc_bus.bus_mtx, hz / 1000); /* disable all interrupts */ @@ -1721,7 +1721,7 @@ musbotg_pull_common(sc, 0); /* wait a little bit (10ms) */ - usb2_pause_mtx(&sc->sc_bus.bus_mtx, 10); + usb2_pause_mtx(&sc->sc_bus.bus_mtx, hz / 100); /* disable double packet buffering */ MUSB2_WRITE_2(sc, MUSB2_REG_RXDBDIS, 0xFFFF); ==== //depot/projects/smpng/sys/dev/usb2/controller/ohci2.c#4 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/usb2/controller/ohci2.c,v 1.9 2009/02/07 06:27:16 thompsa Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb2/controller/ohci2.c,v 1.10 2009/02/09 21:47:39 thompsa Exp $"); /* * USB Open Host Controller driver. @@ -168,7 +168,7 @@ DPRINTF("SMM active, request owner change\n"); OWRITE4(sc, OHCI_COMMAND_STATUS, OHCI_OCR); for (i = 0; (i < 100) && (ctl & OHCI_IR); i++) { - usb2_pause_mtx(NULL, 1); + usb2_pause_mtx(NULL, hz / 1000); ctl = OREAD4(sc, OHCI_CONTROL); } if (ctl & OHCI_IR) { @@ -181,7 +181,8 @@ DPRINTF("cold started\n"); reset: /* controller was cold started */ - usb2_pause_mtx(NULL, USB_BUS_RESET_DELAY); + usb2_pause_mtx(NULL, + USB_MS_TO_TICKS(USB_BUS_RESET_DELAY)); } /* @@ -191,7 +192,8 @@ DPRINTF("%s: resetting\n", device_get_nameunit(sc->sc_bus.bdev)); OWRITE4(sc, OHCI_CONTROL, OHCI_HCFS_RESET); - usb2_pause_mtx(NULL, USB_BUS_RESET_DELAY); + usb2_pause_mtx(NULL, + USB_MS_TO_TICKS(USB_BUS_RESET_DELAY)); /* we now own the host controller and the bus has been reset */ ival = OHCI_GET_IVAL(OREAD4(sc, OHCI_FM_INTERVAL)); @@ -253,7 +255,8 @@ desca = OREAD4(sc, OHCI_RH_DESCRIPTOR_A); OWRITE4(sc, OHCI_RH_DESCRIPTOR_A, desca | OHCI_NOCP); OWRITE4(sc, OHCI_RH_STATUS, OHCI_LPSC); /* Enable port power */ - usb2_pause_mtx(NULL, OHCI_ENABLE_POWER_DELAY); + usb2_pause_mtx(NULL, + USB_MS_TO_TICKS(OHCI_ENABLE_POWER_DELAY)); OWRITE4(sc, OHCI_RH_DESCRIPTOR_A, desca); /* @@ -262,7 +265,8 @@ */ sc->sc_noport = 0; for (i = 0; (i < 10) && (sc->sc_noport == 0); i++) { - usb2_pause_mtx(NULL, OHCI_READ_DESC_DELAY); + usb2_pause_mtx(NULL, + USB_MS_TO_TICKS(OHCI_READ_DESC_DELAY)); sc->sc_noport = OHCI_GET_NDP(OREAD4(sc, OHCI_RH_DESCRIPTOR_A)); } @@ -417,11 +421,11 @@ OWRITE4(sc, OHCI_INTERRUPT_DISABLE, OHCI_ALL_INTRS); OWRITE4(sc, OHCI_CONTROL, OHCI_HCFS_RESET); + USB_BUS_UNLOCK(&sc->sc_bus); + /* XXX let stray task complete */ - usb2_pause_mtx(&sc->sc_bus.bus_mtx, 50); + usb2_pause_mtx(NULL, hz / 20); - USB_BUS_UNLOCK(&sc->sc_bus); - usb2_callout_drain(&sc->sc_tmo_rhsc); } @@ -455,7 +459,7 @@ OWRITE4(sc, OHCI_CONTROL, ctl); usb2_pause_mtx(&sc->sc_bus.bus_mtx, - USB_RESUME_WAIT); + USB_MS_TO_TICKS(USB_RESUME_WAIT)); USB_BUS_UNLOCK(&sc->sc_bus); } @@ -485,10 +489,12 @@ ctl = OREAD4(sc, OHCI_CONTROL); ctl |= OHCI_HCFS_RESUME; OWRITE4(sc, OHCI_CONTROL, ctl); - usb2_pause_mtx(&sc->sc_bus.bus_mtx, USB_RESUME_DELAY); + usb2_pause_mtx(&sc->sc_bus.bus_mtx, + USB_MS_TO_TICKS(USB_RESUME_DELAY)); ctl = (ctl & ~OHCI_HCFS_MASK) | OHCI_HCFS_OPERATIONAL; OWRITE4(sc, OHCI_CONTROL, ctl); - usb2_pause_mtx(&sc->sc_bus.bus_mtx, USB_RESUME_RECOVERY); + usb2_pause_mtx(&sc->sc_bus.bus_mtx, + USB_MS_TO_TICKS(USB_RESUME_RECOVERY)); sc->sc_control = sc->sc_intre = 0; USB_BUS_UNLOCK(&sc->sc_bus); @@ -827,6 +833,9 @@ td_alt_next = td->alt_next; td_flags = 0; + if (xfer->aframes != xfer->nframes) { + xfer->frlengths[xfer->aframes] = 0; + } while (1) { usb2_pc_cpu_invalidate(td->page_cache); @@ -850,10 +859,15 @@ cc = OHCI_CC_STALL; } else if (xfer->aframes != xfer->nframes) { /* - * subtract remaining length from - * "frlengths[]" + * Sum up total transfer length + * in "frlengths[]": */ - xfer->frlengths[xfer->aframes] -= temp; + xfer->frlengths[xfer->aframes] += td->len - temp; + } + } else { + if (xfer->aframes != xfer->nframes) { + /* transfer was complete */ + xfer->frlengths[xfer->aframes] += td->len; } } /* Check for last transfer */ @@ -2401,7 +2415,7 @@ DELAY(USB_PORT_ROOT_RESET_DELAY * 1000); } else { usb2_pause_mtx(&sc->sc_bus.bus_mtx, - USB_PORT_ROOT_RESET_DELAY); + USB_MS_TO_TICKS(USB_PORT_ROOT_RESET_DELAY)); } if ((OREAD4(sc, port) & UPS_RESET) == 0) { ==== //depot/projects/smpng/sys/dev/usb2/controller/uhci2.c#5 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/usb2/controller/uhci2.c,v 1.11 2009/02/07 06:27:16 thompsa Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb2/controller/uhci2.c,v 1.12 2009/02/09 21:47:39 thompsa Exp $"); /* * USB Universal Host Controller driver. @@ -271,7 +271,7 @@ /* wait */ usb2_pause_mtx(&sc->sc_bus.bus_mtx, - USB_BUS_RESET_DELAY); + USB_MS_TO_TICKS(USB_BUS_RESET_DELAY)); /* terminate all transfers */ @@ -283,7 +283,7 @@ while (n--) { /* wait one millisecond */ - usb2_pause_mtx(&sc->sc_bus.bus_mtx, 1); + usb2_pause_mtx(&sc->sc_bus.bus_mtx, hz / 1000); if (!(UREAD2(sc, UHCI_CMD) & UHCI_CMD_HCRESET)) { goto done_1; @@ -299,7 +299,7 @@ while (n--) { /* wait one millisecond */ - usb2_pause_mtx(&sc->sc_bus.bus_mtx, 1); + usb2_pause_mtx(&sc->sc_bus.bus_mtx, hz / 1000); /* check if HC is stopped */ if (UREAD2(sc, UHCI_STS) & UHCI_STS_HCH) { @@ -345,7 +345,7 @@ while (n--) { /* wait one millisecond */ - usb2_pause_mtx(&sc->sc_bus.bus_mtx, 1); + usb2_pause_mtx(&sc->sc_bus.bus_mtx, hz / 1000); /* check that controller has started */ @@ -636,7 +636,8 @@ UHCICMD(sc, UHCI_CMD_EGSM); - usb2_pause_mtx(&sc->sc_bus.bus_mtx, USB_RESUME_WAIT); + usb2_pause_mtx(&sc->sc_bus.bus_mtx, + USB_MS_TO_TICKS(USB_RESUME_WAIT)); USB_BUS_UNLOCK(&sc->sc_bus); } @@ -655,7 +656,7 @@ UHCICMD(sc, UHCI_CMD_FGR); usb2_pause_mtx(&sc->sc_bus.bus_mtx, - USB_RESUME_DELAY); + USB_MS_TO_TICKS(USB_RESUME_DELAY)); /* and start traffic again */ @@ -2408,7 +2409,7 @@ if (use_polling) { DELAY(10000); } else { - usb2_pause_mtx(&sc->sc_bus.bus_mtx, 10); + usb2_pause_mtx(&sc->sc_bus.bus_mtx, hz / 100); } } @@ -2420,7 +2421,7 @@ DELAY(USB_PORT_ROOT_RESET_DELAY * 1000); } else { usb2_pause_mtx(&sc->sc_bus.bus_mtx, - USB_PORT_ROOT_RESET_DELAY); + USB_MS_TO_TICKS(USB_PORT_ROOT_RESET_DELAY)); } DPRINTFN(4, "uhci port %d reset, status0 = 0x%04x\n", @@ -2453,7 +2454,7 @@ DELAY(USB_PORT_RESET_DELAY * 1000); } else { usb2_pause_mtx(&sc->sc_bus.bus_mtx, - USB_PORT_RESET_DELAY); + USB_MS_TO_TICKS(USB_PORT_RESET_DELAY)); } x = UREAD2(sc, port); @@ -2780,9 +2781,9 @@ /* wait 20ms for resume sequence to complete */ if (use_polling) { /* polling */ - DELAY(20 * 1000); + DELAY(20000); } else { - usb2_pause_mtx(&sc->sc_bus.bus_mtx, 20); >>> TRUNCATED FOR MAIL (1000 lines) <<<