summaryrefslogtreecommitdiff
path: root/drivers/scsi
diff options
context:
space:
mode:
authorRaghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>2017-05-10 09:39:44 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2017-06-12 20:47:59 -0400
commit80c7d8a5cffa7187c3b3b78eb67705dae91e9a1a (patch)
tree3fb1c26b8dafe674f012186503963add5c252c0e /drivers/scsi
parent6b24d425881792b16ccf2189b43d57b4aff2a4e6 (diff)
scsi: aacraid: Rework IOP reset
Reworked IOP reset to remove unneeded variable and created a helper function to notify fw of an imminent IOP reset. 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>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/aacraid/src.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/scsi/aacraid/src.c b/drivers/scsi/aacraid/src.c
index f278a21c86db..39ecb58762a7 100644
--- a/drivers/scsi/aacraid/src.c
+++ b/drivers/scsi/aacraid/src.c
@@ -694,15 +694,17 @@ static void aac_dump_fw_fib_iop_reset(struct aac_dev *dev)
0, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL);
}
-static void aac_send_iop_reset(struct aac_dev *dev, int bled)
+static void aac_notify_fw_of_iop_reset(struct aac_dev *dev)
{
- u32 var, reset_mask;
+ aac_adapter_sync_cmd(dev, IOP_RESET_ALWAYS, 0, 0, 0, 0, 0, 0, NULL,
+ NULL, NULL, NULL, NULL);
+}
+static void aac_send_iop_reset(struct aac_dev *dev)
+{
aac_dump_fw_fib_iop_reset(dev);
- bled = aac_adapter_sync_cmd(dev, IOP_RESET_ALWAYS,
- 0, 0, 0, 0, 0, 0, &var,
- &reset_mask, NULL, NULL, NULL);
+ aac_notify_fw_of_iop_reset(dev);
aac_set_intx_mode(dev);
@@ -742,7 +744,7 @@ static int aac_src_restart_adapter(struct aac_dev *dev, int bled, u8 reset_type)
switch (reset_type) {
case IOP_HWSOFT_RESET:
- aac_send_iop_reset(dev, bled);
+ aac_send_iop_reset(dev);
/*
* Check to see if KERNEL_UP_AND_RUNNING
* Wait for the adapter to be up and running.
@@ -769,7 +771,7 @@ static int aac_src_restart_adapter(struct aac_dev *dev, int bled, u8 reset_type)
}
break;
default:
- aac_send_iop_reset(dev, bled);
+ aac_send_iop_reset(dev);
break;
}