summaryrefslogtreecommitdiff
path: root/drivers/scsi/smartpqi/smartpqi_sis.c
diff options
context:
space:
mode:
authorKevin Barnett <kevin.barnett@hpe.com>2017-05-04 02:52:46 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2017-06-13 03:48:02 +0300
commit162d7753fce9a00719c09dfebd9fee3855e27fbe (patch)
treef126532ee1c17e44e3aabcc5781b8146591f9222 /drivers/scsi/smartpqi/smartpqi_sis.c
parent5b0fba0f408777113eff93bd18ab0b9f80760fb7 (diff)
downloadlinux-162d7753fce9a00719c09dfebd9fee3855e27fbe.tar.xz
scsi: smartpqi: ensure controller is in SIS mode at init
put in SIS mode during initialization. support kexec/kdump Reviewed-by: Scott Benesh <scott.benesh@microsemi.com> Reviewed-by: Scott Teel <scott.teel@microsemi.com> Signed-off-by: Kevin Barnett <kevin.barnett@microsemi.com> Signed-off-by: Don Brace <don.brace@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/smartpqi/smartpqi_sis.c')
-rw-r--r--drivers/scsi/smartpqi/smartpqi_sis.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/smartpqi/smartpqi_sis.c b/drivers/scsi/smartpqi/smartpqi_sis.c
index c7d9ea10b02a..c5325a4d0f0f 100644
--- a/drivers/scsi/smartpqi/smartpqi_sis.c
+++ b/drivers/scsi/smartpqi/smartpqi_sis.c
@@ -127,6 +127,12 @@ bool sis_is_firmware_running(struct pqi_ctrl_info *ctrl_info)
return running;
}
+bool sis_is_kernel_up(struct pqi_ctrl_info *ctrl_info)
+{
+ return readl(&ctrl_info->registers->sis_firmware_status) &
+ SIS_CTRL_KERNEL_UP;
+}
+
/* used for passing command parameters/results when issuing SIS commands */
struct sis_sync_cmd_params {
u32 mailbox[6]; /* mailboxes 0-5 */