summaryrefslogtreecommitdiff
path: root/drivers/scsi/st.h
diff options
context:
space:
mode:
authorMartin K. Petersen <martin.petersen@oracle.com>2025-02-03 17:52:32 -0500
committerMartin K. Petersen <martin.petersen@oracle.com>2025-02-03 17:52:32 -0500
commit026476271efe817b970ea360981ee77919bcdbad (patch)
treee783ed2abbd6d274683c5fc13dc2ac440809d979 /drivers/scsi/st.h
parent14807b4a4e03b66c26f4c82f495fc8fbe35fb95d (diff)
parent2c445d5f832a51dfd8527fcce7323f79d37c0432 (diff)
Merge patch series "scsi: st: scsi_error: More reset patches"
Kai Mäkisara <Kai.Makisara@kolumbus.fi> says: 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. Link: https://lore.kernel.org/r/20250120194925.44432-1-Kai.Makisara@kolumbus.fi Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/st.h')
-rw-r--r--drivers/scsi/st.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/st.h b/drivers/scsi/st.h
index 1aaaf5369a40..0d7c4b8c2c8a 100644
--- a/drivers/scsi/st.h
+++ b/drivers/scsi/st.h
@@ -165,6 +165,7 @@ struct scsi_tape {
unsigned char compression_changed;
unsigned char drv_buffer;
unsigned char density;
+ unsigned char changed_density;
unsigned char door_locked;
unsigned char autorew_dev; /* auto-rewind device */
unsigned char rew_at_close; /* rewind necessary at close */
@@ -172,11 +173,16 @@ struct scsi_tape {
unsigned char cleaning_req; /* cleaning requested? */
unsigned char first_tur; /* first TEST UNIT READY */
int block_size;
+ int changed_blksize;
int min_block;
int max_block;
int recover_count; /* From tape opening */
int recover_reg; /* From last status call */
+ /* The saved values of midlevel counters */
+ unsigned int new_media_ctr;
+ unsigned int por_ctr;
+
#if DEBUG
unsigned char write_pending;
int nbr_finished;