megaraid_sas: complete outstanding IOCTLs before killing adapter
Driver calls megasas_complete_cmd() to call wake_up() for each MFI frame that was issued through the ioctl() interface prior to the kill adapter. This ensures userspace ioctl() system calls issued just before a kill adapter don't get stuck in wait state and IOCTLs are returned to the application. Cc: <stable@vger.kernel.org> Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com> Signed-off-by: Chaitra Basappa <chaitra.basappa@avagotech.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:

committed by
Christoph Hellwig

parent
c2ced1719a
commit
c8dd61eff2
@@ -2631,7 +2631,6 @@ int megasas_reset_fusion(struct Scsi_Host *shost, int iotimeout)
|
||||
instance->host->host_no);
|
||||
megaraid_sas_kill_hba(instance);
|
||||
instance->skip_heartbeat_timer_del = 1;
|
||||
instance->adprecovery = MEGASAS_HW_CRITICAL_ERROR;
|
||||
retval = FAILED;
|
||||
goto out;
|
||||
}
|
||||
@@ -2827,8 +2826,6 @@ int megasas_reset_fusion(struct Scsi_Host *shost, int iotimeout)
|
||||
dev_info(&instance->pdev->dev,
|
||||
"Failed from %s %d\n",
|
||||
__func__, __LINE__);
|
||||
instance->adprecovery =
|
||||
MEGASAS_HW_CRITICAL_ERROR;
|
||||
megaraid_sas_kill_hba(instance);
|
||||
retval = FAILED;
|
||||
}
|
||||
@@ -2877,7 +2874,6 @@ int megasas_reset_fusion(struct Scsi_Host *shost, int iotimeout)
|
||||
"adapter scsi%d.\n", instance->host->host_no);
|
||||
megaraid_sas_kill_hba(instance);
|
||||
instance->skip_heartbeat_timer_del = 1;
|
||||
instance->adprecovery = MEGASAS_HW_CRITICAL_ERROR;
|
||||
retval = FAILED;
|
||||
} else {
|
||||
/* For VF: Restart HB timer if we didn't OCR */
|
||||
|
Reference in New Issue
Block a user