PERFORCE change 139157 for review
Hans Petter Selasky
hselasky at FreeBSD.org
Tue Apr 1 13:15:50 PDT 2008
http://perforce.freebsd.org/chv.cgi?CH=139157
Change 139157 by hselasky at 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;
More information about the p4-projects
mailing list