diff options
author | jmg <jmg@FreeBSD.org> | 2006-09-03 00:27:42 +0000 |
---|---|---|
committer | jmg <jmg@FreeBSD.org> | 2006-09-03 00:27:42 +0000 |
commit | c25fb06d921a770f65a0f6e25dc1e92e4e1b5227 (patch) | |
tree | 2d913a3cb79e7a1579bdad59426344b90355f220 /sys/dev/usb/ohci_pci.c | |
parent | 84ee477ac39bc8414949b4df724f390aac837627 (diff) | |
download | FreeBSD-src-c25fb06d921a770f65a0f6e25dc1e92e4e1b5227.zip FreeBSD-src-c25fb06d921a770f65a0f6e25dc1e92e4e1b5227.tar.gz |
add a newbus method for obtaining the bus's bus_dma_tag_t... This is
required by arches like sparc64 (not yet implemented) and sun4v where there
are seperate IOMMU's for each PCI bus... For all other arches, it will
end up returning NULL, which makes it a no-op...
Convert a few drivers (the ones we've been working w/ on sun4v) to the
new convection... Eventually all drivers will need to replace the parent
tag of NULL, w/ bus_get_dma_tag(dev), though dev is usually different for
each driver, and will require hand inspection...
Reviewed by: scottl (earlier version)
Diffstat (limited to 'sys/dev/usb/ohci_pci.c')
-rw-r--r-- | sys/dev/usb/ohci_pci.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/usb/ohci_pci.c b/sys/dev/usb/ohci_pci.c index 1401a4b..78bc401 100644 --- a/sys/dev/usb/ohci_pci.c +++ b/sys/dev/usb/ohci_pci.c @@ -307,10 +307,10 @@ ohci_pci_attach(device_t self) } /* Allocate a parent dma tag for DMA maps */ - err = bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT, - BUS_SPACE_MAXADDR, NULL, NULL, BUS_SPACE_MAXSIZE_32BIT, - USB_DMA_NSEG, BUS_SPACE_MAXSIZE_32BIT, 0, NULL, NULL, - &sc->sc_bus.parent_dmatag); + err = bus_dma_tag_create(bus_get_dma_tag(self), 1, 0, + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, + BUS_SPACE_MAXSIZE_32BIT, USB_DMA_NSEG, BUS_SPACE_MAXSIZE_32BIT, 0, + NULL, NULL, &sc->sc_bus.parent_dmatag); if (err) { device_printf(self, "Could not allocate parent DMA tag (%d)\n", err); |