From: Kai Mäkisara Date: Tue, 11 Mar 2025 11:25:15 +0000 (+0200) Subject: scsi: st: ERASE does not change tape location X-Git-Tag: v6.14.9~620 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=198c272a9f70750a1a4dac52cb9b03c194565b72;p=thirdparty%2Fkernel%2Fstable.git scsi: st: ERASE does not change tape location [ Upstream commit ad77cebf97bd42c93ab4e3bffd09f2b905c1959a ] The SCSI ERASE command erases from the current position onwards. Don't clear the position variables. Signed-off-by: Kai Mäkisara Link: https://lore.kernel.org/r/20250311112516.5548-3-Kai.Makisara@kolumbus.fi Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index 2a18ba51427ac..4add423f2f415 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c @@ -2897,7 +2897,6 @@ static int st_int_ioctl(struct scsi_tape *STp, unsigned int cmd_in, unsigned lon timeout = STp->long_timeout * 8; DEBC_printk(STp, "Erasing tape.\n"); - fileno = blkno = at_sm = 0; break; case MTSETBLK: /* Set block length */ case MTSETDENSITY: /* Set tape density */