diff options
| author | Laurence Oberman <loberman@redhat.com> | 2026-09-29 15:28:20 -0400 |
|---|---|---|
| committer | Martin K. Petersen (Oracle) <mkp@kernel.org> | 2026-10-03 10:29:48 -0400 |
| commit | 614f374472127b8e279fc14bb6c45a23319f6b96 (patch) | |
| tree | 5446aee5ac0433d6a498927c82a32b65e899eec4 /tools/lib/python/kdoc/python_version.py | |
| parent | 54ee0ee9bdeb7e9d3b70cc5c2bdf7e58c4423e8d (diff) | |
| download | linux-next-614f374472127b8e279fc14bb6c45a23319f6b96.tar.gz linux-next-614f374472127b8e279fc14bb6c45a23319f6b96.zip | |
scsi: st: Restore the drive buffering mode after reset
A device reset also returns the drive's buffered mode to its default.
check_tape() reads the buffered mode with MODE SENSE on every open, so st
follows the drive and a mode set by the user with MTSETDRVBUFFER is lost
without any indication. The value is also written back by every later MODE
SELECT, including the one that restores a changed block size.
Unlike density and block size, the buffered mode has no "changed" state
that could be used to restore it. Record the value set with MTSETDRVBUFFER
and restore it after a reset together with density and block size: when
MTREW, MTSEEK or MTEOM clear the reset condition, and after MTLOAD and
MTRETEN. It is restored first, so that the MODE SELECTs for density and
block size carry the right value.
The buffered mode is a drive setting, not a property of the medium, so it
is not cleared when a new session starts.
Suggested-by: Kai Mäkisara <Kai.Makisara@kolumbus.fi>
Assisted-by: Claude sashiko
Signed-off-by: Laurence Oberman <loberman@redhat.com>
Reviewed-by: Kai Mäkisara <kai.makisara@kolumbus.fi>
Link: https://patch.msgid.link/20260929192821.997675-4-loberman@redhat.com
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions
