Commit 97009a29e8c999def2d1e9ef253c226daf9541af

Authored by Kei Tokunaga
Committed by James Bottomley
1 parent e4bf25fbcc

[SCSI] mptfusion: print Doorbell register in a case of hard reset and timeout

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>

Showing 4 changed files with 33 additions and 15 deletions Side-by-side Diff

drivers/message/fusion/mptbase.c
... ... @@ -5063,8 +5063,9 @@
5063 5063 if (ioc->mptbase_cmds.status & MPT_MGMT_STATUS_DID_IOCRESET)
5064 5064 goto out;
5065 5065 if (!timeleft) {
5066   - printk(KERN_DEBUG "%s: Issuing Reset from %s!!\n",
5067   - ioc->name, __func__);
  5066 + printk(MYIOC_s_WARN_FMT
  5067 + "Issuing Reset from %s!!, doorbell=0x%08x\n",
  5068 + ioc->name, __func__, mpt_GetIocState(ioc, 0));
5068 5069 mpt_Soft_Hard_ResetHandler(ioc, CAN_SLEEP);
5069 5070 mpt_free_msg_frame(ioc, mf);
5070 5071 }
... ... @@ -6455,8 +6456,9 @@
6455 6456 mutex_unlock(&ioc->mptbase_cmds.mutex);
6456 6457 if (issue_hard_reset) {
6457 6458 issue_hard_reset = 0;
6458   - printk(MYIOC_s_WARN_FMT "Issuing Reset from %s!!\n",
6459   - ioc->name, __func__);
  6459 + printk(MYIOC_s_WARN_FMT
  6460 + "Issuing Reset from %s!!, doorbell=0x%08x\n",
  6461 + ioc->name, __func__, mpt_GetIocState(ioc, 0));
6460 6462 if (retry_count == 0) {
6461 6463 if (mpt_Soft_Hard_ResetHandler(ioc, CAN_SLEEP) != 0)
6462 6464 retry_count++;
... ... @@ -7146,7 +7148,8 @@
7146 7148 rc = mpt_do_ioc_recovery(ioc, MPT_HOSTEVENT_IOC_RECOVER, sleepFlag);
7147 7149 if (rc != 0) {
7148 7150 printk(KERN_WARNING MYNAM
7149   - ": WARNING - (%d) Cannot recover %s\n", rc, ioc->name);
  7151 + ": WARNING - (%d) Cannot recover %s, doorbell=0x%08x\n",
  7152 + rc, ioc->name, mpt_GetIocState(ioc, 0));
7150 7153 } else {
7151 7154 if (ioc->hard_resets < -1)
7152 7155 ioc->hard_resets++;
drivers/message/fusion/mptctl.c
... ... @@ -954,9 +954,12 @@
954 954 mpt_free_msg_frame(iocp, mf);
955 955 goto fwdl_out;
956 956 }
957   - if (!timeleft)
  957 + if (!timeleft) {
  958 + printk(MYIOC_s_WARN_FMT
  959 + "FW download timeout, doorbell=0x%08x\n",
  960 + iocp->name, mpt_GetIocState(iocp, 0));
958 961 mptctl_timeout_expired(iocp, mf);
959   - else
  962 + } else
960 963 goto retry_wait;
961 964 goto fwdl_out;
962 965 }
... ... @@ -2301,6 +2304,10 @@
2301 2304 goto done_free_mem;
2302 2305 }
2303 2306 if (!timeleft) {
  2307 + printk(MYIOC_s_WARN_FMT
  2308 + "mpt cmd timeout, doorbell=0x%08x"
  2309 + " function=0x%x\n",
  2310 + ioc->name, mpt_GetIocState(ioc, 0), function);
2304 2311 if (function == MPI_FUNCTION_SCSI_TASK_MGMT)
2305 2312 mutex_unlock(&ioc->taskmgmt_cmds.mutex);
2306 2313 mptctl_timeout_expired(ioc, mf);
2307 2314  
... ... @@ -2608,9 +2615,12 @@
2608 2615 mpt_free_msg_frame(ioc, mf);
2609 2616 goto out;
2610 2617 }
2611   - if (!timeleft)
  2618 + if (!timeleft) {
  2619 + printk(MYIOC_s_WARN_FMT
  2620 + "HOST INFO command timeout, doorbell=0x%08x\n",
  2621 + ioc->name, mpt_GetIocState(ioc, 0));
2612 2622 mptctl_timeout_expired(ioc, mf);
2613   - else
  2623 + } else
2614 2624 goto retry_wait;
2615 2625 goto out;
2616 2626 }
drivers/message/fusion/mptsas.c
... ... @@ -4816,8 +4816,9 @@
4816 4816 mutex_unlock(&ioc->taskmgmt_cmds.mutex);
4817 4817  
4818 4818 if (issue_reset) {
4819   - printk(MYIOC_s_WARN_FMT "Issuing Reset from %s!!\n",
4820   - ioc->name, __func__);
  4819 + printk(MYIOC_s_WARN_FMT
  4820 + "Issuing Reset from %s!! doorbell=0x%08x\n",
  4821 + ioc->name, __func__, mpt_GetIocState(ioc, 0));
4821 4822 mpt_Soft_Hard_ResetHandler(ioc, CAN_SLEEP);
4822 4823 }
4823 4824 mptsas_free_fw_event(ioc, fw_event);
drivers/message/fusion/mptscsih.c
... ... @@ -1706,8 +1706,9 @@
1706 1706  
1707 1707 CLEAR_MGMT_STATUS(ioc->taskmgmt_cmds.status)
1708 1708 if (issue_hard_reset) {
1709   - printk(MYIOC_s_WARN_FMT "Issuing Reset from %s!!\n",
1710   - ioc->name, __func__);
  1709 + printk(MYIOC_s_WARN_FMT
  1710 + "Issuing Reset from %s!! doorbell=0x%08x\n",
  1711 + ioc->name, __func__, mpt_GetIocState(ioc, 0));
1711 1712 retval = mpt_Soft_Hard_ResetHandler(ioc, CAN_SLEEP);
1712 1713 mpt_free_msg_frame(ioc, mf);
1713 1714 }
... ... @@ -3051,8 +3052,11 @@
3051 3052 goto out;
3052 3053 }
3053 3054 if (!timeleft) {
3054   - printk(MYIOC_s_WARN_FMT "Issuing Reset from %s!!\n",
3055   - ioc->name, __func__);
  3055 + printk(MYIOC_s_WARN_FMT
  3056 + "Issuing Reset from %s!! doorbell=0x%08xh"
  3057 + " cmd=0x%02x\n",
  3058 + ioc->name, __func__, mpt_GetIocState(ioc, 0),
  3059 + cmd);
3056 3060 mpt_Soft_Hard_ResetHandler(ioc, CAN_SLEEP);
3057 3061 mpt_free_msg_frame(ioc, mf);
3058 3062 }