Lines Matching refs:mrq
218 * @mrq - pointer to stick the request to
220 * Host calls this function from idle state (*mrq == NULL) or after finishing
221 * previous request (*mrq should point to it). If previous request was
225 int memstick_next_req(struct memstick_host *host, struct memstick_request **mrq)
229 if ((*mrq) && (*mrq)->error && host->retries) {
230 (*mrq)->error = rc;
236 rc = host->card->next_request(host->card, mrq);
241 *mrq = NULL;
263 * @mrq - request to use
267 void memstick_init_req_sg(struct memstick_request *mrq, unsigned char tpc,
270 mrq->tpc = tpc;
272 mrq->data_dir = WRITE;
274 mrq->data_dir = READ;
276 mrq->sg = *sg;
277 mrq->long_data = 1;
280 mrq->need_card_int = 1;
282 mrq->need_card_int = 0;
288 * @mrq - request to use
297 void memstick_init_req(struct memstick_request *mrq, unsigned char tpc,
300 mrq->tpc = tpc;
302 mrq->data_dir = WRITE;
304 mrq->data_dir = READ;
306 mrq->data_len = length > sizeof(mrq->data) ? sizeof(mrq->data) : length;
307 if (mrq->data_dir == WRITE)
308 memcpy(mrq->data, buf, mrq->data_len);
310 mrq->long_data = 0;
313 mrq->need_card_int = 1;
315 mrq->need_card_int = 0;
327 struct memstick_request **mrq)
331 if (!(*mrq)) {
334 *mrq = &card->current_mrq;
337 if (!(*mrq)->error) {
338 memcpy(&id_reg, (*mrq)->data, sizeof(id_reg));
351 struct memstick_request **mrq)
353 if (!(*mrq)) {
357 *mrq = &card->current_mrq;