• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/s390/cio/

Lines Matching refs:tcw

18  * tcw_get_intrg - return pointer to associated interrogate tcw
19 * @tcw: pointer to the original tcw
21 * Return a pointer to the interrogate tcw associated with the specified tcw
22 * or %NULL if there is no associated interrogate tcw.
24 struct tcw *tcw_get_intrg(struct tcw *tcw)
26 return (struct tcw *) ((addr_t) tcw->intrg);
31 * tcw_get_data - return pointer to input/output data associated with tcw
32 * @tcw: pointer to the tcw
34 * Return the input or output data address specified in the tcw depending
38 void *tcw_get_data(struct tcw *tcw)
40 if (tcw->r)
41 return (void *) ((addr_t) tcw->input);
42 if (tcw->w)
43 return (void *) ((addr_t) tcw->output);
49 * tcw_get_tccb - return pointer to tccb associated with tcw
50 * @tcw: pointer to the tcw
52 * Return pointer to the tccb associated with this tcw.
54 struct tccb *tcw_get_tccb(struct tcw *tcw)
56 return (struct tccb *) ((addr_t) tcw->tccb);
61 * tcw_get_tsb - return pointer to tsb associated with tcw
62 * @tcw: pointer to the tcw
64 * Return pointer to the tsb associated with this tcw.
66 struct tsb *tcw_get_tsb(struct tcw *tcw)
68 return (struct tsb *) ((addr_t) tcw->tsb);
73 * tcw_init - initialize tcw data structure
74 * @tcw: pointer to the tcw to be initialized
78 * Initialize all fields of the specified tcw data structure with zero and
81 void tcw_init(struct tcw *tcw, int r, int w)
83 memset(tcw, 0, sizeof(struct tcw));
84 tcw->format = TCW_FORMAT_DEFAULT;
85 tcw->flags = TCW_FLAGS_TIDAW_FORMAT(TCW_TIDAW_FORMAT_DEFAULT);
87 tcw->r = 1;
89 tcw->w = 1;
140 * tcw_finalize - finalize tcw length fields and tidaw list
141 * @tcw: pointer to the tcw
145 * Calculate the input-/output-count and tccbl field in the tcw, add a
152 void tcw_finalize(struct tcw *tcw, int num_tidaws)
160 tidaw = tcw_get_data(tcw);
164 tccb = tcw_get_tccb(tcw);
167 /* Calculate tcw input/output count and tcat transport count. */
169 if (tcw->w && (tcw->flags & TCW_FLAGS_OUTPUT_TIDA))
171 if (tcw->r)
172 tcw->input_count = count;
173 else if (tcw->w)
174 tcw->output_count = count;
177 tcw->tccbl = (sizeof(struct tccb) + tca_size(tccb) +
183 * tcw_set_intrg - set the interrogate tcw address of a tcw
184 * @tcw: the tcw address
185 * @intrg_tcw: the address of the interrogate tcw
187 * Set the address of the interrogate tcw in the specified tcw.
189 void tcw_set_intrg(struct tcw *tcw, struct tcw *intrg_tcw)
191 tcw->intrg = (u32) ((addr_t) intrg_tcw);
196 * tcw_set_data - set data address and tida flag of a tcw
197 * @tcw: the tcw address
202 * Set the input/output data address of a tcw (depending on the value of the
206 void tcw_set_data(struct tcw *tcw, void *data, int use_tidal)
208 if (tcw->r) {
209 tcw->input = (u64) ((addr_t) data);
211 tcw->flags |= TCW_FLAGS_INPUT_TIDA;
212 } else if (tcw->w) {
213 tcw->output = (u64) ((addr_t) data);
215 tcw->flags |= TCW_FLAGS_OUTPUT_TIDA;
221 * tcw_set_tccb - set tccb address of a tcw
222 * @tcw: the tcw address
225 * Set the address of the tccb in the specified tcw.
227 void tcw_set_tccb(struct tcw *tcw, struct tccb *tccb)
229 tcw->tccb = (u64) ((addr_t) tccb);
234 * tcw_set_tsb - set tsb address of a tcw
235 * @tcw: the tcw address
238 * Set the address of the tsb in the specified tcw.
240 void tcw_set_tsb(struct tcw *tcw, struct tsb *tsb)
242 tcw->tsb = (u64) ((addr_t) tsb);
322 * tcw_add_tidaw - add a tidaw to a tcw
323 * @tcw: the tcw address
329 * Add a new tidaw to the input/output data tidaw-list of the specified tcw
337 struct tidaw *tcw_add_tidaw(struct tcw *tcw, int num_tidaws, u8 flags,
343 tidaw = ((struct tidaw *) tcw_get_data(tcw)) + num_tidaws;