Issue Function Level Reset everytime driver is loaded.

Signed-off-by: John Soni Jose <sony.joh...@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallic...@emulex.com>
---
 drivers/scsi/be2iscsi/be_main.c |   39 ++++++++++++---------------------------
 1 files changed, 12 insertions(+), 27 deletions(-)

diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 82c69aa..0fb36b4 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -47,8 +47,6 @@
 static unsigned int be_iopoll_budget = 10;
 static unsigned int be_max_phys_size = 64;
 static unsigned int enable_msix = 1;
-static unsigned int gcrashmode = 0;
-static unsigned int num_hba = 0;
 
 MODULE_DEVICE_TABLE(pci, beiscsi_pci_id_table);
 MODULE_DESCRIPTION(DRV_DESC " " BUILD_STR);
@@ -4605,31 +4603,18 @@ static int __devinit beiscsi_dev_probe(struct pci_dev 
*pcidev,
                goto hba_free;
        }
 
-       if (!num_hba) {
-               real_offset = (u8 *)phba->csr_va + MPU_EP_SEMAPHORE;
-               value = readl((void *)real_offset);
-               if (value & 0x00010000) {
-                       gcrashmode++;
-                       beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-                                   "BM_%d : Loading Driver in crashdump 
mode\n");
-                       ret = beiscsi_cmd_reset_function(phba);
-                       if (ret) {
-                               beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-                                           "BM_%d : Reset Failed. Aborting 
Crashdump\n");
-                               goto hba_free;
-                       }
-                       ret = be_chk_reset_complete(phba);
-                       if (ret) {
-                               beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
-                                           "BM_%d : Failed to get out of 
reset."
-                                           "Aborting Crashdump\n");
-                               goto hba_free;
-                       }
-               } else {
-                       value |= 0x00010000;
-                       writel(value, (void *)real_offset);
-                       num_hba++;
-               }
+       ret = beiscsi_cmd_reset_function(phba);
+       if (ret) {
+               beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
+                           "BM_%d : Reset Failed. Aborting Crashdump\n");
+               goto hba_free;
+       }
+       ret = be_chk_reset_complete(phba);
+       if (ret) {
+               beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
+                           "BM_%d : Failed to get out of reset."
+                           "Aborting Crashdump\n");
+               goto hba_free;
        }
 
        spin_lock_init(&phba->io_sgl_lock);
-- 
1.7.2

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to