]> www.infradead.org Git - users/jedix/linux-maple.git/commit
scsi: mpi3mr: Synchronous access b/w reset and tm thread for reply queue
authorRanjan Kumar <ranjan.kumar@broadcom.com>
Wed, 29 Jan 2025 10:08:49 +0000 (15:38 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 4 Feb 2025 02:46:40 +0000 (21:46 -0500)
commitf195fc060c738d303a21fae146dbf85e1595fb4c
treebdedc47da939065bb2bfe40b03b3eb38bb88badd
parent339a7b32a371a667dccfcd0e945add38f2cbe596
scsi: mpi3mr: Synchronous access b/w reset and tm thread for reply queue

When the task management thread processes reply queues while the reset
thread resets them, the task management thread accesses an invalid queue ID
(0xFFFF), set by the reset thread, which points to unallocated memory,
causing a crash.

Add flag 'io_admin_reset_sync' to synchronize access between the reset,
I/O, and admin threads. Before a reset, the reset handler sets this flag to
block I/O and admin processing threads. If any thread bypasses the initial
check, the reset thread waits up to 10 seconds for processing to finish. If
the wait exceeds 10 seconds, the controller is marked as unrecoverable.

Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com>
Signed-off-by: Ranjan Kumar <ranjan.kumar@broadcom.com>
Link: https://lore.kernel.org/r/20250129100850.25430-4-ranjan.kumar@broadcom.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/mpi3mr/mpi3mr.h
drivers/scsi/mpi3mr/mpi3mr_fw.c