]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
scsi: st: Restore some drive settings after reset
authorKai Mäkisara <Kai.Makisara@kolumbus.fi>
Mon, 20 Jan 2025 19:49:22 +0000 (21:49 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2025 12:38:04 +0000 (14:38 +0200)
commit2c6387f545be6365e8ed223790c6ffe2d6856734
tree18f0774ba623baf8a52ac04ae29b379e0c1ad64a
parent7e25573e1ac5ca074513e0a3726372b51e0993e8
scsi: st: Restore some drive settings after reset

[ Upstream commit 7081dc75df79696d8322d01821c28e53416c932c ]

Some of the allowed operations put the tape into a known position to
continue operation assuming only the tape position has changed.  But reset
sets partition, density and block size to drive default values. These
should be restored to the values before reset.

Normally the current block size and density are stored by the drive.  If
the settings have been changed, the changed values have to be saved by the
driver across reset.

Signed-off-by: Kai Mäkisara <Kai.Makisara@kolumbus.fi>
Link: https://lore.kernel.org/r/20250120194925.44432-2-Kai.Makisara@kolumbus.fi
Reviewed-by: John Meneghini <jmeneghi@redhat.com>
Tested-by: John Meneghini <jmeneghi@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/st.c
drivers/scsi/st.h