[SCSI] mptfusion: mpt config will do Hard Reset based upon retry counts
authorKashyap, Desai <kashyap.desai@lsi.com>
Thu, 18 Mar 2010 13:44:51 +0000 (19:14 +0530)
committerJames Bottomley <James.Bottomley@suse.de>
Sun, 11 Apr 2010 14:24:06 +0000 (09:24 -0500)
mpt_config would only attempt a MUR before retrying the command. The
driver will now retry a second time with a hard reset before leaving
the function.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/message/fusion/mptbase.c

index a4f023bd5d2b31f585647af027660a24f0be230b..a6a57011ba6cfcba8f7497b6d270084d84a69295 100644 (file)
@@ -6456,10 +6456,15 @@ out:
                issue_hard_reset = 0;
                printk(MYIOC_s_WARN_FMT "Issuing Reset from %s!!\n",
                    ioc->name, __func__);
-               mpt_Soft_Hard_ResetHandler(ioc, CAN_SLEEP);
+               if (retry_count == 0) {
+                       if (mpt_Soft_Hard_ResetHandler(ioc, CAN_SLEEP) != 0)
+                               retry_count++;
+               } else
+                       mpt_HardResetHandler(ioc, CAN_SLEEP);
+
                mpt_free_msg_frame(ioc, mf);
                /* attempt one retry for a timed out command */
-               if (!retry_count) {
+               if (retry_count < 2) {
                        printk(MYIOC_s_INFO_FMT
                            "Attempting Retry Config request"
                            " type 0x%x, page 0x%x,"