Lines Matching defs:partition
695 STps = &(STp->ps[STp->partition]);
799 STps = &(STp->ps[STp->partition]);
848 STps = &(STp->ps[STp->partition]);
954 STp->partition = find_partition(STp);
955 if (STp->partition < 0)
956 STp->partition = 0;
957 STp->new_partition = STp->partition;
1077 STp->partition = STp->new_partition = 0;
1105 STp->partition = STp->new_partition = 0;
1217 partition support has been enabled. */
1218 DEBC_printk(STp, "Updating partition number in status.\n");
1219 if ((STp->partition = find_partition(STp)) < 0) {
1220 retval = STp->partition;
1223 STp->new_partition = STp->partition;
1355 struct st_partstat *STps = &(STp->ps[STp->partition]);
1428 STps = &(STp->ps[STp->partition]);
1658 STps = &(STp->ps[STp->partition]);
1922 STps = &(STp->ps[STp->partition]);
2132 STps = &(STp->ps[STp->partition]);
2676 STps = &(STp->ps[STp->partition]);
2728 STps = &(STp->ps[STp->partition]);
3116 static int get_location(struct scsi_tape *STp, unsigned int *block, int *partition,
3144 *block = *partition = 0;
3153 *partition = 0;
3159 *partition = (STp->buffer)->b_data[1];
3161 (STp->buffer)->b_data[1] == 0) /* BOP of partition 0 */
3165 *block, *partition);
3174 /* Set the tape block and partition. Negative partition means that only the
3176 static int set_location(struct scsi_tape *STp, unsigned int block, int partition,
3189 STps = &(STp->ps[STp->partition]);
3191 DEBC_printk(STp, "Setting block to %d and partition to %d.\n",
3192 block, partition);
3193 DEB(if (partition < 0)
3196 /* Update the location at the partition we are leaving */
3197 if ((!STp->can_partitions && partition != 0) ||
3198 partition >= ST_NBR_PARTITIONS)
3200 if (partition != STp->partition) {
3207 "partition %d saved.\n",
3208 blk, STp->partition);
3227 if (STp->partition != partition) {
3229 scmd[8] = partition;
3230 DEBC_printk(STp, "Trying to change partition "
3231 "from %d to %d\n", STp->partition,
3232 partition);
3252 STp->partition = p;
3255 STp->partition = partition;
3256 STps = &(STp->ps[partition]);
3276 /* Find the current partition number for the drive status. Called from open and
3277 returns either partition number of negative error code. */
3280 int i, partition;
3283 if ((i = get_location(STp, &block, &partition, 1)) < 0)
3285 if (partition >= ST_NBR_PARTITIONS)
3287 return partition;
3291 /* Change the partition if necessary */
3296 if (STp->partition == STp->new_partition)
3305 /* Functions for reading and writing the medium partition mode page. */
3334 DEBC_printk(STp, "Can't read medium partition page.\n");
3369 /* Partition the tape into two partitions if size > 0 or one partition if
3375 My HP C1533A drive returns only one partition size field. This is used to
3376 set the size of partition 1. There is no size field for the default partition.
3378 used to set the size of partition 1 (this is what the SCSI-3 standard specifies).
3380 partition size fields is greater than the maximum number of additional partitions
3384 and 10 when 1 partition is defined (information from Eric Lee Green). This is
3385 is acceptable also to some other old drives and enforced if the first partition
3386 size field is used for the first additional partition size.
3401 DEBC_printk(STp, "Can't read partition mode page.\n");
3424 DEBC_printk(STp, "Formatting tape with one partition.\n");
3456 /* The second condition is for HP DDS which use only one partition size
3462 bp[psdo] = bp[psdo + 1] = 0xff; /* Rest to partition 0 */
3475 DEBC_printk(STp, "Formatting tape with one partition.\n");
3537 STps = &(STp->ps[STp->partition]);
3596 /* Old position must be restored if partition will be
3599 (STp->new_partition != STp->partition);
3701 STp->partition = STp->new_partition = 0;
3792 mt_status.mt_resid = STp->partition;
4372 tpnt->partition = 0;