Lines Matching defs:dcw
103 struct dcw *dcw;
109 dcw = (struct dcw *) &tccb->tca[offset];
110 count += dcw->count;
111 if (!(dcw->flags & DCW_FLAGS_CC))
113 offset += sizeof(struct dcw) + ALIGN((int) dcw->cd_count, 4);
279 * tccb_add_dcw - add a dcw to the tccb
282 * @cmd: the dcw command
283 * @flags: flags for the dcw
284 * @cd: pointer to control data for this dcw or NULL if none is required
285 * @cd_count: number of control data bytes for this dcw
286 * @count: number of data bytes for this dcw
288 * Add a new dcw to the specified tccb by writing the dcw information specified
290 * a pointer to the newly added dcw on success or -%ENOSPC if the new dcw
296 struct dcw *tccb_add_dcw(struct tccb *tccb, size_t tccb_size, u8 cmd, u8 flags,
299 struct dcw *dcw;
305 size = ALIGN(sizeof(struct dcw) + cd_count, 4);
309 /* Add dcw to tca. */
310 dcw = (struct dcw *) &tccb->tca[tca_offset];
311 memset(dcw, 0, size);
312 dcw->cmd = cmd;
313 dcw->flags = flags;
314 dcw->count = count;
315 dcw->cd_count = cd_count;
317 memcpy(&dcw->cd[0], cd, cd_count);
319 return dcw;