scsi: aacraid: Using single reset mask for IOP reset
authorRaghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Wed, 10 May 2017 16:39:43 +0000 (09:39 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 13 Jun 2017 00:47:59 +0000 (20:47 -0400)
The driver can now trigger IOP reset with a single reset mask. Removed
code that retrieves a reset_mask from the firmware.

Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Reviewed-by: David Carroll <david.carroll@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/aacraid/aacraid.h
drivers/scsi/aacraid/src.c

index cb7d69939a346804d5dd3cc7575bd0dfbdcc3a94..c74e1aa18a20a9b6467b517624d42b0bff4d0b1e 100644 (file)
@@ -2378,6 +2378,7 @@ struct revision
 #define SOFT_RESET_TIME                        60
 
 
+
 struct aac_common
 {
        /*
@@ -2488,7 +2489,9 @@ struct aac_hba_info {
 #define IOP_RESET_FW_FIB_DUMP          0x00000034
 #define IOP_RESET                      0x00001000
 #define IOP_RESET_ALWAYS               0x00001001
-#define RE_INIT_ADAPTER                        0x000000ee
+#define RE_INIT_ADAPTER                0x000000ee
+
+#define IOP_SRC_RESET_MASK             0x00000100
 
 /*
  *     Adapter Status Register
index 7b0410e0f569481cc40101fab38a768c7e274c8e..f278a21c86db82a9fc68ad47fe494114582dc99e 100644 (file)
@@ -704,22 +704,10 @@ static void aac_send_iop_reset(struct aac_dev *dev, int bled)
                                    0, 0, 0, 0, 0, 0, &var,
                                    &reset_mask, NULL, NULL, NULL);
 
-       if ((bled || var != 0x00000001) && !dev->doorbell_mask)
-               bled = -EINVAL;
-       else if (dev->doorbell_mask) {
-               reset_mask = dev->doorbell_mask;
-               bled = 0;
-               var = 0x00000001;
-       }
-
        aac_set_intx_mode(dev);
 
-       if (!bled && (dev->supplement_adapter_info.supported_options2 &
-           AAC_OPTION_DOORBELL_RESET)) {
-               src_writel(dev, MUnit.IDR, reset_mask);
-       } else {
-               src_writel(dev, MUnit.IDR, 0x100);
-       }
+       src_writel(dev, MUnit.IDR, IOP_SRC_RESET_MASK);
+
        msleep(30000);
 }