From 1f84e7e2b98983beb2e77a904cbfffb54994f0a7 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Fri, 23 Mar 2012 20:47:25 +0000 Subject: MFC 232403,232667: - Add a bus_dma tag to each PCI bus that is a child of a Host-PCI bridge. The tag enforces a single restriction that all DMA transactions must not cross a 4GB boundary. Note that while this restriction technically only applies to PCI-express, this change applies it to all PCI devices as it is simpler to implement that way and errs on the side of caution. - Add a softc structure for PCI bus devices to hold the bus_dma tag and a new pci_attach_common() routine that performs actions common to the attach phase of all PCI bus drivers. Right now this only consists of a bootverbose printf and the allocate of a bus_dma tag if necessary. - Adjust all PCI bus drivers to allocate a PCI bus softc and to call pci_attach_common() from their attach routines. --- sys/dev/cardbus/cardbus.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/dev/cardbus') diff --git a/sys/dev/cardbus/cardbus.c b/sys/dev/cardbus/cardbus.c index 39d20b5cc1bd..df5fcb2e56b2 100644 --- a/sys/dev/cardbus/cardbus.c +++ b/sys/dev/cardbus/cardbus.c @@ -316,6 +316,7 @@ static device_method_t cardbus_methods[] = { DEVMETHOD(device_resume, cardbus_resume), /* Bus interface */ + DEVMETHOD(bus_get_dma_tag, bus_generic_get_dma_tag), DEVMETHOD(bus_read_ivar, cardbus_read_ivar), DEVMETHOD(bus_driver_added, cardbus_driver_added), -- cgit v1.3