Lines Matching defs:device
3 * tape device discipline for 3480/3490 tapes.
58 struct tape_device *device = request->device;
71 tape_med_state_set(device, MS_UNLOADED);
73 tape_med_state_set(device, MS_LOADED);
76 device->tape_generic_status |= GMT_WR_PROT(~0);
78 device->tape_generic_status &= ~GMT_WR_PROT(~0);
85 static int tape_34xx_medium_sense(struct tape_device *device)
98 rc = tape_do_io_interruptible(device, request);
103 static void tape_34xx_medium_sense_async(struct tape_device *device)
117 tape_do_io_async(device, request);
121 struct tape_device *device;
141 struct tape_device *device = p->device;
145 tape_34xx_medium_sense_async(device);
150 tape_put_device(device);
155 tape_34xx_schedule_work(struct tape_device *device, enum tape_op op)
164 p->device = tape_get_device(device);
186 tape_34xx_delete_sbid_from(request->device, 0);
222 tape_34xx_unsolicited_irq(struct tape_device *device, struct irb *irb)
227 tape_34xx_delete_sbid_from(device, 0);
228 tape_34xx_schedule_work(device, TO_MSEN);
230 DBF_EVENT(3, "unsol.irq! dev end: %08x\n", device->cdev_id);
231 tape_dump_sense_dbf(device, NULL, irb);
241 tape_34xx_erp_read_opposite(struct tape_device *device,
250 tape_std_read_backward(device, request);
262 tape_34xx_erp_bug(struct tape_device *device, struct tape_request *request,
266 dev_err(&device->cdev->dev, "An unexpected condition %d "
268 tape_dump_sense_dbf(device, request, irb);
278 tape_34xx_erp_overrun(struct tape_device *device, struct tape_request *request,
282 dev_warn (&device->cdev->dev, "A data overrun occurred between"
286 return tape_34xx_erp_bug(device, request, irb, -1);
293 tape_34xx_erp_sequence(struct tape_device *device,
300 dev_warn (&device->cdev->dev, "The block ID sequence on the "
308 return tape_34xx_erp_bug(device, request, irb, -2);
317 tape_34xx_unit_check(struct tape_device *device, struct tape_request *request,
323 inhibit_cu_recovery = (*device->modeset_byte & 0x80) ? 1 : 0;
338 return tape_34xx_erp_bug(device, request, irb, -3);
384 tape_34xx_delete_sbid_from(device, 0);
421 return tape_34xx_erp_bug(device, request,
425 dev_warn (&device->cdev->dev, "A read error occurred "
435 return tape_34xx_erp_bug(device, request,
439 dev_warn (&device->cdev->dev, "A write error on the "
444 return tape_34xx_erp_read_opposite(device, request);
447 dev_warn (&device->cdev->dev, "Writing the ID-mark "
451 /* Tape void. Tried to read beyond end of device. */
452 dev_warn (&device->cdev->dev, "Reading the tape beyond"
457 dev_warn (&device->cdev->dev, "The tape contains an "
464 if (device->cdev->id.driver_info == tape_3480)
465 return tape_34xx_erp_bug(device, request,
471 return tape_34xx_erp_overrun(device, request, irb);
474 return tape_34xx_erp_sequence(device, request, irb);
493 dev_warn (&device->cdev->dev, "A path equipment check occurred"
494 " for the tape device\n");
500 * be threated as "device end".
531 tape_med_state_set(device, MS_UNLOADED);
535 return tape_34xx_erp_bug(device, request, irb, sense[3]);
547 return tape_34xx_erp_bug(device, request, irb, sense[3]);
554 dev_warn (&device->cdev->dev, "The tape unit cannot process "
559 dev_warn (&device->cdev->dev, "The tape medium is write-"
564 dev_warn (&device->cdev->dev, "The tape does not have the "
572 dev_warn (&device->cdev->dev, "The tape unit failed to load"
574 tape_34xx_delete_sbid_from(device, 0);
581 dev_warn (&device->cdev->dev, "Automatic unloading of the tape"
585 return tape_34xx_erp_bug(device, request, irb, sense[3]);
594 dev_warn (&device->cdev->dev, "An equipment check has occurred"
598 if (device->cdev->id.driver_info == tape_3490)
602 return tape_34xx_erp_bug(device, request, irb, sense[3]);
608 dev_warn (&device->cdev->dev, "The tape information states an"
626 dev_warn (&device->cdev->dev, "The tape unit is not ready\n");
630 dev_warn (&device->cdev->dev, "The tape medium has been "
632 tape_34xx_delete_sbid_from(device, 0);
639 dev_warn (&device->cdev->dev, "The tape subsystem is running "
644 tape_34xx_delete_sbid_from(device, 0);
645 tape_med_state_set(device, MS_UNLOADED);
664 return tape_34xx_erp_bug(device, request,
669 dev_warn (&device->cdev->dev, "The tape unit is already "
678 dev_warn (&device->cdev->dev, "The tape unit is not online\n");
682 dev_warn (&device->cdev->dev, "The control unit has fenced "
684 tape_34xx_delete_sbid_from(device, 0);
691 dev_warn (&device->cdev->dev, "A parity error occurred on the "
696 dev_warn (&device->cdev->dev, "I/O error recovery failed on "
704 dev_warn (&device->cdev->dev, "The tape unit requires a "
714 if (device->cdev->id.driver_info == tape_3490)
722 return tape_34xx_erp_bug(device, request, irb, sense[3]);
724 if (device->cdev->id.driver_info == tape_3490) {
730 dev_warn (&device->cdev->dev, "The maximum block size"
735 return tape_34xx_erp_bug(device, request, irb, sense[3]);
755 tape_med_state_set(device, MS_UNLOADED);
756 tape_34xx_delete_sbid_from(device, 0);
759 return tape_34xx_erp_bug(device, request, irb, sense[3]);
768 dev_warn (&device->cdev->dev, "A channel interface error cannot be"
773 dev_warn (&device->cdev->dev, "A channel protocol error "
787 dev_warn (&device->cdev->dev, "The tape unit does not support "
795 dev_warn (&device->cdev->dev, "The tape unit does not support"
800 dev_warn (&device->cdev->dev, "The tape unit does not support tape "
805 dev_warn (&device->cdev->dev, "The tape unit does not support"
810 dev_warn (&device->cdev->dev, "The tape unit does not support"
824 return tape_34xx_erp_bug(device, request, irb, sense[3]);
832 tape_34xx_irq(struct tape_device *device, struct tape_request *request,
836 return tape_34xx_unsolicited_irq(device, irb);
846 return tape_34xx_unit_check(device, request, irb);
862 tape_dump_sense_dbf(device, request, irb);
870 tape_34xx_ioctl(struct tape_device *device, unsigned int cmd, unsigned long arg)
878 return tape_std_display(device, &disp);
902 tape_34xx_add_sbid(struct tape_device *device, struct tape_34xx_block_id bid)
913 sbid_list = (struct list_head *) device->discdata;
964 tape_34xx_delete_sbid_from(struct tape_device *device, int from)
971 sbid_list = (struct list_head *) device->discdata;
994 struct tape_device * device,
1002 sbid_list = (struct list_head *) device->discdata;
1030 tape_34xx_setup_device(struct tape_device * device)
1035 DBF_EVENT(6, "34xx device setup\n");
1036 if ((rc = tape_std_assign(device)) == 0) {
1037 if ((rc = tape_34xx_medium_sense(device)) != 0) {
1044 device->discdata = discdata;
1051 tape_34xx_cleanup_device(struct tape_device *device)
1053 tape_std_unassign(device);
1055 if (device->discdata) {
1056 tape_34xx_delete_sbid_from(device, 0);
1057 kfree(device->discdata);
1058 device->discdata = NULL;
1067 tape_34xx_mttell(struct tape_device *device, int mt_count)
1075 rc = tape_std_read_block_id(device, (__u64 *) &block_id);
1079 tape_34xx_add_sbid(device, block_id.cbid);
1087 tape_34xx_mtseek(struct tape_device *device, int mt_count)
1103 bid->format = (*device->modeset_byte & 0x08) ?
1106 tape_34xx_merge_sbid(device, bid);
1108 tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, device->modeset_byte);
1113 return tape_do_io_free(device, request);
1229 MODULE_DESCRIPTION("Linux on zSeries channel attached 3480 tape device driver");