diff options
author | adam radford <aradford@gmail.com> | 2011-10-08 21:15:19 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-10-16 12:22:05 -0400 |
commit | e5f93a36f72c9817b989f573f7140e3dfbce0f49 (patch) | |
tree | f73c18e2583d6abe46d0cb9ed35f9c5ac1f43c0e /drivers/scsi/megaraid | |
parent | c8e858fe72230dd2ad07abcbec7c9f201672a8b4 (diff) |
[SCSI] megaraid_sas: Add driver workaround for PERC5/1068 kdump kernel panic
The following patch for megaraid_sas adds a driver workaround for
PERC5/1068 based controller FW that keeps a command from the main
kernel that the driver cannot cancel which was causing a kernel panic
in shutdown of the kdump kernel.
Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/megaraid')
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas.h | 1 | ||||
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas_base.c | 19 |
2 files changed, 19 insertions, 1 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h index 9ffb92daa58b..7375fde2ab4f 100644 --- a/drivers/scsi/megaraid/megaraid_sas.h +++ b/drivers/scsi/megaraid/megaraid_sas.h | |||
@@ -139,6 +139,7 @@ | |||
139 | #define MFI_CMD_ABORT 0x06 | 139 | #define MFI_CMD_ABORT 0x06 |
140 | #define MFI_CMD_SMP 0x07 | 140 | #define MFI_CMD_SMP 0x07 |
141 | #define MFI_CMD_STP 0x08 | 141 | #define MFI_CMD_STP 0x08 |
142 | #define MFI_CMD_INVALID 0xff | ||
142 | 143 | ||
143 | #define MR_DCMD_CTRL_GET_INFO 0x01010000 | 144 | #define MR_DCMD_CTRL_GET_INFO 0x01010000 |
144 | #define MR_DCMD_LD_GET_LIST 0x03010000 | 145 | #define MR_DCMD_LD_GET_LIST 0x03010000 |
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index ec09d5c2ed90..de2f47c439c7 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c | |||
@@ -215,6 +215,10 @@ megasas_return_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd) | |||
215 | 215 | ||
216 | cmd->scmd = NULL; | 216 | cmd->scmd = NULL; |
217 | cmd->frame_count = 0; | 217 | cmd->frame_count = 0; |
218 | if ((instance->pdev->device != PCI_DEVICE_ID_LSI_FUSION) && | ||
219 | (instance->pdev->device != PCI_DEVICE_ID_LSI_INVADER) && | ||
220 | (reset_devices)) | ||
221 | cmd->frame->hdr.cmd = MFI_CMD_INVALID; | ||
218 | list_add_tail(&cmd->list, &instance->cmd_pool); | 222 | list_add_tail(&cmd->list, &instance->cmd_pool); |
219 | 223 | ||
220 | spin_unlock_irqrestore(&instance->cmd_pool_lock, flags); | 224 | spin_unlock_irqrestore(&instance->cmd_pool_lock, flags); |
@@ -2165,7 +2169,16 @@ megasas_complete_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd, | |||
2165 | cmd->scmd->SCp.ptr = NULL; | 2169 | cmd->scmd->SCp.ptr = NULL; |
2166 | 2170 | ||
2167 | switch (hdr->cmd) { | 2171 | switch (hdr->cmd) { |
2168 | 2172 | case MFI_CMD_INVALID: | |
2173 | /* Some older 1068 controller FW may keep a pended | ||
2174 | MR_DCMD_CTRL_EVENT_GET_INFO left over from the main kernel | ||
2175 | when booting the kdump kernel. Ignore this command to | ||
2176 | prevent a kernel panic on shutdown of the kdump kernel. */ | ||
2177 | printk(KERN_WARNING "megaraid_sas: MFI_CMD_INVALID command " | ||
2178 | "completed.\n"); | ||
2179 | printk(KERN_WARNING "megaraid_sas: If you have a controller " | ||
2180 | "other than PERC5, please upgrade your firmware.\n"); | ||
2181 | break; | ||
2169 | case MFI_CMD_PD_SCSI_IO: | 2182 | case MFI_CMD_PD_SCSI_IO: |
2170 | case MFI_CMD_LD_SCSI_IO: | 2183 | case MFI_CMD_LD_SCSI_IO: |
2171 | 2184 | ||
@@ -2934,6 +2947,10 @@ static int megasas_create_frame_pool(struct megasas_instance *instance) | |||
2934 | memset(cmd->frame, 0, total_sz); | 2947 | memset(cmd->frame, 0, total_sz); |
2935 | cmd->frame->io.context = cmd->index; | 2948 | cmd->frame->io.context = cmd->index; |
2936 | cmd->frame->io.pad_0 = 0; | 2949 | cmd->frame->io.pad_0 = 0; |
2950 | if ((instance->pdev->device != PCI_DEVICE_ID_LSI_FUSION) && | ||
2951 | (instance->pdev->device != PCI_DEVICE_ID_LSI_INVADER) && | ||
2952 | (reset_devices)) | ||
2953 | cmd->frame->hdr.cmd = MFI_CMD_INVALID; | ||
2937 | } | 2954 | } |
2938 | 2955 | ||
2939 | return 0; | 2956 | return 0; |