39 #define BAD_DMA_ADDRESS ((u64) 0)
59 BUG_ON(!valid_dma_direction(direction));
63 static void ipath_dma_unmap_single(
struct ib_device *dev,
67 BUG_ON(!valid_dma_direction(direction));
78 BUG_ON(!valid_dma_direction(direction));
94 static void ipath_dma_unmap_page(
struct ib_device *dev,
95 u64 addr,
size_t size,
98 BUG_ON(!valid_dma_direction(direction));
109 BUG_ON(!valid_dma_direction(direction));
122 static void ipath_unmap_sg(
struct ib_device *dev,
126 BUG_ON(!valid_dma_direction(direction));
138 static unsigned int ipath_sg_dma_len(
struct ib_device *dev,
144 static void ipath_sync_single_for_cpu(
struct ib_device *dev,
151 static void ipath_sync_single_for_device(
struct ib_device *dev,
158 static void *ipath_dma_alloc_coherent(
struct ib_device *dev,
size_t size,
168 *dma_handle = (
u64) addr;
172 static void ipath_dma_free_coherent(
struct ib_device *dev,
size_t size,
173 void *cpu_addr,
u64 dma_handle)
180 ipath_dma_map_single,
181 ipath_dma_unmap_single,
183 ipath_dma_unmap_page,
186 ipath_sg_dma_address,
188 ipath_sync_single_for_cpu,
189 ipath_sync_single_for_device,
190 ipath_dma_alloc_coherent,
191 ipath_dma_free_coherent