Lines Matching defs:dcw
102 struct dcw *dcw;
108 dcw = (struct dcw *) &tccb->tca[offset];
109 count += dcw->count;
110 if (!(dcw->flags & DCW_FLAGS_CC))
112 offset += sizeof(struct dcw) + ALIGN((int) dcw->cd_count, 4);
278 * tccb_add_dcw - add a dcw to the tccb
281 * @cmd: the dcw command
282 * @flags: flags for the dcw
283 * @cd: pointer to control data for this dcw or NULL if none is required
284 * @cd_count: number of control data bytes for this dcw
285 * @count: number of data bytes for this dcw
287 * Add a new dcw to the specified tccb by writing the dcw information specified
289 * a pointer to the newly added dcw on success or -%ENOSPC if the new dcw
295 struct dcw *tccb_add_dcw(struct tccb *tccb, size_t tccb_size, u8 cmd, u8 flags,
298 struct dcw *dcw;
304 size = ALIGN(sizeof(struct dcw) + cd_count, 4);
308 /* Add dcw to tca. */
309 dcw = (struct dcw *) &tccb->tca[tca_offset];
310 memset(dcw, 0, size);
311 dcw->cmd = cmd;
312 dcw->flags = flags;
313 dcw->count = count;
314 dcw->cd_count = cd_count;
316 memcpy(&dcw->cd[0], cd, cd_count);
318 return dcw;