From owner-p4-projects@FreeBSD.ORG Sun Sep 17 17:27:32 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 543F616A417; Sun, 17 Sep 2006 17:27:32 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 17B2E16A40F for ; Sun, 17 Sep 2006 17:27:32 +0000 (UTC) (envelope-from trhodes@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B8BBE43D49 for ; Sun, 17 Sep 2006 17:27:31 +0000 (GMT) (envelope-from trhodes@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k8HHRV30053384 for ; Sun, 17 Sep 2006 17:27:31 GMT (envelope-from trhodes@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k8HHRVgQ053381 for perforce@freebsd.org; Sun, 17 Sep 2006 17:27:31 GMT (envelope-from trhodes@freebsd.org) Date: Sun, 17 Sep 2006 17:27:31 GMT Message-Id: <200609171727.k8HHRVgQ053381@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to trhodes@freebsd.org using -f From: Tom Rhodes To: Perforce Change Reviews Cc: Subject: PERFORCE change 106250 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: Sun, 17 Sep 2006 17:27:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=106250 Change 106250 by trhodes@trhodes_local on 2006/09/17 17:27:04 Integrate these files with head, minor modifications of whitespace, remove unneeded code, etc. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/ehci_pci.c#8 integrate .. //depot/projects/usb/src/sys/dev/usb/if_axereg.h#6 integrate .. //depot/projects/usb/src/sys/dev/usb/if_kue.c#11 integrate .. //depot/projects/usb/src/sys/dev/usb/if_udavreg.h#5 integrate .. //depot/projects/usb/src/sys/dev/usb/if_uralvar.h#6 integrate .. //depot/projects/usb/src/sys/dev/usb/ohci_pci.c#7 edit .. //depot/projects/usb/src/sys/dev/usb/ucomvar.h#6 integrate .. //depot/projects/usb/src/sys/dev/usb/ufm.c#7 integrate .. //depot/projects/usb/src/sys/dev/usb/uhci_pci.c#7 integrate .. //depot/projects/usb/src/sys/dev/usb/usb.h#6 integrate .. //depot/projects/usb/src/sys/dev/usb/usb_quirks.c#5 integrate Differences ... ==== //depot/projects/usb/src/sys/dev/usb/ehci_pci.c#8 (text+ko) ==== @@ -35,6 +35,9 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD: src/sys/dev/usb/ehci_pci.c,v 1.23 2006/09/07 00:06:41 imp Exp $"); + /* * USB Enhanced Host Controller Driver, a.k.a. USB 2.0 controller. * @@ -60,6 +63,7 @@ #include #include /* LIST_XXX() */ #include +#include #include #define INCLUDE_PCIXXX_H @@ -389,7 +393,7 @@ } legsup = eec; pci_write_config(self, eecp, legsup | EHCI_LEGSUP_OSOWNED, 4); - if(legsup & EHCI_LEGSUP_BIOSOWNED) + if (legsup & EHCI_LEGSUP_BIOSOWNED) { device_printf(sc->sc_bus.bdev, "waiting for BIOS " "to give up control\n"); ==== //depot/projects/usb/src/sys/dev/usb/if_axereg.h#6 (text+ko) ==== @@ -29,7 +29,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/usb/if_axereg.h,v 1.8 2005/06/10 16:49:15 brooks Exp $ + * $FreeBSD: src/sys/dev/usb/if_axereg.h,v 1.10 2006/06/04 14:42:38 iedowse Exp $ */ /* ==== //depot/projects/usb/src/sys/dev/usb/if_kue.c#11 (text+ko) ==== @@ -281,7 +281,6 @@ data, 0, NULL, 60000); if (err) { - DPRINTF(sc, 0, "device request failed, err=%s " "(ignored)\n", usbd_errstr(err)); ==== //depot/projects/usb/src/sys/dev/usb/if_udavreg.h#5 (text+ko) ==== @@ -1,6 +1,6 @@ /* $NetBSD: if_udavreg.h,v 1.2 2003/09/04 15:17:39 tsutsui Exp $ */ /* $nabe: if_udavreg.h,v 1.2 2003/08/21 16:26:40 nabe Exp $ */ -/* $FreeBSD: src/sys/dev/usb/if_udavreg.h,v 1.6 2005/12/04 10:06:04 ru Exp $ */ +/* $FreeBSD: src/sys/dev/usb/if_udavreg.h,v 1.7 2006/09/07 00:06:41 imp Exp $ */ /*- * Copyright (c) 2003 * Shingo WATANABE . All rights reserved. @@ -142,9 +142,9 @@ struct __callout sc_watchdog; struct mtx sc_mtx; - struct ifnet * sc_ifp; - struct usbd_device * sc_udev; - struct usbd_xfer * sc_xfer[UDAV_ENDPT_MAX]; + struct ifnet *sc_ifp; + struct usbd_device *sc_udev; + struct usbd_xfer *sc_xfer[UDAV_ENDPT_MAX]; device_t sc_miibus; device_t sc_dev; ==== //depot/projects/usb/src/sys/dev/usb/if_uralvar.h#6 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/usb/if_uralvar.h,v 1.6 2005/11/29 20:55:53 damien Exp $ */ +/* $FreeBSD: src/sys/dev/usb/if_uralvar.h,v 1.7 2006/09/07 00:06:41 imp Exp $ */ /*- * Copyright (c) 2005 @@ -119,14 +119,14 @@ struct usbd_memory_wait sc_mem_wait; struct __callout sc_watchdog; struct ural_bbp_prom sc_bbp_prom[16]; - struct usbd_xfer * sc_xfer[URAL_N_TRANSFER]; + struct usbd_xfer * *sc_xfer[URAL_N_TRANSFER]; union ural_rxtap sc_rxtap; union ural_txtap sc_txtap; - struct mbuf * sc_bcn_mbuf; - struct ifnet * sc_ifp; - struct bpf_if * sc_drvbpf; - struct usbd_device * sc_udev; + struct mbuf *sc_bcn_mbuf; + struct ifnet *sc_ifp; + struct bpf_if *sc_drvbpf; + struct usbd_device *sc_udev; int (*sc_newstate) (struct ieee80211com *, enum ieee80211_state, int); ==== //depot/projects/usb/src/sys/dev/usb/ohci_pci.c#7 (text+ko) ==== @@ -35,6 +35,9 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD: src/sys/dev/usb/ohci_pci.c,v 1.48 2006/09/03 00:27:42 jmg Exp $"); + /* * USB Open Host Controller driver. * @@ -55,6 +58,7 @@ #include #include /* LIST_XXX() */ #include +#include #include #define INCLUDE_PCIXXX_H @@ -317,6 +321,11 @@ sc->sc_bus.bdev = NULL; } + if (sc->sc_bus.parent_dmatag != NULL) + bus_dma_tag_destroy(sc->sc_bus.parent_dmatag); + if (sc->sc_bus.buffer_dmatag != NULL) + bus_dma_tag_destroy(sc->sc_bus.buffer_dmatag); + pci_disable_busmaster(self); if(sc->irq_res && sc->ih) @@ -344,7 +353,7 @@ if(sc->io_res) { bus_release_resource(self, SYS_RES_MEMORY, PCI_CBMEM, - sc->io_res); + sc->io_res); sc->io_res = NULL; } ==== //depot/projects/usb/src/sys/dev/usb/ucomvar.h#6 (text+ko) ==== @@ -1,5 +1,5 @@ /* $NetBSD: ucomvar.h,v 1.9 2001/01/23 21:56:17 augustss Exp $ */ -/* $FreeBSD: src/sys/dev/usb/ucomvar.h,v 1.7 2005/01/06 01:43:28 imp Exp $ */ +/* $FreeBSD: src/sys/dev/usb/ucomvar.h,v 1.8 2006/09/07 00:06:41 imp Exp $ */ /*- * Copyright (c) 2001-2002, Shunsuke Akiyama . @@ -103,9 +103,9 @@ struct ucom_softc { struct task sc_task; - const struct ucom_callback * sc_callback; - struct tty * sc_tty; - void * sc_parent; + const struct ucom_callback *sc_callback; + struct tty *sc_tty; + void *sc_parent; u_int16_t sc_portno; ==== //depot/projects/usb/src/sys/dev/usb/ufm.c#7 (text+ko) ==== @@ -29,6 +29,9 @@ */ #include +__FBSDID("$FreeBSD: src/sys/dev/usb/ufm.c,v 1.25 2006/09/07 00:06:41 imp Exp $"); + + #include #include #include @@ -73,8 +76,8 @@ struct mtx sc_mtx; struct usbd_memory_wait sc_mem_wait; - struct usbd_device * sc_udev; - struct usbd_xfer * sc_xfer[UFM_N_TRANSFER]; + struct usbd_device *sc_udev; + struct usbd_xfer *sc_xfer[UFM_N_TRANSFER]; u_int32_t sc_unit; u_int32_t sc_freq; ==== //depot/projects/usb/src/sys/dev/usb/uhci_pci.c#7 (text+ko) ==== @@ -35,6 +35,9 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD: src/sys/dev/usb/uhci_pci.c,v 1.58 2006/05/28 05:27:08 iedowse Exp $"); + /* Universal Host Controller Interface * * UHCI spec: http://www.intel.com/ @@ -54,6 +57,7 @@ #include #include /* LIST_XXX() */ #include +#include #include #define INCLUDE_PCIXXX_H @@ -305,6 +309,29 @@ #endif pci_write_config(self, PCI_LEGSUP, PCI_LEGSUP_USBPIRQDEN, 2); + /* Allocate a parent dma tag for DMA maps */ + err = bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT, + BUS_SPACE_MAXADDR, NULL, NULL, BUS_SPACE_MAXSIZE_32BIT, + USB_DMA_NSEG, BUS_SPACE_MAXSIZE_32BIT, 0, NULL, NULL, + &sc->sc_bus.parent_dmatag); + if (err) { + device_printf(self, "Could not allocate parent DMA tag (%d)\n", + err); + uhci_pci_detach(self); + return ENXIO; + } + /* Allocate a dma tag for transfer buffers */ + err = bus_dma_tag_create(sc->sc_bus.parent_dmatag, 1, 0, + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, + BUS_SPACE_MAXSIZE_32BIT, USB_DMA_NSEG, BUS_SPACE_MAXSIZE_32BIT, 0, + busdma_lock_mutex, &Giant, &sc->sc_bus.buffer_dmatag); + if (err) { + device_printf(self, "Could not allocate transfer tag (%d)\n", + err); + uhci_pci_detach(self); + return ENXIO; + } + err = uhci_init(sc); if(!err) { ==== //depot/projects/usb/src/sys/dev/usb/usb.h#6 (text+ko) ==== @@ -1,3 +1,6 @@ +/* $NetBSD: usb.h,v 1.69 2002/09/22 23:20:50 augustss Exp $ */ +/* $FreeBSD: src/sys/dev/usb/usb.h,v 1.41 2006/09/06 23:44:24 imp Exp $ */ + /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. @@ -46,7 +49,15 @@ #endif #if defined(_KERNEL) +#if 1 #include +#else +#include + +MALLOC_DECLARE(M_USB); +MALLOC_DECLARE(M_USBDEV); +MALLOC_DECLARE(M_USBHC); +#endif #endif /* _KERNEL */ /* These two defines are used by usbd to autoload the usb kld */ ==== //depot/projects/usb/src/sys/dev/usb/usb_quirks.c#5 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/usb/usb_quirks.c,v 1.49 2006/02/26 22:20:45 iedowse Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/usb_quirks.c,v 1.50 2006/09/06 23:44:24 imp Exp $"); #include #include @@ -50,7 +50,7 @@ #define ANY 0xffff -Static const struct usbd_quirk_entry { +static const struct usbd_quirk_entry { u_int16_t idVendor; u_int16_t idProduct; u_int16_t bcdDevice;