diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-10-05 01:18:40 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-10-05 01:18:40 +0000 |
commit | 012bb3e61e5eced6c610f9e036372bf0c8def2d1 (patch) | |
tree | 87efc733f9b164e8c85c0336f92c8fb7eff6d183 /include/asm-arm/pci.h | |
parent | 625a1589d3d6464b5d90b8a0918789e3afffd220 (diff) |
Merge with Linux 2.4.0-test9. Please check DECstation, I had a number
of rejects to fixup while integrating Linus patches. I also found
that this kernel will only boot SMP on Origin; the UP kernel freeze
soon after bootup with SCSI timeout messages. I commit this anyway
since I found that the last CVS versions had the same problem.
Diffstat (limited to 'include/asm-arm/pci.h')
-rw-r--r-- | include/asm-arm/pci.h | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/include/asm-arm/pci.h b/include/asm-arm/pci.h index 2a2fcc947..63c1ee9cf 100644 --- a/include/asm-arm/pci.h +++ b/include/asm-arm/pci.h @@ -93,8 +93,10 @@ pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int directi { int i; - for (i = 0; i < nents; i++, sg++) + for (i = 0; i < nents; i++, sg++) { consistent_sync(sg->address, sg->length, direction); + sg->dma_address = virt_to_bus(sg->address); + } return nents; } @@ -136,7 +138,7 @@ pci_dma_sync_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nelems, int d int i; for (i = 0; i < nelems; i++, sg++) - consistent_sync(sg->address, sg->length, 3); + consistent_sync(sg->address, sg->length, direction); } /* Return whether the given PCI device DMA address mask can @@ -149,15 +151,6 @@ extern inline int pci_dma_supported(struct pci_dev *hwdev, dma_addr_t mask) return 1; } -/* These macros should be used after a pci_map_sg call has been done - * to get bus addresses of each of the SG entries and their lengths. - * You should only work with the number of sg entries pci_map_sg - * returns, or alternatively stop on the first sg_dma_len(sg) which - * is 0. - */ -#define sg_dma_address(sg) (virt_to_bus((sg)->address)) -#define sg_dma_len(sg) ((sg)->length) - #endif /* __KERNEL__ */ #endif |