Lines Matching refs:tape

7    Rewritten from Dwayne Forsyth's SCSI tape driver by Kai Makisara.
95 MODULE_DESCRIPTION("SCSI tape (st) driver");
109 MODULE_PARM_DESC(try_direct_io, "Try direct I/O between user buffer and tape drive (1)");
388 if (!debugging) { /* Abnormal conditions for tape */
833 /* Flush the tape buffer. The tape will be positioned correctly unless
1041 /* See if the drive is ready and gather information about the tape. Return values:
1044 1 drive not ready (possibly no tape)
1171 DEBC_printk(STp, "Density %x, tape length: %x, "
1182 "non-buffered tape: disabling "
1217 after the driver has been initialized with tape in the drive and the
1300 "Can't allocate one page tape buffer.\n");
1348 /* Flush the tape buffer before close */
1464 accessing this tape. */
1598 "Can't allocate %d byte tape buffer.\n",
1653 "Write not multiple of tape block size.\n");
1709 the problems after some tape movement. */
1902 /* Read data from the tape. Returns zero in the normal case, one if the
2164 /* Check the buffer writability before any tape movement. Don't alter
2218 /* Change the eof state if no data from tape or buffer */
2485 /* Read a mode page into the tape buffer. The block descriptors are included
2511 /* Send the mode page in the tape buffer to the drive. Assumes that the mode data
2650 st_printk(ST_DEB_MSG, STp, "Unloading tape.\n");
2652 st_printk(ST_DEB_MSG, STp, "Loading tape.\n");
2698 st_printk(ST_DEB_MSG, STp, "Spacing tape %s over %d %s.\n",
2855 DEBC_printk(STp, "Rewinding tape.\n");
2859 DEBC_printk(STp, "No op on tape.\n");
2868 DEBC_printk(STp, "Retensioning tape.\n");
2873 /* space to the end of tape */
2902 DEBC_printk(STp, "Erasing tape.\n");
2906 case MTSETDENSITY: /* Set tape density */
3113 /* Get the tape position. If bt == 2, arg points into a kernel space mt_loc
3145 DEBC_printk(STp, " Can't read tape position.\n");
3164 DEBC_printk(STp, "Got tape pos. blk %d part %d.\n",
3174 /* Set the tape block and partition. Negative partition means that only the
3322 /* Get the number of partitions on the tape. As a side effect reads the
3323 mode page into the tape buffer. */
3369 /* Partition the tape into two partitions if size > 0 or one partition if
3424 DEBC_printk(STp, "Formatting tape with one partition.\n");
3475 DEBC_printk(STp, "Formatting tape with one partition.\n");
3485 "Formatting tape with two partitions (%i = %d MB).\n",
3505 st_printk(KERN_INFO, STp, "Partitioning of tape failed.\n");
3631 * to this device. If the user wants to rewind the tape,
3884 /* Try to allocate a new tape buffer. Calling function must not hold
3892 printk(KERN_NOTICE "st: Can't allocate new tape buffer.\n");
3910 /* Try to allocate enough space in the tape buffer */
4000 /* Move data from the user buffer to the tape buffer. Returns zero (success) or
4032 /* Move data from the tape buffer to the user buffer. Returns zero (success) or
4176 static int create_one_cdev(struct scsi_tape *tape, int mode, int rew)
4182 struct st_modedef *STm = &(tape->modes[mode]);
4184 int dev_num = tape->index;
4208 tape->name, st_formats[i]);
4210 dev = device_create(&st_sysfs_class, &tape->device->sdev_gendev,
4211 cdev_devno, &tape->modes[mode], "%s", name);
4229 static int create_cdevs(struct scsi_tape *tape)
4233 error = create_one_cdev(tape, mode, 0);
4236 error = create_one_cdev(tape, mode, 1);
4241 return sysfs_create_link(&tape->device->sdev_gendev.kobj,
4242 &tape->modes[0].devs[0]->kobj, "tape");
4245 static void remove_cdevs(struct scsi_tape *tape)
4248 sysfs_remove_link(&tape->device->sdev_gendev.kobj, "tape");
4250 struct st_modedef *STm = &(tape->modes[mode]);
4286 "st: Can't allocate new tape buffer. "
4342 STm->tape = tpnt;
4389 "Attached scsi tape %s\n", tpnt->name);
4636 struct scsi_tape *STp = STm->tape;
4661 /* Support for tape stats */
4664 * read_cnt_show - return read count - count of reads made from tape drive
4675 (long long)atomic64_read(&STm->tape->stats->read_cnt));
4680 * read_byte_cnt_show - return read byte count - tape drives
4682 * of data read from the tape drive.
4693 (long long)atomic64_read(&STm->tape->stats->read_byte_cnt));
4709 (long long)atomic64_read(&STm->tape->stats->tot_read_time));
4715 * to write(2) that have written data to tape.
4726 (long long)atomic64_read(&STm->tape->stats->write_cnt));
4732 * bytes written to tape.
4743 (long long)atomic64_read(&STm->tape->stats->write_byte_cnt));
4760 (long long)atomic64_read(&STm->tape->stats->tot_write_time));
4778 (long long)atomic64_read(&STm->tape->stats->in_flight));
4784 * waiting on all I/O to complete. This includes tape movement commands
4785 * such as rewinding, seeking to end of file or tape, it also includes
4786 * read and write. To determine the time spent on tape movement
4798 (long long)atomic64_read(&STm->tape->stats->tot_io_time));
4805 * Typically these are tape movement requests but will include driver
4806 * tape movement. This includes only requests issued by the st driver.
4817 (long long)atomic64_read(&STm->tape->stats->other_cnt));
4824 * block size on tape.
4835 (long long)atomic64_read(&STm->tape->stats->resid_cnt));