top of the virt_to_bus interface.
First of all, you should make sure
top of the virt_to_bus interface.
First of all, you should make sure
- pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
- } else if (!pci_set_dma_mask(pdev, DMA_32BIT_MASK)) {
+ pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
+ } else if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
Finally, if your device can only drive the low 24-bits of
address during PCI bus mastering you might do something like:
Finally, if your device can only drive the low 24-bits of
address during PCI bus mastering you might do something like:
card->name);
}
if (!pci_set_dma_mask(pdev, RECORD_ADDRESS_BITS)) {
card->record_enabled = 1;
} else {
card->record_enabled = 0;
card->name);
}
if (!pci_set_dma_mask(pdev, RECORD_ADDRESS_BITS)) {
card->record_enabled = 1;
} else {
card->record_enabled = 0;
-where pdev is a struct pci_dev *. You should pass NULL for PCI like buses
-where devices don't have struct pci_dev (like ISA, EISA). This may be
-called in interrupt context.
+where pdev is a struct pci_dev *. This may be called in interrupt context.
+You should use dma_alloc_coherent (see DMA-API.txt) for buses
+where devices don't have struct pci_dev (like ISA, EISA).
This argument is needed because the DMA translations may be bus
specific (and often is private to the bus which the device is attached
This argument is needed because the DMA translations may be bus
specific (and often is private to the bus which the device is attached
driver needs regions sized smaller than a page, you may prefer using
the pci_pool interface, described below.
driver needs regions sized smaller than a page, you may prefer using
the pci_pool interface, described below.
default return a DMA address which is SAC (Single Address Cycle)
addressable. Even if the device indicates (via PCI dma mask) that it
may address the upper 32-bits and thus perform DAC cycles, consistent
default return a DMA address which is SAC (Single Address Cycle)
addressable. Even if the device indicates (via PCI dma mask) that it
may address the upper 32-bits and thus perform DAC cycles, consistent
dma_addr_t dma_handle;
dma_handle = pci_map_single(pdev, addr, size, direction);
dma_addr_t dma_handle;
dma_handle = pci_map_single(pdev, addr, size, direction);
/*
* reduce current DMA mapping usage,
* delay and try again later or
/*
* reduce current DMA mapping usage,
* delay and try again later or