[SCSI] mptfusion: print Doorbell register in a case of hard reset and timeout
authorKei Tokunaga <tokunaga.keiich@jp.fujitsu.com>
Tue, 22 Jun 2010 10:01:51 +0000 (19:01 +0900)
committerJames Bottomley <James.Bottomley@suse.de>
Tue, 27 Jul 2010 17:03:52 +0000 (12:03 -0500)
Printing Doorbell register in a case of hard reset and timeout
should be useful for figuring out the state of the system.

Signed-off-by: Kei Tokunaga <tokunaga.keiich@jp.fujitsu.com>
Acked-by: "Desai, Kashyap" <Kashyap.Desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/message/fusion/mptbase.c
drivers/message/fusion/mptctl.c
drivers/message/fusion/mptsas.c
drivers/message/fusion/mptscsih.c

index c36d5b9ff663771439e2196a1481dfab38db8f45..e319abcd849cb14066fc2c5e82c47ebd379dd37f 100644 (file)
@@ -5063,8 +5063,9 @@ mptbase_sas_persist_operation(MPT_ADAPTER *ioc, u8 persist_opcode)
                if (ioc->mptbase_cmds.status & MPT_MGMT_STATUS_DID_IOCRESET)
                        goto out;
                if (!timeleft) {
-                       printk(KERN_DEBUG "%s: Issuing Reset from %s!!\n",
-                           ioc->name, __func__);
+                       printk(MYIOC_s_WARN_FMT
+                              "Issuing Reset from %s!!, doorbell=0x%08x\n",
+                              ioc->name, __func__, mpt_GetIocState(ioc, 0));
                        mpt_Soft_Hard_ResetHandler(ioc, CAN_SLEEP);
                        mpt_free_msg_frame(ioc, mf);
                }
@@ -6455,8 +6456,9 @@ out:
        mutex_unlock(&ioc->mptbase_cmds.mutex);
        if (issue_hard_reset) {
                issue_hard_reset = 0;
-               printk(MYIOC_s_WARN_FMT "Issuing Reset from %s!!\n",
-                   ioc->name, __func__);
+               printk(MYIOC_s_WARN_FMT
+                      "Issuing Reset from %s!!, doorbell=0x%08x\n",
+                      ioc->name, __func__, mpt_GetIocState(ioc, 0));
                if (retry_count == 0) {
                        if (mpt_Soft_Hard_ResetHandler(ioc, CAN_SLEEP) != 0)
                                retry_count++;
@@ -7146,7 +7148,8 @@ mpt_HardResetHandler(MPT_ADAPTER *ioc, int sleepFlag)
        rc = mpt_do_ioc_recovery(ioc, MPT_HOSTEVENT_IOC_RECOVER, sleepFlag);
        if (rc != 0) {
                printk(KERN_WARNING MYNAM
-                   ": WARNING - (%d) Cannot recover %s\n", rc, ioc->name);
+                      ": WARNING - (%d) Cannot recover %s, doorbell=0x%08x\n",
+                      rc, ioc->name, mpt_GetIocState(ioc, 0));
        } else {
                if (ioc->hard_resets < -1)
                        ioc->hard_resets++;
index 9bd89cebb5a936999c1b380dc644ae074ff931d4..40046f595f1c5b718011c93729372c0d7556c3a6 100644 (file)
@@ -954,9 +954,12 @@ retry_wait:
                        mpt_free_msg_frame(iocp, mf);
                        goto fwdl_out;
                }
-               if (!timeleft)
+               if (!timeleft) {
+                       printk(MYIOC_s_WARN_FMT
+                              "FW download timeout, doorbell=0x%08x\n",
+                              iocp->name, mpt_GetIocState(iocp, 0));
                        mptctl_timeout_expired(iocp, mf);
-               else
+               else
                        goto retry_wait;
                goto fwdl_out;
        }
@@ -2301,6 +2304,10 @@ retry_wait:
                        goto done_free_mem;
                }
                if (!timeleft) {
+                       printk(MYIOC_s_WARN_FMT
+                              "mpt cmd timeout, doorbell=0x%08x"
+                              " function=0x%x\n",
+                              ioc->name, mpt_GetIocState(ioc, 0), function);
                        if (function == MPI_FUNCTION_SCSI_TASK_MGMT)
                                mutex_unlock(&ioc->taskmgmt_cmds.mutex);
                        mptctl_timeout_expired(ioc, mf);
@@ -2608,9 +2615,12 @@ retry_wait:
                        mpt_free_msg_frame(ioc, mf);
                        goto out;
                }
-               if (!timeleft)
+               if (!timeleft) {
+                       printk(MYIOC_s_WARN_FMT
+                              "HOST INFO command timeout, doorbell=0x%08x\n",
+                              ioc->name, mpt_GetIocState(ioc, 0));
                        mptctl_timeout_expired(ioc, mf);
-               else
+               else
                        goto retry_wait;
                goto out;
        }
index 46cc90c9bfc66569aec283ad726d1bd6263f2f5d..f705a235300e1ef70b742db736e5b213b02b9bd1 100644 (file)
@@ -4816,8 +4816,9 @@ mptsas_broadcast_primative_work(struct fw_event_work *fw_event)
        mutex_unlock(&ioc->taskmgmt_cmds.mutex);
 
        if (issue_reset) {
-               printk(MYIOC_s_WARN_FMT "Issuing Reset from %s!!\n",
-                   ioc->name, __func__);
+               printk(MYIOC_s_WARN_FMT
+                      "Issuing Reset from %s!! doorbell=0x%08x\n",
+                      ioc->name, __func__, mpt_GetIocState(ioc, 0));
                mpt_Soft_Hard_ResetHandler(ioc, CAN_SLEEP);
        }
        mptsas_free_fw_event(ioc, fw_event);
index c5c8fb811f5456ea8a4280207732b26a9d1951e1..dceb67a21825690ea7ded38bb5485f3db3a4079b 100644 (file)
@@ -1706,8 +1706,9 @@ mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, int lun,
 
        CLEAR_MGMT_STATUS(ioc->taskmgmt_cmds.status)
        if (issue_hard_reset) {
-               printk(MYIOC_s_WARN_FMT "Issuing Reset from %s!!\n",
-                       ioc->name, __func__);
+               printk(MYIOC_s_WARN_FMT
+                      "Issuing Reset from %s!! doorbell=0x%08x\n",
+                      ioc->name, __func__, mpt_GetIocState(ioc, 0));
                retval = mpt_Soft_Hard_ResetHandler(ioc, CAN_SLEEP);
                mpt_free_msg_frame(ioc, mf);
        }
@@ -3051,8 +3052,11 @@ mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTERNAL_CMD *io)
                        goto out;
                }
                if (!timeleft) {
-                       printk(MYIOC_s_WARN_FMT "Issuing Reset from %s!!\n",
-                           ioc->name, __func__);
+                       printk(MYIOC_s_WARN_FMT
+                              "Issuing Reset from %s!! doorbell=0x%08xh"
+                              " cmd=0x%02x\n",
+                              ioc->name, __func__, mpt_GetIocState(ioc, 0),
+                              cmd);
                        mpt_Soft_Hard_ResetHandler(ioc, CAN_SLEEP);
                        mpt_free_msg_frame(ioc, mf);
                }