Lines Matching refs:req
74 struct memstick_request *req; member
192 if (host->req->long_data) { in tifm_ms_transfer_data()
193 length = host->req->sg.length - host->block_pos; in tifm_ms_transfer_data()
194 off = host->req->sg.offset + host->block_pos; in tifm_ms_transfer_data()
196 length = host->req->data_len - host->block_pos; in tifm_ms_transfer_data()
205 if (host->req->long_data) { in tifm_ms_transfer_data()
206 pg = nth_page(sg_page(&host->req->sg), in tifm_ms_transfer_data()
215 buf = host->req->data + host->block_pos; in tifm_ms_transfer_data()
216 p_cnt = host->req->data_len - host->block_pos; in tifm_ms_transfer_data()
219 t_size = host->req->data_dir == WRITE in tifm_ms_transfer_data()
223 if (host->req->long_data) { in tifm_ms_transfer_data()
236 if (!length && (host->req->data_dir == WRITE)) { in tifm_ms_transfer_data()
266 data = host->req->data; in tifm_ms_issue_cmd()
270 if (host->req->long_data) { in tifm_ms_issue_cmd()
271 data_len = host->req->sg.length; in tifm_ms_issue_cmd()
275 data_len = host->req->data_len; in tifm_ms_issue_cmd()
285 if (1 != tifm_map_sg(sock, &host->req->sg, 1, in tifm_ms_issue_cmd()
286 host->req->data_dir == READ in tifm_ms_issue_cmd()
289 host->req->error = -ENOMEM; in tifm_ms_issue_cmd()
290 return host->req->error; in tifm_ms_issue_cmd()
292 data_len = sg_dma_len(&host->req->sg); in tifm_ms_issue_cmd()
299 if (host->req->data_dir == WRITE) in tifm_ms_issue_cmd()
305 writel(sg_dma_address(&host->req->sg), in tifm_ms_issue_cmd()
319 host->req->error = 0; in tifm_ms_issue_cmd()
331 cmd = (host->req->tpc & 0xf) << 12; in tifm_ms_issue_cmd()
347 host->req->int_reg = readl(sock->addr + SOCK_MS_STATUS) & 0xff; in tifm_ms_complete_cmd()
348 host->req->int_reg = (host->req->int_reg & 1) in tifm_ms_complete_cmd()
349 | ((host->req->int_reg << 4) & 0xe0); in tifm_ms_complete_cmd()
356 tifm_unmap_sg(sock, &host->req->sg, 1, in tifm_ms_complete_cmd()
357 host->req->data_dir == READ in tifm_ms_complete_cmd()
367 rc = memstick_next_req(msh, &host->req); in tifm_ms_complete_cmd()
373 if (!host->req->error) { in tifm_ms_check_status()
378 if (host->req->need_card_int in tifm_ms_check_status()
400 if (host->req) { in tifm_ms_data_event()
434 if (host->req) { in tifm_ms_card_event()
436 host->req->error = -ETIME; in tifm_ms_card_event()
438 host->req->error = -EILSEQ; in tifm_ms_card_event()
469 if (!host->req) { in tifm_ms_req_tasklet()
472 rc = memstick_next_req(msh, &host->req); in tifm_ms_req_tasklet()
474 host->req->error = -ETIME; in tifm_ms_req_tasklet()
481 rc = memstick_next_req(msh, &host->req); in tifm_ms_req_tasklet()
550 dev_name(&host->dev->dev), host->req ? host->req->tpc : 0, in tifm_ms_abort()
607 if (host->req) { in tifm_ms_remove()
613 tifm_unmap_sg(sock, &host->req->sg, 1, in tifm_ms_remove()
614 host->req->data_dir == READ in tifm_ms_remove()
617 host->req->error = -ETIME; in tifm_ms_remove()
620 rc = memstick_next_req(msh, &host->req); in tifm_ms_remove()
622 host->req->error = -ETIME; in tifm_ms_remove()