提交 3627dba5 编写于 作者: S Sreekanth Reddy 提交者: James Bottomley

[SCSI] mpt2sas: Change in MPI2_RAID_ACTION_SYSTEM_SHUTDOWN_INITIATED notification methodology

The intent of this patch is to perform a graceful shutdown of target drives even if
volume doesn't exits. Changes done in this patch

1. Removed the check for the presence of volumes before sending down
   MPI2_RAID_ACTION_SYSTEM_SHUTDOWN_INITIATED. Therefore, this RAID action
   would be sent if the card is IR Firmware.

2. The MPI2_RAID_ACTION_SYSTEM_SHUTDOWN_INITIATED is sent even when the
   system undergoes suspend (in addition to remove/shutdown which was already
   present)
Signed-off-by: NSreekanth Reddy <Sreekanth.Reddy@lsi.com>
Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
上级 6409a7d0
...@@ -7710,10 +7710,6 @@ _scsih_ir_shutdown(struct MPT2SAS_ADAPTER *ioc) ...@@ -7710,10 +7710,6 @@ _scsih_ir_shutdown(struct MPT2SAS_ADAPTER *ioc)
if (!ioc->ir_firmware) if (!ioc->ir_firmware)
return; return;
/* are there any volumes ? */
if (list_empty(&ioc->raid_device_list))
return;
mutex_lock(&ioc->scsih_cmds.mutex); mutex_lock(&ioc->scsih_cmds.mutex);
if (ioc->scsih_cmds.status != MPT2_CMD_NOT_USED) { if (ioc->scsih_cmds.status != MPT2_CMD_NOT_USED) {
...@@ -8280,6 +8276,7 @@ _scsih_suspend(struct pci_dev *pdev, pm_message_t state) ...@@ -8280,6 +8276,7 @@ _scsih_suspend(struct pci_dev *pdev, pm_message_t state)
mpt2sas_base_stop_watchdog(ioc); mpt2sas_base_stop_watchdog(ioc);
scsi_block_requests(shost); scsi_block_requests(shost);
_scsih_ir_shutdown(ioc);
device_state = pci_choose_state(pdev, state); device_state = pci_choose_state(pdev, state);
printk(MPT2SAS_INFO_FMT "pdev=0x%p, slot=%s, entering " printk(MPT2SAS_INFO_FMT "pdev=0x%p, slot=%s, entering "
"operating state [D%d]\n", ioc->name, pdev, "operating state [D%d]\n", ioc->name, pdev,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册