STm 882 drivers/scsi/st.c static int set_mode_densblk(struct scsi_tape * STp, struct st_modedef * STm) STm 888 drivers/scsi/st.c STm->default_density >= 0 && STm 889 drivers/scsi/st.c STm->default_density != STp->density) { STm 890 drivers/scsi/st.c arg = STm->default_density; STm 896 drivers/scsi/st.c STm->default_blksize >= 0 && STm 897 drivers/scsi/st.c STm->default_blksize != STp->block_size) { STm 898 drivers/scsi/st.c arg |= STm->default_blksize; STm 907 drivers/scsi/st.c STm->default_blksize, STm->default_density); STm 1045 drivers/scsi/st.c struct st_modedef *STm; STm 1058 drivers/scsi/st.c STm = &(STp->modes[STp->current_mode]); STm 1224 drivers/scsi/st.c if (!(STm->defaults_for_writes) && STm 1225 drivers/scsi/st.c (retval = set_mode_densblk(STp, STm)) < 0) STm 1346 drivers/scsi/st.c struct st_modedef *STm = &(STp->modes[STp->current_mode]); STm 1421 drivers/scsi/st.c if (!STm->sysv || STps->rw != ST_READING) { STm 1631 drivers/scsi/st.c struct st_modedef *STm; STm 1650 drivers/scsi/st.c STm = &(STp->modes[STp->current_mode]); STm 1666 drivers/scsi/st.c if ((retval = set_mode_densblk(STp, STm)) < 0) STm 1668 drivers/scsi/st.c if (STm->default_compression != ST_DONT_TOUCH && STm 1670 drivers/scsi/st.c if (st_compression(STp, (STm->default_compression == ST_YES))) { STm 1748 drivers/scsi/st.c STm->do_async_writes && STps->eof < ST_EOM_OK; STm 1750 drivers/scsi/st.c if (STp->block_size != 0 && STm->do_buffer_writes && STm 1905 drivers/scsi/st.c struct st_modedef *STm; STm 1913 drivers/scsi/st.c STm = &(STp->modes[STp->current_mode]); STm 1922 drivers/scsi/st.c if (!(STp->try_dio_now && try_rdio) && STm->do_read_ahead) { STm 2103 drivers/scsi/st.c struct st_modedef *STm; STm 2114 drivers/scsi/st.c STm = &(STp->modes[STp->current_mode]); STm 2116 drivers/scsi/st.c if (!STm->do_read_ahead) { STm 2244 drivers/scsi/st.c static void st_log_options(struct scsi_tape * STp, struct st_modedef * STm) STm 2250 drivers/scsi/st.c STp->current_mode, STm->do_buffer_writes, STm 2251 drivers/scsi/st.c STm->do_async_writes, STm->do_read_ahead); STm 2260 drivers/scsi/st.c STm->defaults_for_writes, STp->omit_blklims, STm 2265 drivers/scsi/st.c STm->sysv, STp->immediate, STp->sili, STm 2277 drivers/scsi/st.c struct st_modedef *STm; STm 2281 drivers/scsi/st.c STm = &(STp->modes[STp->current_mode]); STm 2282 drivers/scsi/st.c if (!STm->defined) { STm 2283 drivers/scsi/st.c cd0 = STm->cdevs[0]; STm 2284 drivers/scsi/st.c cd1 = STm->cdevs[1]; STm 2285 drivers/scsi/st.c d0 = STm->devs[0]; STm 2286 drivers/scsi/st.c d1 = STm->devs[1]; STm 2287 drivers/scsi/st.c memcpy(STm, &(STp->modes[0]), sizeof(struct st_modedef)); STm 2288 drivers/scsi/st.c STm->cdevs[0] = cd0; STm 2289 drivers/scsi/st.c STm->cdevs[1] = cd1; STm 2290 drivers/scsi/st.c STm->devs[0] = d0; STm 2291 drivers/scsi/st.c STm->devs[1] = d1; STm 2299 drivers/scsi/st.c STm->do_buffer_writes = (options & MT_ST_BUFFER_WRITES) != 0; STm 2300 drivers/scsi/st.c STm->do_async_writes = (options & MT_ST_ASYNC_WRITES) != 0; STm 2301 drivers/scsi/st.c STm->defaults_for_writes = (options & MT_ST_DEF_WRITES) != 0; STm 2302 drivers/scsi/st.c STm->do_read_ahead = (options & MT_ST_READ_AHEAD) != 0; STm 2313 drivers/scsi/st.c STm->sysv = (options & MT_ST_SYSV) != 0; STm 2316 drivers/scsi/st.c st_log_options(STp, STm); ) STm 2320 drivers/scsi/st.c STm->do_buffer_writes = value; STm 2322 drivers/scsi/st.c STm->do_async_writes = value; STm 2324 drivers/scsi/st.c STm->defaults_for_writes = value; STm 2326 drivers/scsi/st.c STm->do_read_ahead = value; STm 2347 drivers/scsi/st.c STm->sysv = value; STm 2353 drivers/scsi/st.c st_log_options(STp, STm); ) STm 2359 drivers/scsi/st.c STm->default_blksize = (-1); STm 2362 drivers/scsi/st.c STm->default_blksize = value; STm 2364 drivers/scsi/st.c "%d bytes.\n", STm->default_blksize); STm 2367 drivers/scsi/st.c set_mode_densblk(STp, STm); STm 2399 drivers/scsi/st.c STm->default_density = (-1); STm 2403 drivers/scsi/st.c STm->default_density = value & 0xff; STm 2405 drivers/scsi/st.c STm->default_density); STm 2408 drivers/scsi/st.c set_mode_densblk(STp, STm); STm 2426 drivers/scsi/st.c STm->default_compression = ST_DONT_TOUCH; STm 2437 drivers/scsi/st.c STm->default_compression = (value & 1 ? ST_YES : ST_NO); STm 2443 drivers/scsi/st.c st_compression(STp, (STm->default_compression == ST_YES)); STm 3509 drivers/scsi/st.c struct st_modedef *STm; STm 3523 drivers/scsi/st.c STm = &(STp->modes[STp->current_mode]); STm 3560 drivers/scsi/st.c if (!STm->defined && STm 3730 drivers/scsi/st.c if (!STm->defined) { STm 3796 drivers/scsi/st.c if (STm->do_async_writes || STm 3797 drivers/scsi/st.c (STm->do_buffer_writes && STp->block_size != 0) || STm 4177 drivers/scsi/st.c struct st_modedef *STm = &(tape->modes[mode]); STm 4191 drivers/scsi/st.c STm->cdevs[rew] = cdev; STm 4213 drivers/scsi/st.c STm->devs[rew] = dev; STm 4217 drivers/scsi/st.c cdev_del(STm->cdevs[rew]); STm 4219 drivers/scsi/st.c STm->cdevs[rew] = NULL; STm 4220 drivers/scsi/st.c STm->devs[rew] = NULL; STm 4245 drivers/scsi/st.c struct st_modedef *STm = &(tape->modes[mode]); STm 4247 drivers/scsi/st.c if (STm->cdevs[rew]) STm 4248 drivers/scsi/st.c cdev_del(STm->cdevs[rew]); STm 4249 drivers/scsi/st.c if (STm->devs[rew]) STm 4250 drivers/scsi/st.c device_unregister(STm->devs[rew]); STm 4260 drivers/scsi/st.c struct st_modedef *STm; STm 4345 drivers/scsi/st.c STm = &(tpnt->modes[i]); STm 4346 drivers/scsi/st.c STm->defined = 0; STm 4347 drivers/scsi/st.c STm->sysv = ST_SYSV; STm 4348 drivers/scsi/st.c STm->defaults_for_writes = 0; STm 4349 drivers/scsi/st.c STm->do_async_writes = ST_ASYNC_WRITES; STm 4350 drivers/scsi/st.c STm->do_buffer_writes = ST_BUFFER_WRITES; STm 4351 drivers/scsi/st.c STm->do_read_ahead = ST_READ_AHEAD; STm 4352 drivers/scsi/st.c STm->default_compression = ST_DONT_TOUCH; STm 4353 drivers/scsi/st.c STm->default_blksize = (-1); /* No forced size */ STm 4354 drivers/scsi/st.c STm->default_density = (-1); /* No forced density */ STm 4355 drivers/scsi/st.c STm->tape = tpnt; STm 4605 drivers/scsi/st.c struct st_modedef *STm = dev_get_drvdata(dev); STm 4608 drivers/scsi/st.c l = snprintf(buf, PAGE_SIZE, "%d\n", STm->defined); STm 4617 drivers/scsi/st.c struct st_modedef *STm = dev_get_drvdata(dev); STm 4620 drivers/scsi/st.c l = snprintf(buf, PAGE_SIZE, "%d\n", STm->default_blksize); STm 4629 drivers/scsi/st.c struct st_modedef *STm = dev_get_drvdata(dev); STm 4633 drivers/scsi/st.c fmt = STm->default_density >= 0 ? "0x%02x\n" : "%d\n"; STm 4634 drivers/scsi/st.c l = snprintf(buf, PAGE_SIZE, fmt, STm->default_density); STm 4643 drivers/scsi/st.c struct st_modedef *STm = dev_get_drvdata(dev); STm 4646 drivers/scsi/st.c l = snprintf(buf, PAGE_SIZE, "%d\n", STm->default_compression - 1); STm 4654 drivers/scsi/st.c struct st_modedef *STm = dev_get_drvdata(dev); STm 4655 drivers/scsi/st.c struct scsi_tape *STp = STm->tape; STm 4659 drivers/scsi/st.c options = STm->do_buffer_writes ? MT_ST_BUFFER_WRITES : 0; STm 4660 drivers/scsi/st.c options |= STm->do_async_writes ? MT_ST_ASYNC_WRITES : 0; STm 4661 drivers/scsi/st.c options |= STm->do_read_ahead ? MT_ST_READ_AHEAD : 0; STm 4665 drivers/scsi/st.c options |= STm->defaults_for_writes ? MT_ST_DEF_WRITES : 0; STm 4670 drivers/scsi/st.c options |= STm->sysv ? MT_ST_SYSV : 0; STm 4691 drivers/scsi/st.c struct st_modedef *STm = dev_get_drvdata(dev); STm 4694 drivers/scsi/st.c (long long)atomic64_read(&STm->tape->stats->read_cnt)); STm 4709 drivers/scsi/st.c struct st_modedef *STm = dev_get_drvdata(dev); STm 4712 drivers/scsi/st.c (long long)atomic64_read(&STm->tape->stats->read_byte_cnt)); STm 4725 drivers/scsi/st.c struct st_modedef *STm = dev_get_drvdata(dev); STm 4728 drivers/scsi/st.c (long long)atomic64_read(&STm->tape->stats->tot_read_time)); STm 4742 drivers/scsi/st.c struct st_modedef *STm = dev_get_drvdata(dev); STm 4745 drivers/scsi/st.c (long long)atomic64_read(&STm->tape->stats->write_cnt)); STm 4759 drivers/scsi/st.c struct st_modedef *STm = dev_get_drvdata(dev); STm 4762 drivers/scsi/st.c (long long)atomic64_read(&STm->tape->stats->write_byte_cnt)); STm 4776 drivers/scsi/st.c struct st_modedef *STm = dev_get_drvdata(dev); STm 4779 drivers/scsi/st.c (long long)atomic64_read(&STm->tape->stats->tot_write_time)); STm 4794 drivers/scsi/st.c struct st_modedef *STm = dev_get_drvdata(dev); STm 4797 drivers/scsi/st.c (long long)atomic64_read(&STm->tape->stats->in_flight)); STm 4814 drivers/scsi/st.c struct st_modedef *STm = dev_get_drvdata(dev); STm 4817 drivers/scsi/st.c (long long)atomic64_read(&STm->tape->stats->tot_io_time)); STm 4833 drivers/scsi/st.c struct st_modedef *STm = dev_get_drvdata(dev); STm 4836 drivers/scsi/st.c (long long)atomic64_read(&STm->tape->stats->other_cnt)); STm 4851 drivers/scsi/st.c struct st_modedef *STm = dev_get_drvdata(dev); STm 4854 drivers/scsi/st.c (long long)atomic64_read(&STm->tape->stats->resid_cnt));