summaryrefslogtreecommitdiff
path: root/drivers/scsi/mpi3mr/mpi3mr.h
diff options
context:
space:
mode:
authorKashyap Desai <kashyap.desai@broadcom.com>2021-05-20 20:55:26 +0530
committerMartin K. Petersen <martin.petersen@oracle.com>2021-06-02 00:56:16 -0400
commit672ae26c82166d63e0352403b7ea16ab4705edc1 (patch)
treea9225efc1eb5e2722cd41e455b655e868fde1dc6 /drivers/scsi/mpi3mr/mpi3mr.h
parent023ab2a9b4edd4b1b109d1982cd80e10c327fbb2 (diff)
downloadlinux-672ae26c82166d63e0352403b7ea16ab4705edc1.tar.gz
linux-672ae26c82166d63e0352403b7ea16ab4705edc1.tar.bz2
linux-672ae26c82166d63e0352403b7ea16ab4705edc1.zip
scsi: mpi3mr: Add support for internal watchdog thread
The watchdog thread is the driver's internal thread which does a few things such as detecting firmware faults, resetting the controller, performing timestamp sync, etc. Link: https://lore.kernel.org/r/20210520152545.2710479-6-kashyap.desai@broadcom.com Cc: sathya.prakash@broadcom.com Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/mpi3mr/mpi3mr.h')
-rw-r--r--drivers/scsi/mpi3mr/mpi3mr.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/scsi/mpi3mr/mpi3mr.h b/drivers/scsi/mpi3mr/mpi3mr.h
index 4b3b76c7c6ff..1151a9435f3f 100644
--- a/drivers/scsi/mpi3mr/mpi3mr.h
+++ b/drivers/scsi/mpi3mr/mpi3mr.h
@@ -481,6 +481,10 @@ struct scmd_priv {
* @sense_buf_q_dma: Sense buffer queue DMA address
* @sbq_lock: Sense buffer queue lock
* @sbq_host_index: Sense buffer queuehost index
+ * @watchdog_work_q_name: Fault watchdog worker thread name
+ * @watchdog_work_q: Fault watchdog worker thread
+ * @watchdog_work: Fault watchdog work
+ * @watchdog_lock: Fault watchdog lock
* @is_driver_loading: Is driver still loading
* @scan_started: Async scan started
* @scan_failed: Asycn scan failed
@@ -494,6 +498,7 @@ struct scmd_priv {
* @chain_buf_lock: Chain buffer list lock
* @reset_in_progress: Reset in progress flag
* @unrecoverable: Controller unrecoverable flag
+ * @diagsave_timeout: Diagnostic information save timeout
* @logging_level: Controller debug logging level
* @current_event: Firmware event currently in process
* @driver_info: Driver, Kernel, OS information to firmware
@@ -575,6 +580,11 @@ struct mpi3mr_ioc {
spinlock_t sbq_lock;
u32 sbq_host_index;
+ char watchdog_work_q_name[20];
+ struct workqueue_struct *watchdog_work_q;
+ struct delayed_work watchdog_work;
+ spinlock_t watchdog_lock;
+
u8 is_driver_loading;
u8 scan_started;
u16 scan_failed;
@@ -592,6 +602,7 @@ struct mpi3mr_ioc {
u8 reset_in_progress;
u8 unrecoverable;
+ u16 diagsave_timeout;
int logging_level;
struct mpi3mr_fwevt *current_event;