From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 17:36:25 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD2EF1065670; Tue, 23 Dec 2008 17:36:25 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AA5488FC14; Tue, 23 Dec 2008 17:36:25 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBNHaPT5008623; Tue, 23 Dec 2008 17:36:25 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBNHaPh3008614; Tue, 23 Dec 2008 17:36:25 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200812231736.mBNHaPh3008614@svn.freebsd.org> From: Andrew Thompson Date: Tue, 23 Dec 2008 17:36:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186439 - head/sys/dev/usb2/controller X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 17:36:25 -0000 Author: thompsa Date: Tue Dec 23 17:36:25 2008 New Revision: 186439 URL: http://svn.freebsd.org/changeset/base/186439 Log: Name the bus mutex by the controller name, this allows each bus to be distinguished in lock profiling, etc. Modified: head/sys/dev/usb2/controller/at91dci_atmelarm.c head/sys/dev/usb2/controller/ehci2_pci.c head/sys/dev/usb2/controller/musb2_otg_atmelarm.c head/sys/dev/usb2/controller/ohci2_atmelarm.c head/sys/dev/usb2/controller/ohci2_pci.c head/sys/dev/usb2/controller/uhci2_pci.c head/sys/dev/usb2/controller/usb2_bus.h head/sys/dev/usb2/controller/usb2_controller.c head/sys/dev/usb2/controller/uss820dci_atmelarm.c Modified: head/sys/dev/usb2/controller/at91dci_atmelarm.c ============================================================================== --- head/sys/dev/usb2/controller/at91dci_atmelarm.c Tue Dec 23 16:54:00 2008 (r186438) +++ head/sys/dev/usb2/controller/at91dci_atmelarm.c Tue Dec 23 17:36:25 2008 (r186439) @@ -147,6 +147,7 @@ at91_udp_attach(device_t dev) /* get all DMA memory */ + sc->sc_dci.sc_bus.parent = dev; if (usb2_bus_mem_alloc_all(&sc->sc_dci.sc_bus, USB_GET_DMA_TAG(dev), NULL)) { return (ENOMEM); Modified: head/sys/dev/usb2/controller/ehci2_pci.c ============================================================================== --- head/sys/dev/usb2/controller/ehci2_pci.c Tue Dec 23 16:54:00 2008 (r186438) +++ head/sys/dev/usb2/controller/ehci2_pci.c Tue Dec 23 17:36:25 2008 (r186439) @@ -234,6 +234,7 @@ ehci_pci_attach(device_t self) } /* get all DMA memory */ + sc->sc_bus.parent = self; if (usb2_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(self), &ehci_iterate_hw_softc)) { return ENOMEM; Modified: head/sys/dev/usb2/controller/musb2_otg_atmelarm.c ============================================================================== --- head/sys/dev/usb2/controller/musb2_otg_atmelarm.c Tue Dec 23 16:54:00 2008 (r186438) +++ head/sys/dev/usb2/controller/musb2_otg_atmelarm.c Tue Dec 23 17:36:25 2008 (r186439) @@ -104,6 +104,7 @@ musbotg_attach(device_t dev) /* get all DMA memory */ + sc->sc_otg.sc_bus.parent = dev; if (usb2_bus_mem_alloc_all(&sc->sc_otg.sc_bus, USB_GET_DMA_TAG(dev), NULL)) { return (ENOMEM); Modified: head/sys/dev/usb2/controller/ohci2_atmelarm.c ============================================================================== --- head/sys/dev/usb2/controller/ohci2_atmelarm.c Tue Dec 23 16:54:00 2008 (r186438) +++ head/sys/dev/usb2/controller/ohci2_atmelarm.c Tue Dec 23 17:36:25 2008 (r186439) @@ -75,6 +75,7 @@ ohci_atmelarm_attach(device_t dev) } /* get all DMA memory */ + sc->sc_ohci.sc_bus.parent = dev; if (usb2_bus_mem_alloc_all(&sc->sc_ohci.sc_bus, USB_GET_DMA_TAG(dev), &ohci_iterate_hw_softc)) { return ENOMEM; Modified: head/sys/dev/usb2/controller/ohci2_pci.c ============================================================================== --- head/sys/dev/usb2/controller/ohci2_pci.c Tue Dec 23 16:54:00 2008 (r186438) +++ head/sys/dev/usb2/controller/ohci2_pci.c Tue Dec 23 17:36:25 2008 (r186439) @@ -202,6 +202,7 @@ ohci_pci_attach(device_t self) } /* get all DMA memory */ + sc->sc_bus.parent = self; if (usb2_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(self), &ohci_iterate_hw_softc)) { return ENOMEM; Modified: head/sys/dev/usb2/controller/uhci2_pci.c ============================================================================== --- head/sys/dev/usb2/controller/uhci2_pci.c Tue Dec 23 16:54:00 2008 (r186438) +++ head/sys/dev/usb2/controller/uhci2_pci.c Tue Dec 23 17:36:25 2008 (r186439) @@ -253,6 +253,7 @@ uhci_pci_attach(device_t self) } /* get all DMA memory */ + sc->sc_bus.parent = self; if (usb2_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(self), &uhci_iterate_hw_softc)) { return ENOMEM; Modified: head/sys/dev/usb2/controller/usb2_bus.h ============================================================================== --- head/sys/dev/usb2/controller/usb2_bus.h Tue Dec 23 16:54:00 2008 (r186438) +++ head/sys/dev/usb2/controller/usb2_bus.h Tue Dec 23 17:36:25 2008 (r186439) @@ -59,6 +59,7 @@ struct usb2_bus { struct usb2_perm perm; struct usb2_xfer_queue intr_q; + device_t parent; device_t bdev; /* filled by HC driver */ struct usb2_dma_parent_tag dma_parent_tag[1]; Modified: head/sys/dev/usb2/controller/usb2_controller.c ============================================================================== --- head/sys/dev/usb2/controller/usb2_controller.c Tue Dec 23 16:54:00 2008 (r186438) +++ head/sys/dev/usb2/controller/usb2_controller.c Tue Dec 23 17:36:25 2008 (r186439) @@ -430,7 +430,7 @@ usb2_bus_mem_alloc_all(struct usb2_bus * bus->devices_max = USB_MAX_DEVICES; - mtx_init(&bus->bus_mtx, "USB bus lock", + mtx_init(&bus->bus_mtx, device_get_nameunit(bus->parent), NULL, MTX_DEF | MTX_RECURSE); TAILQ_INIT(&bus->intr_q.head); Modified: head/sys/dev/usb2/controller/uss820dci_atmelarm.c ============================================================================== --- head/sys/dev/usb2/controller/uss820dci_atmelarm.c Tue Dec 23 16:54:00 2008 (r186438) +++ head/sys/dev/usb2/controller/uss820dci_atmelarm.c Tue Dec 23 17:36:25 2008 (r186439) @@ -140,6 +140,7 @@ uss820_atmelarm_attach(device_t dev) } /* get all DMA memory */ + sc->sc_bus.parent = dev; if (usb2_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(dev), NULL)) { return (ENOMEM);