Be sure to clear was_reset when ever we clear pos_unknown. If we don't then the code in st_chk_result() will turn on pos_unknown again. STp->pos_unknown |= STp->device->was_reset; This results in confusion as future commands fail unexpectedly. Signed-off-by: John Meneghini <jmeneghi@xxxxxxxxxx> --- drivers/scsi/st.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index 9c0f9779768e..e9d1cb6c8a86 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c @@ -1083,6 +1083,7 @@ static int check_tape(struct scsi_tape *STp, struct file *filp) if (retval == CHKRES_NEW_SESSION) { STp->pos_unknown = 0; + STp->device->was_reset = 0; STp->partition = STp->new_partition = 0; if (STp->can_partitions) STp->nbr_partitions = 1; /* This guess will be updated later -- 2.47.0