Lines Matching refs:device
57 struct tape_device *device = request->device; in __tape_34xx_medium_sense() local
70 tape_med_state_set(device, MS_UNLOADED); in __tape_34xx_medium_sense()
72 tape_med_state_set(device, MS_LOADED); in __tape_34xx_medium_sense()
75 device->tape_generic_status |= GMT_WR_PROT(~0); in __tape_34xx_medium_sense()
77 device->tape_generic_status &= ~GMT_WR_PROT(~0); in __tape_34xx_medium_sense()
84 static int tape_34xx_medium_sense(struct tape_device *device) in tape_34xx_medium_sense() argument
97 rc = tape_do_io_interruptible(device, request); in tape_34xx_medium_sense()
102 static void tape_34xx_medium_sense_async(struct tape_device *device) in tape_34xx_medium_sense_async() argument
116 tape_do_io_async(device, request); in tape_34xx_medium_sense_async()
120 struct tape_device *device; member
140 struct tape_device *device = p->device; in tape_34xx_work_handler() local
144 tape_34xx_medium_sense_async(device); in tape_34xx_work_handler()
149 tape_put_device(device); in tape_34xx_work_handler()
154 tape_34xx_schedule_work(struct tape_device *device, enum tape_op op) in tape_34xx_schedule_work() argument
163 p->device = tape_get_device(device); in tape_34xx_schedule_work()
185 tape_34xx_delete_sbid_from(request->device, 0); in tape_34xx_done()
221 tape_34xx_unsolicited_irq(struct tape_device *device, struct irb *irb) in tape_34xx_unsolicited_irq() argument
226 tape_34xx_delete_sbid_from(device, 0); in tape_34xx_unsolicited_irq()
227 tape_34xx_schedule_work(device, TO_MSEN); in tape_34xx_unsolicited_irq()
229 DBF_EVENT(3, "unsol.irq! dev end: %08x\n", device->cdev_id); in tape_34xx_unsolicited_irq()
230 tape_dump_sense_dbf(device, NULL, irb); in tape_34xx_unsolicited_irq()
240 tape_34xx_erp_read_opposite(struct tape_device *device, in tape_34xx_erp_read_opposite() argument
249 tape_std_read_backward(device, request); in tape_34xx_erp_read_opposite()
261 tape_34xx_erp_bug(struct tape_device *device, struct tape_request *request, in tape_34xx_erp_bug() argument
265 dev_err(&device->cdev->dev, "An unexpected condition %d " in tape_34xx_erp_bug()
267 tape_dump_sense_dbf(device, request, irb); in tape_34xx_erp_bug()
277 tape_34xx_erp_overrun(struct tape_device *device, struct tape_request *request, in tape_34xx_erp_overrun() argument
281 dev_warn (&device->cdev->dev, "A data overrun occurred between" in tape_34xx_erp_overrun()
285 return tape_34xx_erp_bug(device, request, irb, -1); in tape_34xx_erp_overrun()
292 tape_34xx_erp_sequence(struct tape_device *device, in tape_34xx_erp_sequence() argument
299 dev_warn (&device->cdev->dev, "The block ID sequence on the " in tape_34xx_erp_sequence()
307 return tape_34xx_erp_bug(device, request, irb, -2); in tape_34xx_erp_sequence()
316 tape_34xx_unit_check(struct tape_device *device, struct tape_request *request, in tape_34xx_unit_check() argument
322 inhibit_cu_recovery = (*device->modeset_byte & 0x80) ? 1 : 0; in tape_34xx_unit_check()
337 return tape_34xx_erp_bug(device, request, irb, -3); in tape_34xx_unit_check()
383 tape_34xx_delete_sbid_from(device, 0); in tape_34xx_unit_check()
420 return tape_34xx_erp_bug(device, request, in tape_34xx_unit_check()
424 dev_warn (&device->cdev->dev, "A read error occurred " in tape_34xx_unit_check()
434 return tape_34xx_erp_bug(device, request, in tape_34xx_unit_check()
438 dev_warn (&device->cdev->dev, "A write error on the " in tape_34xx_unit_check()
443 return tape_34xx_erp_read_opposite(device, request); in tape_34xx_unit_check()
446 dev_warn (&device->cdev->dev, "Writing the ID-mark " in tape_34xx_unit_check()
451 dev_warn (&device->cdev->dev, "Reading the tape beyond" in tape_34xx_unit_check()
456 dev_warn (&device->cdev->dev, "The tape contains an " in tape_34xx_unit_check()
463 if (device->cdev->id.driver_info == tape_3480) in tape_34xx_unit_check()
464 return tape_34xx_erp_bug(device, request, in tape_34xx_unit_check()
470 return tape_34xx_erp_overrun(device, request, irb); in tape_34xx_unit_check()
473 return tape_34xx_erp_sequence(device, request, irb); in tape_34xx_unit_check()
492 dev_warn (&device->cdev->dev, "A path equipment check occurred" in tape_34xx_unit_check()
530 tape_med_state_set(device, MS_UNLOADED); in tape_34xx_unit_check()
534 return tape_34xx_erp_bug(device, request, irb, sense[3]); in tape_34xx_unit_check()
546 return tape_34xx_erp_bug(device, request, irb, sense[3]); in tape_34xx_unit_check()
553 dev_warn (&device->cdev->dev, "The tape unit cannot process " in tape_34xx_unit_check()
558 dev_warn (&device->cdev->dev, "The tape medium is write-" in tape_34xx_unit_check()
563 dev_warn (&device->cdev->dev, "The tape does not have the " in tape_34xx_unit_check()
571 dev_warn (&device->cdev->dev, "The tape unit failed to load" in tape_34xx_unit_check()
573 tape_34xx_delete_sbid_from(device, 0); in tape_34xx_unit_check()
580 dev_warn (&device->cdev->dev, "Automatic unloading of the tape" in tape_34xx_unit_check()
584 return tape_34xx_erp_bug(device, request, irb, sense[3]); in tape_34xx_unit_check()
593 dev_warn (&device->cdev->dev, "An equipment check has occurred" in tape_34xx_unit_check()
597 if (device->cdev->id.driver_info == tape_3490) in tape_34xx_unit_check()
601 return tape_34xx_erp_bug(device, request, irb, sense[3]); in tape_34xx_unit_check()
607 dev_warn (&device->cdev->dev, "The tape information states an" in tape_34xx_unit_check()
625 dev_warn (&device->cdev->dev, "The tape unit is not ready\n"); in tape_34xx_unit_check()
629 dev_warn (&device->cdev->dev, "The tape medium has been " in tape_34xx_unit_check()
631 tape_34xx_delete_sbid_from(device, 0); in tape_34xx_unit_check()
638 dev_warn (&device->cdev->dev, "The tape subsystem is running " in tape_34xx_unit_check()
643 tape_34xx_delete_sbid_from(device, 0); in tape_34xx_unit_check()
644 tape_med_state_set(device, MS_UNLOADED); in tape_34xx_unit_check()
663 return tape_34xx_erp_bug(device, request, in tape_34xx_unit_check()
668 dev_warn (&device->cdev->dev, "The tape unit is already " in tape_34xx_unit_check()
677 dev_warn (&device->cdev->dev, "The tape unit is not online\n"); in tape_34xx_unit_check()
681 dev_warn (&device->cdev->dev, "The control unit has fenced " in tape_34xx_unit_check()
683 tape_34xx_delete_sbid_from(device, 0); in tape_34xx_unit_check()
690 dev_warn (&device->cdev->dev, "A parity error occurred on the " in tape_34xx_unit_check()
695 dev_warn (&device->cdev->dev, "I/O error recovery failed on " in tape_34xx_unit_check()
703 dev_warn (&device->cdev->dev, "The tape unit requires a " in tape_34xx_unit_check()
713 if (device->cdev->id.driver_info == tape_3490) in tape_34xx_unit_check()
721 return tape_34xx_erp_bug(device, request, irb, sense[3]); in tape_34xx_unit_check()
723 if (device->cdev->id.driver_info == tape_3490) { in tape_34xx_unit_check()
729 dev_warn (&device->cdev->dev, "The maximum block size" in tape_34xx_unit_check()
734 return tape_34xx_erp_bug(device, request, irb, sense[3]); in tape_34xx_unit_check()
754 tape_med_state_set(device, MS_UNLOADED); in tape_34xx_unit_check()
755 tape_34xx_delete_sbid_from(device, 0); in tape_34xx_unit_check()
758 return tape_34xx_erp_bug(device, request, irb, sense[3]); in tape_34xx_unit_check()
767 dev_warn (&device->cdev->dev, "A channel interface error cannot be" in tape_34xx_unit_check()
772 dev_warn (&device->cdev->dev, "A channel protocol error " in tape_34xx_unit_check()
776 if (device->cdev->id.driver_info == tape_3480) { in tape_34xx_unit_check()
788 dev_warn (&device->cdev->dev, "The tape unit does not support " in tape_34xx_unit_check()
796 dev_warn (&device->cdev->dev, "The tape unit does not support" in tape_34xx_unit_check()
801 dev_warn (&device->cdev->dev, "The tape unit does not support tape " in tape_34xx_unit_check()
806 dev_warn (&device->cdev->dev, "The tape unit does not support" in tape_34xx_unit_check()
811 dev_warn (&device->cdev->dev, "The tape unit does not support" in tape_34xx_unit_check()
825 return tape_34xx_erp_bug(device, request, irb, sense[3]); in tape_34xx_unit_check()
833 tape_34xx_irq(struct tape_device *device, struct tape_request *request, in tape_34xx_irq() argument
837 return tape_34xx_unsolicited_irq(device, irb); in tape_34xx_irq()
847 return tape_34xx_unit_check(device, request, irb); in tape_34xx_irq()
863 tape_dump_sense_dbf(device, request, irb); in tape_34xx_irq()
871 tape_34xx_ioctl(struct tape_device *device, unsigned int cmd, unsigned long arg) in tape_34xx_ioctl() argument
879 return tape_std_display(device, &disp); in tape_34xx_ioctl()
903 tape_34xx_add_sbid(struct tape_device *device, struct tape_34xx_block_id bid) in tape_34xx_add_sbid() argument
914 sbid_list = (struct list_head *) device->discdata; in tape_34xx_add_sbid()
965 tape_34xx_delete_sbid_from(struct tape_device *device, int from) in tape_34xx_delete_sbid_from() argument
972 sbid_list = (struct list_head *) device->discdata; in tape_34xx_delete_sbid_from()
995 struct tape_device * device, in tape_34xx_merge_sbid() argument
1003 sbid_list = (struct list_head *) device->discdata; in tape_34xx_merge_sbid()
1031 tape_34xx_setup_device(struct tape_device * device) in tape_34xx_setup_device() argument
1037 if ((rc = tape_std_assign(device)) == 0) { in tape_34xx_setup_device()
1038 if ((rc = tape_34xx_medium_sense(device)) != 0) { in tape_34xx_setup_device()
1045 device->discdata = discdata; in tape_34xx_setup_device()
1052 tape_34xx_cleanup_device(struct tape_device *device) in tape_34xx_cleanup_device() argument
1054 tape_std_unassign(device); in tape_34xx_cleanup_device()
1056 if (device->discdata) { in tape_34xx_cleanup_device()
1057 tape_34xx_delete_sbid_from(device, 0); in tape_34xx_cleanup_device()
1058 kfree(device->discdata); in tape_34xx_cleanup_device()
1059 device->discdata = NULL; in tape_34xx_cleanup_device()
1068 tape_34xx_mttell(struct tape_device *device, int mt_count) in tape_34xx_mttell() argument
1076 rc = tape_std_read_block_id(device, (__u64 *) &block_id); in tape_34xx_mttell()
1080 tape_34xx_add_sbid(device, block_id.cbid); in tape_34xx_mttell()
1088 tape_34xx_mtseek(struct tape_device *device, int mt_count) in tape_34xx_mtseek() argument
1104 bid->format = (*device->modeset_byte & 0x08) ? in tape_34xx_mtseek()
1107 tape_34xx_merge_sbid(device, bid); in tape_34xx_mtseek()
1109 tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, device->modeset_byte); in tape_34xx_mtseek()
1114 return tape_do_io_free(device, request); in tape_34xx_mtseek()