Lines Matching refs:STm
888 static int set_mode_densblk(struct scsi_tape * STp, struct st_modedef * STm)
894 STm->default_density >= 0 &&
895 STm->default_density != STp->density) {
896 arg = STm->default_density;
902 STm->default_blksize >= 0 &&
903 STm->default_blksize != STp->block_size) {
904 arg |= STm->default_blksize;
913 STm->default_blksize, STm->default_density);
1052 struct st_modedef *STm;
1065 STm = &(STp->modes[STp->current_mode]);
1231 if (!(STm->defaults_for_writes) &&
1232 (retval = set_mode_densblk(STp, STm)) < 0)
1355 struct st_modedef *STm = &(STp->modes[STp->current_mode]);
1430 if (!STm->sysv || STps->rw != ST_READING) {
1639 struct st_modedef *STm;
1658 STm = &(STp->modes[STp->current_mode]);
1674 if ((retval = set_mode_densblk(STp, STm)) < 0)
1676 if (STm->default_compression != ST_DONT_TOUCH &&
1678 if (st_compression(STp, (STm->default_compression == ST_YES))) {
1756 STm->do_async_writes && STps->eof < ST_EOM_OK;
1758 if (STp->block_size != 0 && STm->do_buffer_writes &&
1914 struct st_modedef *STm;
1922 STm = &(STp->modes[STp->current_mode]);
1931 if (!(STp->try_dio_now && try_rdio) && STm->do_read_ahead) {
2113 struct st_modedef *STm;
2124 STm = &(STp->modes[STp->current_mode]);
2126 if (!STm->do_read_ahead) {
2255 static void st_log_options(struct scsi_tape * STp, struct st_modedef * STm)
2261 STp->current_mode, STm->do_buffer_writes,
2262 STm->do_async_writes, STm->do_read_ahead);
2271 STm->defaults_for_writes, STp->omit_blklims,
2276 STm->sysv, STp->immediate, STp->sili,
2288 struct st_modedef *STm;
2292 STm = &(STp->modes[STp->current_mode]);
2293 if (!STm->defined) {
2294 cd0 = STm->cdevs[0];
2295 cd1 = STm->cdevs[1];
2296 d0 = STm->devs[0];
2297 d1 = STm->devs[1];
2298 memcpy(STm, &(STp->modes[0]), sizeof(struct st_modedef));
2299 STm->cdevs[0] = cd0;
2300 STm->cdevs[1] = cd1;
2301 STm->devs[0] = d0;
2302 STm->devs[1] = d1;
2310 STm->do_buffer_writes = (options & MT_ST_BUFFER_WRITES) != 0;
2311 STm->do_async_writes = (options & MT_ST_ASYNC_WRITES) != 0;
2312 STm->defaults_for_writes = (options & MT_ST_DEF_WRITES) != 0;
2313 STm->do_read_ahead = (options & MT_ST_READ_AHEAD) != 0;
2324 STm->sysv = (options & MT_ST_SYSV) != 0;
2327 st_log_options(STp, STm); )
2331 STm->do_buffer_writes = value;
2333 STm->do_async_writes = value;
2335 STm->defaults_for_writes = value;
2337 STm->do_read_ahead = value;
2358 STm->sysv = value;
2364 st_log_options(STp, STm); )
2370 STm->default_blksize = (-1);
2373 STm->default_blksize = value;
2375 "%d bytes.\n", STm->default_blksize);
2378 set_mode_densblk(STp, STm);
2410 STm->default_density = (-1);
2414 STm->default_density = value & 0xff;
2416 STm->default_density);
2419 set_mode_densblk(STp, STm);
2437 STm->default_compression = ST_DONT_TOUCH;
2448 STm->default_compression = (value & 1 ? ST_YES : ST_NO);
2454 st_compression(STp, (STm->default_compression == ST_YES));
3524 struct st_modedef *STm;
3537 STm = &(STp->modes[STp->current_mode]);
3574 if (!STm->defined &&
3744 if (!STm->defined) {
3810 if (STm->do_async_writes ||
3811 (STm->do_buffer_writes && STp->block_size != 0) ||
4182 struct st_modedef *STm = &(tape->modes[mode]);
4196 STm->cdevs[rew] = cdev;
4218 STm->devs[rew] = dev;
4222 cdev_del(STm->cdevs[rew]);
4224 STm->cdevs[rew] = NULL;
4225 STm->devs[rew] = NULL;
4250 struct st_modedef *STm = &(tape->modes[mode]);
4252 if (STm->cdevs[rew])
4253 cdev_del(STm->cdevs[rew]);
4254 if (STm->devs[rew])
4255 device_unregister(STm->devs[rew]);
4264 struct st_modedef *STm;
4332 STm = &(tpnt->modes[i]);
4333 STm->defined = 0;
4334 STm->sysv = ST_SYSV;
4335 STm->defaults_for_writes = 0;
4336 STm->do_async_writes = ST_ASYNC_WRITES;
4337 STm->do_buffer_writes = ST_BUFFER_WRITES;
4338 STm->do_read_ahead = ST_READ_AHEAD;
4339 STm->default_compression = ST_DONT_TOUCH;
4340 STm->default_blksize = (-1); /* No forced size */
4341 STm->default_density = (-1); /* No forced density */
4342 STm->tape = tpnt;
4586 struct st_modedef *STm = dev_get_drvdata(dev);
4589 l = snprintf(buf, PAGE_SIZE, "%d\n", STm->defined);
4598 struct st_modedef *STm = dev_get_drvdata(dev);
4601 l = snprintf(buf, PAGE_SIZE, "%d\n", STm->default_blksize);
4610 struct st_modedef *STm = dev_get_drvdata(dev);
4614 fmt = STm->default_density >= 0 ? "0x%02x\n" : "%d\n";
4615 l = snprintf(buf, PAGE_SIZE, fmt, STm->default_density);
4624 struct st_modedef *STm = dev_get_drvdata(dev);
4627 l = snprintf(buf, PAGE_SIZE, "%d\n", STm->default_compression - 1);
4635 struct st_modedef *STm = dev_get_drvdata(dev);
4636 struct scsi_tape *STp = STm->tape;
4640 options = STm->do_buffer_writes ? MT_ST_BUFFER_WRITES : 0;
4641 options |= STm->do_async_writes ? MT_ST_ASYNC_WRITES : 0;
4642 options |= STm->do_read_ahead ? MT_ST_READ_AHEAD : 0;
4646 options |= STm->defaults_for_writes ? MT_ST_DEF_WRITES : 0;
4651 options |= STm->sysv ? MT_ST_SYSV : 0;
4672 struct st_modedef *STm = dev_get_drvdata(dev);
4675 (long long)atomic64_read(&STm->tape->stats->read_cnt));
4690 struct st_modedef *STm = dev_get_drvdata(dev);
4693 (long long)atomic64_read(&STm->tape->stats->read_byte_cnt));
4706 struct st_modedef *STm = dev_get_drvdata(dev);
4709 (long long)atomic64_read(&STm->tape->stats->tot_read_time));
4723 struct st_modedef *STm = dev_get_drvdata(dev);
4726 (long long)atomic64_read(&STm->tape->stats->write_cnt));
4740 struct st_modedef *STm = dev_get_drvdata(dev);
4743 (long long)atomic64_read(&STm->tape->stats->write_byte_cnt));
4757 struct st_modedef *STm = dev_get_drvdata(dev);
4760 (long long)atomic64_read(&STm->tape->stats->tot_write_time));
4775 struct st_modedef *STm = dev_get_drvdata(dev);
4778 (long long)atomic64_read(&STm->tape->stats->in_flight));
4795 struct st_modedef *STm = dev_get_drvdata(dev);
4798 (long long)atomic64_read(&STm->tape->stats->tot_io_time));
4814 struct st_modedef *STm = dev_get_drvdata(dev);
4817 (long long)atomic64_read(&STm->tape->stats->other_cnt));
4832 struct st_modedef *STm = dev_get_drvdata(dev);
4835 (long long)atomic64_read(&STm->tape->stats->resid_cnt));