diff options
author | thompsa <thompsa@FreeBSD.org> | 2008-12-23 17:36:25 +0000 |
---|---|---|
committer | thompsa <thompsa@FreeBSD.org> | 2008-12-23 17:36:25 +0000 |
commit | 13c65f56b568c751181cdac11f5ce30b619f2d86 (patch) | |
tree | 1fb5fdf2b581886d2880dd6351e469f46b260ca4 /sys/dev | |
parent | 291c79e84c43ec0141da734347f9140c80b6a933 (diff) | |
download | FreeBSD-src-13c65f56b568c751181cdac11f5ce30b619f2d86.zip FreeBSD-src-13c65f56b568c751181cdac11f5ce30b619f2d86.tar.gz |
Name the bus mutex by the controller name, this allows each bus to be
distinguished in lock profiling, etc.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/usb2/controller/at91dci_atmelarm.c | 1 | ||||
-rw-r--r-- | sys/dev/usb2/controller/ehci2_pci.c | 1 | ||||
-rw-r--r-- | sys/dev/usb2/controller/musb2_otg_atmelarm.c | 1 | ||||
-rw-r--r-- | sys/dev/usb2/controller/ohci2_atmelarm.c | 1 | ||||
-rw-r--r-- | sys/dev/usb2/controller/ohci2_pci.c | 1 | ||||
-rw-r--r-- | sys/dev/usb2/controller/uhci2_pci.c | 1 | ||||
-rw-r--r-- | sys/dev/usb2/controller/usb2_bus.h | 1 | ||||
-rw-r--r-- | sys/dev/usb2/controller/usb2_controller.c | 2 | ||||
-rw-r--r-- | sys/dev/usb2/controller/uss820dci_atmelarm.c | 1 |
9 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/usb2/controller/at91dci_atmelarm.c b/sys/dev/usb2/controller/at91dci_atmelarm.c index d0772fe..23de204 100644 --- a/sys/dev/usb2/controller/at91dci_atmelarm.c +++ b/sys/dev/usb2/controller/at91dci_atmelarm.c @@ -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); diff --git a/sys/dev/usb2/controller/ehci2_pci.c b/sys/dev/usb2/controller/ehci2_pci.c index 41b5c2c..65e4fce 100644 --- a/sys/dev/usb2/controller/ehci2_pci.c +++ b/sys/dev/usb2/controller/ehci2_pci.c @@ -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; diff --git a/sys/dev/usb2/controller/musb2_otg_atmelarm.c b/sys/dev/usb2/controller/musb2_otg_atmelarm.c index f67de1e..de4b58b 100644 --- a/sys/dev/usb2/controller/musb2_otg_atmelarm.c +++ b/sys/dev/usb2/controller/musb2_otg_atmelarm.c @@ -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); diff --git a/sys/dev/usb2/controller/ohci2_atmelarm.c b/sys/dev/usb2/controller/ohci2_atmelarm.c index cd0d332..b440f14 100644 --- a/sys/dev/usb2/controller/ohci2_atmelarm.c +++ b/sys/dev/usb2/controller/ohci2_atmelarm.c @@ -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; diff --git a/sys/dev/usb2/controller/ohci2_pci.c b/sys/dev/usb2/controller/ohci2_pci.c index fe84e9c..990c849 100644 --- a/sys/dev/usb2/controller/ohci2_pci.c +++ b/sys/dev/usb2/controller/ohci2_pci.c @@ -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; diff --git a/sys/dev/usb2/controller/uhci2_pci.c b/sys/dev/usb2/controller/uhci2_pci.c index 44e0b59..9baf42b 100644 --- a/sys/dev/usb2/controller/uhci2_pci.c +++ b/sys/dev/usb2/controller/uhci2_pci.c @@ -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; diff --git a/sys/dev/usb2/controller/usb2_bus.h b/sys/dev/usb2/controller/usb2_bus.h index c58c986..d9dc74e 100644 --- a/sys/dev/usb2/controller/usb2_bus.h +++ b/sys/dev/usb2/controller/usb2_bus.h @@ -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]; diff --git a/sys/dev/usb2/controller/usb2_controller.c b/sys/dev/usb2/controller/usb2_controller.c index 7c3ea89..5dd517d 100644 --- a/sys/dev/usb2/controller/usb2_controller.c +++ b/sys/dev/usb2/controller/usb2_controller.c @@ -430,7 +430,7 @@ usb2_bus_mem_alloc_all(struct usb2_bus *bus, bus_dma_tag_t dmat, 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); diff --git a/sys/dev/usb2/controller/uss820dci_atmelarm.c b/sys/dev/usb2/controller/uss820dci_atmelarm.c index 3a1eb16..8e92ffb 100644 --- a/sys/dev/usb2/controller/uss820dci_atmelarm.c +++ b/sys/dev/usb2/controller/uss820dci_atmelarm.c @@ -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); |