Lines Matching refs:tidaw
118 static u32 calc_cbc_size(struct tidaw *tidaw, int num)
126 if (tidaw[i].flags & TIDAW_FLAGS_LAST)
129 * transferred or data transferred by this tidaw. Assumption:
131 data_count += tidaw[i].count;
132 if (tidaw[i].flags & TIDAW_FLAGS_INSERT_CBC) {
142 * tcw_finalize - finalize tcw length fields and tidaw list
148 * tcat the tccb and terminate the data tidaw list if used.
150 * Note: in case input- or output-tida is used, the tidaw-list must be stored
156 struct tidaw *tidaw;
161 /* Terminate tidaw list. */
162 tidaw = tcw_get_data(tcw);
164 tidaw[num_tidaws - 1].flags |= TIDAW_FLAGS_LAST;
172 count += calc_cbc_size(tidaw, num_tidaws);
324 * tcw_add_tidaw - add a tidaw to a tcw
327 * @flags: flags for the new tidaw
328 * @addr: address value for the new tidaw
329 * @count: count value for the new tidaw
331 * Add a new tidaw to the input/output data tidaw-list of the specified tcw
333 * the new tidaw.
335 * Note: the tidaw-list is assumed to be contiguous with no ttics. The caller
336 * must ensure that there is enough space for the new tidaw. The last-tidaw
337 * flag for the last tidaw in the list will be set by tcw_finalize.
339 struct tidaw *tcw_add_tidaw(struct tcw *tcw, int num_tidaws, u8 flags,
342 struct tidaw *tidaw;
344 /* Add tidaw to tidaw-list. */
345 tidaw = ((struct tidaw *) tcw_get_data(tcw)) + num_tidaws;
346 memset(tidaw, 0, sizeof(struct tidaw));
347 tidaw->flags = flags;
348 tidaw->count = count;
349 tidaw->addr = virt_to_dma64(addr);
350 return tidaw;