Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Dec 2008 17:36:25 +0000 (UTC)
From:      Andrew Thompson <thompsa@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r186439 - head/sys/dev/usb2/controller
Message-ID:  <200812231736.mBNHaPh3008614@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812231736.mBNHaPh3008614>