From patchwork Thu May 21 17:55:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 6457991 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BD28EC0433 for ; Thu, 21 May 2015 17:55:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EC9CC2051D for ; Thu, 21 May 2015 17:55:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DAE9020522 for ; Thu, 21 May 2015 17:55:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964799AbbEURzc (ORCPT ); Thu, 21 May 2015 13:55:32 -0400 Received: from mail-qg0-f50.google.com ([209.85.192.50]:35681 "EHLO mail-qg0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964784AbbEURz1 (ORCPT ); Thu, 21 May 2015 13:55:27 -0400 Received: by qgew3 with SMTP id w3so45153231qge.2 for ; Thu, 21 May 2015 10:55:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:user-agent :mime-version:content-type:content-transfer-encoding; bh=CWL5THcdlZcGjnpv9Fk+pA2otkAzyI6AWcKbtZtGEdM=; b=XuHe6UVn18x1MdkNUaAvQTRkiWLR9qhEamySh7C+yiml9FBgBNCrNxjHrAVvbT0W+x ynlFlNQb1xdSkez5TUA6BnFgJFsqLlAxegEhhl/8LoNBaA5yVm5vM8blWx0n4XbXgt1u cfIU4Y3sx5iFyxee3iT+da8yvVgBkP49JsGEcvP132N9nVNlmuFmcGSXGadUUoliYGoN 9q8YYK6N6NiyIplqPUx7cjeetJA9PeWp0vJGfvCKuTITwpjYFsT2Ffv6tGXJoxyL8rCW FHfhyMaT8r04a4Y9yjbughNrtwTXYAPUzFNpDnjcMGKtcMEKwiKU6JKZnil3k1sgDk2G DLcw== X-Gm-Message-State: ALoCoQlmaZ+jY0ZGZKM1vf/rd5X2mhpj/5xviakoLAR88plqst624Lj9A3N9PZfs471zHNxUIR9v X-Received: by 10.55.20.141 with SMTP id 13mr9190549qku.30.1432230926885; Thu, 21 May 2015 10:55:26 -0700 (PDT) Received: from myfc17 (c-75-67-235-135.hsd1.nh.comcast.net. [75.67.235.135]) by mx.google.com with ESMTPSA id r31sm13762682qkr.42.2015.05.21.10.55.26 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 21 May 2015 10:55:26 -0700 (PDT) Date: Thu, 21 May 2015 13:55:22 -0400 From: james.smart@avagotech.com (James Smart) To: linux-scsi@vger.kernel.org Subject: [PATCH v2 07/15] lpfc: Correct reporting of vport state on fdisc command failure. Message-ID: <555e1c0a.KKafFC5Tv0GZ+C37%james.smart@avagotech.com> User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Correct reporting of vport state on fdisc command failure. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_els.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 724b61c..b490ef5 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -8237,7 +8237,8 @@ lpfc_cmpl_els_fdisc(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, lpfc_do_scr_ns_plogi(phba, vport); goto out; fdisc_failed: - lpfc_vport_set_state(vport, FC_VPORT_FAILED); + if (vport->fc_vport->vport_state != FC_VPORT_NO_FABRIC_RSCS) + lpfc_vport_set_state(vport, FC_VPORT_FAILED); /* Cancel discovery timer */ lpfc_can_disctmo(vport); lpfc_nlp_put(ndlp);