Lines Matching full:request
38 struct tape_request * request = from_timer(request, t, timer); in tape_std_assign_timeout() local
39 struct tape_device * device = request->device; in tape_std_assign_timeout()
46 rc = tape_cancel_io(device, request); in tape_std_assign_timeout()
56 struct tape_request *request; in tape_std_assign() local
58 request = tape_alloc_request(2, 11); in tape_std_assign()
59 if (IS_ERR(request)) in tape_std_assign()
60 return PTR_ERR(request); in tape_std_assign()
62 request->op = TO_ASSIGN; in tape_std_assign()
63 tape_ccw_cc(request->cpaddr, ASSIGN, 11, request->cpdata); in tape_std_assign()
64 tape_ccw_end(request->cpaddr + 1, NOP, 0, NULL); in tape_std_assign()
71 timer_setup(&request->timer, tape_std_assign_timeout, 0); in tape_std_assign()
72 mod_timer(&request->timer, jiffies + msecs_to_jiffies(2000)); in tape_std_assign()
74 rc = tape_do_io_interruptible(device, request); in tape_std_assign()
76 del_timer_sync(&request->timer); in tape_std_assign()
84 tape_free_request(request); in tape_std_assign()
95 struct tape_request *request; in tape_std_unassign() local
103 request = tape_alloc_request(2, 11); in tape_std_unassign()
104 if (IS_ERR(request)) in tape_std_unassign()
105 return PTR_ERR(request); in tape_std_unassign()
107 request->op = TO_UNASSIGN; in tape_std_unassign()
108 tape_ccw_cc(request->cpaddr, UNASSIGN, 11, request->cpdata); in tape_std_unassign()
109 tape_ccw_end(request->cpaddr + 1, NOP, 0, NULL); in tape_std_unassign()
111 if ((rc = tape_do_io(device, request)) != 0) { in tape_std_unassign()
116 tape_free_request(request); in tape_std_unassign()
126 struct tape_request *request; in tape_std_display() local
129 request = tape_alloc_request(2, 17); in tape_std_display()
130 if (IS_ERR(request)) { in tape_std_display()
132 return PTR_ERR(request); in tape_std_display()
134 request->op = TO_DIS; in tape_std_display()
136 *(unsigned char *) request->cpdata = disp->cntrl; in tape_std_display()
138 memcpy(((unsigned char *) request->cpdata) + 1, disp->message1, 8); in tape_std_display()
139 memcpy(((unsigned char *) request->cpdata) + 9, disp->message2, 8); in tape_std_display()
140 ASCEBC(((unsigned char*) request->cpdata) + 1, 16); in tape_std_display()
142 tape_ccw_cc(request->cpaddr, LOAD_DISPLAY, 17, request->cpdata); in tape_std_display()
143 tape_ccw_end(request->cpaddr + 1, NOP, 0, NULL); in tape_std_display()
145 rc = tape_do_io_interruptible(device, request); in tape_std_display()
146 tape_free_request(request); in tape_std_display()
156 struct tape_request *request; in tape_std_read_block_id() local
159 request = tape_alloc_request(3, 8); in tape_std_read_block_id()
160 if (IS_ERR(request)) in tape_std_read_block_id()
161 return PTR_ERR(request); in tape_std_read_block_id()
162 request->op = TO_RBI; in tape_std_read_block_id()
164 tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, device->modeset_byte); in tape_std_read_block_id()
165 tape_ccw_cc(request->cpaddr + 1, READ_BLOCK_ID, 8, request->cpdata); in tape_std_read_block_id()
166 tape_ccw_end(request->cpaddr + 2, NOP, 0, NULL); in tape_std_read_block_id()
168 rc = tape_do_io(device, request); in tape_std_read_block_id()
171 *id = *(__u64 *) request->cpdata; in tape_std_read_block_id()
172 tape_free_request(request); in tape_std_read_block_id()
268 struct tape_request *request; in tape_std_mtfsf() local
271 request = tape_alloc_request(mt_count + 2, 0); in tape_std_mtfsf()
272 if (IS_ERR(request)) in tape_std_mtfsf()
273 return PTR_ERR(request); in tape_std_mtfsf()
274 request->op = TO_FSF; in tape_std_mtfsf()
276 ccw = tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, in tape_std_mtfsf()
282 return tape_do_io_free(device, request); in tape_std_mtfsf()
292 struct tape_request *request; in tape_std_mtfsr() local
296 request = tape_alloc_request(mt_count + 2, 0); in tape_std_mtfsr()
297 if (IS_ERR(request)) in tape_std_mtfsr()
298 return PTR_ERR(request); in tape_std_mtfsr()
299 request->op = TO_FSB; in tape_std_mtfsr()
301 ccw = tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, in tape_std_mtfsr()
307 rc = tape_do_io(device, request); in tape_std_mtfsr()
308 if (rc == 0 && request->rescnt > 0) { in tape_std_mtfsr()
312 tape_free_request(request); in tape_std_mtfsr()
324 struct tape_request *request; in tape_std_mtbsr() local
328 request = tape_alloc_request(mt_count + 2, 0); in tape_std_mtbsr()
329 if (IS_ERR(request)) in tape_std_mtbsr()
330 return PTR_ERR(request); in tape_std_mtbsr()
331 request->op = TO_BSB; in tape_std_mtbsr()
333 ccw = tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, in tape_std_mtbsr()
339 rc = tape_do_io(device, request); in tape_std_mtbsr()
340 if (rc == 0 && request->rescnt > 0) { in tape_std_mtbsr()
344 tape_free_request(request); in tape_std_mtbsr()
355 struct tape_request *request; in tape_std_mtweof() local
358 request = tape_alloc_request(mt_count + 2, 0); in tape_std_mtweof()
359 if (IS_ERR(request)) in tape_std_mtweof()
360 return PTR_ERR(request); in tape_std_mtweof()
361 request->op = TO_WTM; in tape_std_mtweof()
363 ccw = tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, in tape_std_mtweof()
369 return tape_do_io_free(device, request); in tape_std_mtweof()
380 struct tape_request *request; in tape_std_mtbsfm() local
383 request = tape_alloc_request(mt_count + 2, 0); in tape_std_mtbsfm()
384 if (IS_ERR(request)) in tape_std_mtbsfm()
385 return PTR_ERR(request); in tape_std_mtbsfm()
386 request->op = TO_BSF; in tape_std_mtbsfm()
388 ccw = tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, in tape_std_mtbsfm()
394 return tape_do_io_free(device, request); in tape_std_mtbsfm()
404 struct tape_request *request; in tape_std_mtbsf() local
408 request = tape_alloc_request(mt_count + 2, 0); in tape_std_mtbsf()
409 if (IS_ERR(request)) in tape_std_mtbsf()
410 return PTR_ERR(request); in tape_std_mtbsf()
411 request->op = TO_BSF; in tape_std_mtbsf()
413 ccw = tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, in tape_std_mtbsf()
418 rc = tape_do_io_free(device, request); in tape_std_mtbsf()
435 struct tape_request *request; in tape_std_mtfsfm() local
439 request = tape_alloc_request(mt_count + 2, 0); in tape_std_mtfsfm()
440 if (IS_ERR(request)) in tape_std_mtfsfm()
441 return PTR_ERR(request); in tape_std_mtfsfm()
442 request->op = TO_FSF; in tape_std_mtfsfm()
444 ccw = tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, in tape_std_mtfsfm()
449 rc = tape_do_io_free(device, request); in tape_std_mtfsfm()
465 struct tape_request *request; in tape_std_mtrew() local
467 request = tape_alloc_request(3, 0); in tape_std_mtrew()
468 if (IS_ERR(request)) in tape_std_mtrew()
469 return PTR_ERR(request); in tape_std_mtrew()
470 request->op = TO_REW; in tape_std_mtrew()
472 tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, in tape_std_mtrew()
474 tape_ccw_cc(request->cpaddr + 1, REWIND, 0, NULL); in tape_std_mtrew()
475 tape_ccw_end(request->cpaddr + 2, NOP, 0, NULL); in tape_std_mtrew()
478 return tape_do_io_free(device, request); in tape_std_mtrew()
488 struct tape_request *request; in tape_std_mtoffl() local
490 request = tape_alloc_request(3, 0); in tape_std_mtoffl()
491 if (IS_ERR(request)) in tape_std_mtoffl()
492 return PTR_ERR(request); in tape_std_mtoffl()
493 request->op = TO_RUN; in tape_std_mtoffl()
495 tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, device->modeset_byte); in tape_std_mtoffl()
496 tape_ccw_cc(request->cpaddr + 1, REWIND_UNLOAD, 0, NULL); in tape_std_mtoffl()
497 tape_ccw_end(request->cpaddr + 2, NOP, 0, NULL); in tape_std_mtoffl()
500 return tape_do_io_free(device, request); in tape_std_mtoffl()
509 struct tape_request *request; in tape_std_mtnop() local
511 request = tape_alloc_request(2, 0); in tape_std_mtnop()
512 if (IS_ERR(request)) in tape_std_mtnop()
513 return PTR_ERR(request); in tape_std_mtnop()
514 request->op = TO_NOP; in tape_std_mtnop()
516 tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, device->modeset_byte); in tape_std_mtnop()
517 tape_ccw_end(request->cpaddr + 1, NOP, 0, NULL); in tape_std_mtnop()
519 return tape_do_io_free(device, request); in tape_std_mtnop()
560 struct tape_request *request; in tape_std_mtreten() local
562 request = tape_alloc_request(4, 0); in tape_std_mtreten()
563 if (IS_ERR(request)) in tape_std_mtreten()
564 return PTR_ERR(request); in tape_std_mtreten()
565 request->op = TO_FSF; in tape_std_mtreten()
567 tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, device->modeset_byte); in tape_std_mtreten()
568 tape_ccw_cc(request->cpaddr + 1,FORSPACEFILE, 0, NULL); in tape_std_mtreten()
569 tape_ccw_cc(request->cpaddr + 2, NOP, 0, NULL); in tape_std_mtreten()
570 tape_ccw_end(request->cpaddr + 3, CCW_CMD_TIC, 0, request->cpaddr); in tape_std_mtreten()
572 tape_do_io_interruptible(device, request); in tape_std_mtreten()
573 tape_free_request(request); in tape_std_mtreten()
583 struct tape_request *request; in tape_std_mterase() local
585 request = tape_alloc_request(6, 0); in tape_std_mterase()
586 if (IS_ERR(request)) in tape_std_mterase()
587 return PTR_ERR(request); in tape_std_mterase()
588 request->op = TO_DSE; in tape_std_mterase()
590 tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, device->modeset_byte); in tape_std_mterase()
591 tape_ccw_cc(request->cpaddr + 1, REWIND, 0, NULL); in tape_std_mterase()
592 tape_ccw_cc(request->cpaddr + 2, ERASE_GAP, 0, NULL); in tape_std_mterase()
593 tape_ccw_cc(request->cpaddr + 3, DATA_SEC_ERASE, 0, NULL); in tape_std_mterase()
594 tape_ccw_cc(request->cpaddr + 4, REWIND, 0, NULL); in tape_std_mterase()
595 tape_ccw_end(request->cpaddr + 5, NOP, 0, NULL); in tape_std_mterase()
598 return tape_do_io_free(device, request); in tape_std_mterase()
617 struct tape_request *request; in tape_std_mtcompression() local
623 request = tape_alloc_request(2, 0); in tape_std_mtcompression()
624 if (IS_ERR(request)) in tape_std_mtcompression()
625 return PTR_ERR(request); in tape_std_mtcompression()
626 request->op = TO_NOP; in tape_std_mtcompression()
632 tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, device->modeset_byte); in tape_std_mtcompression()
633 tape_ccw_end(request->cpaddr + 1, NOP, 0, NULL); in tape_std_mtcompression()
635 return tape_do_io_free(device, request); in tape_std_mtcompression()
644 struct tape_request *request; in tape_std_read_block() local
647 * We have to alloc 4 ccws in order to be able to transform request in tape_std_read_block()
648 * into a read backward request in error case. in tape_std_read_block()
650 request = tape_alloc_request(4, 0); in tape_std_read_block()
651 if (IS_ERR(request)) { in tape_std_read_block()
653 return request; in tape_std_read_block()
655 request->op = TO_RFO; in tape_std_read_block()
656 tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, device->modeset_byte); in tape_std_read_block()
657 tape_ccw_end_idal(request->cpaddr + 1, READ_FORWARD, in tape_std_read_block()
660 return request; in tape_std_read_block()
667 tape_std_read_backward(struct tape_device *device, struct tape_request *request) in tape_std_read_backward() argument
671 * transform the request to a read backward, followed by a in tape_std_read_backward()
674 request->op = TO_RBA; in tape_std_read_backward()
675 tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, device->modeset_byte); in tape_std_read_backward()
676 tape_ccw_cc_idal(request->cpaddr + 1, READ_BACKWARD, in tape_std_read_backward()
678 tape_ccw_cc(request->cpaddr + 2, FORSPACEBLOCK, 0, NULL); in tape_std_read_backward()
679 tape_ccw_end(request->cpaddr + 3, NOP, 0, NULL); in tape_std_read_backward()
688 struct tape_request *request; in tape_std_write_block() local
690 request = tape_alloc_request(2, 0); in tape_std_write_block()
691 if (IS_ERR(request)) { in tape_std_write_block()
693 return request; in tape_std_write_block()
695 request->op = TO_WRI; in tape_std_write_block()
696 tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, device->modeset_byte); in tape_std_write_block()
697 tape_ccw_end_idal(request->cpaddr + 1, WRITE_CMD, in tape_std_write_block()
700 return request; in tape_std_write_block()