aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorJames Smart <James.Smart@Emulex.Com>2007-04-25 09:52:49 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-05-06 10:33:14 -0400
commit5b8bd0c9be706677327c01df28bf6b54de008f34 (patch)
tree5f5a3461af6821afc621c3368887658530372dd3 /drivers/scsi
parent82085718faa6955c8a78b2e6ac2ad95072ac875a (diff)
[SCSI] lpfc 8.1.12 : Improve diagnostic messages and change local loopback message to KERN_INFO
Improve diagnostic messages and change local loopback message to KERN_INFO Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/lpfc/lpfc.h10
-rw-r--r--drivers/scsi/lpfc/lpfc_attr.c1
-rw-r--r--drivers/scsi/lpfc/lpfc_els.c66
-rw-r--r--drivers/scsi/lpfc/lpfc_hbadisc.c12
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c1
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c6
6 files changed, 61 insertions, 35 deletions
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
index b7193d1a90f6..da8b6bb09a76 100644
--- a/drivers/scsi/lpfc/lpfc.h
+++ b/drivers/scsi/lpfc/lpfc.h
@@ -247,6 +247,9 @@ struct lpfc_hba {
247#define FC_ABORT_DISCOVERY 0x8000 /* we want to abort discovery */ 247#define FC_ABORT_DISCOVERY 0x8000 /* we want to abort discovery */
248#define FC_NDISC_ACTIVE 0x10000 /* NPort discovery active */ 248#define FC_NDISC_ACTIVE 0x10000 /* NPort discovery active */
249#define FC_BYPASSED_MODE 0x20000 /* NPort is in bypassed mode */ 249#define FC_BYPASSED_MODE 0x20000 /* NPort is in bypassed mode */
250#define FC_LOOPBACK_MODE 0x40000 /* NPort is in Loopback mode */
251 /* This flag is set while issuing */
252 /* INIT_LINK mailbox command */
250 253
251 uint32_t fc_topology; /* link topology, from LINK INIT */ 254 uint32_t fc_topology; /* link topology, from LINK INIT */
252 255
@@ -388,6 +391,13 @@ struct lpfc_hba {
388 struct fc_host_statistics link_stats; 391 struct fc_host_statistics link_stats;
389}; 392};
390 393
394static inline void
395lpfc_set_loopback_flag(struct lpfc_hba *phba) {
396 if (phba->cfg_topology == FLAGS_LOCAL_LB)
397 phba->fc_flag |= FC_LOOPBACK_MODE;
398 else
399 phba->fc_flag &= ~FC_LOOPBACK_MODE;
400}
391 401
392struct rnidrsp { 402struct rnidrsp {
393 void *buf; 403 void *buf;
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index 7811aaf114d5..df9847ea1a12 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -237,6 +237,7 @@ lpfc_issue_lip(struct Scsi_Host *host)
237 phba->fc_ratov * 2); 237 phba->fc_ratov * 2);
238 } 238 }
239 239
240 lpfc_set_loopback_flag(phba);
240 if (mbxstatus == MBX_TIMEOUT) 241 if (mbxstatus == MBX_TIMEOUT)
241 pmboxq->mbox_cmpl = lpfc_sli_def_mbox_cmpl; 242 pmboxq->mbox_cmpl = lpfc_sli_def_mbox_cmpl;
242 else 243 else
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
index 4d9e7f50c189..8f98c5b0bf8c 100644
--- a/drivers/scsi/lpfc/lpfc_els.c
+++ b/drivers/scsi/lpfc/lpfc_els.c
@@ -2046,10 +2046,9 @@ lpfc_els_rsp_reject(struct lpfc_hba * phba, uint32_t rejectError,
2046 2046
2047 /* Xmit ELS RJT <err> response tag <ulpIoTag> */ 2047 /* Xmit ELS RJT <err> response tag <ulpIoTag> */
2048 lpfc_printf_log(phba, KERN_INFO, LOG_ELS, 2048 lpfc_printf_log(phba, KERN_INFO, LOG_ELS,
2049 "%d:0129 Xmit ELS RJT x%x response tag x%x " 2049 "%d:0129 Xmit ELS RJT x%x response tag x%x xri x%x, "
2050 "Data: x%x x%x x%x x%x x%x\n", 2050 "did x%x, nlp_flag x%x, nlp_state x%x, rpi x%x\n",
2051 phba->brd_no, 2051 phba->brd_no, rejectError, elsiocb->iotag,
2052 rejectError, elsiocb->iocb.ulpIoTag,
2053 elsiocb->iocb.ulpContext, ndlp->nlp_DID, 2052 elsiocb->iocb.ulpContext, ndlp->nlp_DID,
2054 ndlp->nlp_flag, ndlp->nlp_state, ndlp->nlp_rpi); 2053 ndlp->nlp_flag, ndlp->nlp_state, ndlp->nlp_rpi);
2055 2054
@@ -2088,18 +2087,18 @@ lpfc_els_rsp_adisc_acc(struct lpfc_hba * phba,
2088 if (!elsiocb) 2087 if (!elsiocb)
2089 return 1; 2088 return 1;
2090 2089
2090 icmd = &elsiocb->iocb;
2091 oldcmd = &oldiocb->iocb;
2092 icmd->ulpContext = oldcmd->ulpContext; /* Xri */
2093
2091 /* Xmit ADISC ACC response tag <ulpIoTag> */ 2094 /* Xmit ADISC ACC response tag <ulpIoTag> */
2092 lpfc_printf_log(phba, KERN_INFO, LOG_ELS, 2095 lpfc_printf_log(phba, KERN_INFO, LOG_ELS,
2093 "%d:0130 Xmit ADISC ACC response tag x%x " 2096 "%d:0130 Xmit ADISC ACC response iotag x%x xri: "
2094 "Data: x%x x%x x%x x%x x%x\n", 2097 "x%x, did x%x, nlp_flag x%x, nlp_state x%x rpi x%x\n",
2095 phba->brd_no, 2098 phba->brd_no, elsiocb->iotag,
2096 elsiocb->iocb.ulpIoTag,
2097 elsiocb->iocb.ulpContext, ndlp->nlp_DID, 2099 elsiocb->iocb.ulpContext, ndlp->nlp_DID,
2098 ndlp->nlp_flag, ndlp->nlp_state, ndlp->nlp_rpi); 2100 ndlp->nlp_flag, ndlp->nlp_state, ndlp->nlp_rpi);
2099 2101
2100 icmd = &elsiocb->iocb;
2101 oldcmd = &oldiocb->iocb;
2102 icmd->ulpContext = oldcmd->ulpContext; /* Xri */
2103 pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt); 2102 pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt);
2104 2103
2105 *((uint32_t *) (pcmd)) = ELS_CMD_ACC; 2104 *((uint32_t *) (pcmd)) = ELS_CMD_ACC;
@@ -2124,8 +2123,8 @@ lpfc_els_rsp_adisc_acc(struct lpfc_hba * phba,
2124} 2123}
2125 2124
2126int 2125int
2127lpfc_els_rsp_prli_acc(struct lpfc_hba * phba, 2126lpfc_els_rsp_prli_acc(struct lpfc_hba *phba, struct lpfc_iocbq *oldiocb,
2128 struct lpfc_iocbq * oldiocb, struct lpfc_nodelist * ndlp) 2127 struct lpfc_nodelist *ndlp)
2129{ 2128{
2130 PRLI *npr; 2129 PRLI *npr;
2131 lpfc_vpd_t *vpd; 2130 lpfc_vpd_t *vpd;
@@ -2147,18 +2146,18 @@ lpfc_els_rsp_prli_acc(struct lpfc_hba * phba,
2147 if (!elsiocb) 2146 if (!elsiocb)
2148 return 1; 2147 return 1;
2149 2148
2149 icmd = &elsiocb->iocb;
2150 oldcmd = &oldiocb->iocb;
2151 icmd->ulpContext = oldcmd->ulpContext; /* Xri */
2152
2150 /* Xmit PRLI ACC response tag <ulpIoTag> */ 2153 /* Xmit PRLI ACC response tag <ulpIoTag> */
2151 lpfc_printf_log(phba, KERN_INFO, LOG_ELS, 2154 lpfc_printf_log(phba, KERN_INFO, LOG_ELS,
2152 "%d:0131 Xmit PRLI ACC response tag x%x " 2155 "%d:0131 Xmit PRLI ACC response tag x%x xri x%x, "
2153 "Data: x%x x%x x%x x%x x%x\n", 2156 "did x%x, nlp_flag x%x, nlp_state x%x, rpi x%x\n",
2154 phba->brd_no, 2157 phba->brd_no, elsiocb->iotag,
2155 elsiocb->iocb.ulpIoTag,
2156 elsiocb->iocb.ulpContext, ndlp->nlp_DID, 2158 elsiocb->iocb.ulpContext, ndlp->nlp_DID,
2157 ndlp->nlp_flag, ndlp->nlp_state, ndlp->nlp_rpi); 2159 ndlp->nlp_flag, ndlp->nlp_state, ndlp->nlp_rpi);
2158 2160
2159 icmd = &elsiocb->iocb;
2160 oldcmd = &oldiocb->iocb;
2161 icmd->ulpContext = oldcmd->ulpContext; /* Xri */
2162 pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt); 2161 pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt);
2163 2162
2164 *((uint32_t *) (pcmd)) = (ELS_CMD_ACC | (ELS_CMD_PRLI & ~ELS_RSP_MASK)); 2163 *((uint32_t *) (pcmd)) = (ELS_CMD_ACC | (ELS_CMD_PRLI & ~ELS_RSP_MASK));
@@ -2228,17 +2227,17 @@ lpfc_els_rsp_rnid_acc(struct lpfc_hba * phba,
2228 if (!elsiocb) 2227 if (!elsiocb)
2229 return 1; 2228 return 1;
2230 2229
2230 icmd = &elsiocb->iocb;
2231 oldcmd = &oldiocb->iocb;
2232 icmd->ulpContext = oldcmd->ulpContext; /* Xri */
2233
2231 /* Xmit RNID ACC response tag <ulpIoTag> */ 2234 /* Xmit RNID ACC response tag <ulpIoTag> */
2232 lpfc_printf_log(phba, KERN_INFO, LOG_ELS, 2235 lpfc_printf_log(phba, KERN_INFO, LOG_ELS,
2233 "%d:0132 Xmit RNID ACC response tag x%x " 2236 "%d:0132 Xmit RNID ACC response tag x%x "
2234 "Data: x%x\n", 2237 "xri x%x\n",
2235 phba->brd_no, 2238 phba->brd_no, elsiocb->iotag,
2236 elsiocb->iocb.ulpIoTag,
2237 elsiocb->iocb.ulpContext); 2239 elsiocb->iocb.ulpContext);
2238 2240
2239 icmd = &elsiocb->iocb;
2240 oldcmd = &oldiocb->iocb;
2241 icmd->ulpContext = oldcmd->ulpContext; /* Xri */
2242 pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt); 2241 pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt);
2243 2242
2244 *((uint32_t *) (pcmd)) = ELS_CMD_ACC; 2243 *((uint32_t *) (pcmd)) = ELS_CMD_ACC;
@@ -2701,6 +2700,7 @@ lpfc_els_rcv_flogi(struct lpfc_hba * phba,
2701 mbox->mbox_cmpl = lpfc_sli_def_mbox_cmpl; 2700 mbox->mbox_cmpl = lpfc_sli_def_mbox_cmpl;
2702 rc = lpfc_sli_issue_mbox 2701 rc = lpfc_sli_issue_mbox
2703 (phba, mbox, (MBX_NOWAIT | MBX_STOP_IOCB)); 2702 (phba, mbox, (MBX_NOWAIT | MBX_STOP_IOCB));
2703 lpfc_set_loopback_flag(phba);
2704 if (rc == MBX_NOT_FINISHED) { 2704 if (rc == MBX_NOT_FINISHED) {
2705 mempool_free( mbox, phba->mbox_mem_pool); 2705 mempool_free( mbox, phba->mbox_mem_pool);
2706 } 2706 }
@@ -2842,10 +2842,9 @@ lpfc_els_rsp_rps_acc(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb)
2842 2842
2843 /* Xmit ELS RPS ACC response tag <ulpIoTag> */ 2843 /* Xmit ELS RPS ACC response tag <ulpIoTag> */
2844 lpfc_printf_log(phba, KERN_INFO, LOG_ELS, 2844 lpfc_printf_log(phba, KERN_INFO, LOG_ELS,
2845 "%d:0118 Xmit ELS RPS ACC response tag x%x " 2845 "%d:0118 Xmit ELS RPS ACC response tag x%x xri x%x, "
2846 "Data: x%x x%x x%x x%x x%x\n", 2846 "did x%x, nlp_flag x%x, nlp_state x%x, rpi x%x\n",
2847 phba->brd_no, 2847 phba->brd_no, elsiocb->iotag,
2848 elsiocb->iocb.ulpIoTag,
2849 elsiocb->iocb.ulpContext, ndlp->nlp_DID, 2848 elsiocb->iocb.ulpContext, ndlp->nlp_DID,
2850 ndlp->nlp_flag, ndlp->nlp_state, ndlp->nlp_rpi); 2849 ndlp->nlp_flag, ndlp->nlp_state, ndlp->nlp_rpi);
2851 2850
@@ -2951,10 +2950,9 @@ lpfc_els_rsp_rpl_acc(struct lpfc_hba * phba, uint16_t cmdsize,
2951 2950
2952 /* Xmit ELS RPL ACC response tag <ulpIoTag> */ 2951 /* Xmit ELS RPL ACC response tag <ulpIoTag> */
2953 lpfc_printf_log(phba, KERN_INFO, LOG_ELS, 2952 lpfc_printf_log(phba, KERN_INFO, LOG_ELS,
2954 "%d:0120 Xmit ELS RPL ACC response tag x%x " 2953 "%d:0120 Xmit ELS RPL ACC response tag x%x xri x%x, "
2955 "Data: x%x x%x x%x x%x x%x\n", 2954 "did x%x, nlp_flag x%x, nlp_state x%x, rpi x%x\n",
2956 phba->brd_no, 2955 phba->brd_no, elsiocb->iotag,
2957 elsiocb->iocb.ulpIoTag,
2958 elsiocb->iocb.ulpContext, ndlp->nlp_DID, 2956 elsiocb->iocb.ulpContext, ndlp->nlp_DID,
2959 ndlp->nlp_flag, ndlp->nlp_state, ndlp->nlp_rpi); 2957 ndlp->nlp_flag, ndlp->nlp_state, ndlp->nlp_rpi);
2960 2958
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
index 5f8698bcecb9..164af8a7e95d 100644
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -900,12 +900,21 @@ lpfc_mbx_cmpl_read_la(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb)
900 900
901 if (la->attType == AT_LINK_UP) { 901 if (la->attType == AT_LINK_UP) {
902 phba->fc_stat.LinkUp++; 902 phba->fc_stat.LinkUp++;
903 lpfc_printf_log(phba, KERN_ERR, LOG_LINK_EVENT, 903 if (phba->fc_flag & FC_LOOPBACK_MODE) {
904 lpfc_printf_log(phba, KERN_INFO, LOG_LINK_EVENT,
905 "%d:1306 Link Up Event in loop back mode "
906 "x%x received Data: x%x x%x x%x x%x\n",
907 phba->brd_no, la->eventTag, phba->fc_eventTag,
908 la->granted_AL_PA, la->UlnkSpeed,
909 phba->alpa_map[0]);
910 } else {
911 lpfc_printf_log(phba, KERN_ERR, LOG_LINK_EVENT,
904 "%d:1303 Link Up Event x%x received " 912 "%d:1303 Link Up Event x%x received "
905 "Data: x%x x%x x%x x%x\n", 913 "Data: x%x x%x x%x x%x\n",
906 phba->brd_no, la->eventTag, phba->fc_eventTag, 914 phba->brd_no, la->eventTag, phba->fc_eventTag,
907 la->granted_AL_PA, la->UlnkSpeed, 915 la->granted_AL_PA, la->UlnkSpeed,
908 phba->alpa_map[0]); 916 phba->alpa_map[0]);
917 }
909 lpfc_mbx_process_link_up(phba, la); 918 lpfc_mbx_process_link_up(phba, la);
910 } else { 919 } else {
911 phba->fc_stat.LinkDown++; 920 phba->fc_stat.LinkDown++;
@@ -2251,6 +2260,7 @@ lpfc_disc_timeout_handler(struct lpfc_hba *phba)
2251 initlinkmbox->mb.un.varInitLnk.lipsr_AL_PA = 0; 2260 initlinkmbox->mb.un.varInitLnk.lipsr_AL_PA = 0;
2252 rc = lpfc_sli_issue_mbox(phba, initlinkmbox, 2261 rc = lpfc_sli_issue_mbox(phba, initlinkmbox,
2253 (MBX_NOWAIT | MBX_STOP_IOCB)); 2262 (MBX_NOWAIT | MBX_STOP_IOCB));
2263 lpfc_set_loopback_flag(phba);
2254 if (rc == MBX_NOT_FINISHED) 2264 if (rc == MBX_NOT_FINISHED)
2255 mempool_free(initlinkmbox, phba->mbox_mem_pool); 2265 mempool_free(initlinkmbox, phba->mbox_mem_pool);
2256 2266
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 6449ac8fca24..4df0a77ab12e 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -391,6 +391,7 @@ lpfc_config_port_post(struct lpfc_hba * phba)
391 lpfc_init_link(phba, pmb, phba->cfg_topology, phba->cfg_link_speed); 391 lpfc_init_link(phba, pmb, phba->cfg_topology, phba->cfg_link_speed);
392 pmb->mbox_cmpl = lpfc_sli_def_mbox_cmpl; 392 pmb->mbox_cmpl = lpfc_sli_def_mbox_cmpl;
393 rc = lpfc_sli_issue_mbox(phba, pmb, MBX_NOWAIT); 393 rc = lpfc_sli_issue_mbox(phba, pmb, MBX_NOWAIT);
394 lpfc_set_loopback_flag(phba);
394 if (rc != MBX_SUCCESS) { 395 if (rc != MBX_SUCCESS) {
395 lpfc_printf_log(phba, 396 lpfc_printf_log(phba,
396 KERN_ERR, 397 KERN_ERR,
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index dba94c68feb1..fd82797df095 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -2794,6 +2794,12 @@ lpfc_sli_issue_abort_iotag(struct lpfc_hba * phba,
2794 iabt->ulpCommand = CMD_CLOSE_XRI_CN; 2794 iabt->ulpCommand = CMD_CLOSE_XRI_CN;
2795 2795
2796 abtsiocbp->iocb_cmpl = lpfc_sli_abort_els_cmpl; 2796 abtsiocbp->iocb_cmpl = lpfc_sli_abort_els_cmpl;
2797
2798 lpfc_printf_log(phba, KERN_INFO, LOG_SLI,
2799 "%d:0339 Abort xri x%x, original iotag x%x, abort "
2800 "cmd iotag x%x\n",
2801 phba->brd_no, iabt->un.acxri.abortContextTag,
2802 iabt->un.acxri.abortIoTag, abtsiocbp->iotag);
2797 retval = lpfc_sli_issue_iocb(phba, pring, abtsiocbp, 0); 2803 retval = lpfc_sli_issue_iocb(phba, pring, abtsiocbp, 0);
2798 2804
2799abort_iotag_exit: 2805abort_iotag_exit: