Skip to content

Commit 9bcb1d5

Browse files
cp890582martinkpetersen
authored andcommitted
scsi: megaraid_sas: Add crash dump mode capability bit in MFI capabilities
In kdump kernel mode, the driver works in reduced functionality mode with some features disabled such as reduced MSI-X count and RDPQ disabled, etc. However, the firmware is not aware of this mode in some cases, which results in undefined behavior. To address this, the driver informs the firmware about the kdump mode through MPI capabilities bit during driver initialization. This allows firmware to adjust its behavior accordingly. Signed-off-by: Chandrakanth Patil <[email protected]> Signed-off-by: Sumit Saxena <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
1 parent bfa6591 commit 9bcb1d5

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

drivers/scsi/megaraid/megaraid_sas.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1760,7 +1760,8 @@ union megasas_sgl_frame {
17601760
typedef union _MFI_CAPABILITIES {
17611761
struct {
17621762
#if defined(__BIG_ENDIAN_BITFIELD)
1763-
u32 reserved:16;
1763+
u32 reserved:15;
1764+
u32 support_memdump:1;
17641765
u32 support_fw_exposed_dev_list:1;
17651766
u32 support_nvme_passthru:1;
17661767
u32 support_64bit_mode:1;
@@ -1794,7 +1795,8 @@ typedef union _MFI_CAPABILITIES {
17941795
u32 support_64bit_mode:1;
17951796
u32 support_nvme_passthru:1;
17961797
u32 support_fw_exposed_dev_list:1;
1797-
u32 reserved:16;
1798+
u32 support_memdump:1;
1799+
u32 reserved:15;
17981800
#endif
17991801
} mfi_capabilities;
18001802
__le32 reg;

drivers/scsi/megaraid/megaraid_sas_fusion.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,6 +1201,9 @@ megasas_ioc_init_fusion(struct megasas_instance *instance)
12011201
drv_ops->mfi_capabilities.support_nvme_passthru = 1;
12021202
drv_ops->mfi_capabilities.support_fw_exposed_dev_list = 1;
12031203

1204+
if (reset_devices)
1205+
drv_ops->mfi_capabilities.support_memdump = 1;
1206+
12041207
if (instance->consistent_mask_64bit)
12051208
drv_ops->mfi_capabilities.support_64bit_mode = 1;
12061209

0 commit comments

Comments
 (0)