Commit e57a1f9b authored by Kevin Barnett's avatar Kevin Barnett Committed by Martin K. Petersen

scsi: smartpqi: correct controller offline issue

Fixes: 6c223761 'smartpqi: initial commit of Microsemi smartpqi driver'

Fixed a bug where the driver would not free all of the
controller resources if the controller ever went offline.
Reviewed-by: default avatarScott Teel <scott.teel@microsemi.com>
Reviewed-by: default avatarScott Benesh <scott.benesh@microsemi.com>
Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: default avatarTomas Henzl <thenzl@redhat.com>
Signed-off-by: default avatarKevin Barnett <kevin.barnett@microsemi.com>
Signed-off-by: default avatarDon Brace <don.brace@microsemi.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent ff6abb73
...@@ -5609,19 +5609,14 @@ static void pqi_free_ctrl_resources(struct pqi_ctrl_info *ctrl_info) ...@@ -5609,19 +5609,14 @@ static void pqi_free_ctrl_resources(struct pqi_ctrl_info *ctrl_info)
static void pqi_remove_ctrl(struct pqi_ctrl_info *ctrl_info) static void pqi_remove_ctrl(struct pqi_ctrl_info *ctrl_info)
{ {
int rc;
if (ctrl_info->controller_online) {
cancel_delayed_work_sync(&ctrl_info->rescan_work); cancel_delayed_work_sync(&ctrl_info->rescan_work);
cancel_delayed_work_sync(&ctrl_info->update_time_work); cancel_delayed_work_sync(&ctrl_info->update_time_work);
pqi_remove_all_scsi_devices(ctrl_info); pqi_remove_all_scsi_devices(ctrl_info);
pqi_unregister_scsi(ctrl_info); pqi_unregister_scsi(ctrl_info);
ctrl_info->controller_online = false;
}
if (ctrl_info->pqi_mode_enabled) { if (ctrl_info->pqi_mode_enabled) {
sis_disable_msix(ctrl_info); sis_disable_msix(ctrl_info);
rc = pqi_reset(ctrl_info); if (pqi_reset(ctrl_info) == 0)
if (rc == 0)
sis_reenable_sis_mode(ctrl_info); sis_reenable_sis_mode(ctrl_info);
} }
pqi_free_ctrl_resources(ctrl_info); pqi_free_ctrl_resources(ctrl_info);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment