mbox series

[v3,0/4] scsi: st: scsi_error: More reset patches

Message ID 20250120194925.44432-1-Kai.Makisara@kolumbus.fi
Headers show
Series scsi: st: scsi_error: More reset patches | expand

Message

Kai Mäkisara Jan. 20, 2025, 7:49 p.m. UTC
The first patch re-applies after device reset some settings changed
by the user (partition, density, block size).

The second and third patch address the case where more than one ULD
access the same device. The Unit Attention (UA) sense data is sent only
to one ULD and the others miss it. The st driver needs to find out
if device reset or media change has happened.

The second patch adds counters for New Media and Power On/Reset (POR)
Unit Attentions to the scsi_device struct. The third one changes st
so that these are used: if the value in the scsi_device struct does
not match the one stored locally, the corresponding UA has happened.
Use of the was_reset flag has been removed.

The fourth patch adds a file to sysfs to tell the user if reads/writes
to a tape are blocked following a device reset.
---
Changes since V2:
- applies to 6.13 + patch "scsi: st: Regression fix: Don't set
  pos_unknown just after device recognition"
- the UA counters changed to u16 (suggested by Bart van Assche)
- the macros to use the counters moved from patch 2 to patch 3
  (suggested by Bart Van Assche)
- remove clearing was_reset in patch 3 and not in patch 1

Changes since V1:
- replace the patch removing was_reset handling with patches two and three
- add sysfs file reset_blocked

Kai Mäkisara (4):
  scsi: st: Restore some drive settings after reset
  scsi: scsi_error: Add counters for New Media and Power On/Reset UNIT
    ATTENTIONs
  scsi: st: scsi_device: Modify st.c to use the new scsi_error counters
  scsi: st: Add sysfs file reset_blocked

 Documentation/scsi/st.rst  |  5 +++
 drivers/scsi/scsi_error.c  | 12 +++++++
 drivers/scsi/st.c          | 73 +++++++++++++++++++++++++++++++++-----
 drivers/scsi/st.h          |  6 ++++
 include/scsi/scsi_device.h |  9 +++++
 5 files changed, 97 insertions(+), 8 deletions(-)