From patchwork Tue Nov 21 00:00:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 10067525 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 74CA160224 for ; Tue, 21 Nov 2017 00:01:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6712329194 for ; Tue, 21 Nov 2017 00:01:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5BFEB2923B; Tue, 21 Nov 2017 00:01:38 +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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI 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 0B42129194 for ; Tue, 21 Nov 2017 00:01:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751714AbdKUABh (ORCPT ); Mon, 20 Nov 2017 19:01:37 -0500 Received: from mail-qk0-f196.google.com ([209.85.220.196]:35851 "EHLO mail-qk0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751871AbdKUAAz (ORCPT ); Mon, 20 Nov 2017 19:00:55 -0500 Received: by mail-qk0-f196.google.com with SMTP id o6so9753335qkh.3 for ; Mon, 20 Nov 2017 16:00:54 -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=jbF0ozNb9Q0wJjmVQ7vh1lges2fWP9Bs0UfijkPsG0A=; b=LPFIA1teMXu6Yo8po7sKv9uizJZEP6BPkDdYsDaOKGDuNTFRVFHjmKaOcKyueJ0rWu fegtx/Ibqwn1eylw/QdyIg2mDkTThJpTvvRoqb7lztpoax3LOgFfJcpnjKhQHKrkfOyT JFs0cnNhqV75t7zg+dSuQC98EnsI706nlpEW9jYFaikbK/D1Yit9rAAHy1Yiwl6ohJtZ k4OMzqbzFwm4A8i9ksF76Ixea4bughLPvr6WiNb5o23v54GgOo2wNS0UERus+8Sqvzzw uyHtGLyw+aGfoQ+zJJYMIcVxeA7lmyeKKAYn6DZuz9IGQ2rDE/bPJ0E80AAkHfYeooxJ WCDg== 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=jbF0ozNb9Q0wJjmVQ7vh1lges2fWP9Bs0UfijkPsG0A=; b=odwqeu43GyV8IfWDNaBJ4NKY1TXKbzUQP/OwB0MDsj+ixgQOAE0m6nEdR0rGb5LBxd tpwrPeOYngo/9LcNag4WU673vO6o/bmIDZJdh5+Jpp3Uvk8eI6+bjij7+Vu3aVHzQHds efkVwtB68VPtR3q9PMaG0Y2D03X33dlmxnGk9D5ItKH++otP7mXNl7CByUkwde9hsSg7 kb+bayofjkvK23zZOFSiQ08BgKe/95pKTzWMmgSiiJwxuuNmfH24GKx0sNXza4OZY+Jq Bl+3AXoPpvpcy9cbVd8/BTDjgzKAv6SgdNzgdPNCd0zmbxuqKloOyFywW9PjTQwKFhTn yiUA== X-Gm-Message-State: AJaThX6ppqxJckywdERCRiNWCUCUWjIFhQciE/mkfF/u00ZePGsve5D/ L2M2YjLsapAc8f4srOxERWcZPiEJ X-Google-Smtp-Source: AGs4zMZ2Wosuvq28xl0AWo5tC8jR7t5+Att2gZQLo4OjCv4vVr8iShkJyMvhFmTT7+t5tEQ4z+5+Mw== X-Received: by 10.55.3.130 with SMTP id 124mr23277214qkd.197.1511222454169; Mon, 20 Nov 2017 16:00:54 -0800 (PST) Received: from pallmd1.broadcom.com ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id w143sm1612821qka.84.2017.11.20.16.00.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 20 Nov 2017 16:00:53 -0800 (PST) From: James Smart To: linux-scsi@vger.kernel.org Cc: James Smart , Dick Kennedy , James Smart Subject: [PATCH v3 01/17] lpfc: FLOGI failures are reported when connected to a private loop. Date: Mon, 20 Nov 2017 16:00:28 -0800 Message-Id: <20171121000044.27702-2-jsmart2021@gmail.com> X-Mailer: git-send-email 2.13.1 In-Reply-To: <20171121000044.27702-1-jsmart2021@gmail.com> References: <20171121000044.27702-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 --- 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);