Lines Matching refs:STm

612 static int set_mode_densblk(Scsi_Tape * STp, ST_mode * STm)  in set_mode_densblk()  argument
619 STm->default_density >= 0 && in set_mode_densblk()
620 STm->default_density != STp->density) { in set_mode_densblk()
621 arg = STm->default_density; in set_mode_densblk()
627 STm->default_blksize >= 0 && in set_mode_densblk()
628 STm->default_blksize != STp->block_size) { in set_mode_densblk()
629 arg |= STm->default_blksize; in set_mode_densblk()
637 dev, STm->default_blksize, STm->default_density); in set_mode_densblk()
735 ST_mode *STm; in check_tape() local
749 STm = &(STp->modes[STp->current_mode]); in check_tape()
906 if (!(STm->defaults_for_writes) && in check_tape()
907 (retval = set_mode_densblk(STp, STm)) < 0) in check_tape()
1036 ST_mode *STm; in st_flush() local
1050 STm = &(STp->modes[STp->current_mode]); in st_flush()
1115 if (!STm->sysv || STps->rw != ST_READING) { in st_flush()
1202 ST_mode *STm; in st_write() local
1239 STm = &(STp->modes[STp->current_mode]); in st_write()
1240 if (!STm->defined) { in st_write()
1325 if ((retval = set_mode_densblk(STp, STm)) < 0) in st_write()
1327 if (STm->default_compression != ST_DONT_TOUCH && in st_write()
1329 if (st_compression(STp, (STm->default_compression == ST_YES))) { in st_write()
1358 if (!STm->do_buffer_writes) { in st_write()
1368 if (!STm->do_async_writes || STp->block_size > 0) in st_write()
1380 while ((STp->block_size == 0 && !STm->do_async_writes && count > 0) || in st_write()
1521 if (STm->do_async_writes && STp->block_size == 0) { in st_write()
1563 ST_mode *STm; in read_tape() local
1571 STm = &(STp->modes[STp->current_mode]); in read_tape()
1582 if (STm->do_read_ahead) { in read_tape()
1745 ST_mode *STm; in st_read() local
1781 STm = &(STp->modes[STp->current_mode]); in st_read()
1782 if (!STm->defined) { in st_read()
1818 if (!(STm->do_read_ahead) && STp->block_size != 0 && in st_read()
1936 static void st_log_options(Scsi_Tape * STp, ST_mode * STm, int dev) in st_log_options() argument
1940 dev, STp->current_mode, STm->do_buffer_writes, STm->do_async_writes, in st_log_options()
1941 STm->do_read_ahead); in st_log_options()
1947 dev, STm->defaults_for_writes, STp->omit_blklims, STp->can_partitions, in st_log_options()
1950 "st%d: sysv: %d nowait: %d\n", dev, STm->sysv, STp->immediate); in st_log_options()
1961 ST_mode *STm; in st_set_options() local
1964 STm = &(STp->modes[STp->current_mode]); in st_set_options()
1965 if (!STm->defined) { in st_set_options()
1966 memcpy(STm, &(STp->modes[0]), sizeof(ST_mode)); in st_set_options()
1975 STm->do_buffer_writes = (options & MT_ST_BUFFER_WRITES) != 0; in st_set_options()
1976 STm->do_async_writes = (options & MT_ST_ASYNC_WRITES) != 0; in st_set_options()
1977 STm->defaults_for_writes = (options & MT_ST_DEF_WRITES) != 0; in st_set_options()
1978 STm->do_read_ahead = (options & MT_ST_READ_AHEAD) != 0; in st_set_options()
1988 STm->sysv = (options & MT_ST_SYSV) != 0; in st_set_options()
1990 st_log_options(STp, STm, dev); in st_set_options()
1994 STm->do_buffer_writes = value; in st_set_options()
1996 STm->do_async_writes = value; in st_set_options()
1998 STm->defaults_for_writes = value; in st_set_options()
2000 STm->do_read_ahead = value; in st_set_options()
2019 STm->sysv = value; in st_set_options()
2023 st_log_options(STp, STm, dev); in st_set_options()
2029 STm->default_blksize = (-1); in st_set_options()
2032 STm->default_blksize = value; in st_set_options()
2034 dev, STm->default_blksize); in st_set_options()
2037 set_mode_densblk(STp, STm); in st_set_options()
2067 STm->default_density = (-1); in st_set_options()
2071 STm->default_density = value & 0xff; in st_set_options()
2073 dev, STm->default_density); in st_set_options()
2076 set_mode_densblk(STp, STm); in st_set_options()
2094 STm->default_compression = ST_DONT_TOUCH; in st_set_options()
2104 STm->default_compression = (value & 1 ? ST_YES : ST_NO); in st_set_options()
2109 st_compression(STp, (STm->default_compression == ST_YES)); in st_set_options()
3086 ST_mode *STm; in st_ioctl() local
3104 STm = &(STp->modes[STp->current_mode]); in st_ioctl()
3140 if (!STm->defined && in st_ioctl()
3293 if (!STm->defined) { in st_ioctl()
3359 if (STm->do_async_writes || in st_ioctl()
3360 (STm->do_buffer_writes && STp->block_size != 0) || in st_ioctl()
3789 ST_mode *STm; in st_attach() local
3920 STm = &(tpnt->modes[i]); in st_attach()
3921 STm->defined = FALSE; in st_attach()
3922 STm->sysv = ST_SYSV; in st_attach()
3923 STm->defaults_for_writes = 0; in st_attach()
3924 STm->do_async_writes = ST_ASYNC_WRITES; in st_attach()
3925 STm->do_buffer_writes = ST_BUFFER_WRITES; in st_attach()
3926 STm->do_read_ahead = ST_READ_AHEAD; in st_attach()
3927 STm->default_compression = ST_DONT_TOUCH; in st_attach()
3928 STm->default_blksize = (-1); /* No forced size */ in st_attach()
3929 STm->default_density = (-1); /* No forced density */ in st_attach()