Lines Matching defs:tidaw
117 static u32 calc_cbc_size(struct tidaw *tidaw, int num)
125 if (tidaw[i].flags & TIDAW_FLAGS_LAST)
128 * transferred or data transferred by this tidaw. Assumption:
130 data_count += tidaw[i].count;
131 if (tidaw[i].flags & TIDAW_FLAGS_INSERT_CBC) {
141 * tcw_finalize - finalize tcw length fields and tidaw list
147 * tcat the tccb and terminate the data tidaw list if used.
149 * Note: in case input- or output-tida is used, the tidaw-list must be stored
155 struct tidaw *tidaw;
160 /* Terminate tidaw list. */
161 tidaw = tcw_get_data(tcw);
163 tidaw[num_tidaws - 1].flags |= TIDAW_FLAGS_LAST;
171 count += calc_cbc_size(tidaw, num_tidaws);
323 * tcw_add_tidaw - add a tidaw to a tcw
326 * @flags: flags for the new tidaw
327 * @addr: address value for the new tidaw
328 * @count: count value for the new tidaw
330 * Add a new tidaw to the input/output data tidaw-list of the specified tcw
332 * the new tidaw.
334 * Note: the tidaw-list is assumed to be contiguous with no ttics. The caller
335 * must ensure that there is enough space for the new tidaw. The last-tidaw
336 * flag for the last tidaw in the list will be set by tcw_finalize.
338 struct tidaw *tcw_add_tidaw(struct tcw *tcw, int num_tidaws, u8 flags,
341 struct tidaw *tidaw;
343 /* Add tidaw to tidaw-list. */
344 tidaw = ((struct tidaw *) tcw_get_data(tcw)) + num_tidaws;
345 memset(tidaw, 0, sizeof(struct tidaw));
346 tidaw->flags = flags;
347 tidaw->count = count;
348 tidaw->addr = (u64) ((addr_t) addr);
349 return tidaw;