mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
Name the bus mutex by the controller name, this allows each bus to be
distinguished in lock profiling, etc.
This commit is contained in:
parent
8c639779f4
commit
cf4d7cfcc5
9 changed files with 9 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue