Commit 34bd9f27 authored by Shivasharan S's avatar Shivasharan S Committed by Martin K. Petersen

scsi: megaraid_sas: Remove spin lock for dpc operation

Optimization: No need to hold hba_lock in dpc context for reading atomic
variable.
Signed-off-by: default avatarShivasharan S <shivasharan.srikanteshwara@broadcom.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 9e77018e
...@@ -3573,18 +3573,13 @@ megasas_complete_cmd_dpc_fusion(unsigned long instance_addr) ...@@ -3573,18 +3573,13 @@ megasas_complete_cmd_dpc_fusion(unsigned long instance_addr)
{ {
struct megasas_instance *instance = struct megasas_instance *instance =
(struct megasas_instance *)instance_addr; (struct megasas_instance *)instance_addr;
unsigned long flags;
u32 count, MSIxIndex; u32 count, MSIxIndex;
count = instance->msix_vectors > 0 ? instance->msix_vectors : 1; count = instance->msix_vectors > 0 ? instance->msix_vectors : 1;
/* If we have already declared adapter dead, donot complete cmds */ /* If we have already declared adapter dead, donot complete cmds */
spin_lock_irqsave(&instance->hba_lock, flags); if (atomic_read(&instance->adprecovery) == MEGASAS_HW_CRITICAL_ERROR)
if (atomic_read(&instance->adprecovery) == MEGASAS_HW_CRITICAL_ERROR) {
spin_unlock_irqrestore(&instance->hba_lock, flags);
return; return;
}
spin_unlock_irqrestore(&instance->hba_lock, flags);
for (MSIxIndex = 0 ; MSIxIndex < count; MSIxIndex++) for (MSIxIndex = 0 ; MSIxIndex < count; MSIxIndex++)
complete_cmd_fusion(instance, MSIxIndex); complete_cmd_fusion(instance, MSIxIndex);
......
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