Lines Matching refs:STm

814 static int set_mode_densblk(struct scsi_tape * STp, struct st_modedef * STm)  in set_mode_densblk()  argument
821 STm->default_density >= 0 && in set_mode_densblk()
822 STm->default_density != STp->density) { in set_mode_densblk()
823 arg = STm->default_density; in set_mode_densblk()
829 STm->default_blksize >= 0 && in set_mode_densblk()
830 STm->default_blksize != STp->block_size) { in set_mode_densblk()
831 arg |= STm->default_blksize; in set_mode_densblk()
839 name, STm->default_blksize, STm->default_density); in set_mode_densblk()
981 struct st_modedef *STm; in check_tape() local
995 STm = &(STp->modes[STp->current_mode]); in check_tape()
1161 if (!(STm->defaults_for_writes) && in check_tape()
1162 (retval = set_mode_densblk(STp, STm)) < 0) in check_tape()
1287 struct st_modedef *STm = &(STp->modes[STp->current_mode]); in st_flush() local
1362 if (!STm->sysv || STps->rw != ST_READING) { in st_flush()
1570 struct st_modedef *STm; in st_write() local
1590 STm = &(STp->modes[STp->current_mode]); in st_write()
1606 if ((retval = set_mode_densblk(STp, STm)) < 0) in st_write()
1608 if (STm->default_compression != ST_DONT_TOUCH && in st_write()
1610 if (st_compression(STp, (STm->default_compression == ST_YES))) { in st_write()
1688 STm->do_async_writes && STps->eof < ST_EOM_OK; in st_write()
1690 if (STp->block_size != 0 && STm->do_buffer_writes && in st_write()
1845 struct st_modedef *STm; in read_tape() local
1854 STm = &(STp->modes[STp->current_mode]); in read_tape()
1863 if (!(STp->try_dio_now && try_rdio) && STm->do_read_ahead) { in read_tape()
2035 struct st_modedef *STm; in st_read() local
2047 STm = &(STp->modes[STp->current_mode]); in st_read()
2049 if (!STm->do_read_ahead) { in st_read()
2176 static void st_log_options(struct scsi_tape * STp, struct st_modedef * STm, char *name) in DEB() argument
2181 name, STp->current_mode, STm->do_buffer_writes, STm->do_async_writes, in DEB()
2182 STm->do_read_ahead); in DEB()
2188 name, STm->defaults_for_writes, STp->omit_blklims, STp->can_partitions, in DEB()
2192 name, STm->sysv, STp->immediate, STp->sili, in DEB()
2205 struct st_modedef *STm; local
2209 STm = &(STp->modes[STp->current_mode]);
2210 if (!STm->defined) {
2211 cd0 = STm->cdevs[0]; cd1 = STm->cdevs[1];
2212 memcpy(STm, &(STp->modes[0]), sizeof(struct st_modedef));
2213 STm->cdevs[0] = cd0; STm->cdevs[1] = cd1;
2222 STm->do_buffer_writes = (options & MT_ST_BUFFER_WRITES) != 0;
2223 STm->do_async_writes = (options & MT_ST_ASYNC_WRITES) != 0;
2224 STm->defaults_for_writes = (options & MT_ST_DEF_WRITES) != 0;
2225 STm->do_read_ahead = (options & MT_ST_READ_AHEAD) != 0;
2236 STm->sysv = (options & MT_ST_SYSV) != 0;
2239 st_log_options(STp, STm, name); )
2243 STm->do_buffer_writes = value;
2245 STm->do_async_writes = value;
2247 STm->defaults_for_writes = value;
2249 STm->do_read_ahead = value;
2270 STm->sysv = value;
2276 st_log_options(STp, STm, name); )
2282 STm->default_blksize = (-1);
2285 STm->default_blksize = value;
2287 name, STm->default_blksize));
2290 set_mode_densblk(STp, STm);
2322 STm->default_density = (-1);
2326 STm->default_density = value & 0xff;
2328 name, STm->default_density));
2331 set_mode_densblk(STp, STm);
2349 STm->default_compression = ST_DONT_TOUCH;
2359 STm->default_compression = (value & 1 ? ST_YES : ST_NO);
2364 st_compression(STp, (STm->default_compression == ST_YES));
3333 struct st_modedef *STm; in st_ioctl() local
3348 STm = &(STp->modes[STp->current_mode]); in st_ioctl()
3386 if (!STm->defined && in st_ioctl()
3551 if (!STm->defined) { in st_ioctl()
3617 if (STm->do_async_writes || in st_ioctl()
3618 (STm->do_buffer_writes && STp->block_size != 0) || in st_ioctl()
4001 struct st_modedef *STm; in st_probe() local
4118 STm = &(tpnt->modes[i]); in st_probe()
4119 STm->defined = 0; in st_probe()
4120 STm->sysv = ST_SYSV; in st_probe()
4121 STm->defaults_for_writes = 0; in st_probe()
4122 STm->do_async_writes = ST_ASYNC_WRITES; in st_probe()
4123 STm->do_buffer_writes = ST_BUFFER_WRITES; in st_probe()
4124 STm->do_read_ahead = ST_READ_AHEAD; in st_probe()
4125 STm->default_compression = ST_DONT_TOUCH; in st_probe()
4126 STm->default_blksize = (-1); /* No forced size */ in st_probe()
4127 STm->default_density = (-1); /* No forced density */ in st_probe()
4151 STm = &(tpnt->modes[mode]); in st_probe()
4172 STm->cdevs[j] = cdev; in st_probe()
4191 STm = &(tpnt->modes[mode]); in st_probe()
4195 if (STm->cdevs[j]) { in st_probe()
4196 if (cdev == STm->cdevs[j]) in st_probe()
4201 cdev_del(STm->cdevs[j]); in st_probe()
4413 struct st_modedef *STm = dev_get_drvdata(dev); in st_defined_show() local
4416 l = snprintf(buf, PAGE_SIZE, "%d\n", STm->defined); in st_defined_show()
4425 struct st_modedef *STm = dev_get_drvdata(dev); in st_defblk_show() local
4428 l = snprintf(buf, PAGE_SIZE, "%d\n", STm->default_blksize); in st_defblk_show()
4437 struct st_modedef *STm = dev_get_drvdata(dev); in st_defdensity_show() local
4441 fmt = STm->default_density >= 0 ? "0x%02x\n" : "%d\n"; in st_defdensity_show()
4442 l = snprintf(buf, PAGE_SIZE, fmt, STm->default_density); in st_defdensity_show()
4452 struct st_modedef *STm = dev_get_drvdata(dev); in st_defcompression_show() local
4455 l = snprintf(buf, PAGE_SIZE, "%d\n", STm->default_compression - 1); in st_defcompression_show()
4464 struct st_modedef *STm = dev_get_drvdata(dev); in st_options_show() local
4471 if (&scsi_tapes[i]->modes[j] == STm) in st_options_show()
4481 options = STm->do_buffer_writes ? MT_ST_BUFFER_WRITES : 0; in st_options_show()
4482 options |= STm->do_async_writes ? MT_ST_ASYNC_WRITES : 0; in st_options_show()
4483 options |= STm->do_read_ahead ? MT_ST_READ_AHEAD : 0; in st_options_show()
4487 options |= STm->defaults_for_writes ? MT_ST_DEF_WRITES : 0; in st_options_show()
4492 options |= STm->sysv ? MT_ST_SYSV : 0; in st_options_show()