Skip to content

scsi: st: improve pos_unknown handling after reset

John Meneghini linux-scsi 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3scsi: st: instrument the pos_unknown codedrivers/scsi/st.c+31 -00 replies
2/3scsi: st: clear was_reset when CHKRES_NEW_SESSIONdrivers/scsi/st.c+1 -05 replies
3/3scsi: st: clear pos_unknown when the por ua is expecteddrivers/scsi/st.c+22 -92 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchLaurence ObermanJohn Meneghini
1/3R-b T-b
2/3
3/3T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] scsi: st: improve pos_unknown handling after reset

These patches address some issues with positoin lost handling which where introduced by commit 9604eea5bd3a ("scsi: st: Add third party poweron reset handling"). That commit added code which detected any unexpected power on/reset unit attention to st_chk_results() and correclty set pos_unknown in the driver.

However, the aforementioned changes is catching POR UAs that are expected as well as those that are unexpected as st_chk_results() sets pos_unknown every time a POR UA is seen. This results in a change of behavior that is confusing as some tape drives can set a POR UA when the system reboots, the driver reloads, or a tape is reloaded. This results in regressions as MTIOGET now fails following and kind of reset.

These issues are documented in the kernel bugzilla:

A reproducer test script can be found at:

John Meneghini (3):
scsi: st: instrument the pos_unknown code
scsi: st: clear was_reset when CHKRES_NEW_SESSION
scsi: st: clear pos_unknown when the por ua is expected

 drivers/scsi/st.c | 63 ++++++++++++++++++++++++++++++++++++++++-------
 1 file changed, 54 insertions(+), 9 deletions(-)
Signature · 1 line
2.47.0