From: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Date: Mon, 22 Aug 2011 17:08:29 +0000 (-0700)
Subject: [SCSI] be2iscsi: Add pci_disable device
X-Git-Tag: firefly_0821_release~3680^2~4269^2~126
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8dce69ff481a8d17a7d1027f23595083f28b4556;p=firefly-linux-kernel-4.4.55.git

[SCSI] be2iscsi: Add pci_disable device

  This patch adds call to pci_disable_device during
rmmod and shutdown. The lack of this call was causing hang in
insmod - rmmod loop test

Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
---

diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 51cfd4f2911d..57fea3848b69 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -4181,6 +4181,7 @@ static void beiscsi_remove(struct pci_dev *pcidev)
 	iscsi_host_remove(phba->shost);
 	pci_dev_put(phba->pcidev);
 	iscsi_host_free(phba->shost);
+	pci_disable_device(pcidev);
 }
 
 static void beiscsi_shutdown(struct pci_dev *pcidev)
@@ -4195,6 +4196,7 @@ static void beiscsi_shutdown(struct pci_dev *pcidev)
 	}
 
 	beiscsi_quiesce(phba);
+	pci_disable_device(pcidev);
 }
 
 static void beiscsi_msix_enable(struct beiscsi_hba *phba)