From owner-p4-projects@FreeBSD.ORG Tue Apr 1 20:15:50 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E67B61065674; Tue, 1 Apr 2008 20:15:49 +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 A4FA61065670 for ; Tue, 1 Apr 2008 20:15:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 941128FC1A for ; Tue, 1 Apr 2008 20:15:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m31KFnoE099558 for ; Tue, 1 Apr 2008 20:15:49 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m31KFnQ3099556 for perforce@freebsd.org; Tue, 1 Apr 2008 20:15:49 GMT (envelope-from hselasky@FreeBSD.org) Date: Tue, 1 Apr 2008 20:15:49 GMT Message-Id: <200804012015.m31KFnQ3099556@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 139157 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, 01 Apr 2008 20:15:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=139157 Change 139157 by hselasky@hselasky_laptop001 on 2008/04/01 20:14:49 The "usbd_bus_mem_alloc_all()" function now initialises the "bus_dma_tag_t" typed field that once was in "struct usbd_bus". The reason for this change is that the initial field was moved into another structure. Factor out this initialisation to save future code updates. Affected files ... .. //depot/projects/usb/src/sys/arm/at91/at91_udp.c#6 edit .. //depot/projects/usb/src/sys/dev/usb/ehci_pci.c#33 edit .. //depot/projects/usb/src/sys/dev/usb/ohci_pci.c#29 edit .. //depot/projects/usb/src/sys/dev/usb/uhci_pci.c#29 edit .. //depot/projects/usb/src/sys/dev/usb/uss820_dci_pccard.c#2 edit Differences ... ==== //depot/projects/usb/src/sys/arm/at91/at91_udp.c#6 (text+ko) ==== @@ -141,7 +141,6 @@ } /* setup AT9100 USB device controller interface softc */ - sc->sc_dci.sc_bus.dma_tag_parent = device_get_dma_tag(dev); sc->sc_dci.sc_clocks_on = &at91_udp_clocks_on; sc->sc_dci.sc_clocks_off = &at91_udp_clocks_off; sc->sc_dci.sc_clocks_arg = sc; @@ -151,7 +150,8 @@ /* get all DMA memory */ - if (usbd_bus_mem_alloc_all(&(sc->sc_dci.sc_bus), NULL)) { + if (usbd_bus_mem_alloc_all(&(sc->sc_dci.sc_bus), + device_get_dma_tag(dev), NULL)) { return (ENOMEM); } /* ==== //depot/projects/usb/src/sys/dev/usb/ehci_pci.c#33 (text+ko) ==== @@ -219,13 +219,10 @@ device_printf(self, "Could not allocate sc\n"); return (ENXIO); } - /* store parent DMA tag */ - - sc->sc_bus.dma_tag_parent = device_get_dma_tag(self); - /* get all DMA memory */ - if (usbd_bus_mem_alloc_all(&(sc->sc_bus), &ehci_iterate_hw_softc)) { + if (usbd_bus_mem_alloc_all(&(sc->sc_bus), + device_get_dma_tag(self), &ehci_iterate_hw_softc)) { return ENOMEM; } sc->sc_dev = self; ==== //depot/projects/usb/src/sys/dev/usb/ohci_pci.c#29 (text+ko) ==== @@ -196,13 +196,10 @@ device_printf(self, "Could not allocate sc\n"); return (ENXIO); } - /* store parent DMA tag */ - - sc->sc_bus.dma_tag_parent = device_get_dma_tag(self); - /* get all DMA memory */ - if (usbd_bus_mem_alloc_all(&(sc->sc_bus), &ohci_iterate_hw_softc)) { + if (usbd_bus_mem_alloc_all(&(sc->sc_bus), device_get_dma_tag(self), + &ohci_iterate_hw_softc)) { return ENOMEM; } sc->sc_dev = self; ==== //depot/projects/usb/src/sys/dev/usb/uhci_pci.c#29 (text+ko) ==== @@ -224,13 +224,10 @@ device_printf(self, "Could not allocate sc\n"); return (ENXIO); } - /* store parent DMA tag */ - - sc->sc_bus.dma_tag_parent = device_get_dma_tag(self); - /* get all DMA memory */ - if (usbd_bus_mem_alloc_all(&(sc->sc_bus), &uhci_iterate_hw_softc)) { + if (usbd_bus_mem_alloc_all(&(sc->sc_bus), device_get_dma_tag(self), + &uhci_iterate_hw_softc)) { return ENOMEM; } sc->sc_dev = self; ==== //depot/projects/usb/src/sys/dev/usb/uss820_dci_pccard.c#2 (text+ko) ==== @@ -154,11 +154,10 @@ if (sc == NULL) { return (ENXIO); } - sc->sc_bus.dma_tag_parent = device_get_dma_tag(dev); - /* get all DMA memory */ - if (usbd_bus_mem_alloc_all(&(sc->sc_bus), NULL)) { + if (usbd_bus_mem_alloc_all(&(sc->sc_bus), + device_get_dma_tag(dev), NULL)) { return (ENOMEM); } rid = 0;