Lines Matching refs:dcw
101 struct dcw *dcw;
107 dcw = (struct dcw *) &tccb->tca[offset];
108 count += dcw->count;
109 if (!(dcw->flags & DCW_FLAGS_CC))
111 offset += sizeof(struct dcw) + ALIGN((int) dcw->cd_count, 4);
277 * tccb_add_dcw - add a dcw to the tccb
280 * @cmd: the dcw command
281 * @flags: flags for the dcw
282 * @cd: pointer to control data for this dcw or NULL if none is required
283 * @cd_count: number of control data bytes for this dcw
284 * @count: number of data bytes for this dcw
286 * Add a new dcw to the specified tccb by writing the dcw information specified
288 * a pointer to the newly added dcw on success or -%ENOSPC if the new dcw
294 struct dcw *tccb_add_dcw(struct tccb *tccb, size_t tccb_size, u8 cmd, u8 flags,
297 struct dcw *dcw;
303 size = ALIGN(sizeof(struct dcw) + cd_count, 4);
307 /* Add dcw to tca. */
308 dcw = (struct dcw *) &tccb->tca[tca_offset];
309 memset(dcw, 0, size);
310 dcw->cmd = cmd;
311 dcw->flags = flags;
312 dcw->count = count;
313 dcw->cd_count = cd_count;
315 memcpy(&dcw->cd[0], cd, cd_count);
317 return dcw;