Lines Matching refs:tccb

50  * tcw_get_tccb - return pointer to tccb associated with tcw
53 * Return pointer to the tccb associated with this tcw.
55 struct tccb *tcw_get_tccb(struct tcw *tcw)
57 return (struct tccb *) ((addr_t) tcw->tccb);
94 static inline size_t tca_size(struct tccb *tccb)
96 return tccb->tcah.tcal - 12;
99 static u32 calc_dcw_count(struct tccb *tccb)
106 size = tca_size(tccb);
108 dcw = (struct dcw *) &tccb->tca[offset];
147 * tcat the tccb and terminate the data tidaw list if used.
150 * in contiguous storage (no ttic). The tcal field in the tccb must be
156 struct tccb *tccb;
164 /* Add tcat to tccb. */
165 tccb = tcw_get_tccb(tcw);
166 tcat = (struct tccb_tcat *) &tccb->tca[tca_size(tccb)];
169 count = calc_dcw_count(tccb);
178 tcw->tccbl = (sizeof(struct tccb) + tca_size(tccb) +
222 * tcw_set_tccb - set tccb address of a tcw
224 * @tccb: the tccb address
226 * Set the address of the tccb in the specified tcw.
228 void tcw_set_tccb(struct tcw *tcw, struct tccb *tccb)
230 tcw->tccb = (u64) ((addr_t) tccb);
248 * tccb_init - initialize tccb
249 * @tccb: the tccb address
250 * @size: the maximum size of the tccb
253 * Initialize the header of the specified tccb by resetting all values to zero
256 void tccb_init(struct tccb *tccb, size_t size, u32 sac)
258 memset(tccb, 0, size);
259 tccb->tcah.format = TCCB_FORMAT_DEFAULT;
260 tccb->tcah.sac = sac;
261 tccb->tcah.tcal = 12;
278 * tccb_add_dcw - add a dcw to the tccb
279 * @tccb: the tccb address
280 * @tccb_size: the maximum tccb size
287 * Add a new dcw to the specified tccb by writing the dcw information specified
288 * by @cmd, @flags, @cd, @cd_count and @count to the tca of the tccb. Return
292 * Note: the tcal field of the tccb header will be updates to reflect added
295 struct dcw *tccb_add_dcw(struct tccb *tccb, size_t tccb_size, u8 cmd, u8 flags,
303 tca_offset = tca_size(tccb);
309 dcw = (struct dcw *) &tccb->tca[tca_offset];
317 tccb->tcah.tcal += size;