Lines Matching full:request

204 	struct tape_request *request;  in tape_3592_kekl_query()  local
213 request = tape_alloc_request(2, sizeof(*order)); in tape_3592_kekl_query()
214 if (IS_ERR(request)) { in tape_3592_kekl_query()
215 rc = PTR_ERR(request); in tape_3592_kekl_query()
218 order = request->cpdata; in tape_3592_kekl_query()
222 request->op = TO_KEKL_QUERY; in tape_3592_kekl_query()
223 tape_ccw_cc(request->cpaddr, PERF_SUBSYS_FUNC, sizeof(*order), order); in tape_3592_kekl_query()
224 tape_ccw_end(request->cpaddr + 1, READ_SS_DATA, sizeof(*int_kekls), in tape_3592_kekl_query()
226 rc = tape_do_io(device, request); in tape_3592_kekl_query()
233 tape_free_request(request); in tape_3592_kekl_query()
277 struct tape_request *request; in tape_3592_kekl_set() local
287 request = tape_alloc_request(1, sizeof(*order)); in tape_3592_kekl_set()
288 if (IS_ERR(request)) in tape_3592_kekl_set()
289 return PTR_ERR(request); in tape_3592_kekl_set()
290 order = request->cpdata; in tape_3592_kekl_set()
296 request->op = TO_KEKL_SET; in tape_3592_kekl_set()
297 tape_ccw_end(request->cpaddr, PERF_SUBSYS_FUNC, sizeof(*order), order); in tape_3592_kekl_set()
299 return tape_do_io_free(device, request); in tape_3592_kekl_set()
329 struct tape_request *request; in __tape_3592_enable_crypt() local
335 request = tape_alloc_request(2, 72); in __tape_3592_enable_crypt()
336 if (IS_ERR(request)) in __tape_3592_enable_crypt()
337 return request; in __tape_3592_enable_crypt()
338 data = request->cpdata; in __tape_3592_enable_crypt()
349 request->op = TO_CRYPT_ON; in __tape_3592_enable_crypt()
350 tape_ccw_cc(request->cpaddr, MODE_SET_CB, 36, data); in __tape_3592_enable_crypt()
351 tape_ccw_end(request->cpaddr + 1, MODE_SET_CB, 36, data + 36); in __tape_3592_enable_crypt()
352 return request; in __tape_3592_enable_crypt()
357 struct tape_request *request; in tape_3592_enable_crypt() local
359 request = __tape_3592_enable_crypt(device); in tape_3592_enable_crypt()
360 if (IS_ERR(request)) in tape_3592_enable_crypt()
361 return PTR_ERR(request); in tape_3592_enable_crypt()
362 return tape_do_io_free(device, request); in tape_3592_enable_crypt()
367 struct tape_request *request; in tape_3592_enable_crypt_async() local
369 request = __tape_3592_enable_crypt(device); in tape_3592_enable_crypt_async()
370 if (!IS_ERR(request)) in tape_3592_enable_crypt_async()
371 tape_do_io_async_free(device, request); in tape_3592_enable_crypt_async()
379 struct tape_request *request; in __tape_3592_disable_crypt() local
385 request = tape_alloc_request(2, 72); in __tape_3592_disable_crypt()
386 if (IS_ERR(request)) in __tape_3592_disable_crypt()
387 return request; in __tape_3592_disable_crypt()
388 data = request->cpdata; in __tape_3592_disable_crypt()
396 request->op = TO_CRYPT_OFF; in __tape_3592_disable_crypt()
397 tape_ccw_cc(request->cpaddr, MODE_SET_CB, 36, data); in __tape_3592_disable_crypt()
398 tape_ccw_end(request->cpaddr + 1, MODE_SET_CB, 36, data + 36); in __tape_3592_disable_crypt()
400 return request; in __tape_3592_disable_crypt()
405 struct tape_request *request; in tape_3592_disable_crypt() local
407 request = __tape_3592_disable_crypt(device); in tape_3592_disable_crypt()
408 if (IS_ERR(request)) in tape_3592_disable_crypt()
409 return PTR_ERR(request); in tape_3592_disable_crypt()
410 return tape_do_io_free(device, request); in tape_3592_disable_crypt()
415 struct tape_request *request; in tape_3592_disable_crypt_async() local
417 request = __tape_3592_disable_crypt(device); in tape_3592_disable_crypt_async()
418 if (!IS_ERR(request)) in tape_3592_disable_crypt_async()
419 tape_do_io_async_free(device, request); in tape_3592_disable_crypt_async()
495 struct tape_request *request; in tape_3590_sense_medium() local
497 request = tape_alloc_request(1, 128); in tape_3590_sense_medium()
498 if (IS_ERR(request)) in tape_3590_sense_medium()
499 return PTR_ERR(request); in tape_3590_sense_medium()
500 request->op = TO_MSEN; in tape_3590_sense_medium()
501 tape_ccw_end(request->cpaddr, MEDIUM_SENSE, 128, request->cpdata); in tape_3590_sense_medium()
502 return tape_do_io_free(device, request); in tape_3590_sense_medium()
507 struct tape_request *request; in tape_3590_sense_medium_async() local
509 request = tape_alloc_request(1, 128); in tape_3590_sense_medium_async()
510 if (IS_ERR(request)) in tape_3590_sense_medium_async()
512 request->op = TO_MSEN; in tape_3590_sense_medium_async()
513 tape_ccw_end(request->cpaddr, MEDIUM_SENSE, 128, request->cpdata); in tape_3590_sense_medium_async()
514 tape_do_io_async_free(device, request); in tape_3590_sense_medium_async()
538 struct tape_request *request; in tape_3590_mtseek() local
541 request = tape_alloc_request(3, 4); in tape_3590_mtseek()
542 if (IS_ERR(request)) in tape_3590_mtseek()
543 return PTR_ERR(request); in tape_3590_mtseek()
544 request->op = TO_LBL; in tape_3590_mtseek()
545 tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, device->modeset_byte); in tape_3590_mtseek()
546 *(__u32 *) request->cpdata = count; in tape_3590_mtseek()
547 tape_ccw_cc(request->cpaddr + 1, LOCATE, 4, request->cpdata); in tape_3590_mtseek()
548 tape_ccw_end(request->cpaddr + 2, NOP, 0, NULL); in tape_3590_mtseek()
549 return tape_do_io_free(device, request); in tape_3590_mtseek()
558 struct tape_request *request) in tape_3590_read_opposite() argument
564 * transform the request to a read backward, followed by a in tape_3590_read_opposite()
567 request->op = TO_RBA; in tape_3590_read_opposite()
568 tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, device->modeset_byte); in tape_3590_read_opposite()
570 tape_ccw_cc_idal(request->cpaddr + 1, data->read_back_op, in tape_3590_read_opposite()
572 tape_ccw_cc(request->cpaddr + 2, FORSPACEBLOCK, 0, NULL); in tape_3590_read_opposite()
573 tape_ccw_end(request->cpaddr + 3, NOP, 0, NULL); in tape_3590_read_opposite()
582 * After a "read attention message" request there are two possible
595 struct tape_request *request; in tape_3590_read_attmsg_async() local
598 request = tape_alloc_request(3, 4096); in tape_3590_read_attmsg_async()
599 if (IS_ERR(request)) in tape_3590_read_attmsg_async()
601 request->op = TO_READ_ATTMSG; in tape_3590_read_attmsg_async()
602 buf = request->cpdata; in tape_3590_read_attmsg_async()
605 tape_ccw_cc(request->cpaddr, PERFORM_SS_FUNC, 12, buf); in tape_3590_read_attmsg_async()
606 tape_ccw_cc(request->cpaddr + 1, READ_SS_DATA, 4096 - 12, buf + 12); in tape_3590_read_attmsg_async()
607 tape_ccw_end(request->cpaddr + 2, NOP, 0, NULL); in tape_3590_read_attmsg_async()
608 tape_do_io_async_free(device, request); in tape_3590_read_attmsg_async()
706 tape_3590_done(struct tape_device *device, struct tape_request *request) in tape_3590_done() argument
709 DBF_EVENT(6, "%s done\n", tape_op_verbose[request->op]); in tape_3590_done()
711 switch (request->op) { in tape_3590_done()
732 tape_3590_med_state_set(device, request->cpdata); in tape_3590_done()
764 tape_3590_erp_succeeded(struct tape_device *device, struct tape_request *request) in tape_3590_erp_succeeded() argument
767 tape_op_verbose[request->op]); in tape_3590_erp_succeeded()
768 return tape_3590_done(device, request); in tape_3590_erp_succeeded()
775 tape_3590_erp_failed(struct tape_device *device, struct tape_request *request, in tape_3590_erp_failed() argument
779 tape_op_verbose[request->op]); in tape_3590_erp_failed()
780 tape_dump_sense_dbf(device, request, irb); in tape_3590_erp_failed()
788 tape_3590_erp_retry(struct tape_device *device, struct tape_request *request, in tape_3590_erp_retry() argument
791 DBF_EVENT(2, "Retry: %s\n", tape_op_verbose[request->op]); in tape_3590_erp_retry()
792 tape_dump_sense_dbf(device, request, irb); in tape_3590_erp_retry()
823 tape_3590_erp_basic(struct tape_device *device, struct tape_request *request, in tape_3590_erp_basic() argument
832 return tape_3590_erp_failed(device, request, irb, rc); in tape_3590_erp_basic()
834 return tape_3590_erp_succeeded(device, request); in tape_3590_erp_basic()
836 return tape_3590_erp_retry(device, request, irb); in tape_3590_erp_basic()
838 return tape_3590_erp_failed(device, request, irb, rc); in tape_3590_erp_basic()
850 struct tape_request *request, struct irb *irb) in tape_3590_erp_read_buf_log() argument
856 return tape_3590_erp_basic(device, request, irb, -EIO); in tape_3590_erp_read_buf_log()
863 tape_3590_erp_swap(struct tape_device *device, struct tape_request *request, in tape_3590_erp_swap() argument
874 return tape_3590_erp_basic(device, request, irb, -EIO); in tape_3590_erp_swap()
882 struct tape_request *request, struct irb *irb) in tape_3590_erp_long_busy() argument
893 struct tape_request *request, struct irb *irb) in tape_3590_erp_special_interrupt() argument
895 return tape_3590_erp_basic(device, request, irb, -EIO); in tape_3590_erp_special_interrupt()
903 struct tape_request *request, struct irb *irb) in tape_3590_erp_read_alternate() argument
924 tape_3590_read_opposite(device, request); in tape_3590_erp_read_alternate()
925 return tape_3590_erp_retry(device, request, irb); in tape_3590_erp_read_alternate()
933 struct tape_request *request, struct irb *irb) in tape_3590_erp_read_opposite() argument
935 switch (request->op) { in tape_3590_erp_read_opposite()
941 tape_3590_read_opposite(device, request); in tape_3590_erp_read_opposite()
942 return tape_3590_erp_retry(device, request, irb); in tape_3590_erp_read_opposite()
945 return tape_3590_erp_failed(device, request, irb, -EIO); in tape_3590_erp_read_opposite()
948 return tape_3590_erp_failed(device, request, irb, -EIO); in tape_3590_erp_read_opposite()
1302 struct tape_request *request, struct irb *irb) in tape_3590_crypt_error() argument
1313 return tape_3590_erp_basic(device, request, irb, -EKEYREJECTED); in tape_3590_crypt_error()
1316 return tape_3590_erp_basic(device, request, irb, -ENOTCONN); in tape_3590_crypt_error()
1321 return tape_3590_erp_basic(device, request, irb, -ENOKEY); in tape_3590_crypt_error()
1330 tape_3590_unit_check(struct tape_device *device, struct tape_request *request, in tape_3590_unit_check() argument
1348 return tape_3590_erp_read_buf_log(device, request, irb); in tape_3590_unit_check()
1352 return tape_3590_erp_read_alternate(device, request, irb); in tape_3590_unit_check()
1357 return tape_3590_erp_special_interrupt(device, request, irb); in tape_3590_unit_check()
1359 return tape_3590_crypt_error(device, request, irb); in tape_3590_unit_check()
1364 return tape_3590_erp_basic(device, request, irb, -ENOSPC); in tape_3590_unit_check()
1368 return tape_3590_erp_basic(device, request, irb, -ENOSPC); in tape_3590_unit_check()
1371 return tape_3590_erp_basic(device, request, irb, -ENOSPC); in tape_3590_unit_check()
1376 return tape_3590_erp_basic(device, request, irb, -EIO); in tape_3590_unit_check()
1382 return tape_3590_erp_basic(device, request, irb, 0); in tape_3590_unit_check()
1391 return tape_3590_erp_basic(device, request, irb, -ENOMEDIUM); in tape_3590_unit_check()
1396 return tape_3590_erp_basic(device, request, irb, -EBUSY); in tape_3590_unit_check()
1399 return tape_3590_erp_long_busy(device, request, irb); in tape_3590_unit_check()
1405 return tape_3590_erp_swap(device, request, irb); in tape_3590_unit_check()
1410 return tape_3590_erp_read_opposite(device, request, in tape_3590_unit_check()
1413 return tape_3590_erp_basic(device, request, irb, -EIO); in tape_3590_unit_check()
1421 return tape_3590_erp_swap(device, request, irb); in tape_3590_unit_check()
1425 return tape_3590_erp_basic(device, request, irb, -EMEDIUMTYPE); in tape_3590_unit_check()
1431 return tape_3590_erp_basic(device, request, irb, -ENOMEDIUM); in tape_3590_unit_check()
1434 return tape_3590_erp_basic(device, request, irb, -EMEDIUMTYPE); in tape_3590_unit_check()
1437 return tape_3590_erp_basic(device, request, irb, -EPERM); in tape_3590_unit_check()
1441 return tape_3590_erp_basic(device, request, irb, -EPERM); in tape_3590_unit_check()
1443 return tape_3590_erp_basic(device, request, irb, -EIO); in tape_3590_unit_check()
1451 tape_3590_irq(struct tape_device *device, struct tape_request *request, in tape_3590_irq() argument
1454 if (request == NULL) in tape_3590_irq()
1459 (request->op == TO_WRI)) { in tape_3590_irq()
1462 return tape_3590_erp_failed(device, request, irb, -ENOSPC); in tape_3590_irq()
1466 return tape_3590_unit_check(device, request, irb); in tape_3590_irq()
1470 if (request->op == TO_FSB || request->op == TO_BSB) in tape_3590_irq()
1471 request->rescnt++; in tape_3590_irq()
1476 return tape_3590_done(device, request); in tape_3590_irq()
1490 tape_dump_sense_dbf(device, request, irb); in tape_3590_irq()
1499 struct tape_request *request; in tape_3590_read_dev_chars() local
1501 request = tape_alloc_request(1, sizeof(*rdc_data)); in tape_3590_read_dev_chars()
1502 if (IS_ERR(request)) in tape_3590_read_dev_chars()
1503 return PTR_ERR(request); in tape_3590_read_dev_chars()
1504 request->op = TO_RDC; in tape_3590_read_dev_chars()
1505 tape_ccw_end(request->cpaddr, CCW_CMD_RDC, sizeof(*rdc_data), in tape_3590_read_dev_chars()
1506 request->cpdata); in tape_3590_read_dev_chars()
1507 rc = tape_do_io(device, request); in tape_3590_read_dev_chars()
1509 memcpy(rdc_data, request->cpdata, sizeof(*rdc_data)); in tape_3590_read_dev_chars()
1510 tape_free_request(request); in tape_3590_read_dev_chars()