Lines Matching defs:STm
815 static int set_mode_densblk(struct scsi_tape * STp, struct st_modedef * STm)
822 STm->default_density >= 0 &&
823 STm->default_density != STp->density) {
824 arg = STm->default_density;
830 STm->default_blksize >= 0 &&
831 STm->default_blksize != STp->block_size) {
832 arg |= STm->default_blksize;
840 name, STm->default_blksize, STm->default_density);
983 struct st_modedef *STm;
997 STm = &(STp->modes[STp->current_mode]);
1157 if (!(STm->defaults_for_writes) &&
1158 (retval = set_mode_densblk(STp, STm)) < 0)
1277 struct st_modedef *STm = &(STp->modes[STp->current_mode]);
1350 if (!STm->sysv || STps->rw != ST_READING) {
1558 struct st_modedef *STm;
1578 STm = &(STp->modes[STp->current_mode]);
1594 if ((retval = set_mode_densblk(STp, STm)) < 0)
1596 if (STm->default_compression != ST_DONT_TOUCH &&
1598 if (st_compression(STp, (STm->default_compression == ST_YES))) {
1676 STm->do_async_writes && STps->eof < ST_EOM_OK;
1678 if (STp->block_size != 0 && STm->do_buffer_writes &&
1834 struct st_modedef *STm;
1843 STm = &(STp->modes[STp->current_mode]);
1852 if (!(STp->try_dio_now && try_rdio) && STm->do_read_ahead) {
2025 struct st_modedef *STm;
2037 STm = &(STp->modes[STp->current_mode]);
2039 if (!STm->do_read_ahead) {
2167 static void st_log_options(struct scsi_tape * STp, struct st_modedef * STm, char *name)
2172 name, STp->current_mode, STm->do_buffer_writes, STm->do_async_writes,
2173 STm->do_read_ahead);
2179 name, STm->defaults_for_writes, STp->omit_blklims, STp->can_partitions,
2182 "%s: sysv: %d nowait: %d sili: %d\n", name, STm->sysv, STp->immediate,
2195 struct st_modedef *STm;
2199 STm = &(STp->modes[STp->current_mode]);
2200 if (!STm->defined) {
2201 cd0 = STm->cdevs[0]; cd1 = STm->cdevs[1];
2202 memcpy(STm, &(STp->modes[0]), sizeof(struct st_modedef));
2203 STm->cdevs[0] = cd0; STm->cdevs[1] = cd1;
2212 STm->do_buffer_writes = (options & MT_ST_BUFFER_WRITES) != 0;
2213 STm->do_async_writes = (options & MT_ST_ASYNC_WRITES) != 0;
2214 STm->defaults_for_writes = (options & MT_ST_DEF_WRITES) != 0;
2215 STm->do_read_ahead = (options & MT_ST_READ_AHEAD) != 0;
2225 STm->sysv = (options & MT_ST_SYSV) != 0;
2228 st_log_options(STp, STm, name); )
2232 STm->do_buffer_writes = value;
2234 STm->do_async_writes = value;
2236 STm->defaults_for_writes = value;
2238 STm->do_read_ahead = value;
2257 STm->sysv = value;
2263 st_log_options(STp, STm, name); )
2269 STm->default_blksize = (-1);
2272 STm->default_blksize = value;
2274 name, STm->default_blksize));
2277 set_mode_densblk(STp, STm);
2309 STm->default_density = (-1);
2313 STm->default_density = value & 0xff;
2315 name, STm->default_density));
2318 set_mode_densblk(STp, STm);
2336 STm->default_compression = ST_DONT_TOUCH;
2346 STm->default_compression = (value & 1 ? ST_YES : ST_NO);
2351 st_compression(STp, (STm->default_compression == ST_YES));
3321 struct st_modedef *STm;
3336 STm = &(STp->modes[STp->current_mode]);
3374 if (!STm->defined &&
3539 if (!STm->defined) {
3605 if (STm->do_async_writes ||
3606 (STm->do_buffer_writes && STp->block_size != 0) ||
3989 struct st_modedef *STm;
4105 STm = &(tpnt->modes[i]);
4106 STm->defined = 0;
4107 STm->sysv = ST_SYSV;
4108 STm->defaults_for_writes = 0;
4109 STm->do_async_writes = ST_ASYNC_WRITES;
4110 STm->do_buffer_writes = ST_BUFFER_WRITES;
4111 STm->do_read_ahead = ST_READ_AHEAD;
4112 STm->default_compression = ST_DONT_TOUCH;
4113 STm->default_blksize = (-1); /* No forced size */
4114 STm->default_density = (-1); /* No forced density */
4138 STm = &(tpnt->modes[mode]);
4159 STm->cdevs[j] = cdev;
4177 STm = &(tpnt->modes[mode]);
4181 if (STm->cdevs[j]) {
4182 if (cdev == STm->cdevs[j])
4187 cdev_del(STm->cdevs[j]);
4398 struct st_modedef *STm = dev_get_drvdata(dev);
4401 l = snprintf(buf, PAGE_SIZE, "%d\n", STm->defined);
4410 struct st_modedef *STm = dev_get_drvdata(dev);
4413 l = snprintf(buf, PAGE_SIZE, "%d\n", STm->default_blksize);
4422 struct st_modedef *STm = dev_get_drvdata(dev);
4426 fmt = STm->default_density >= 0 ? "0x%02x\n" : "%d\n";
4427 l = snprintf(buf, PAGE_SIZE, fmt, STm->default_density);
4437 struct st_modedef *STm = dev_get_drvdata(dev);
4440 l = snprintf(buf, PAGE_SIZE, "%d\n", STm->default_compression - 1);
4449 struct st_modedef *STm = dev_get_drvdata(dev);
4456 if (&scsi_tapes[i]->modes[j] == STm)
4466 options = STm->do_buffer_writes ? MT_ST_BUFFER_WRITES : 0;
4467 options |= STm->do_async_writes ? MT_ST_ASYNC_WRITES : 0;
4468 options |= STm->do_read_ahead ? MT_ST_READ_AHEAD : 0;
4472 options |= STm->defaults_for_writes ? MT_ST_DEF_WRITES : 0;
4477 options |= STm->sysv ? MT_ST_SYSV : 0;