From patchwork Fri Nov 10 01:08:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 10052211 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 740DC6032D for ; Fri, 10 Nov 2017 01:08:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 675122B20E for ; Fri, 10 Nov 2017 01:08:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5C3422B227; Fri, 10 Nov 2017 01:08:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BD6902B20E for ; Fri, 10 Nov 2017 01:08:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755490AbdKJBIr (ORCPT ); Thu, 9 Nov 2017 20:08:47 -0500 Received: from mail-qk0-f194.google.com ([209.85.220.194]:53872 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755266AbdKJBIo (ORCPT ); Thu, 9 Nov 2017 20:08:44 -0500 Received: by mail-qk0-f194.google.com with SMTP id y23so10085685qkb.10 for ; Thu, 09 Nov 2017 17:08:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=xwJi8pR4aRmw5icEpEBtnzO5SssoJu8RFtbvZ8kTgtE=; b=uWzJgaWpbtbHSlZhVxQenZpD0/WAmgX62FQUeaZlQQZWuYDel0Ld2tPv6vZHCawM2s z0gtCvJgmruOmX281DSfd/zFFeRjl2NP/Aqd0AHOnGXH57JEZKvrkzFJjeApV3EA5e0d AB2zk40Aqd7DUdAsy08dGjDJ0oKs3pCXgSXfoe1/K7Fs3bHM5kBgunQ5Z/DsXESCZpQO LuQW62t730NRnGMzoGzcZwm9EzOSbjCnCUmjOWDgPJRW+eUmuPDnAIuzWXsDkXrrl0BJ wctRdE2KKmdFmJdh0+QQULX5uL8qMlv759FM1uvhNxYFWWYWVphRygrDdAlxaKzjDYV8 vBqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=xwJi8pR4aRmw5icEpEBtnzO5SssoJu8RFtbvZ8kTgtE=; b=EeOnvZvwt0eIYI30NcQBgXjtVwmHuKDGGOj8DTPTgGcv3h43QKmxp9Unff6n4RKJmK +huWr/7bCwSPfgm7Md72hjtRabQD6GcIpTn1zZFODvbwNuCFADwU5op3l2qoW9WMMFld Oh8OR/YFHLuvxu2S8/s3Wc4w4lJkT8euiK7vdYFeuXB3GFLlCYfEVOcK1alLiVsNRq64 wxZioEKq4+MCRD8PE5dX/EYQjRSPdGyYttDhhrBv2NvVDfdV9gEqPmfUPVuwgs6Ws2MX wmbpA9/nQZp3tEuv6HW36pdiK8l/b+fZnhPCXze/abASpB8aGhQPUPll66FHdSPNpIWJ zt5w== X-Gm-Message-State: AJaThX6bVGjWxi1IPGov6ExERvuK3tq9SZDMwqhVkrSmgn84qeI5T1mm m/RrcF7SIqr0WiFza2ub/bmFP9BV X-Google-Smtp-Source: AGs4zMank9WGBQBuZ/2BsMmnm59sT8ComJb2gHLQvAjQ8NRomHKCIdKppvpLqnpX9tKZCtQzz3lG2Q== X-Received: by 10.55.25.18 with SMTP id k18mr3933662qkh.336.1510276123556; Thu, 09 Nov 2017 17:08:43 -0800 (PST) Received: from pallmd1.broadcom.com ([192.19.255.250]) by smtp.gmail.com with ESMTPSA id j48sm5661969qta.96.2017.11.09.17.08.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Nov 2017 17:08:43 -0800 (PST) From: James Smart To: linux-scsi@vger.kernel.org Cc: James Smart , Dick Kennedy , James Smart Subject: [PATCH v2 01/17] lpfc: FLOGI failures are reported when connected to a private loop. Date: Thu, 9 Nov 2017 17:08:18 -0800 Message-Id: <20171110010834.4542-2-jsmart2021@gmail.com> X-Mailer: git-send-email 2.13.1 In-Reply-To: <20171110010834.4542-1-jsmart2021@gmail.com> References: <20171110010834.4542-1-jsmart2021@gmail.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When the HBA is connected to a private loop, the driver reports FLOGI loop-open failure as functional error. This is an expected condition. Mark loop-open failure as a warning instead of error. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke --- v2: Reworked printf. v1 printed 2 messages if not a loop open failure. This prints a single message if not a loop open failure. A single message still exists if a loop open failure if warnings enabled. --- drivers/scsi/lpfc/lpfc_els.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index b14f7c5653cd..c81cdc637e64 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -1030,30 +1030,31 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, stop_rr_fcf_flogi: /* FLOGI failure */ - lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, - "2858 FLOGI failure Status:x%x/x%x TMO:x%x " - "Data x%x x%x\n", - irsp->ulpStatus, irsp->un.ulpWord[4], - irsp->ulpTimeout, phba->hba_flag, - phba->fcf.fcf_flag); + if (!(irsp->ulpStatus == IOSTAT_LOCAL_REJECT && + ((irsp->un.ulpWord[4] & IOERR_PARAM_MASK) == + IOERR_LOOP_OPEN_FAILURE))) + lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, + "2858 FLOGI failure Status:x%x/x%x " + "TMO:x%x Data x%x x%x\n", + irsp->ulpStatus, irsp->un.ulpWord[4], + irsp->ulpTimeout, phba->hba_flag, + phba->fcf.fcf_flag); /* Check for retry */ if (lpfc_els_retry(phba, cmdiocb, rspiocb)) goto out; - /* FLOGI failure */ - lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, - "0100 FLOGI failure Status:x%x/x%x TMO:x%x\n", - irsp->ulpStatus, irsp->un.ulpWord[4], - irsp->ulpTimeout); - - /* If this is not a loop open failure, bail out */ if (!(irsp->ulpStatus == IOSTAT_LOCAL_REJECT && ((irsp->un.ulpWord[4] & IOERR_PARAM_MASK) == IOERR_LOOP_OPEN_FAILURE))) goto flogifail; + lpfc_printf_vlog(vport, KERN_WARNING, LOG_ELS, + "0150 FLOGI failure Status:x%x/x%x TMO:x%x\n", + irsp->ulpStatus, irsp->un.ulpWord[4], + irsp->ulpTimeout); + /* FLOGI failed, so there is no fabric */ spin_lock_irq(shost->host_lock); vport->fc_flag &= ~(FC_FABRIC | FC_PUBLIC_LOOP);