Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scsi: smartpqi: Fix kdump issue when controller is locked up

Avoid dropping into shell if the controller is in locked up state.

Driver issues SIS soft reset to bring back the controller to SIS mode while
OS boots into kdump mode.

If the controller is in lockup state, SIS soft reset does not work.

Since the controller lockup code has not been cleared, driver considers the
firmware is no longer up and running. Driver returns back an error code to
OS and the kdump fails.

Link: https://lore.kernel.org/r/164375212337.440833.11955356190354940369.stgit@brunhilda.pdev.net
Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com>
Reviewed-by: Scott Benesh <scott.benesh@microchip.com>
Reviewed-by: Scott Teel <scott.teel@microchip.com>
Signed-off-by: Mahesh Rajashekhara <mahesh.rajashekhara@microchip.com>
Signed-off-by: Don Brace <don.brace@microchip.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Mahesh Rajashekhara and committed by
Martin K. Petersen
3ada501d 27655e9d

+23 -16
+23 -16
drivers/scsi/smartpqi/smartpqi_init.c
··· 7986 7986 return pqi_revert_to_sis_mode(ctrl_info); 7987 7987 } 7988 7988 7989 + static void pqi_perform_lockup_action(void) 7990 + { 7991 + switch (pqi_lockup_action) { 7992 + case PANIC: 7993 + panic("FATAL: Smart Family Controller lockup detected"); 7994 + break; 7995 + case REBOOT: 7996 + emergency_restart(); 7997 + break; 7998 + case NONE: 7999 + default: 8000 + break; 8001 + } 8002 + } 8003 + 7989 8004 static int pqi_ctrl_init(struct pqi_ctrl_info *ctrl_info) 7990 8005 { 7991 8006 int rc; ··· 8025 8010 * commands. 8026 8011 */ 8027 8012 rc = sis_wait_for_ctrl_ready(ctrl_info); 8028 - if (rc) 8013 + if (rc) { 8014 + if (reset_devices) { 8015 + dev_err(&ctrl_info->pci_dev->dev, 8016 + "kdump init failed with error %d\n", rc); 8017 + pqi_lockup_action = REBOOT; 8018 + pqi_perform_lockup_action(); 8019 + } 8029 8020 return rc; 8021 + } 8030 8022 8031 8023 /* 8032 8024 * Get the controller properties. This allows us to determine ··· 8756 8734 ssleep(delay_secs); 8757 8735 8758 8736 return pqi_ctrl_init_resume(ctrl_info); 8759 - } 8760 - 8761 - static void pqi_perform_lockup_action(void) 8762 - { 8763 - switch (pqi_lockup_action) { 8764 - case PANIC: 8765 - panic("FATAL: Smart Family Controller lockup detected"); 8766 - break; 8767 - case REBOOT: 8768 - emergency_restart(); 8769 - break; 8770 - case NONE: 8771 - default: 8772 - break; 8773 - } 8774 8737 } 8775 8738 8776 8739 static struct pqi_raid_error_info pqi_ctrl_offline_raid_error_info = {