summaryrefslogtreecommitdiff
path: root/include/scsi
diff options
context:
space:
mode:
authorKai Mäkisara <Kai.Makisara@kolumbus.fi>2025-01-20 21:49:23 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2025-02-03 17:43:31 -0500
commita5d518cd4e3e592eaa59b888a5d75ad639d554ea (patch)
treea07a4dcbac055daa54fe44ebe9583c39112e485a /include/scsi
parent7081dc75df79696d8322d01821c28e53416c932c (diff)
scsi: core: Add counters for New Media and Power On/Reset UNIT ATTENTIONs
The purpose of the counters is to enable all ULDs attached to a device to find out that a New Media or/and Power On/Reset Unit Attentions has/have been set, even if another ULD catches the Unit Attention as response to a SCSI command. The ULDs can read the counters and see if the values have changed from the previous check. Signed-off-by: Kai Mäkisara <Kai.Makisara@kolumbus.fi> Link: https://lore.kernel.org/r/20250120194925.44432-3-Kai.Makisara@kolumbus.fi Reviewed-by: John Meneghini <jmeneghi@redhat.com> Tested-by: John Meneghini <jmeneghi@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/scsi_device.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
index 7acd0ec82bb0..bcc76986096b 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
@@ -247,6 +247,9 @@ struct scsi_device {
unsigned int queue_stopped; /* request queue is quiesced */
bool offline_already; /* Device offline message logged */
+ unsigned int ua_new_media_ctr; /* Counter for New Media UNIT ATTENTIONs */
+ unsigned int ua_por_ctr; /* Counter for Power On / Reset UAs */
+
atomic_t disk_events_disable_depth; /* disable depth for disk events */
DECLARE_BITMAP(supported_events, SDEV_EVT_MAXBITS); /* supported events */