Lines Matching defs:tidaw
116 static u32 calc_cbc_size(struct tidaw *tidaw, int num)
124 if (tidaw[i].flags & TIDAW_FLAGS_LAST)
127 * transferred or data transferred by this tidaw. Assumption:
129 data_count += tidaw[i].count;
130 if (tidaw[i].flags & TIDAW_FLAGS_INSERT_CBC) {
140 * tcw_finalize - finalize tcw length fields and tidaw list
146 * tcat the tccb and terminate the data tidaw list if used.
148 * Note: in case input- or output-tida is used, the tidaw-list must be stored
154 struct tidaw *tidaw;
159 /* Terminate tidaw list. */
160 tidaw = tcw_get_data(tcw);
162 tidaw[num_tidaws - 1].flags |= TIDAW_FLAGS_LAST;
170 count += calc_cbc_size(tidaw, num_tidaws);
322 * tcw_add_tidaw - add a tidaw to a tcw
325 * @flags: flags for the new tidaw
326 * @addr: address value for the new tidaw
327 * @count: count value for the new tidaw
329 * Add a new tidaw to the input/output data tidaw-list of the specified tcw
331 * the new tidaw.
333 * Note: the tidaw-list is assumed to be contiguous with no ttics. The caller
334 * must ensure that there is enough space for the new tidaw. The last-tidaw
335 * flag for the last tidaw in the list will be set by tcw_finalize.
337 struct tidaw *tcw_add_tidaw(struct tcw *tcw, int num_tidaws, u8 flags,
340 struct tidaw *tidaw;
342 /* Add tidaw to tidaw-list. */
343 tidaw = ((struct tidaw *) tcw_get_data(tcw)) + num_tidaws;
344 memset(tidaw, 0, sizeof(struct tidaw));
345 tidaw->flags = flags;
346 tidaw->count = count;
347 tidaw->addr = (u64) ((addr_t) addr);
348 return tidaw;