Re: [PATCH 09/19] lpfc: Reduce log spew on controller reconnects

2017-09-25 Thread Johannes Thumshirn
Looks good,
Reviewed-by: Johannes Thumshirn 
-- 
Johannes Thumshirn  Storage
jthumsh...@suse.de+49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850


[PATCH 09/19] lpfc: Reduce log spew on controller reconnects

2017-09-22 Thread James Smart
There are several log messages that report abnormal
terminations that by default are marked warn. These are
typically the result of failures due to invalid controller
state or abort completions. They are all natural when a
controller resets.

Unfortunately, as they are logged by default, it makes the
admin very concerned.

Convert the messages to Info.

Signed-off-by: Dick Kennedy 
Signed-off-by: James Smart 
---
 drivers/scsi/lpfc/lpfc_nvme.c  |  6 +++---
 drivers/scsi/lpfc/lpfc_nvmet.c | 17 +++--
 2 files changed, 14 insertions(+), 9 deletions(-)
---
 drivers/scsi/lpfc/lpfc_nvme.c  |  6 +++---
 drivers/scsi/lpfc/lpfc_nvmet.c | 16 ++--
 2 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c
index a83b57254de6..e6948945a2f2 100644
--- a/drivers/scsi/lpfc/lpfc_nvme.c
+++ b/drivers/scsi/lpfc/lpfc_nvme.c
@@ -886,7 +886,7 @@ lpfc_nvme_io_cmd_wqe_cmpl(struct lpfc_hba *phba, struct 
lpfc_iocbq *pwqeIn,
break;
default:
 out_err:
-   lpfc_printf_vlog(vport, KERN_ERR, LOG_NVME_IOERR,
+   lpfc_printf_vlog(vport, KERN_INFO, LOG_NVME_IOERR,
 "6072 NVME Completion Error: xri %x "
 "status x%x result x%x placed x%x\n",
 lpfc_ncmd->cur_iocbq.sli4_xritag,
@@ -1339,7 +1339,7 @@ lpfc_nvme_fcp_io_submit(struct nvme_fc_local_port 
*pnvme_lport,
ret = lpfc_sli4_issue_wqe(phba, LPFC_FCP_RING, _ncmd->cur_iocbq);
if (ret) {
atomic_dec(>cmd_pending);
-   lpfc_printf_vlog(vport, KERN_ERR, LOG_NVME_IOERR,
+   lpfc_printf_vlog(vport, KERN_INFO, LOG_NVME_IOERR,
 "6113 FCP could not issue WQE err %x "
 "sid: x%x did: x%x oxid: x%x\n",
 ret, vport->fc_myDID, ndlp->nlp_DID,
@@ -1399,7 +1399,7 @@ void
 lpfc_nvme_abort_fcreq_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
   struct lpfc_wcqe_complete *abts_cmpl)
 {
-   lpfc_printf_log(phba, KERN_ERR, LOG_NVME,
+   lpfc_printf_log(phba, KERN_INFO, LOG_NVME,
"6145 ABORT_XRI_CN completing on rpi x%x "
"original iotag x%x, abort cmd iotag x%x "
"req_tag x%x, status x%x, hwstatus x%x\n",
diff --git a/drivers/scsi/lpfc/lpfc_nvmet.c b/drivers/scsi/lpfc/lpfc_nvmet.c
index d065f5e4fa1a..43ad220e17ad 100644
--- a/drivers/scsi/lpfc/lpfc_nvmet.c
+++ b/drivers/scsi/lpfc/lpfc_nvmet.c
@@ -76,7 +76,7 @@ lpfc_nvmet_defer_release(struct lpfc_hba *phba, struct 
lpfc_nvmet_rcv_ctx *ctxp)
 {
unsigned long iflag;
 
-   lpfc_printf_log(phba, KERN_ERR, LOG_NVME_ABTS,
+   lpfc_printf_log(phba, KERN_INFO, LOG_NVME_ABTS,
"6313 NVMET Defer ctx release xri x%x flg x%x\n",
ctxp->oxid, ctxp->flag);
 
@@ -494,7 +494,7 @@ lpfc_nvmet_xmt_fcp_op_cmp(struct lpfc_hba *phba, struct 
lpfc_iocbq *cmdwqe,
struct lpfc_nvmet_tgtport *tgtp;
struct nvmefc_tgt_fcp_req *rsp;
struct lpfc_nvmet_rcv_ctx *ctxp;
-   uint32_t status, result, op, start_clean;
+   uint32_t status, result, op, start_clean, logerr;
 #ifdef CONFIG_SCSI_LPFC_DEBUG_FS
uint32_t id;
 #endif
@@ -522,17 +522,21 @@ lpfc_nvmet_xmt_fcp_op_cmp(struct lpfc_hba *phba, struct 
lpfc_iocbq *cmdwqe,
if (tgtp)
atomic_inc(>xmt_fcp_rsp_error);
 
+   logerr = LOG_NVME_IOERR;
+
/* pick up SLI4 exhange busy condition */
if (bf_get(lpfc_wcqe_c_xb, wcqe)) {
ctxp->flag |= LPFC_NVMET_XBUSY;
+   logerr |= LOG_NVME_ABTS;
 
-   lpfc_printf_log(phba, KERN_INFO, LOG_NVME_ABTS,
-   "6315 IO Cmpl XBUSY: xri x%x: %x/%x\n",
-   ctxp->oxid, status, result);
} else {
ctxp->flag &= ~LPFC_NVMET_XBUSY;
}
 
+   lpfc_printf_log(phba, KERN_INFO, logerr,
+   "6315 IO Error Cmpl xri x%x: %x/%x XBUSY:x%x\n",
+   ctxp->oxid, status, result, ctxp->flag);
+
} else {
rsp->fcp_error = NVME_SC_SUCCESS;
if (op == NVMET_FCOP_RSP)
@@ -2353,7 +2357,7 @@ lpfc_nvmet_sol_fcp_abort_cmp(struct lpfc_hba *phba, 
struct lpfc_iocbq *cmdwqe,
spin_unlock_irqrestore(>ctxlock, flags);
atomic_inc(>xmt_abort_rsp);
 
-   lpfc_printf_log(phba, KERN_ERR, LOG_NVME_ABTS,
+   lpfc_printf_log(phba, KERN_INFO, LOG_NVME_ABTS,
"6165 ABORT cmpl: xri x%x flg x%x (%d) "
"WCQE: %08x %08x %08x