From patchwork Fri Nov 3 22:56:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 10041287 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 DFF9A60384 for ; Fri, 3 Nov 2017 22:56:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D28BE299CE for ; Fri, 3 Nov 2017 22:56:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C735C299E1; Fri, 3 Nov 2017 22:56:42 +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 3D151299CE for ; Fri, 3 Nov 2017 22:56:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756062AbdKCW4k (ORCPT ); Fri, 3 Nov 2017 18:56:40 -0400 Received: from mail-qk0-f196.google.com ([209.85.220.196]:48790 "EHLO mail-qk0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756040AbdKCW4i (ORCPT ); Fri, 3 Nov 2017 18:56:38 -0400 Received: by mail-qk0-f196.google.com with SMTP id d67so5045394qkg.5 for ; Fri, 03 Nov 2017 15:56:38 -0700 (PDT) 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=COasje2xAXJOILQb9uLMgWvF+gNZ3OW7XB2hkm0SJoY=; b=uwxyQlFWIq6TlhqqbeAlRpwtGiGPl+ryMqzdLdhgx5paUzW2Brls0Bk02p5aPz26ty n8pa34x3mVKuh8XzpZv2PitVTTCOcCgTMhdhUoUXhqVgQo1xddZceJ+GGarRKizQnMZi tPnTeWmr6Fqoe1JcJlk5OktnRQZDgOKssPSpv8bcLL5eZo2mnghVf83+uPFDnJXyIKrD gOwzotvEvnBcumTHWIU/0ZZrZnEt8KsEW4mZEZUzcXsR0F8ONx+QQ1xVXafMTPlWloxU hm+5iN8wKsFdGy0MQE0fXQpFn7BZdeD7DkqioHhEpixCKooY33qsFCqDDqJ/TuP95XT5 J86g== 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=COasje2xAXJOILQb9uLMgWvF+gNZ3OW7XB2hkm0SJoY=; b=GhZocyT2cYrfTw4shwRCjZ9JCeUoW8Gzp/Khwh65HEZ6imPnuzArQ1VcaqME9CGc3p UmZvPMjiRXUWVfAKlsvTK0Z4uLKxfAiv0yt9+9lc/lU76GqRvSese9wYsbmZQ/lOwLqJ gqnsMnz6aLj+/CuWM/HzHAgie+YROvEZwJ9/XdChpGj43YBdsV6lZ43WdgXO/4c6bEYK 5JkWPf4ivhuH+ADazSzjcX18CIfM85iiQi1r+CuQBCo42MiYavP6iWavSp0VSS47+Cy/ Rfba472x7t3n0uuLbQbBLl8cEHoqjRKYoelxT9sJvZiFLbqMQVAQEUaovp3akR0nOkOh V+IQ== X-Gm-Message-State: AMCzsaVpvblC6RtIYlmIB7EICxgWEoyFrYnsIanWt2oLpBIKhfoZ2EUO kNeD59AhcFG7EvvmlzAfKLqMBPJQ X-Google-Smtp-Source: ABhQp+SgIHlqLwnaueHHxQqWKP83lr8BNir7XH+5/WjTFOMrgiuAjEC9t293+H38Jo659cRFg5pX8Q== X-Received: by 10.55.161.195 with SMTP id k186mr12051744qke.204.1509749798103; Fri, 03 Nov 2017 15:56:38 -0700 (PDT) Received: from pallmd1.broadcom.com ([192.19.255.250]) by smtp.gmail.com with ESMTPSA id v21sm4765626qtv.21.2017.11.03.15.56.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 03 Nov 2017 15:56:37 -0700 (PDT) From: James Smart To: linux-scsi@vger.kernel.org Cc: James Smart , Dick Kennedy , James Smart Subject: [PATCH 01/17] lpfc: FLOGI failures are reported when connected to a private loop. Date: Fri, 3 Nov 2017 15:56:12 -0700 Message-Id: <20171103225628.24716-2-jsmart2021@gmail.com> X-Mailer: git-send-email 2.13.1 In-Reply-To: <20171103225628.24716-1-jsmart2021@gmail.com> References: <20171103225628.24716-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 --- drivers/scsi/lpfc/lpfc_els.c | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index b14f7c5653cd..7df791047f55 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -1030,29 +1030,36 @@ 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))) + IOERR_LOOP_OPEN_FAILURE))) { + /* 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); 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);