Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp17929602ybl; Thu, 2 Jan 2020 15:01:56 -0800 (PST) X-Google-Smtp-Source: APXvYqxNxQFZwcCt5Ko4FnPkpbNyx0TVmlu22lfHPyLe7xBy+9mQrdNdf43fOpdKmpriIrMLUUYg X-Received: by 2002:aca:72cd:: with SMTP id p196mr2977414oic.99.1578006116186; Thu, 02 Jan 2020 15:01:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578006116; cv=none; d=google.com; s=arc-20160816; b=fN4Stmx8rH2h+ajwvb9jjLEbM8Fj43pK20zntrjIq/krY+cnvf1qAmGL6HmmBLLUGd be+xq8ndcZ5DXJpLPGFaxRRh4EdBV9Zf5J07gmbZMT87B6JxkBsOzc/lDZi+yceUT2fD wBYEiFM2K3WbzJS5dminf5wP2s0adeeboJLwvR/T/ZR2qfyIhi3Zqo3NagSHlwsry23g +phkTkVpBYH3LxiDNvQmh0eswMgQ8j9hjSjy9McWzr56pg9Ii9ZREkoDgyLFs1KL4jSx z+xRC2LOjNkwNu20/lVCY9vzR50L4XzfJacdH2W7CdH3aTIu/fn0Zb2HlSwgBcRCI7Bl lSBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5i0SWewGCdIG3ArpNSdQ5pdF9aAkjdFy9rEbPwofhl4=; b=o65EQeDZ0H2FzVkdlKTcullWaDNCf0N1FNndNUsOl3rlvaTX7oJL1hqi2A3geDClLI gOAhmBpKpw5Ash/R6HBi69rK1sNR86KS68X2W7s8ZsgN5zAXYDqjufXQCemPojFfxKMS oKGOiPKG8DD/uI2GbI0BAmV6OQcJkMDIlIkPov9jf+5Ef+lmnd5SKMg62vsDA4xzkWzf 3uHndyoJrhyFS+gYPPATMcVX0Q4IddKUSWWfi4+WZACFCPhj6XGhoDbHVnrVNlQe+gHk ElsoQsQbeugkj2gMa2EZ+4ZdQN9zYggm+FHxSgCa9TZ789+4oUXxCsqIfMvntDvkbPIy 7XAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WhfVoDBc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e73si29449170oib.145.2020.01.02.15.01.44; Thu, 02 Jan 2020 15:01:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WhfVoDBc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727548AbgABWMs (ORCPT + 99 others); Thu, 2 Jan 2020 17:12:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:52024 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726667AbgABWMn (ORCPT ); Thu, 2 Jan 2020 17:12:43 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 86F9521D7D; Thu, 2 Jan 2020 22:12:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578003163; bh=zbbxOC3U+xaCh2dQifsmwgKsgtAVBpm/EUuz1h7kG/M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WhfVoDBcJ8QTLyRo2Pe0LFz01554CEEuPPW/DHoCx2aXB3T3nU7qlgvPOVXQLnpzC Nr8y/Np7QTcvGSI/q9jqI8n9qGd3Z2RDigbr7jfMg57JF0jt+jE7T11ggBhNjRsksj RmfP/zr82qq8YEyewISbyCbHGru6A4zpYjRQEwtA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dick Kennedy , James Smart , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 5.4 046/191] scsi: lpfc: Fix unexpected error messages during RSCN handling Date: Thu, 2 Jan 2020 23:05:28 +0100 Message-Id: <20200102215834.851129628@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102215829.911231638@linuxfoundation.org> References: <20200102215829.911231638@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: James Smart [ Upstream commit 2332e6e475b016e2026763f51333f84e2e6c57a3 ] During heavy RCN activity and log_verbose = 0 we see these messages: 2754 PRLI failure DID:521245 Status:x9/xb2c00, data: x0 0231 RSCN timeout Data: x0 x3 0230 Unexpected timeout, hba link state x5 This is due to delayed RSCN activity. Correct by avoiding the timeout thus the messages by restarting the discovery timeout whenever an rscn is received. Filter PRLI responses such that severity depends on whether expected for the configuration or not. For example, PRLI errors on a fabric will be informational (they are expected), but Point-to-Point errors are not necessarily expected so they are raised to an error level. Link: https://lore.kernel.org/r/20191105005708.7399-5-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/lpfc/lpfc_els.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index f293b48616ae..4794a58deaf3 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -2236,6 +2236,7 @@ lpfc_cmpl_els_prli(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, struct Scsi_Host *shost = lpfc_shost_from_vport(vport); IOCB_t *irsp; struct lpfc_nodelist *ndlp; + char *mode; /* we pass cmdiocb to state machine which needs rspiocb as well */ cmdiocb->context_un.rsp_iocb = rspiocb; @@ -2273,8 +2274,17 @@ lpfc_cmpl_els_prli(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, goto out; } + /* If we don't send GFT_ID to Fabric, a PRLI error + * could be expected. + */ + if ((vport->fc_flag & FC_FABRIC) || + (vport->cfg_enable_fc4_type != LPFC_ENABLE_BOTH)) + mode = KERN_ERR; + else + mode = KERN_INFO; + /* PRLI failed */ - lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, + lpfc_printf_vlog(vport, mode, LOG_ELS, "2754 PRLI failure DID:%06X Status:x%x/x%x, " "data: x%x\n", ndlp->nlp_DID, irsp->ulpStatus, @@ -6455,7 +6465,7 @@ lpfc_els_rcv_rscn(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb, uint32_t payload_len, length, nportid, *cmd; int rscn_cnt; int rscn_id = 0, hba_id = 0; - int i; + int i, tmo; pcmd = (struct lpfc_dmabuf *) cmdiocb->context2; lp = (uint32_t *) pcmd->virt; @@ -6561,6 +6571,13 @@ lpfc_els_rcv_rscn(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb, spin_lock_irq(shost->host_lock); vport->fc_flag |= FC_RSCN_DEFERRED; + + /* Restart disctmo if its already running */ + if (vport->fc_flag & FC_DISC_TMO) { + tmo = ((phba->fc_ratov * 3) + 3); + mod_timer(&vport->fc_disctmo, + jiffies + msecs_to_jiffies(1000 * tmo)); + } if ((rscn_cnt < FC_MAX_HOLD_RSCN) && !(vport->fc_flag & FC_RSCN_DISCOVERY)) { vport->fc_flag |= FC_RSCN_MODE; -- 2.20.1