aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-i386/pci.h
diff options
context:
space:
mode:
authorrn@wyvis.research.intel-research.net <rn@wyvis.research.intel-research.net>2003-03-14 15:58:24 +0000
committerrn@wyvis.research.intel-research.net <rn@wyvis.research.intel-research.net>2003-03-14 15:58:24 +0000
commit0ec37682a14624a0f5097be9ea1fec77453dc8c1 (patch)
treebab97e72ada703fd5a1d9c774d3d0451d6ceade7 /xen/include/asm-i386/pci.h
parentd9812e47d9c20b15dbb920cc451eff1c7b88e81c (diff)
parentf9e443afb85c3843c8abd0760ee4a77b0aceeeed (diff)
downloadxen-0ec37682a14624a0f5097be9ea1fec77453dc8c1.tar.gz
xen-0ec37682a14624a0f5097be9ea1fec77453dc8c1.tar.bz2
xen-0ec37682a14624a0f5097be9ea1fec77453dc8c1.zip
bitkeeper revision 1.126 (3e71fc20anCOs2KFyD3-AMyHjdJQfg)
resolve merge conflicts manually
Diffstat (limited to 'xen/include/asm-i386/pci.h')
-rw-r--r--xen/include/asm-i386/pci.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/xen/include/asm-i386/pci.h b/xen/include/asm-i386/pci.h
index 1ffade8914..a38bef4986 100644
--- a/xen/include/asm-i386/pci.h
+++ b/xen/include/asm-i386/pci.h
@@ -151,17 +151,17 @@ static inline int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg,
for (i = 0; i < nents; i++ ) {
if (sg[i].address && sg[i].page)
out_of_line_bug();
-
- /* not worth checking since NULL is ok says SMH */
#if 0
- else if (!sg[i].address && !sg[i].page)
+ /* Invalid check, since address==0 is valid. */
+ else if (!sg[i].address && !sg[i].page)
out_of_line_bug();
#endif
- if (sg[i].address)
- sg[i].dma_address = virt_to_bus(sg[i].address);
- else
+ /* XXX Switched round, since address==0 is valid. */
+ if (sg[i].page)
sg[i].dma_address = page_to_bus(sg[i].page) + sg[i].offset;
+ else
+ sg[i].dma_address = virt_to_bus(sg[i].address);
}
flush_write_buffers();