]> www.infradead.org Git - users/jedix/linux-maple.git/commit
scsi: st: Modify st.c to use the new scsi_error counters
authorKai Mäkisara <Kai.Makisara@kolumbus.fi>
Mon, 20 Jan 2025 19:49:24 +0000 (21:49 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 3 Feb 2025 22:43:31 +0000 (17:43 -0500)
commit341128dfe10a7c8681d86e81b5bc63902da644ef
tree1eaa84acc9d5cbe5f1f1c2d5af56bf5fc74ba82b
parenta5d518cd4e3e592eaa59b888a5d75ad639d554ea
scsi: st: Modify st.c to use the new scsi_error counters

Compare the stored values of por_ctr and new_media_ctr against the values
in the device struct. In case of mismatch, the Unit Attention corresponding
to the counter has happened.  This is a safeguard against another ULD
catching the Unit Attention sense data.

Macros scsi_get_ua_new_media_ctr and scsi_get_ua_por_ctr are added to read
the current values of the counters.

Signed-off-by: Kai Mäkisara <Kai.Makisara@kolumbus.fi>
Link: https://lore.kernel.org/r/20250120194925.44432-4-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>
drivers/scsi/st.c
drivers/scsi/st.h
include/scsi/scsi_device.h