Lines Matching refs:iter
100 struct mthca_icm_iter *iter) in mthca_icm_first() argument
102 iter->icm = icm; in mthca_icm_first()
103 iter->chunk = list_empty(&icm->chunk_list) ? in mthca_icm_first()
106 iter->page_idx = 0; in mthca_icm_first()
109 static inline int mthca_icm_last(struct mthca_icm_iter *iter) in mthca_icm_last() argument
111 return !iter->chunk; in mthca_icm_last()
114 static inline void mthca_icm_next(struct mthca_icm_iter *iter) in mthca_icm_next() argument
116 if (++iter->page_idx >= iter->chunk->nsg) { in mthca_icm_next()
117 if (iter->chunk->list.next == &iter->icm->chunk_list) { in mthca_icm_next()
118 iter->chunk = NULL; in mthca_icm_next()
122 iter->chunk = list_entry(iter->chunk->list.next, in mthca_icm_next()
124 iter->page_idx = 0; in mthca_icm_next()
128 static inline dma_addr_t mthca_icm_addr(struct mthca_icm_iter *iter) in mthca_icm_addr() argument
130 return sg_dma_address(&iter->chunk->mem[iter->page_idx]); in mthca_icm_addr()
133 static inline unsigned long mthca_icm_size(struct mthca_icm_iter *iter) in mthca_icm_size() argument
135 return sg_dma_len(&iter->chunk->mem[iter->page_idx]); in mthca_icm_size()