提交 f84e8b5b 编写于 作者: S Sreekanth Reddy 提交者: Martin K. Petersen

scsi: mpi3mr: Scan the devices during resume time

Scan the target devices during system resume time and add or remove the
target device with the SML if the corresponding target device is newly
added or removed respectively.

Link: https://lore.kernel.org/r/20220912135742.11764-8-sreekanth.reddy@broadcom.comSigned-off-by: NSreekanth Reddy <sreekanth.reddy@broadcom.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 130fc180
...@@ -132,6 +132,8 @@ extern atomic64_t event_counter; ...@@ -132,6 +132,8 @@ extern atomic64_t event_counter;
#define MPI3MR_DEFAULT_CFG_PAGE_SZ 1024 /* in bytes */ #define MPI3MR_DEFAULT_CFG_PAGE_SZ 1024 /* in bytes */
#define MPI3MR_RESET_TOPOLOGY_SETTLE_TIME 10
#define MPI3MR_SCMD_TIMEOUT (60 * HZ) #define MPI3MR_SCMD_TIMEOUT (60 * HZ)
#define MPI3MR_EH_SCMD_TIMEOUT (60 * HZ) #define MPI3MR_EH_SCMD_TIMEOUT (60 * HZ)
......
...@@ -4042,10 +4042,8 @@ int mpi3mr_reinit_ioc(struct mpi3mr_ioc *mrioc, u8 is_resume) ...@@ -4042,10 +4042,8 @@ int mpi3mr_reinit_ioc(struct mpi3mr_ioc *mrioc, u8 is_resume)
goto out_failed; goto out_failed;
} }
if (!is_resume) { mrioc->device_refresh_on = 1;
mrioc->device_refresh_on = 1; mpi3mr_add_event_wait_for_device_refresh(mrioc);
mpi3mr_add_event_wait_for_device_refresh(mrioc);
}
ioc_info(mrioc, "sending port enable\n"); ioc_info(mrioc, "sending port enable\n");
retval = mpi3mr_issue_port_enable(mrioc, 1); retval = mpi3mr_issue_port_enable(mrioc, 1);
...@@ -4912,7 +4910,7 @@ int mpi3mr_soft_reset_handler(struct mpi3mr_ioc *mrioc, ...@@ -4912,7 +4910,7 @@ int mpi3mr_soft_reset_handler(struct mpi3mr_ioc *mrioc,
mrioc->name, reset_reason); mrioc->name, reset_reason);
goto out; goto out;
} }
ssleep(10); ssleep(MPI3MR_RESET_TOPOLOGY_SETTLE_TIME);
out: out:
if (!retval) { if (!retval) {
......
...@@ -5228,13 +5228,17 @@ mpi3mr_resume(struct device *dev) ...@@ -5228,13 +5228,17 @@ mpi3mr_resume(struct device *dev)
} }
mrioc->stop_drv_processing = 0; mrioc->stop_drv_processing = 0;
mpi3mr_invalidate_devhandles(mrioc);
mpi3mr_free_enclosure_list(mrioc);
mpi3mr_memset_buffers(mrioc); mpi3mr_memset_buffers(mrioc);
r = mpi3mr_reinit_ioc(mrioc, 1); r = mpi3mr_reinit_ioc(mrioc, 1);
if (r) { if (r) {
ioc_err(mrioc, "resuming controller failed[%d]\n", r); ioc_err(mrioc, "resuming controller failed[%d]\n", r);
return r; return r;
} }
ssleep(MPI3MR_RESET_TOPOLOGY_SETTLE_TIME);
scsi_unblock_requests(shost); scsi_unblock_requests(shost);
mrioc->device_refresh_on = 0;
mpi3mr_start_watchdog(mrioc); mpi3mr_start_watchdog(mrioc);
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册