scsi: megaraid_sas: For SRIOV, do not set STOP_ADP bit
authorShivasharan S <shivasharan.srikanteshwara@broadcom.com>
Wed, 17 Oct 2018 06:37:47 +0000 (23:37 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 7 Nov 2018 01:33:57 +0000 (20:33 -0500)
For SRIOV based adapters, driver should not set the STOP_ADP bit as part of
kill adapter.

Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/megaraid/megaraid_sas_base.c

index 4687e86..6882194 100644 (file)
@@ -2076,9 +2076,11 @@ void megaraid_sas_kill_hba(struct megasas_instance *instance)
        if ((instance->pdev->device == PCI_DEVICE_ID_LSI_SAS0073SKINNY) ||
                (instance->pdev->device == PCI_DEVICE_ID_LSI_SAS0071SKINNY) ||
                (instance->adapter_type != MFI_SERIES)) {
-               writel(MFI_STOP_ADP, &instance->reg_set->doorbell);
-               /* Flush */
-               readl(&instance->reg_set->doorbell);
+               if (!instance->requestorId) {
+                       writel(MFI_STOP_ADP, &instance->reg_set->doorbell);
+                       /* Flush */
+                       readl(&instance->reg_set->doorbell);
+               }
                if (instance->requestorId && instance->peerIsPresent)
                        memset(instance->ld_ids, 0xff, MEGASAS_MAX_LD_IDS);
        } else {